@studious-lms/server 1.14.0 → 1.16.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.
Files changed (129) hide show
  1. package/dist/lib/inferDocumentFormat.d.ts +10 -0
  2. package/dist/lib/inferDocumentFormat.d.ts.map +1 -0
  3. package/dist/lib/inferDocumentFormat.js +48 -0
  4. package/dist/lib/inferDocumentFormat.js.map +1 -0
  5. package/dist/models/announcement.d.ts +45 -45
  6. package/dist/models/assignment.d.ts +75 -75
  7. package/dist/models/class.d.ts +13 -13
  8. package/dist/models/comment.d.ts +6 -6
  9. package/dist/models/conversation.d.ts +23 -23
  10. package/dist/models/event.d.ts +18 -18
  11. package/dist/models/file.d.ts +9 -9
  12. package/dist/models/labChat.d.ts +4 -4
  13. package/dist/models/message.d.ts +13 -13
  14. package/dist/models/newtonChat.d.ts +3 -3
  15. package/dist/models/notification.d.ts +4 -4
  16. package/dist/models/worksheet.d.ts +121 -121
  17. package/dist/pipelines/aiLabChat.d.ts +7 -1
  18. package/dist/pipelines/aiLabChat.d.ts.map +1 -1
  19. package/dist/pipelines/aiLabChat.js +145 -67
  20. package/dist/pipelines/aiLabChat.js.map +1 -1
  21. package/dist/pipelines/aiLabChatContract.d.ts +34 -195
  22. package/dist/pipelines/aiLabChatContract.d.ts.map +1 -1
  23. package/dist/pipelines/aiLabChatContract.js +9 -19
  24. package/dist/pipelines/aiLabChatContract.js.map +1 -1
  25. package/dist/pipelines/gradeWorksheet.d.ts +6 -6
  26. package/dist/pipelines/gradeWorksheet.d.ts.map +1 -1
  27. package/dist/pipelines/gradeWorksheet.js +75 -36
  28. package/dist/pipelines/gradeWorksheet.js.map +1 -1
  29. package/dist/pipelines/labChatPrompt.d.ts +8 -3
  30. package/dist/pipelines/labChatPrompt.d.ts.map +1 -1
  31. package/dist/pipelines/labChatPrompt.js +49 -14
  32. package/dist/pipelines/labChatPrompt.js.map +1 -1
  33. package/dist/pipelines/pdfToWorksheet.d.ts +1 -1
  34. package/dist/routers/_app.d.ts +524 -516
  35. package/dist/routers/_app.d.ts.map +1 -1
  36. package/dist/routers/announcement.d.ts +40 -40
  37. package/dist/routers/assignment.d.ts +121 -121
  38. package/dist/routers/class.d.ts +8 -8
  39. package/dist/routers/comment.d.ts +5 -5
  40. package/dist/routers/conversation.d.ts +6 -6
  41. package/dist/routers/discussion.d.ts +3 -3
  42. package/dist/routers/embedding.d.ts +6 -2
  43. package/dist/routers/embedding.d.ts.map +1 -1
  44. package/dist/routers/embedding.js +44 -36
  45. package/dist/routers/embedding.js.map +1 -1
  46. package/dist/routers/event.d.ts +18 -18
  47. package/dist/routers/file.d.ts +2 -2
  48. package/dist/routers/labChat.d.ts +3 -3
  49. package/dist/routers/notifications.d.ts +4 -4
  50. package/dist/routers/search.d.ts +2 -2
  51. package/dist/routers/worksheet.d.ts +44 -44
  52. package/dist/routes/aiStream.d.ts.map +1 -1
  53. package/dist/routes/aiStream.js +41 -11
  54. package/dist/routes/aiStream.js.map +1 -1
  55. package/dist/seedDatabase.d.ts +1 -1
  56. package/dist/services/aiChatStream.d.ts +18 -0
  57. package/dist/services/aiChatStream.d.ts.map +1 -1
  58. package/dist/services/aiChatStream.js +81 -11
  59. package/dist/services/aiChatStream.js.map +1 -1
  60. package/dist/services/aiModifierTools.d.ts +0 -16
  61. package/dist/services/aiModifierTools.d.ts.map +1 -1
  62. package/dist/services/aiModifierTools.js +112 -3
  63. package/dist/services/aiModifierTools.js.map +1 -1
  64. package/dist/services/aiProposalTools.d.ts.map +1 -1
  65. package/dist/services/aiProposalTools.js +25 -25
  66. package/dist/services/aiProposalTools.js.map +1 -1
  67. package/dist/services/announcement.d.ts +34 -34
  68. package/dist/services/assignment.d.ts +111 -111
  69. package/dist/services/assignment.d.ts.map +1 -1
  70. package/dist/services/assignment.js +4 -2
  71. package/dist/services/assignment.js.map +1 -1
  72. package/dist/services/class.d.ts +6 -6
  73. package/dist/services/class.d.ts.map +1 -1
  74. package/dist/services/class.js +7 -3
  75. package/dist/services/class.js.map +1 -1
  76. package/dist/services/comment.d.ts +5 -5
  77. package/dist/services/conversation.d.ts +6 -6
  78. package/dist/services/discussion.d.ts.map +1 -1
  79. package/dist/services/discussion.js +9 -2
  80. package/dist/services/discussion.js.map +1 -1
  81. package/dist/services/embedding.d.ts +19 -1
  82. package/dist/services/embedding.d.ts.map +1 -1
  83. package/dist/services/embedding.js +154 -8
  84. package/dist/services/embedding.js.map +1 -1
  85. package/dist/services/event.d.ts +18 -18
  86. package/dist/services/file.d.ts +4 -4
  87. package/dist/services/folder.d.ts.map +1 -1
  88. package/dist/services/folder.js +32 -2
  89. package/dist/services/folder.js.map +1 -1
  90. package/dist/services/labChat.d.ts +3 -3
  91. package/dist/services/notification.d.ts +4 -4
  92. package/dist/services/openaiDocumentGen.d.ts +25 -0
  93. package/dist/services/openaiDocumentGen.d.ts.map +1 -0
  94. package/dist/services/openaiDocumentGen.js +195 -0
  95. package/dist/services/openaiDocumentGen.js.map +1 -0
  96. package/dist/services/search.d.ts +1 -1
  97. package/dist/services/search.d.ts.map +1 -1
  98. package/dist/services/search.js +27 -2
  99. package/dist/services/search.js.map +1 -1
  100. package/dist/services/worksheet.d.ts +66 -49
  101. package/dist/services/worksheet.d.ts.map +1 -1
  102. package/dist/services/worksheet.js +48 -3
  103. package/dist/services/worksheet.js.map +1 -1
  104. package/dist/workers/processors/embedContent.d.ts.map +1 -1
  105. package/dist/workers/processors/embedContent.js +16 -25
  106. package/dist/workers/processors/embedContent.js.map +1 -1
  107. package/package.json +1 -1
  108. package/prisma/migrations/20260610140000_expand_embedding_source_types/migration.sql +4 -0
  109. package/prisma/schema.prisma +3 -0
  110. package/src/lib/inferDocumentFormat.ts +58 -0
  111. package/src/pipelines/aiLabChat.ts +185 -74
  112. package/src/pipelines/aiLabChatContract.ts +7 -17
  113. package/src/pipelines/gradeWorksheet.ts +95 -38
  114. package/src/pipelines/labChatPrompt.ts +61 -14
  115. package/src/routers/embedding.ts +44 -39
  116. package/src/routes/aiStream.ts +47 -9
  117. package/src/services/aiChatStream.ts +103 -8
  118. package/src/services/aiModifierTools.ts +154 -1
  119. package/src/services/aiProposalTools.ts +26 -25
  120. package/src/services/assignment.ts +3 -0
  121. package/src/services/class.ts +7 -1
  122. package/src/services/discussion.ts +13 -0
  123. package/src/services/embedding.ts +167 -6
  124. package/src/services/folder.ts +31 -0
  125. package/src/services/openaiDocumentGen.ts +237 -0
  126. package/src/services/search.ts +25 -1
  127. package/src/services/worksheet.ts +68 -1
  128. package/src/workers/processors/embedContent.ts +18 -22
  129. package/tests/unit/lib/inferDocumentFormat.test.ts +33 -0
