@studious-lms/server 1.13.0 → 1.14.0
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/.dockerignore +28 -0
- package/.env.example +5 -0
- package/.github/workflows/deploy.yml +123 -0
- package/Dockerfile +54 -0
- package/dist/index.js +5 -2
- package/dist/index.js.map +1 -1
- package/dist/lib/config/cors.d.ts.map +1 -1
- package/dist/lib/config/cors.js +31 -11
- package/dist/lib/config/cors.js.map +1 -1
- package/dist/lib/config/env.d.ts +17 -0
- package/dist/lib/config/env.d.ts.map +1 -1
- package/dist/lib/config/env.js +8 -2
- package/dist/lib/config/env.js.map +1 -1
- package/dist/lib/googleCloudStorage.d.ts +10 -0
- package/dist/lib/googleCloudStorage.d.ts.map +1 -1
- package/dist/lib/googleCloudStorage.js +22 -2
- package/dist/lib/googleCloudStorage.js.map +1 -1
- package/dist/lib/prisma.d.ts +104 -5
- package/dist/lib/prisma.d.ts.map +1 -1
- package/dist/lib/prisma.js +33 -2
- package/dist/lib/prisma.js.map +1 -1
- package/dist/models/agenda.d.ts +20 -20
- package/dist/models/announcement.d.ts +177 -69
- package/dist/models/announcement.d.ts.map +1 -1
- package/dist/models/assignment.d.ts +551 -353
- package/dist/models/assignment.d.ts.map +1 -1
- package/dist/models/attendance.d.ts +197 -71
- package/dist/models/attendance.d.ts.map +1 -1
- package/dist/models/auth.d.ts +348 -114
- package/dist/models/auth.d.ts.map +1 -1
- package/dist/models/class.d.ts +324 -198
- package/dist/models/class.d.ts.map +1 -1
- package/dist/models/class.js +2 -2
- package/dist/models/class.js.map +1 -1
- package/dist/models/cloudStorage.d.ts +146 -56
- package/dist/models/cloudStorage.d.ts.map +1 -1
- package/dist/models/comment.d.ts +267 -115
- package/dist/models/comment.d.ts.map +1 -1
- package/dist/models/conversation.d.ts +199 -73
- package/dist/models/conversation.d.ts.map +1 -1
- package/dist/models/department.d.ts +196 -70
- package/dist/models/department.d.ts.map +1 -1
- package/dist/models/event.d.ts +287 -125
- package/dist/models/event.d.ts.map +1 -1
- package/dist/models/file.d.ts +389 -263
- package/dist/models/file.d.ts.map +1 -1
- package/dist/models/folder.d.ts +433 -181
- package/dist/models/folder.d.ts.map +1 -1
- package/dist/models/labChat.d.ts +209 -83
- package/dist/models/labChat.d.ts.map +1 -1
- package/dist/models/marketing.d.ts +80 -26
- package/dist/models/marketing.d.ts.map +1 -1
- package/dist/models/message.d.ts +95 -41
- package/dist/models/message.d.ts.map +1 -1
- package/dist/models/newtonChat.d.ts +83 -29
- package/dist/models/newtonChat.d.ts.map +1 -1
- package/dist/models/notification.d.ts +61 -25
- package/dist/models/notification.d.ts.map +1 -1
- package/dist/models/school.d.ts +349 -133
- package/dist/models/school.d.ts.map +1 -1
- package/dist/models/section.d.ts +216 -72
- package/dist/models/section.d.ts.map +1 -1
- package/dist/models/tag.d.ts +156 -48
- package/dist/models/tag.d.ts.map +1 -1
- package/dist/models/user.d.ts +82 -28
- package/dist/models/user.d.ts.map +1 -1
- package/dist/models/worksheet.d.ts +1020 -411
- package/dist/models/worksheet.d.ts.map +1 -1
- package/dist/models/worksheet.js +8 -2
- package/dist/models/worksheet.js.map +1 -1
- package/dist/pipelines/aiLabChat.d.ts +0 -8
- package/dist/pipelines/aiLabChat.d.ts.map +1 -1
- package/dist/pipelines/aiLabChat.js +50 -67
- package/dist/pipelines/aiLabChat.js.map +1 -1
- package/dist/pipelines/aiLabChatContract.d.ts +393 -388
- package/dist/pipelines/aiLabChatContract.d.ts.map +1 -1
- package/dist/pipelines/aiLabChatContract.js +63 -69
- package/dist/pipelines/aiLabChatContract.js.map +1 -1
- package/dist/pipelines/aiNewtonChat.d.ts.map +1 -1
- package/dist/pipelines/aiNewtonChat.js +41 -41
- package/dist/pipelines/aiNewtonChat.js.map +1 -1
- package/dist/pipelines/gradeWorksheet.d.ts +8 -8
- package/dist/pipelines/labChatPrompt.d.ts +10 -8
- package/dist/pipelines/labChatPrompt.d.ts.map +1 -1
- package/dist/pipelines/labChatPrompt.js +47 -67
- package/dist/pipelines/labChatPrompt.js.map +1 -1
- package/dist/pipelines/pdfToWorksheet.d.ts +2 -2
- package/dist/routers/_app.d.ts +2203 -1957
- 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/admin.d.ts +13 -13
- package/dist/routers/agenda.d.ts +18 -18
- package/dist/routers/announcement.d.ts +32 -32
- package/dist/routers/assignment.d.ts +335 -335
- package/dist/routers/attendance.d.ts +10 -10
- package/dist/routers/auth.d.ts +2 -2
- package/dist/routers/class.d.ts +147 -147
- package/dist/routers/comment.d.ts +22 -22
- package/dist/routers/conversation.d.ts +17 -17
- package/dist/routers/department.d.ts +34 -34
- package/dist/routers/discussion.d.ts +65 -53
- package/dist/routers/discussion.d.ts.map +1 -1
- package/dist/routers/discussion.js +6 -2
- package/dist/routers/discussion.js.map +1 -1
- package/dist/routers/embedding.d.ts +69 -0
- package/dist/routers/embedding.d.ts.map +1 -0
- package/dist/routers/embedding.js +143 -0
- package/dist/routers/embedding.js.map +1 -0
- package/dist/routers/event.d.ts +39 -39
- package/dist/routers/file.d.ts +12 -12
- package/dist/routers/folder.d.ts +38 -38
- package/dist/routers/labChat.d.ts +19 -19
- package/dist/routers/marketing.d.ts +2 -2
- package/dist/routers/message.d.ts +13 -13
- package/dist/routers/newtonChat.d.ts +4 -4
- package/dist/routers/notifications.d.ts +9 -9
- package/dist/routers/permissions.d.ts +14 -14
- package/dist/routers/school.d.ts +55 -55
- package/dist/routers/search.d.ts +22 -1
- package/dist/routers/search.d.ts.map +1 -1
- package/dist/routers/search.js +9 -3
- package/dist/routers/search.js.map +1 -1
- package/dist/routers/section.d.ts +4 -4
- package/dist/routers/studentProgress.d.ts +1 -1
- package/dist/routers/tag.d.ts +7 -7
- package/dist/routers/user.d.ts +10 -10
- package/dist/routers/worksheet.d.ts +95 -57
- package/dist/routers/worksheet.d.ts.map +1 -1
- package/dist/routers/worksheet.js +26 -2
- package/dist/routers/worksheet.js.map +1 -1
- package/dist/routes/aiStream.d.ts +2 -0
- package/dist/routes/aiStream.d.ts.map +1 -0
- package/dist/routes/aiStream.js +696 -0
- package/dist/routes/aiStream.js.map +1 -0
- package/dist/seedDatabase.d.ts +2 -2
- package/dist/seedDatabase.js +6 -6
- package/dist/seedDatabase.js.map +1 -1
- package/dist/services/adminInstitution.d.ts +8 -8
- package/dist/services/adminRunJob.d.ts +4 -4
- package/dist/services/agenda.d.ts +18 -18
- package/dist/services/aiChatStream.d.ts +68 -0
- package/dist/services/aiChatStream.d.ts.map +1 -0
- package/dist/services/aiChatStream.js +157 -0
- package/dist/services/aiChatStream.js.map +1 -0
- package/dist/services/aiModifierTools.d.ts +32 -0
- package/dist/services/aiModifierTools.d.ts.map +1 -0
- package/dist/services/aiModifierTools.js +165 -0
- package/dist/services/aiModifierTools.js.map +1 -0
- package/dist/services/aiProposalTools.d.ts +32 -0
- package/dist/services/aiProposalTools.d.ts.map +1 -0
- package/dist/services/aiProposalTools.js +207 -0
- package/dist/services/aiProposalTools.js.map +1 -0
- package/dist/services/aiStream.d.ts +22 -0
- package/dist/services/aiStream.d.ts.map +1 -0
- package/dist/services/aiStream.js +142 -0
- package/dist/services/aiStream.js.map +1 -0
- package/dist/services/aiTools.d.ts +16 -0
- package/dist/services/aiTools.d.ts.map +1 -0
- package/dist/services/aiTools.js +271 -0
- package/dist/services/aiTools.js.map +1 -0
- package/dist/services/announcement.d.ts +12 -12
- package/dist/services/announcement.d.ts.map +1 -1
- package/dist/services/announcement.js +7 -2
- package/dist/services/announcement.js.map +1 -1
- package/dist/services/assignment.d.ts +293 -293
- package/dist/services/assignment.d.ts.map +1 -1
- package/dist/services/assignment.js +28 -9
- package/dist/services/assignment.js.map +1 -1
- package/dist/services/attendance.d.ts +10 -10
- package/dist/services/auth.d.ts +2 -2
- package/dist/services/class.d.ts +138 -138
- package/dist/services/class.d.ts.map +1 -1
- package/dist/services/class.js +19 -3
- package/dist/services/class.js.map +1 -1
- package/dist/services/comment.d.ts +22 -22
- package/dist/services/conversation.d.ts +17 -17
- package/dist/services/department.d.ts +33 -33
- package/dist/services/discussion.d.ts +58 -58
- package/dist/services/discussion.d.ts.map +1 -1
- package/dist/services/discussion.js +8 -8
- package/dist/services/discussion.js.map +1 -1
- package/dist/services/discussionSummary.d.ts +21 -0
- package/dist/services/discussionSummary.d.ts.map +1 -0
- package/dist/services/discussionSummary.js +179 -0
- package/dist/services/discussionSummary.js.map +1 -0
- package/dist/services/embedding.d.ts +67 -0
- package/dist/services/embedding.d.ts.map +1 -0
- package/dist/services/embedding.js +226 -0
- package/dist/services/embedding.js.map +1 -0
- package/dist/services/event.d.ts +37 -37
- package/dist/services/file.d.ts +24 -24
- package/dist/services/folder.d.ts +36 -36
- package/dist/services/labChat.d.ts +19 -19
- package/dist/services/marketing.d.ts +2 -2
- package/dist/services/message.d.ts +11 -11
- package/dist/services/message.d.ts.map +1 -1
- package/dist/services/message.js +2 -2
- package/dist/services/message.js.map +1 -1
- package/dist/services/newtonChat.d.ts +4 -4
- package/dist/services/notification.d.ts +9 -9
- package/dist/services/notification.d.ts.map +1 -1
- package/dist/services/permissions.d.ts +14 -14
- package/dist/services/school.d.ts +50 -50
- package/dist/services/search.d.ts +12 -0
- package/dist/services/search.d.ts.map +1 -1
- package/dist/services/search.js +120 -2
- package/dist/services/search.js.map +1 -1
- package/dist/services/section.d.ts +3 -3
- package/dist/services/tag.d.ts +4 -4
- package/dist/services/user.d.ts +4 -4
- package/dist/services/user.d.ts.map +1 -1
- package/dist/services/user.js +10 -15
- package/dist/services/user.js.map +1 -1
- package/dist/services/worksheet.d.ts +60 -48
- package/dist/services/worksheet.d.ts.map +1 -1
- package/dist/services/worksheet.js +11 -4
- package/dist/services/worksheet.js.map +1 -1
- package/dist/utils/streamBroadcast.d.ts +11 -0
- package/dist/utils/streamBroadcast.d.ts.map +1 -0
- package/dist/utils/streamBroadcast.js +32 -0
- package/dist/utils/streamBroadcast.js.map +1 -0
- package/dist/workers/connection.d.ts +15 -0
- package/dist/workers/connection.d.ts.map +1 -1
- package/dist/workers/connection.js +20 -2
- package/dist/workers/connection.js.map +1 -1
- package/dist/workers/index.js +4 -2
- package/dist/workers/index.js.map +1 -1
- package/dist/workers/processors/createRunJobWorker.d.ts.map +1 -1
- package/dist/workers/processors/createRunJobWorker.js +31 -8
- package/dist/workers/processors/createRunJobWorker.js.map +1 -1
- package/dist/workers/processors/embedContent.d.ts +8 -0
- package/dist/workers/processors/embedContent.d.ts.map +1 -0
- package/dist/workers/processors/embedContent.js +76 -0
- package/dist/workers/processors/embedContent.js.map +1 -0
- package/dist/workers/queues.d.ts +6 -0
- package/dist/workers/queues.d.ts.map +1 -1
- package/dist/workers/queues.js +5 -3
- package/dist/workers/queues.js.map +1 -1
- package/package.json +5 -1
- package/prisma/migrations/20260609215135_init/migration.sql +1412 -0
- package/prisma/migrations/20260610130000_add_worksheet_tags/migration.sql +13 -0
- package/prisma/schema.prisma +38 -7
- package/src/index.ts +4 -0
- package/src/lib/config/cors.ts +32 -9
- package/src/lib/config/env.ts +6 -0
- package/src/lib/googleCloudStorage.ts +21 -0
- package/src/lib/prisma.ts +40 -1
- package/src/models/class.ts +3 -2
- package/src/models/worksheet.ts +5 -2
- package/src/pipelines/aiLabChat.ts +54 -79
- package/src/pipelines/aiLabChatContract.ts +69 -69
- package/src/pipelines/aiNewtonChat.ts +46 -43
- package/src/pipelines/labChatPrompt.ts +63 -88
- package/src/routers/_app.ts +2 -0
- package/src/routers/discussion.ts +7 -0
- package/src/routers/embedding.ts +159 -0
- package/src/routers/search.ts +10 -1
- package/src/routers/worksheet.ts +27 -0
- package/src/routes/aiStream.ts +789 -0
- package/src/seedDatabase.ts +4 -4
- package/src/services/aiChatStream.ts +219 -0
- package/src/services/aiModifierTools.ts +188 -0
- package/src/services/aiProposalTools.ts +272 -0
- package/src/services/aiStream.ts +175 -0
- package/src/services/aiTools.ts +290 -0
- package/src/services/announcement.ts +7 -0
- package/src/services/assignment.ts +28 -7
- package/src/services/class.ts +20 -1
- package/src/services/discussion.ts +9 -8
- package/src/services/discussionSummary.ts +226 -0
- package/src/services/embedding.ts +285 -0
- package/src/services/message.ts +2 -2
- package/src/services/search.ts +138 -0
- package/src/services/user.ts +9 -17
- package/src/services/worksheet.ts +9 -2
- package/src/utils/streamBroadcast.ts +48 -0
- package/src/workers/connection.ts +19 -0
- package/src/workers/index.ts +2 -0
- package/src/workers/processors/createRunJobWorker.ts +32 -6
- package/src/workers/processors/embedContent.ts +90 -0
- package/src/workers/queues.ts +5 -1
- package/tests/unit/pipelines/aiLabChatContract.test.ts +38 -21
- package/tests/unit/pipelines/labChatPrompt.test.ts +23 -36
- package/prisma/migrations/20250807062924_init/migration.sql +0 -436
- package/prisma/migrations/20250919063704_init2/migration.sql +0 -24
- package/prisma/migrations/20250920143543_add_profile_fields/migration.sql +0 -15
- package/prisma/migrations/20250922165147_add_chat_models/migration.sql +0 -68
- package/prisma/migrations/20250922165314_add_chat_roles/migration.sql +0 -5
- package/prisma/migrations/20250922171242_refactor_notification_system/migration.sql +0 -20
- package/prisma/migrations/20250922172208_add_mentions_system/migration.sql +0 -21
- package/prisma/migrations/20250925072732_add_lab_chat_system/migration.sql +0 -25
- package/prisma/migrations/20251020151505_add_upload_tracking_fields/migration.sql +0 -57
- package/prisma/migrations/20251109122857_annuoncements_comments/migration.sql +0 -30
- package/prisma/migrations/20251109135555_reactions_announcements_comments/migration.sql +0 -35
- package/prisma/migrations/20260410124000_add_submission_recommendation_state/migration.sql +0 -14
- package/prisma/migrations/20260415103500_add_session_type/migration.sql +0 -33
- package/prisma/migrations/20260415133000_add_ai_usage_logs/migration.sql +0 -19
- package/prisma/migrations/20260417083000_add_conversation_member_hidden_at/migration.sql +0 -2
- package/prisma/migrations/20260502230500_assignment_submission_comments/migration.sql +0 -60
- package/prisma/migrations/20260504071500_school_memberships/migration.sql +0 -81
- package/prisma/migrations/20260506162500_consolidate_run_job_and_unify_job_status/migration.sql +0 -166
- package/prisma/migrations/20260509220000_institution_overhaul/migration.sql +0 -184
- package/prisma/migrations/20260510170000_add_folder_permissions/migration.sql +0 -93
- package/prisma/migrations/20260510183000_add_discussions/migration.sql +0 -151
- /package/.github/workflows/{npm.yml → npm-publish.yml} +0 -0
package/dist/models/comment.d.ts
CHANGED
|
@@ -41,66 +41,84 @@ export declare const commentSelect: {
|
|
|
41
41
|
};
|
|
42
42
|
};
|
|
43
43
|
/** @returns Comment by ID with author and reactions. */
|
|
44
|
-
export declare function findCommentById(id: string): import(".prisma/client").Prisma.
|
|
44
|
+
export declare function findCommentById(id: string): import("@prisma/client/runtime/library.js").DynamicModelExtensionFluentApi<import(".prisma/client").Prisma.TypeMap<import("@prisma/client/runtime/library.js").InternalArgs & {
|
|
45
|
+
result: {
|
|
46
|
+
userProfile: {
|
|
47
|
+
profilePicture: () => {
|
|
48
|
+
needs: {
|
|
49
|
+
profilePicture: true;
|
|
50
|
+
};
|
|
51
|
+
compute(profile: {
|
|
52
|
+
profilePicture: string | null;
|
|
53
|
+
}): string | null;
|
|
54
|
+
};
|
|
55
|
+
profilePictureThumbnail: () => {
|
|
56
|
+
needs: {
|
|
57
|
+
profilePictureThumbnail: true;
|
|
58
|
+
};
|
|
59
|
+
compute(profile: {
|
|
60
|
+
profilePictureThumbnail: string | null;
|
|
61
|
+
}): string | null;
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
model: {};
|
|
66
|
+
query: {};
|
|
67
|
+
client: {};
|
|
68
|
+
}, {}>, "Comment", "findUnique", null> & import("@prisma/client/runtime/library.js").PrismaPromise<{
|
|
45
69
|
id: string;
|
|
46
70
|
createdAt: Date;
|
|
47
|
-
assignmentId: string | null;
|
|
48
|
-
submissionId: string | null;
|
|
49
|
-
announcementId: string | null;
|
|
50
71
|
reactions: {
|
|
51
72
|
type: import(".prisma/client").$Enums.ReactionType;
|
|
52
73
|
user: {
|
|
53
74
|
id: string;
|
|
54
75
|
username: string;
|
|
55
76
|
profile: {
|
|
56
|
-
displayName: string | null;
|
|
57
77
|
profilePicture: string | null;
|
|
78
|
+
displayName: string | null;
|
|
58
79
|
profilePictureThumbnail: string | null;
|
|
59
80
|
} | null;
|
|
60
81
|
};
|
|
61
82
|
}[];
|
|
62
|
-
modifiedAt: Date | null;
|
|
63
83
|
content: string;
|
|
64
|
-
|
|
84
|
+
assignmentId: string | null;
|
|
85
|
+
submissionId: string | null;
|
|
86
|
+
modifiedAt: Date | null;
|
|
87
|
+
announcementId: string | null;
|
|
65
88
|
isPinned: boolean;
|
|
66
89
|
author: {
|
|
67
90
|
id: string;
|
|
68
91
|
username: string;
|
|
69
92
|
profile: {
|
|
70
|
-
displayName: string | null;
|
|
71
93
|
profilePicture: string | null;
|
|
94
|
+
displayName: string | null;
|
|
72
95
|
profilePictureThumbnail: string | null;
|
|
73
96
|
} | null;
|
|
74
97
|
};
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
db: {
|
|
78
|
-
url: string;
|
|
79
|
-
};
|
|
80
|
-
};
|
|
81
|
-
}>;
|
|
98
|
+
parentCommentId: string | null;
|
|
99
|
+
} | null>;
|
|
82
100
|
/** @returns Replies to a comment. */
|
|
83
|
-
export declare function findRepliesByCommentId(commentId: string): import("
|
|
101
|
+
export declare function findRepliesByCommentId(commentId: string): import("@prisma/client/runtime/library.js").PrismaPromise<({
|
|
84
102
|
author: {
|
|
85
103
|
id: string;
|
|
86
104
|
username: string;
|
|
87
105
|
profile: {
|
|
88
|
-
displayName: string | null;
|
|
89
106
|
profilePicture: string | null;
|
|
107
|
+
displayName: string | null;
|
|
90
108
|
profilePictureThumbnail: string | null;
|
|
91
109
|
} | null;
|
|
92
110
|
};
|
|
93
111
|
} & {
|
|
94
112
|
id: string;
|
|
95
113
|
createdAt: Date;
|
|
114
|
+
content: string;
|
|
96
115
|
assignmentId: string | null;
|
|
97
116
|
submissionId: string | null;
|
|
98
|
-
announcementId: string | null;
|
|
99
117
|
modifiedAt: Date | null;
|
|
100
|
-
|
|
118
|
+
announcementId: string | null;
|
|
101
119
|
authorId: string;
|
|
102
|
-
parentCommentId: string | null;
|
|
103
120
|
isPinned: boolean;
|
|
121
|
+
parentCommentId: string | null;
|
|
104
122
|
studentQuestionProgressId: string | null;
|
|
105
123
|
})[]>;
|
|
106
124
|
/** Create a comment (reply). */
|
|
@@ -112,116 +130,230 @@ export declare function createComment(data: {
|
|
|
112
130
|
assignmentId?: string | null;
|
|
113
131
|
submissionId?: string | null;
|
|
114
132
|
studentQuestionProgressId?: string | null;
|
|
115
|
-
}): import(".prisma/client").Prisma.
|
|
133
|
+
}): import("@prisma/client/runtime/library.js").DynamicModelExtensionFluentApi<import(".prisma/client").Prisma.TypeMap<import("@prisma/client/runtime/library.js").InternalArgs & {
|
|
134
|
+
result: {
|
|
135
|
+
userProfile: {
|
|
136
|
+
profilePicture: () => {
|
|
137
|
+
needs: {
|
|
138
|
+
profilePicture: true;
|
|
139
|
+
};
|
|
140
|
+
compute(profile: {
|
|
141
|
+
profilePicture: string | null;
|
|
142
|
+
}): string | null;
|
|
143
|
+
};
|
|
144
|
+
profilePictureThumbnail: () => {
|
|
145
|
+
needs: {
|
|
146
|
+
profilePictureThumbnail: true;
|
|
147
|
+
};
|
|
148
|
+
compute(profile: {
|
|
149
|
+
profilePictureThumbnail: string | null;
|
|
150
|
+
}): string | null;
|
|
151
|
+
};
|
|
152
|
+
};
|
|
153
|
+
};
|
|
154
|
+
model: {};
|
|
155
|
+
query: {};
|
|
156
|
+
client: {};
|
|
157
|
+
}, {}>, "Comment", "create", never> & import("@prisma/client/runtime/library.js").PrismaPromise<{
|
|
116
158
|
id: string;
|
|
117
159
|
createdAt: Date;
|
|
160
|
+
content: string;
|
|
118
161
|
assignmentId: string | null;
|
|
119
162
|
submissionId: string | null;
|
|
120
|
-
announcementId: string | null;
|
|
121
163
|
modifiedAt: Date | null;
|
|
122
|
-
|
|
164
|
+
announcementId: string | null;
|
|
123
165
|
authorId: string;
|
|
124
|
-
parentCommentId: string | null;
|
|
125
166
|
isPinned: boolean;
|
|
167
|
+
parentCommentId: string | null;
|
|
126
168
|
studentQuestionProgressId: string | null;
|
|
127
|
-
}, never, import("@prisma/client/runtime/library.js").DefaultArgs, {
|
|
128
|
-
datasources: {
|
|
129
|
-
db: {
|
|
130
|
-
url: string;
|
|
131
|
-
};
|
|
132
|
-
};
|
|
133
169
|
}>;
|
|
134
170
|
/** @returns User's reaction on a comment. */
|
|
135
|
-
export declare function findReactionByUserAndComment(userId: string, commentId: string): import(".prisma/client").Prisma.
|
|
171
|
+
export declare function findReactionByUserAndComment(userId: string, commentId: string): import("@prisma/client/runtime/library.js").DynamicModelExtensionFluentApi<import(".prisma/client").Prisma.TypeMap<import("@prisma/client/runtime/library.js").InternalArgs & {
|
|
172
|
+
result: {
|
|
173
|
+
userProfile: {
|
|
174
|
+
profilePicture: () => {
|
|
175
|
+
needs: {
|
|
176
|
+
profilePicture: true;
|
|
177
|
+
};
|
|
178
|
+
compute(profile: {
|
|
179
|
+
profilePicture: string | null;
|
|
180
|
+
}): string | null;
|
|
181
|
+
};
|
|
182
|
+
profilePictureThumbnail: () => {
|
|
183
|
+
needs: {
|
|
184
|
+
profilePictureThumbnail: true;
|
|
185
|
+
};
|
|
186
|
+
compute(profile: {
|
|
187
|
+
profilePictureThumbnail: string | null;
|
|
188
|
+
}): string | null;
|
|
189
|
+
};
|
|
190
|
+
};
|
|
191
|
+
};
|
|
192
|
+
model: {};
|
|
193
|
+
query: {};
|
|
194
|
+
client: {};
|
|
195
|
+
}, {}>, "Reaction", "findUnique", null> & import("@prisma/client/runtime/library.js").PrismaPromise<{
|
|
136
196
|
type: import(".prisma/client").$Enums.ReactionType;
|
|
137
197
|
id: string;
|
|
138
|
-
createdAt: Date;
|
|
139
198
|
userId: string;
|
|
199
|
+
createdAt: Date;
|
|
140
200
|
announcementId: string | null;
|
|
141
201
|
discussionId: string | null;
|
|
142
202
|
discussionReplyId: string | null;
|
|
143
203
|
commentId: string | null;
|
|
144
|
-
} | null
|
|
145
|
-
datasources: {
|
|
146
|
-
db: {
|
|
147
|
-
url: string;
|
|
148
|
-
};
|
|
149
|
-
};
|
|
150
|
-
}>;
|
|
204
|
+
} | null>;
|
|
151
205
|
/** Add or update reaction on a comment. */
|
|
152
206
|
export declare function upsertReaction(data: {
|
|
153
207
|
userId: string;
|
|
154
208
|
commentId: string;
|
|
155
209
|
type: string;
|
|
156
|
-
}): import(".prisma/client").Prisma.
|
|
210
|
+
}): import("@prisma/client/runtime/library.js").DynamicModelExtensionFluentApi<import(".prisma/client").Prisma.TypeMap<import("@prisma/client/runtime/library.js").InternalArgs & {
|
|
211
|
+
result: {
|
|
212
|
+
userProfile: {
|
|
213
|
+
profilePicture: () => {
|
|
214
|
+
needs: {
|
|
215
|
+
profilePicture: true;
|
|
216
|
+
};
|
|
217
|
+
compute(profile: {
|
|
218
|
+
profilePicture: string | null;
|
|
219
|
+
}): string | null;
|
|
220
|
+
};
|
|
221
|
+
profilePictureThumbnail: () => {
|
|
222
|
+
needs: {
|
|
223
|
+
profilePictureThumbnail: true;
|
|
224
|
+
};
|
|
225
|
+
compute(profile: {
|
|
226
|
+
profilePictureThumbnail: string | null;
|
|
227
|
+
}): string | null;
|
|
228
|
+
};
|
|
229
|
+
};
|
|
230
|
+
};
|
|
231
|
+
model: {};
|
|
232
|
+
query: {};
|
|
233
|
+
client: {};
|
|
234
|
+
}, {}>, "Reaction", "upsert", never> & import("@prisma/client/runtime/library.js").PrismaPromise<{
|
|
157
235
|
user: {
|
|
158
236
|
id: string;
|
|
159
237
|
username: string;
|
|
160
238
|
profile: {
|
|
161
|
-
displayName: string | null;
|
|
162
239
|
profilePicture: string | null;
|
|
240
|
+
displayName: string | null;
|
|
163
241
|
profilePictureThumbnail: string | null;
|
|
164
242
|
} | null;
|
|
165
243
|
};
|
|
166
244
|
} & {
|
|
167
245
|
type: import(".prisma/client").$Enums.ReactionType;
|
|
168
246
|
id: string;
|
|
169
|
-
createdAt: Date;
|
|
170
247
|
userId: string;
|
|
248
|
+
createdAt: Date;
|
|
171
249
|
announcementId: string | null;
|
|
172
250
|
discussionId: string | null;
|
|
173
251
|
discussionReplyId: string | null;
|
|
174
252
|
commentId: string | null;
|
|
175
|
-
}, never, import("@prisma/client/runtime/library.js").DefaultArgs, {
|
|
176
|
-
datasources: {
|
|
177
|
-
db: {
|
|
178
|
-
url: string;
|
|
179
|
-
};
|
|
180
|
-
};
|
|
181
253
|
}>;
|
|
182
254
|
/** Delete a reaction. */
|
|
183
|
-
export declare function deleteReactionById(id: string): import(".prisma/client").Prisma.
|
|
255
|
+
export declare function deleteReactionById(id: string): import("@prisma/client/runtime/library.js").DynamicModelExtensionFluentApi<import(".prisma/client").Prisma.TypeMap<import("@prisma/client/runtime/library.js").InternalArgs & {
|
|
256
|
+
result: {
|
|
257
|
+
userProfile: {
|
|
258
|
+
profilePicture: () => {
|
|
259
|
+
needs: {
|
|
260
|
+
profilePicture: true;
|
|
261
|
+
};
|
|
262
|
+
compute(profile: {
|
|
263
|
+
profilePicture: string | null;
|
|
264
|
+
}): string | null;
|
|
265
|
+
};
|
|
266
|
+
profilePictureThumbnail: () => {
|
|
267
|
+
needs: {
|
|
268
|
+
profilePictureThumbnail: true;
|
|
269
|
+
};
|
|
270
|
+
compute(profile: {
|
|
271
|
+
profilePictureThumbnail: string | null;
|
|
272
|
+
}): string | null;
|
|
273
|
+
};
|
|
274
|
+
};
|
|
275
|
+
};
|
|
276
|
+
model: {};
|
|
277
|
+
query: {};
|
|
278
|
+
client: {};
|
|
279
|
+
}, {}>, "Reaction", "delete", never> & import("@prisma/client/runtime/library.js").PrismaPromise<{
|
|
184
280
|
type: import(".prisma/client").$Enums.ReactionType;
|
|
185
281
|
id: string;
|
|
186
|
-
createdAt: Date;
|
|
187
282
|
userId: string;
|
|
283
|
+
createdAt: Date;
|
|
188
284
|
announcementId: string | null;
|
|
189
285
|
discussionId: string | null;
|
|
190
286
|
discussionReplyId: string | null;
|
|
191
287
|
commentId: string | null;
|
|
192
|
-
}, never, import("@prisma/client/runtime/library.js").DefaultArgs, {
|
|
193
|
-
datasources: {
|
|
194
|
-
db: {
|
|
195
|
-
url: string;
|
|
196
|
-
};
|
|
197
|
-
};
|
|
198
288
|
}>;
|
|
199
289
|
/** @returns Comment with announcement classId. */
|
|
200
|
-
export declare function findCommentWithAnnouncement(commentId: string): import(".prisma/client").Prisma.
|
|
290
|
+
export declare function findCommentWithAnnouncement(commentId: string): import("@prisma/client/runtime/library.js").DynamicModelExtensionFluentApi<import(".prisma/client").Prisma.TypeMap<import("@prisma/client/runtime/library.js").InternalArgs & {
|
|
291
|
+
result: {
|
|
292
|
+
userProfile: {
|
|
293
|
+
profilePicture: () => {
|
|
294
|
+
needs: {
|
|
295
|
+
profilePicture: true;
|
|
296
|
+
};
|
|
297
|
+
compute(profile: {
|
|
298
|
+
profilePicture: string | null;
|
|
299
|
+
}): string | null;
|
|
300
|
+
};
|
|
301
|
+
profilePictureThumbnail: () => {
|
|
302
|
+
needs: {
|
|
303
|
+
profilePictureThumbnail: true;
|
|
304
|
+
};
|
|
305
|
+
compute(profile: {
|
|
306
|
+
profilePictureThumbnail: string | null;
|
|
307
|
+
}): string | null;
|
|
308
|
+
};
|
|
309
|
+
};
|
|
310
|
+
};
|
|
311
|
+
model: {};
|
|
312
|
+
query: {};
|
|
313
|
+
client: {};
|
|
314
|
+
}, {}>, "Comment", "findUnique", null> & import("@prisma/client/runtime/library.js").PrismaPromise<({
|
|
201
315
|
announcement: {
|
|
202
316
|
classId: string;
|
|
203
317
|
} | null;
|
|
204
318
|
} & {
|
|
205
319
|
id: string;
|
|
206
320
|
createdAt: Date;
|
|
321
|
+
content: string;
|
|
207
322
|
assignmentId: string | null;
|
|
208
323
|
submissionId: string | null;
|
|
209
|
-
announcementId: string | null;
|
|
210
324
|
modifiedAt: Date | null;
|
|
211
|
-
|
|
325
|
+
announcementId: string | null;
|
|
212
326
|
authorId: string;
|
|
213
|
-
parentCommentId: string | null;
|
|
214
327
|
isPinned: boolean;
|
|
328
|
+
parentCommentId: string | null;
|
|
215
329
|
studentQuestionProgressId: string | null;
|
|
216
|
-
}) | null
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
330
|
+
}) | null>;
|
|
331
|
+
/** @returns Comment with the owning class context for authorization. */
|
|
332
|
+
export declare function findCommentWithContext(commentId: string): import("@prisma/client/runtime/library.js").DynamicModelExtensionFluentApi<import(".prisma/client").Prisma.TypeMap<import("@prisma/client/runtime/library.js").InternalArgs & {
|
|
333
|
+
result: {
|
|
334
|
+
userProfile: {
|
|
335
|
+
profilePicture: () => {
|
|
336
|
+
needs: {
|
|
337
|
+
profilePicture: true;
|
|
338
|
+
};
|
|
339
|
+
compute(profile: {
|
|
340
|
+
profilePicture: string | null;
|
|
341
|
+
}): string | null;
|
|
342
|
+
};
|
|
343
|
+
profilePictureThumbnail: () => {
|
|
344
|
+
needs: {
|
|
345
|
+
profilePictureThumbnail: true;
|
|
346
|
+
};
|
|
347
|
+
compute(profile: {
|
|
348
|
+
profilePictureThumbnail: string | null;
|
|
349
|
+
}): string | null;
|
|
350
|
+
};
|
|
220
351
|
};
|
|
221
352
|
};
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
|
|
353
|
+
model: {};
|
|
354
|
+
query: {};
|
|
355
|
+
client: {};
|
|
356
|
+
}, {}>, "Comment", "findUnique", null> & import("@prisma/client/runtime/library.js").PrismaPromise<({
|
|
225
357
|
assignment: {
|
|
226
358
|
class: {
|
|
227
359
|
school: {
|
|
@@ -238,6 +370,22 @@ export declare function findCommentWithContext(commentId: string): import(".pris
|
|
|
238
370
|
}[];
|
|
239
371
|
};
|
|
240
372
|
} | null;
|
|
373
|
+
announcement: {
|
|
374
|
+
class: {
|
|
375
|
+
school: {
|
|
376
|
+
memberships: {
|
|
377
|
+
userId: string;
|
|
378
|
+
}[];
|
|
379
|
+
} | null;
|
|
380
|
+
id: string;
|
|
381
|
+
teachers: {
|
|
382
|
+
id: string;
|
|
383
|
+
}[];
|
|
384
|
+
students: {
|
|
385
|
+
id: string;
|
|
386
|
+
}[];
|
|
387
|
+
};
|
|
388
|
+
} | null;
|
|
241
389
|
submission: {
|
|
242
390
|
assignment: {
|
|
243
391
|
class: {
|
|
@@ -257,24 +405,7 @@ export declare function findCommentWithContext(commentId: string): import(".pris
|
|
|
257
405
|
};
|
|
258
406
|
studentId: string;
|
|
259
407
|
} | null;
|
|
260
|
-
announcement: {
|
|
261
|
-
class: {
|
|
262
|
-
school: {
|
|
263
|
-
memberships: {
|
|
264
|
-
userId: string;
|
|
265
|
-
}[];
|
|
266
|
-
} | null;
|
|
267
|
-
id: string;
|
|
268
|
-
teachers: {
|
|
269
|
-
id: string;
|
|
270
|
-
}[];
|
|
271
|
-
students: {
|
|
272
|
-
id: string;
|
|
273
|
-
}[];
|
|
274
|
-
};
|
|
275
|
-
} | null;
|
|
276
408
|
studentQuestionProgress: {
|
|
277
|
-
studentId: string;
|
|
278
409
|
studentWorksheetResponse: {
|
|
279
410
|
submission: {
|
|
280
411
|
assignment: {
|
|
@@ -296,6 +427,7 @@ export declare function findCommentWithContext(commentId: string): import(".pris
|
|
|
296
427
|
studentId: string;
|
|
297
428
|
} | null;
|
|
298
429
|
} | null;
|
|
430
|
+
studentId: string;
|
|
299
431
|
} | null;
|
|
300
432
|
parentComment: ({
|
|
301
433
|
assignment: {
|
|
@@ -314,6 +446,22 @@ export declare function findCommentWithContext(commentId: string): import(".pris
|
|
|
314
446
|
}[];
|
|
315
447
|
};
|
|
316
448
|
} | null;
|
|
449
|
+
announcement: {
|
|
450
|
+
class: {
|
|
451
|
+
school: {
|
|
452
|
+
memberships: {
|
|
453
|
+
userId: string;
|
|
454
|
+
}[];
|
|
455
|
+
} | null;
|
|
456
|
+
id: string;
|
|
457
|
+
teachers: {
|
|
458
|
+
id: string;
|
|
459
|
+
}[];
|
|
460
|
+
students: {
|
|
461
|
+
id: string;
|
|
462
|
+
}[];
|
|
463
|
+
};
|
|
464
|
+
} | null;
|
|
317
465
|
submission: {
|
|
318
466
|
assignment: {
|
|
319
467
|
class: {
|
|
@@ -333,24 +481,7 @@ export declare function findCommentWithContext(commentId: string): import(".pris
|
|
|
333
481
|
};
|
|
334
482
|
studentId: string;
|
|
335
483
|
} | null;
|
|
336
|
-
announcement: {
|
|
337
|
-
class: {
|
|
338
|
-
school: {
|
|
339
|
-
memberships: {
|
|
340
|
-
userId: string;
|
|
341
|
-
}[];
|
|
342
|
-
} | null;
|
|
343
|
-
id: string;
|
|
344
|
-
teachers: {
|
|
345
|
-
id: string;
|
|
346
|
-
}[];
|
|
347
|
-
students: {
|
|
348
|
-
id: string;
|
|
349
|
-
}[];
|
|
350
|
-
};
|
|
351
|
-
} | null;
|
|
352
484
|
studentQuestionProgress: {
|
|
353
|
-
studentId: string;
|
|
354
485
|
studentWorksheetResponse: {
|
|
355
486
|
submission: {
|
|
356
487
|
assignment: {
|
|
@@ -372,41 +503,60 @@ export declare function findCommentWithContext(commentId: string): import(".pris
|
|
|
372
503
|
studentId: string;
|
|
373
504
|
} | null;
|
|
374
505
|
} | null;
|
|
506
|
+
studentId: string;
|
|
375
507
|
} | null;
|
|
376
508
|
} & {
|
|
377
509
|
id: string;
|
|
378
510
|
createdAt: Date;
|
|
511
|
+
content: string;
|
|
379
512
|
assignmentId: string | null;
|
|
380
513
|
submissionId: string | null;
|
|
381
|
-
announcementId: string | null;
|
|
382
514
|
modifiedAt: Date | null;
|
|
383
|
-
|
|
515
|
+
announcementId: string | null;
|
|
384
516
|
authorId: string;
|
|
385
|
-
parentCommentId: string | null;
|
|
386
517
|
isPinned: boolean;
|
|
518
|
+
parentCommentId: string | null;
|
|
387
519
|
studentQuestionProgressId: string | null;
|
|
388
520
|
}) | null;
|
|
389
521
|
} & {
|
|
390
522
|
id: string;
|
|
391
523
|
createdAt: Date;
|
|
524
|
+
content: string;
|
|
392
525
|
assignmentId: string | null;
|
|
393
526
|
submissionId: string | null;
|
|
394
|
-
announcementId: string | null;
|
|
395
527
|
modifiedAt: Date | null;
|
|
396
|
-
|
|
528
|
+
announcementId: string | null;
|
|
397
529
|
authorId: string;
|
|
398
|
-
parentCommentId: string | null;
|
|
399
530
|
isPinned: boolean;
|
|
531
|
+
parentCommentId: string | null;
|
|
400
532
|
studentQuestionProgressId: string | null;
|
|
401
|
-
}) | null
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
533
|
+
}) | null>;
|
|
534
|
+
/** @returns Reaction counts by type for a comment. */
|
|
535
|
+
export declare function getReactionCountsByCommentId(commentId: string): import("@prisma/client/runtime/library.js").PrismaPromise<(import("@prisma/client/runtime/library.js").GetAggregateResult<import(".prisma/client").Prisma.$ReactionPayload<import("@prisma/client/runtime/library.js").InternalArgs & {
|
|
536
|
+
result: {
|
|
537
|
+
userProfile: {
|
|
538
|
+
profilePicture: () => {
|
|
539
|
+
needs: {
|
|
540
|
+
profilePicture: true;
|
|
541
|
+
};
|
|
542
|
+
compute(profile: {
|
|
543
|
+
profilePicture: string | null;
|
|
544
|
+
}): string | null;
|
|
545
|
+
};
|
|
546
|
+
profilePictureThumbnail: () => {
|
|
547
|
+
needs: {
|
|
548
|
+
profilePictureThumbnail: true;
|
|
549
|
+
};
|
|
550
|
+
compute(profile: {
|
|
551
|
+
profilePictureThumbnail: string | null;
|
|
552
|
+
}): string | null;
|
|
553
|
+
};
|
|
405
554
|
};
|
|
406
555
|
};
|
|
407
|
-
}
|
|
408
|
-
|
|
409
|
-
|
|
556
|
+
model: {};
|
|
557
|
+
query: {};
|
|
558
|
+
client: {};
|
|
559
|
+
}>, {
|
|
410
560
|
by: "type"[];
|
|
411
561
|
where: {
|
|
412
562
|
commentId: string;
|
|
@@ -414,5 +564,7 @@ export declare function getReactionCountsByCommentId(commentId: string): import(
|
|
|
414
564
|
_count: {
|
|
415
565
|
type: true;
|
|
416
566
|
};
|
|
417
|
-
}
|
|
567
|
+
}> & {
|
|
568
|
+
type: import(".prisma/client").$Enums.ReactionType;
|
|
569
|
+
})[]>;
|
|
418
570
|
//# sourceMappingURL=comment.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"comment.d.ts","sourceRoot":"/","sources":["models/comment.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyChB,CAAC;AAmBX,wDAAwD;AACxD,wBAAgB,eAAe,CAAC,EAAE,EAAE,MAAM
|
|
1
|
+
{"version":3,"file":"comment.d.ts","sourceRoot":"/","sources":["models/comment.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyChB,CAAC;AAmBX,wDAAwD;AACxD,wBAAgB,eAAe,CAAC,EAAE,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAKzC;AAED,qCAAqC;AACrC,wBAAgB,sBAAsB,CAAC,SAAS,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;MAmBvD;AAED,gCAAgC;AAChC,wBAAgB,aAAa,CAAC,IAAI,EAAE;IAClC,eAAe,EAAE,MAAM,CAAC;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,yBAAyB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAIA;AAED,6CAA6C;AAC7C,wBAAgB,4BAA4B,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAM7E;AAED,2CAA2C;AAC3C,wBAAgB,cAAc,CAAC,IAAI,EAAE;IACnC,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;CACd;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BA;AAED,yBAAyB;AACzB,wBAAgB,kBAAkB,CAAC,EAAE,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAI5C;AAED,kDAAkD;AAClD,wBAAgB,2BAA2B,CAAC,SAAS,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WAO5D;AAED,wEAAwE;AACxE,wBAAgB,sBAAsB,CAAC,SAAS,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WAwGvD;AAED,sDAAsD;AACtD,wBAAgB,4BAA4B,CAAC,SAAS,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAM7D"}
|