@@ -4,42 +4,42 @@ export declare function findConversationsByUserId(userId: string): import("@pris
4
4
  id: string;
5
5
  title: string;
6
6
  } | null;
7
- members: ({
8
- user: {
7
+ messages: ({
8
+ sender: {
9
9
  id: string;
10
10
  username: string;
11
11
  profile: {
12
- profilePicture: string | null;
13
12
  displayName: string | null;
14
13
  } | null;
15
14
  };
16
15
  } & {
16
+ status: import(".prisma/client").$Enums.JobStatus | null;
17
+ meta: import("@prisma/client/runtime/library.js").JsonValue | null;
17
18
  id: string;
18
- userId: string;
19
+ createdAt: Date;
20
+ content: string;
21
+ senderId: string;
19
22
  conversationId: string;
20
- role: import(".prisma/client").$Enums.ConversationRole;
21
- joinedAt: Date;
22
- hiddenAt: Date | null;
23
- lastViewedAt: Date | null;
24
- lastViewedMentionAt: Date | null;
23
+ runJobId: string | null;
25
24
  })[];
26
- messages: ({
27
- sender: {
25
+ members: ({
26
+ user: {
28
27
  id: string;
29
28
  username: string;
30
29
  profile: {
30
+ profilePicture: string | null;
31
31
  displayName: string | null;
32
32
  } | null;
33
33
  };
34
34
  } & {
35
- status: import(".prisma/client").$Enums.JobStatus | null;
36
- meta: import("@prisma/client/runtime/library.js").JsonValue | null;
37
35
  id: string;
38
- createdAt: Date;
39
- content: string;
36
+ userId: string;
37
+ role: import(".prisma/client").$Enums.ConversationRole;
40
38
  conversationId: string;
41
- runJobId: string | null;
42
- senderId: string;
39
+ joinedAt: Date;
40
+ hiddenAt: Date | null;
41
+ lastViewedAt: Date | null;
42
+ lastViewedMentionAt: Date | null;
43
43
  })[];
44
44
  } & {
45
45
  type: import(".prisma/client").$Enums.ConversationType;
@@ -161,8 +161,8 @@ export declare function createConversation(data: {
161
161
  } & {
162
162
  id: string;
163
163
  userId: string;
164
- conversationId: string;
165
164
  role: import(".prisma/client").$Enums.ConversationRole;
165
+ conversationId: string;
166
166
  joinedAt: Date;
167
167
  hiddenAt: Date | null;
168
168
  lastViewedAt: Date | null;
@@ -214,8 +214,8 @@ export declare function findConversationByIdAndMember(conversationId: string, us
214
214
  } & {
215
215
  id: string;
216
216
  userId: string;
217
- conversationId: string;
218
217
  role: import(".prisma/client").$Enums.ConversationRole;
218
+ conversationId: string;
219
219
  joinedAt: Date;
220
220
  hiddenAt: Date | null;
221
221
  lastViewedAt: Date | null;
@@ -261,8 +261,8 @@ export declare function createConversationMember(data: {
261
261
  }, {}>, "ConversationMember", "create", never> & import("@prisma/client/runtime/library.js").PrismaPromise<{
262
262
  id: string;
263
263
  userId: string;
264
- conversationId: string;
265
264
  role: import(".prisma/client").$Enums.ConversationRole;
265
+ conversationId: string;
266
266
  joinedAt: Date;
267
267
  hiddenAt: Date | null;
268
268
  lastViewedAt: Date | null;
@@ -296,8 +296,8 @@ export declare function hideConversationMember(userId: string, conversationId: s
296
296
  }, {}>, "ConversationMember", "update", never> & import("@prisma/client/runtime/library.js").PrismaPromise<{
297
297
  id: string;
298
298
  userId: string;
299
- conversationId: string;
300
299
  role: import(".prisma/client").$Enums.ConversationRole;
300
+ conversationId: string;
301
301
  joinedAt: Date;
302
302
  hiddenAt: Date | null;
303
303
  lastViewedAt: Date | null;
@@ -331,8 +331,8 @@ export declare function unhideConversationMember(userId: string, conversationId:
331
331
  }, {}>, "ConversationMember", "update", never> & import("@prisma/client/runtime/library.js").PrismaPromise<{
332
332
  id: string;
333
333
  userId: string;
334
- conversationId: string;
335
334
  role: import(".prisma/client").$Enums.ConversationRole;
335
+ conversationId: string;
336
336
  joinedAt: Date;
337
337
  hiddenAt: Date | null;
338
338
  lastViewedAt: Date | null;
@@ -366,8 +366,8 @@ export declare function deleteConversationMember(userId: string, conversationId:
366
366
  }, {}>, "ConversationMember", "delete", never> & import("@prisma/client/runtime/library.js").PrismaPromise<{
367
367
  id: string;
368
368
  userId: string;
369
- conversationId: string;
370
369
  role: import(".prisma/client").$Enums.ConversationRole;
370
+ conversationId: string;
371
371
  joinedAt: Date;
372
372
  hiddenAt: Date | null;
373
373
  lastViewedAt: Date | null;
@@ -75,6 +75,11 @@ export declare function findEventById(id: string): import("@prisma/client/runtim
75
75
  title: string;
76
76
  dueDate: Date;
77
77
  maxGrade: number | null;
78
+ attachments: {
79
+ type: string;
80
+ id: string;
81
+ name: string;
82
+ }[];
78
83
  instructions: string;
79
84
  graded: boolean;
80
85
  weight: number;
@@ -82,11 +87,6 @@ export declare function findEventById(id: string): import("@prisma/client/runtim
82
87
  id: string;
83
88
  username: string;
84
89
  };
85
- attachments: {
86
- type: string;
87
- id: string;
88
- name: string;
89
- }[];
90
90
  }[];
91
91
  } & {
92
92
  id: string;
@@ -451,15 +451,15 @@ export declare function attachAssignmentToEvent(assignmentId: string, eventId: s
451
451
  id: string;
452
452
  name: string;
453
453
  } | null;
454
- teacher: {
455
- id: string;
456
- username: string;
457
- };
458
454
  attachments: {
459
455
  type: string;
460
456
  id: string;
461
457
  name: string;
462
458
  }[];
459
+ teacher: {
460
+ id: string;
461
+ username: string;
462
+ };
463
463
  } & {
464
464
  type: import(".prisma/client").$Enums.AssignmentType;
465
465
  id: string;
@@ -516,15 +516,15 @@ export declare function detachAssignmentFromEvent(assignmentId: string): import(
516
516
  id: string;
517
517
  name: string;
518
518
  } | null;
519
- teacher: {
520
- id: string;
521
- username: string;
522
- };
523
519
  attachments: {
524
520
  type: string;
525
521
  id: string;
526
522
  name: string;
527
523
  }[];
524
+ teacher: {
525
+ id: string;
526
+ username: string;
527
+ };
528
528
  } & {
529
529
  type: import(".prisma/client").$Enums.AssignmentType;
530
530
  id: string;
@@ -562,6 +562,11 @@ export declare function findAvailableAssignmentsForClass(classId: string): impor
562
562
  title: string;
563
563
  dueDate: Date;
564
564
  maxGrade: number | null;
565
+ attachments: {
566
+ type: string;
567
+ id: string;
568
+ name: string;
569
+ }[];
565
570
  instructions: string;
566
571
  graded: boolean;
567
572
  weight: number;
@@ -569,10 +574,5 @@ export declare function findAvailableAssignmentsForClass(classId: string): impor
569
574
  id: string;
570
575
  username: string;
571
576
  };
572
- attachments: {
573
- type: string;
574
- id: string;
575
- name: string;
576
- }[];
577
577
  }[]>;
578
578
  //# sourceMappingURL=event.d.ts.map
@@ -283,8 +283,8 @@ export declare function findFileById(fileId: string): import("@prisma/client/run
283
283
  id: string;
284
284
  createdAt: Date;
285
285
  assignmentId: string;
286
- modifiedAt: Date;
287
286
  studentId: string;
287
+ modifiedAt: Date;
288
288
  extendedResponse: string | null;
289
289
  gradeReceived: number | null;
290
290
  recommendationState: import(".prisma/client").$Enums.SubmissionRecommendationState;
@@ -379,8 +379,8 @@ export declare function findFileById(fileId: string): import("@prisma/client/run
379
379
  id: string;
380
380
  createdAt: Date;
381
381
  assignmentId: string;
382
- modifiedAt: Date;
383
382
  studentId: string;
383
+ modifiedAt: Date;
384
384
  extendedResponse: string | null;
385
385
  gradeReceived: number | null;
386
386
  recommendationState: import(".prisma/client").$Enums.SubmissionRecommendationState;
@@ -404,6 +404,7 @@ export declare function findFileById(fileId: string): import("@prisma/client/run
404
404
  submissionId: string | null;
405
405
  thumbnailId: string | null;
406
406
  annotationId: string | null;
407
+ conversationId: string | null;
407
408
  uploadStatus: import(".prisma/client").$Enums.UploadStatus;
408
409
  uploadUrl: string | null;
409
410
  uploadExpiresAt: Date | null;
@@ -415,7 +416,6 @@ export declare function findFileById(fileId: string): import("@prisma/client/run
415
416
  cleanupAt: Date | null;
416
417
  classDraftId: string | null;
417
418
  folderId: string | null;
418
- conversationId: string | null;
419
419
  messageId: string | null;
420
420
  announcementId: string | null;
421
421
  discussionId: string | null;
@@ -484,6 +484,7 @@ export declare function findFileWithFolder(fileId: string): import("@prisma/clie
484
484
  submissionId: string | null;
485
485
  thumbnailId: string | null;
486
486
  annotationId: string | null;
487
+ conversationId: string | null;
487
488
  uploadStatus: import(".prisma/client").$Enums.UploadStatus;
488
489
  uploadUrl: string | null;
489
490
  uploadExpiresAt: Date | null;
@@ -495,7 +496,6 @@ export declare function findFileWithFolder(fileId: string): import("@prisma/clie
495
496
  cleanupAt: Date | null;
496
497
  classDraftId: string | null;
497
498
  folderId: string | null;
498
- conversationId: string | null;
499
499
  messageId: string | null;
500
500
  announcementId: string | null;
501
501
  discussionId: string | null;
@@ -564,6 +564,7 @@ export declare function findFileWithFolderAndThumbnail(fileId: string): import("
564
564
  submissionId: string | null;
565
565
  thumbnailId: string | null;
566
566
  annotationId: string | null;
567
+ conversationId: string | null;
567
568
  uploadStatus: import(".prisma/client").$Enums.UploadStatus;
568
569
  uploadUrl: string | null;
569
570
  uploadExpiresAt: Date | null;
@@ -575,7 +576,6 @@ export declare function findFileWithFolderAndThumbnail(fileId: string): import("
575
576
  cleanupAt: Date | null;
576
577
  classDraftId: string | null;
577
578
  folderId: string | null;
578
- conversationId: string | null;
579
579
  messageId: string | null;
580
580
  announcementId: string | null;
581
581
  discussionId: string | null;
@@ -594,6 +594,7 @@ export declare function findFileWithFolderAndThumbnail(fileId: string): import("
594
594
  submissionId: string | null;
595
595
  thumbnailId: string | null;
596
596
  annotationId: string | null;
597
+ conversationId: string | null;
597
598
  uploadStatus: import(".prisma/client").$Enums.UploadStatus;
598
599
  uploadUrl: string | null;
599
600
  uploadExpiresAt: Date | null;
@@ -605,7 +606,6 @@ export declare function findFileWithFolderAndThumbnail(fileId: string): import("
605
606
  cleanupAt: Date | null;
606
607
  classDraftId: string | null;
607
608
  folderId: string | null;
608
- conversationId: string | null;
609
609
  messageId: string | null;
610
610
  announcementId: string | null;
611
611
  discussionId: string | null;
@@ -703,6 +703,7 @@ export declare function updateFileFolder(fileId: string, folderId: string): impo
703
703
  submissionId: string | null;
704
704
  thumbnailId: string | null;
705
705
  annotationId: string | null;
706
+ conversationId: string | null;
706
707
  uploadStatus: import(".prisma/client").$Enums.UploadStatus;
707
708
  uploadUrl: string | null;
708
709
  uploadExpiresAt: Date | null;
@@ -714,7 +715,6 @@ export declare function updateFileFolder(fileId: string, folderId: string): impo
714
715
  cleanupAt: Date | null;
715
716
  classDraftId: string | null;
716
717
  folderId: string | null;
717
- conversationId: string | null;
718
718
  messageId: string | null;
719
719
  announcementId: string | null;
720
720
  discussionId: string | null;
@@ -763,6 +763,7 @@ export declare function updateFileName(fileId: string, name: string): import("@p
763
763
  submissionId: string | null;
764
764
  thumbnailId: string | null;
765
765
  annotationId: string | null;
766
+ conversationId: string | null;
766
767
  uploadStatus: import(".prisma/client").$Enums.UploadStatus;
767
768
  uploadUrl: string | null;
768
769
  uploadExpiresAt: Date | null;
@@ -774,7 +775,6 @@ export declare function updateFileName(fileId: string, name: string): import("@p
774
775
  cleanupAt: Date | null;
775
776
  classDraftId: string | null;
776
777
  folderId: string | null;
777
- conversationId: string | null;
778
778
  messageId: string | null;
779
779
  announcementId: string | null;
780
780
  discussionId: string | null;
@@ -818,6 +818,7 @@ export declare function deleteFileById(fileId: string): import("@prisma/client/r
818
818
  submissionId: string | null;
819
819
  thumbnailId: string | null;
820
820
  annotationId: string | null;
821
+ conversationId: string | null;
821
822
  uploadStatus: import(".prisma/client").$Enums.UploadStatus;
822
823
  uploadUrl: string | null;
823
824
  uploadExpiresAt: Date | null;
@@ -829,7 +830,6 @@ export declare function deleteFileById(fileId: string): import("@prisma/client/r
829
830
  cleanupAt: Date | null;
830
831
  classDraftId: string | null;
831
832
  folderId: string | null;
832
- conversationId: string | null;
833
833
  messageId: string | null;
834
834
  announcementId: string | null;
835
835
  discussionId: string | null;
@@ -98,8 +98,8 @@ export declare function findLabChatByMember(labChatId: string, userId: string):
98
98
  } & {
99
99
  id: string;
100
100
  userId: string;
101
- conversationId: string;
102
101
  role: import(".prisma/client").$Enums.ConversationRole;
102
+ conversationId: string;
103
103
  joinedAt: Date;
104
104
  hiddenAt: Date | null;
105
105
  lastViewedAt: Date | null;
@@ -215,8 +215,8 @@ export declare function findLabChatById(labChatId: string): import("@prisma/clie
215
215
  } & {
216
216
  id: string;
217
217
  userId: string;
218
- conversationId: string;
219
218
  role: import(".prisma/client").$Enums.ConversationRole;
219
+ conversationId: string;
220
220
  joinedAt: Date;
221
221
  hiddenAt: Date | null;
222
222
  lastViewedAt: Date | null;
@@ -306,9 +306,9 @@ export declare function findLabChatsByClass(classId: string): import("@prisma/cl
306
306
  id: string;
307
307
  createdAt: Date;
308
308
  content: string;
309
+ senderId: string;
309
310
  conversationId: string;
310
311
  runJobId: string | null;
311
- senderId: string;
312
312
  })[];
313
313
  } & {
314
314
  type: import(".prisma/client").$Enums.ConversationType;
@@ -413,8 +413,8 @@ export declare function findLabChatForDelete(labChatId: string, userId: string):
413
413
  export declare function findMentionedMemberships(conversationId: string, userIds: string[]): import("@prisma/client/runtime/library.js").PrismaPromise<{
414
414
  id: string;
415
415
  userId: string;
416
- conversationId: string;
417
416
  role: import(".prisma/client").$Enums.ConversationRole;
417
+ conversationId: string;
418
418
  joinedAt: Date;
419
419
  hiddenAt: Date | null;
420
420
  lastViewedAt: Date | null;
@@ -51,8 +51,8 @@ export declare function findConversationMembership(conversationId: string, userI
51
51
  }, {}>, "ConversationMember", "findFirst", null> & import("@prisma/client/runtime/library.js").PrismaPromise<{
52
52
  id: string;
53
53
  userId: string;
54
- conversationId: string;
55
54
  role: import(".prisma/client").$Enums.ConversationRole;
55
+ conversationId: string;
56
56
  joinedAt: Date;
57
57
  hiddenAt: Date | null;
58
58
  lastViewedAt: Date | null;
@@ -77,6 +77,14 @@ export declare function findMessages(conversationId: string, options: {
77
77
  createdAt: Date;
78
78
  messageId: string;
79
79
  })[];
80
+ sender: {
81
+ id: string;
82
+ username: string;
83
+ profile: {
84
+ profilePicture: string | null;
85
+ displayName: string | null;
86
+ } | null;
87
+ };
80
88
  attachments: {
81
89
  path: string;
82
90
  type: string;
@@ -91,30 +99,22 @@ export declare function findMessages(conversationId: string, options: {
91
99
  thumbnailId: string | null;
92
100
  uploadStatus: import(".prisma/client").$Enums.UploadStatus;
93
101
  }[];
94
- sender: {
95
- id: string;
96
- username: string;
97
- profile: {
98
- profilePicture: string | null;
99
- displayName: string | null;
100
- } | null;
101
- };
102
102
  } & {
103
103
  status: import(".prisma/client").$Enums.JobStatus | null;
104
104
  meta: Prisma.JsonValue | null;
105
105
  id: string;
106
106
  createdAt: Date;
107
107
  content: string;
108
+ senderId: string;
108
109
  conversationId: string;
109
110
  runJobId: string | null;
110
- senderId: string;
111
111
  })[]>;
112
112
  /** @returns Memberships for mentioned users. */
113
113
  export declare function findMentionedMemberships(conversationId: string, userIds: string[]): import("@prisma/client/runtime/library.js").PrismaPromise<{
114
114
  id: string;
115
115
  userId: string;
116
- conversationId: string;
117
116
  role: import(".prisma/client").$Enums.ConversationRole;
117
+ conversationId: string;
118
118
  joinedAt: Date;
119
119
  hiddenAt: Date | null;
120
120
  lastViewedAt: Date | null;
@@ -160,9 +160,9 @@ export declare function findMessageById(messageId: string): import("@prisma/clie
160
160
  id: string;
161
161
  createdAt: Date;
162
162
  content: string;
163
+ senderId: string;
163
164
  conversationId: string;
164
165
  runJobId: string | null;
165
- senderId: string;
166
166
  }) | null>;
167
167
  /** @returns Message by ID with minimal sender. */
168
168
  export declare function findMessageByIdMinimal(messageId: string): import("@prisma/client/runtime/library.js").DynamicModelExtensionFluentApi<Prisma.TypeMap<import("@prisma/client/runtime/library.js").InternalArgs & {
@@ -200,9 +200,9 @@ export declare function findMessageByIdMinimal(messageId: string): import("@pris
200
200
  id: string;
201
201
  createdAt: Date;
202
202
  content: string;
203
+ senderId: string;
203
204
  conversationId: string;
204
205
  runJobId: string | null;
205
- senderId: string;
206
206
  }) | null>;
207
207
  /** Count messages in conversation after date, excluding sender's own. */
208
208
  export declare function countUnreadMessages(conversationId: string, userId: string, after?: Date): import("@prisma/client/runtime/library.js").PrismaPromise<number>;
@@ -65,8 +65,8 @@ export declare function findSubmissionByAssignmentAndStudent(assignmentId: strin
65
65
  id: string;
66
66
  createdAt: Date;
67
67
  assignmentId: string;
68
- modifiedAt: Date;
69
68
  studentId: string;
69
+ modifiedAt: Date;
70
70
  extendedResponse: string | null;
71
71
  gradeReceived: number | null;
72
72
  recommendationState: import(".prisma/client").$Enums.SubmissionRecommendationState;
@@ -117,8 +117,8 @@ export declare function findNewtonChatByIdAndMember(newtonChatId: string, userId
117
117
  id: string;
118
118
  createdAt: Date;
119
119
  assignmentId: string;
120
- modifiedAt: Date;
121
120
  studentId: string;
121
+ modifiedAt: Date;
122
122
  extendedResponse: string | null;
123
123
  gradeReceived: number | null;
124
124
  recommendationState: import(".prisma/client").$Enums.SubmissionRecommendationState;
@@ -145,8 +145,8 @@ export declare function findNewtonChatByIdAndMember(newtonChatId: string, userId
145
145
  export declare function findConversationMembersByUserIds(conversationId: string, userIds: string[]): import("@prisma/client/runtime/library.js").PrismaPromise<{
146
146
  id: string;
147
147
  userId: string;
148
- conversationId: string;
149
148
  role: import(".prisma/client").$Enums.ConversationRole;
149
+ conversationId: string;
150
150
  joinedAt: Date;
151
151
  hiddenAt: Date | null;
152
152
  lastViewedAt: Date | null;
@@ -11,9 +11,9 @@ export declare function findNotificationsByReceiverId(receiverId: string): impor
11
11
  createdAt: Date;
12
12
  title: string;
13
13
  content: string;
14
+ senderId: string | null;
14
15
  read: boolean;
15
16
  receiverId: string;
16
- senderId: string | null;
17
17
  })[]>;
18
18
  /** @returns Notification by ID. */
19
19
  export declare function findNotificationByIdForReceiver(id: string, receiverId: string): import("@prisma/client/runtime/library.js").DynamicModelExtensionFluentApi<import(".prisma/client").Prisma.TypeMap<import("@prisma/client/runtime/library.js").InternalArgs & {
@@ -52,9 +52,9 @@ export declare function findNotificationByIdForReceiver(id: string, receiverId:
52
52
  createdAt: Date;
53
53
  title: string;
54
54
  content: string;
55
+ senderId: string | null;
55
56
  read: boolean;
56
57
  receiverId: string;
57
- senderId: string | null;
58
58
  }) | null>;
59
59
  /** Create a notification for one receiver. */
60
60
  export declare function createNotification(data: {
@@ -90,9 +90,9 @@ export declare function createNotification(data: {
90
90
  createdAt: Date;
91
91
  title: string;
92
92
  content: string;
93
+ senderId: string | null;
93
94
  read: boolean;
94
95
  receiverId: string;
95
- senderId: string | null;
96
96
  }>;
97
97
  /** Create multiple notifications in one call. */
98
98
  export declare function createManyNotifications(data: Array<{
@@ -113,8 +113,8 @@ export declare function markNotificationAsReadForReceiver(id: string, receiverId
113
113
  createdAt: Date;
114
114
  title: string;
115
115
  content: string;
116
+ senderId: string | null;
116
117
  read: boolean;
117
118
  receiverId: string;
118
- senderId: string | null;
119
119
  }) | null>;
120
120
  //# sourceMappingURL=notification.d.ts.map