@studious-lms/server 1.13.0 → 1.15.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/instrument.js +3 -3
- package/dist/instrument.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/inferDocumentFormat.d.ts +10 -0
- package/dist/lib/inferDocumentFormat.d.ts.map +1 -0
- package/dist/lib/inferDocumentFormat.js +48 -0
- package/dist/lib/inferDocumentFormat.js.map +1 -0
- package/dist/lib/legal.d.ts +3 -0
- package/dist/lib/legal.d.ts.map +1 -0
- package/dist/lib/legal.js +6 -0
- package/dist/lib/legal.js.map +1 -0
- 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 +211 -101
- package/dist/models/announcement.d.ts.map +1 -1
- package/dist/models/assignment.d.ts +560 -362
- 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 +356 -114
- package/dist/models/auth.d.ts.map +1 -1
- package/dist/models/auth.js +4 -2
- package/dist/models/auth.js.map +1 -1
- package/dist/models/class.d.ts +327 -201
- 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 +262 -110
- package/dist/models/comment.d.ts.map +1 -1
- package/dist/models/conversation.d.ts +206 -80
- 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 +305 -141
- package/dist/models/event.d.ts.map +1 -1
- package/dist/models/file.d.ts +422 -272
- 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 +205 -79
- package/dist/models/labChat.d.ts.map +1 -1
- package/dist/models/marketing.d.ts +79 -38
- package/dist/models/marketing.d.ts.map +1 -1
- package/dist/models/marketing.js +12 -4
- package/dist/models/marketing.js.map +1 -1
- package/dist/models/message.d.ts +97 -43
- package/dist/models/message.d.ts.map +1 -1
- package/dist/models/newtonChat.d.ts +84 -30
- package/dist/models/newtonChat.d.ts.map +1 -1
- package/dist/models/notification.d.ts +57 -21
- 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 +1032 -423
- 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 +7 -9
- package/dist/pipelines/aiLabChat.d.ts.map +1 -1
- package/dist/pipelines/aiLabChat.js +194 -125
- package/dist/pipelines/aiLabChat.js.map +1 -1
- package/dist/pipelines/aiLabChatContract.d.ts +233 -389
- package/dist/pipelines/aiLabChatContract.d.ts.map +1 -1
- package/dist/pipelines/aiLabChatContract.js +54 -70
- 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 +18 -11
- package/dist/pipelines/labChatPrompt.d.ts.map +1 -1
- package/dist/pipelines/labChatPrompt.js +93 -75
- package/dist/pipelines/labChatPrompt.js.map +1 -1
- package/dist/pipelines/pdfToWorksheet.d.ts +1 -1
- package/dist/routers/_app.d.ts +2601 -2151
- 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 +60 -60
- package/dist/routers/assignment.d.ts +393 -383
- package/dist/routers/assignment.d.ts.map +1 -1
- package/dist/routers/attendance.d.ts +10 -10
- package/dist/routers/auth.d.ts +4 -2
- package/dist/routers/auth.d.ts.map +1 -1
- package/dist/routers/auth.js +15 -2
- package/dist/routers/auth.js.map +1 -1
- package/dist/routers/class.d.ts +157 -153
- package/dist/routers/class.d.ts.map +1 -1
- package/dist/routers/comment.d.ts +18 -18
- package/dist/routers/conversation.d.ts +11 -11
- package/dist/routers/department.d.ts +34 -34
- package/dist/routers/discussion.d.ts +68 -56
- 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 +73 -0
- package/dist/routers/embedding.d.ts.map +1 -0
- package/dist/routers/embedding.js +151 -0
- package/dist/routers/embedding.js.map +1 -0
- package/dist/routers/event.d.ts +57 -55
- package/dist/routers/event.d.ts.map +1 -1
- package/dist/routers/file.d.ts +14 -14
- package/dist/routers/folder.d.ts +38 -38
- package/dist/routers/labChat.d.ts +16 -16
- package/dist/routers/marketing.d.ts +1 -14
- package/dist/routers/marketing.d.ts.map +1 -1
- package/dist/routers/message.d.ts +13 -13
- package/dist/routers/newtonChat.d.ts +4 -4
- package/dist/routers/notifications.d.ts +5 -5
- package/dist/routers/permissions.d.ts +14 -14
- package/dist/routers/school.d.ts +59 -55
- package/dist/routers/school.d.ts.map +1 -1
- 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 +99 -10
- package/dist/routers/user.d.ts.map +1 -1
- package/dist/routers/user.js +19 -2
- package/dist/routers/user.js.map +1 -1
- package/dist/routers/worksheet.d.ts +93 -55
- 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 +726 -0
- package/dist/routes/aiStream.js.map +1 -0
- package/dist/seedDatabase.d.ts +3 -1
- package/dist/seedDatabase.d.ts.map +1 -1
- 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 +88 -0
- package/dist/services/aiChatStream.d.ts.map +1 -0
- package/dist/services/aiChatStream.js +254 -0
- package/dist/services/aiChatStream.js.map +1 -0
- package/dist/services/aiModifierTools.d.ts +16 -0
- package/dist/services/aiModifierTools.d.ts.map +1 -0
- package/dist/services/aiModifierTools.js +274 -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 +42 -42
- 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 +355 -345
- package/dist/services/assignment.d.ts.map +1 -1
- package/dist/services/assignment.js +30 -9
- package/dist/services/assignment.js.map +1 -1
- package/dist/services/attendance.d.ts +10 -10
- package/dist/services/auth.d.ts +4 -2
- package/dist/services/auth.d.ts.map +1 -1
- package/dist/services/auth.js +13 -4
- package/dist/services/auth.js.map +1 -1
- package/dist/services/class.d.ts +146 -142
- package/dist/services/class.d.ts.map +1 -1
- package/dist/services/class.js +24 -4
- package/dist/services/class.js.map +1 -1
- package/dist/services/comment.d.ts +18 -18
- package/dist/services/conversation.d.ts +11 -11
- 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 +15 -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 +85 -0
- package/dist/services/embedding.d.ts.map +1 -0
- package/dist/services/embedding.js +372 -0
- package/dist/services/embedding.js.map +1 -0
- package/dist/services/event.d.ts +55 -53
- package/dist/services/event.d.ts.map +1 -1
- package/dist/services/file.d.ts +28 -28
- package/dist/services/folder.d.ts +36 -36
- package/dist/services/folder.d.ts.map +1 -1
- package/dist/services/folder.js +32 -2
- package/dist/services/folder.js.map +1 -1
- package/dist/services/labChat.d.ts +16 -16
- package/dist/services/marketing.d.ts +2 -15
- package/dist/services/marketing.d.ts.map +1 -1
- package/dist/services/marketing.js +5 -5
- package/dist/services/marketing.js.map +1 -1
- 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 +5 -5
- package/dist/services/notification.d.ts.map +1 -1
- package/dist/services/openaiDocumentGen.d.ts +37 -0
- package/dist/services/openaiDocumentGen.d.ts.map +1 -0
- package/dist/services/openaiDocumentGen.js +262 -0
- package/dist/services/openaiDocumentGen.js.map +1 -0
- package/dist/services/permissions.d.ts +14 -14
- package/dist/services/school.d.ts +54 -50
- package/dist/services/school.d.ts.map +1 -1
- package/dist/services/search.d.ts +13 -1
- package/dist/services/search.d.ts.map +1 -1
- package/dist/services/search.js +145 -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/userPrivacy.d.ts +86 -0
- package/dist/services/userPrivacy.d.ts.map +1 -0
- package/dist/services/userPrivacy.js +184 -0
- package/dist/services/userPrivacy.js.map +1 -0
- package/dist/services/worksheet.d.ts +86 -57
- package/dist/services/worksheet.d.ts.map +1 -1
- package/dist/services/worksheet.js +57 -5
- package/dist/services/worksheet.js.map +1 -1
- package/dist/utils/email.d.ts.map +1 -1
- package/dist/utils/email.js +7 -3
- package/dist/utils/email.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 +67 -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/migrations/20260610140000_expand_embedding_source_types/migration.sql +4 -0
- package/prisma/migrations/20260611120000_add_user_terms_acceptance/migration.sql +3 -0
- package/prisma/schema.prisma +44 -7
- package/src/index.ts +4 -0
- package/src/instrument.ts +1 -1
- 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/inferDocumentFormat.ts +58 -0
- package/src/lib/legal.ts +2 -0
- package/src/lib/prisma.ts +40 -1
- package/src/models/auth.ts +4 -0
- package/src/models/class.ts +3 -2
- package/src/models/marketing.ts +10 -2
- package/src/models/worksheet.ts +5 -2
- package/src/pipelines/aiLabChat.ts +245 -146
- package/src/pipelines/aiLabChatContract.ts +59 -69
- package/src/pipelines/aiNewtonChat.ts +46 -43
- package/src/pipelines/labChatPrompt.ts +115 -90
- package/src/routers/_app.ts +2 -0
- package/src/routers/auth.ts +13 -0
- package/src/routers/discussion.ts +7 -0
- package/src/routers/embedding.ts +164 -0
- package/src/routers/search.ts +10 -1
- package/src/routers/user.ts +26 -0
- package/src/routers/worksheet.ts +27 -0
- package/src/routes/aiStream.ts +827 -0
- package/src/seedDatabase.ts +4 -4
- package/src/services/aiChatStream.ts +341 -0
- package/src/services/aiModifierTools.ts +341 -0
- package/src/services/aiProposalTools.ts +274 -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 +31 -7
- package/src/services/auth.ts +14 -2
- package/src/services/class.ts +27 -2
- package/src/services/discussion.ts +22 -8
- package/src/services/discussionSummary.ts +226 -0
- package/src/services/embedding.ts +446 -0
- package/src/services/folder.ts +31 -0
- package/src/services/marketing.ts +3 -3
- package/src/services/message.ts +2 -2
- package/src/services/openaiDocumentGen.ts +319 -0
- package/src/services/search.ts +163 -1
- package/src/services/user.ts +9 -17
- package/src/services/userPrivacy.ts +196 -0
- package/src/services/worksheet.ts +77 -3
- package/src/utils/email.ts +5 -1
- 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 +86 -0
- package/src/workers/queues.ts +5 -1
- package/tests/helpers/registerInput.ts +20 -0
- package/tests/integration/globalSetup.ts +10 -18
- package/tests/integration/routers/auth.test.ts +13 -18
- package/tests/unit/lib/inferDocumentFormat.test.ts +33 -0
- package/tests/unit/pipelines/aiLabChatContract.test.ts +38 -21
- package/tests/unit/pipelines/labChatPrompt.test.ts +23 -36
- package/tests/unit/services/aiChatStream.test.ts +92 -0
- package/tests/unit/services/openaiDocumentGen.test.ts +65 -0
- 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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"marketing.js","sources":["models/marketing.ts"],"sourceRoot":"/","sourcesContent":["/**\n * Marketing model – school development programs, early access requests.\n */\nimport { prisma } from \"../lib/prisma.js\";\n\n/** Create a school development program application. */\nexport function createSchoolDevelopmentProgram(data: {\n id: string;\n name: string;\n type: string;\n address: string;\n city: string;\n country: string;\n numberOfStudents: number;\n numberOfTeachers: number;\n website?: string;\n contactName?: string;\n contactRole?: string;\n contactEmail?: string;\n contactPhone?: string;\n eligibilityInformation?: string;\n whyHelp?: string;\n additionalInformation?: string;\n}) {\n return prisma.schoolDevelopementProgram.create({\n data,\n });\n}\n\n/**
|
|
1
|
+
{"version":3,"file":"marketing.js","sources":["models/marketing.ts"],"sourceRoot":"/","sourcesContent":["/**\n * Marketing model – school development programs, early access requests.\n */\nimport { prisma } from \"../lib/prisma.js\";\n\n/** Create a school development program application. */\nexport function createSchoolDevelopmentProgram(data: {\n id: string;\n name: string;\n type: string;\n address: string;\n city: string;\n country: string;\n numberOfStudents: number;\n numberOfTeachers: number;\n website?: string;\n contactName?: string;\n contactRole?: string;\n contactEmail?: string;\n contactPhone?: string;\n eligibilityInformation?: string;\n whyHelp?: string;\n additionalInformation?: string;\n}) {\n return prisma.schoolDevelopementProgram.create({\n data,\n });\n}\n\n/** Public status lookup — omits contact PII (email, phone, address). */\nexport function findSchoolDevelopmentProgramStatusById(id: string) {\n return prisma.schoolDevelopementProgram.findUnique({\n where: { id },\n select: {\n id: true,\n name: true,\n city: true,\n country: true,\n status: true,\n submittedAt: true,\n },\n });\n}\n\n/** Create an early access request. */\nexport function createEarlyAccessRequest(data: {\n email: string;\n institutionSize: string;\n}) {\n return prisma.earlyAccessRequest.create({\n data,\n });\n}\n"],"names":[],"mappings":"AAAA;;GAEG;;;AACH,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE1C,uDAAuD;AACvD,MAAM,UAAU,8BAA8B,CAAC,IAiB9C;IACC,OAAO,MAAM,CAAC,yBAAyB,CAAC,MAAM,CAAC;QAC7C,IAAI;KACL,CAAC,CAAC;AACL,CAAC;AAED,wEAAwE;AACxE,MAAM,UAAU,sCAAsC,CAAC,EAAU;IAC/D,OAAO,MAAM,CAAC,yBAAyB,CAAC,UAAU,CAAC;QACjD,KAAK,EAAE,EAAE,EAAE,EAAE;QACb,MAAM,EAAE;YACN,EAAE,EAAE,IAAI;YACR,IAAI,EAAE,IAAI;YACV,IAAI,EAAE,IAAI;YACV,OAAO,EAAE,IAAI;YACb,MAAM,EAAE,IAAI;YACZ,WAAW,EAAE,IAAI;SAClB;KACF,CAAC,CAAC;AACL,CAAC;AAED,sCAAsC;AACtC,MAAM,UAAU,wBAAwB,CAAC,IAGxC;IACC,OAAO,MAAM,CAAC,kBAAkB,CAAC,MAAM,CAAC;QACtC,IAAI;KACL,CAAC,CAAC;AACL,CAAC","debug_id":"0ace5974-3200-5f1b-97d3-6b30aa4af12e"}
|
package/dist/models/message.d.ts
CHANGED
|
@@ -24,7 +24,31 @@ export declare const messageFileSelect: {
|
|
|
24
24
|
};
|
|
25
25
|
};
|
|
26
26
|
/** @returns User's membership in a conversation. */
|
|
27
|
-
export declare function findConversationMembership(conversationId: string, userId: string): Prisma.
|
|
27
|
+
export declare function findConversationMembership(conversationId: string, userId: string): import("@prisma/client/runtime/library.js").DynamicModelExtensionFluentApi<Prisma.TypeMap<import("@prisma/client/runtime/library.js").InternalArgs & {
|
|
28
|
+
result: {
|
|
29
|
+
userProfile: {
|
|
30
|
+
profilePicture: () => {
|
|
31
|
+
needs: {
|
|
32
|
+
profilePicture: true;
|
|
33
|
+
};
|
|
34
|
+
compute(profile: {
|
|
35
|
+
profilePicture: string | null;
|
|
36
|
+
}): string | null;
|
|
37
|
+
};
|
|
38
|
+
profilePictureThumbnail: () => {
|
|
39
|
+
needs: {
|
|
40
|
+
profilePictureThumbnail: true;
|
|
41
|
+
};
|
|
42
|
+
compute(profile: {
|
|
43
|
+
profilePictureThumbnail: string | null;
|
|
44
|
+
}): string | null;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
model: {};
|
|
49
|
+
query: {};
|
|
50
|
+
client: {};
|
|
51
|
+
}, {}>, "ConversationMember", "findFirst", null> & import("@prisma/client/runtime/library.js").PrismaPromise<{
|
|
28
52
|
id: string;
|
|
29
53
|
userId: string;
|
|
30
54
|
role: import(".prisma/client").$Enums.ConversationRole;
|
|
@@ -33,18 +57,12 @@ export declare function findConversationMembership(conversationId: string, userI
|
|
|
33
57
|
hiddenAt: Date | null;
|
|
34
58
|
lastViewedAt: Date | null;
|
|
35
59
|
lastViewedMentionAt: Date | null;
|
|
36
|
-
} | null
|
|
37
|
-
datasources: {
|
|
38
|
-
db: {
|
|
39
|
-
url: string;
|
|
40
|
-
};
|
|
41
|
-
};
|
|
42
|
-
}>;
|
|
60
|
+
} | null>;
|
|
43
61
|
/** @returns Messages in conversation with cursor pagination. */
|
|
44
62
|
export declare function findMessages(conversationId: string, options: {
|
|
45
63
|
cursor?: Date;
|
|
46
64
|
limit: number;
|
|
47
|
-
}):
|
|
65
|
+
}): import("@prisma/client/runtime/library.js").PrismaPromise<({
|
|
48
66
|
mentions: ({
|
|
49
67
|
user: {
|
|
50
68
|
id: string;
|
|
@@ -55,44 +73,44 @@ export declare function findMessages(conversationId: string, options: {
|
|
|
55
73
|
};
|
|
56
74
|
} & {
|
|
57
75
|
id: string;
|
|
58
|
-
createdAt: Date;
|
|
59
76
|
userId: string;
|
|
77
|
+
createdAt: Date;
|
|
60
78
|
messageId: string;
|
|
61
79
|
})[];
|
|
80
|
+
sender: {
|
|
81
|
+
id: string;
|
|
82
|
+
username: string;
|
|
83
|
+
profile: {
|
|
84
|
+
profilePicture: string | null;
|
|
85
|
+
displayName: string | null;
|
|
86
|
+
} | null;
|
|
87
|
+
};
|
|
62
88
|
attachments: {
|
|
63
89
|
path: string;
|
|
64
90
|
type: string;
|
|
65
|
-
name: string;
|
|
66
91
|
id: string;
|
|
92
|
+
name: string;
|
|
67
93
|
size: number | null;
|
|
68
94
|
uploadedAt: Date | null;
|
|
69
|
-
uploadStatus: import(".prisma/client").$Enums.UploadStatus;
|
|
70
|
-
thumbnailId: string | null;
|
|
71
95
|
thumbnail: {
|
|
72
96
|
path: string;
|
|
73
97
|
id: string;
|
|
74
98
|
} | null;
|
|
99
|
+
thumbnailId: string | null;
|
|
100
|
+
uploadStatus: import(".prisma/client").$Enums.UploadStatus;
|
|
75
101
|
}[];
|
|
76
|
-
sender: {
|
|
77
|
-
id: string;
|
|
78
|
-
username: string;
|
|
79
|
-
profile: {
|
|
80
|
-
displayName: string | null;
|
|
81
|
-
profilePicture: string | null;
|
|
82
|
-
} | null;
|
|
83
|
-
};
|
|
84
102
|
} & {
|
|
85
103
|
status: import(".prisma/client").$Enums.JobStatus | null;
|
|
86
104
|
meta: Prisma.JsonValue | null;
|
|
87
105
|
id: string;
|
|
88
106
|
createdAt: Date;
|
|
89
|
-
conversationId: string;
|
|
90
107
|
content: string;
|
|
91
108
|
senderId: string;
|
|
109
|
+
conversationId: string;
|
|
92
110
|
runJobId: string | null;
|
|
93
111
|
})[]>;
|
|
94
112
|
/** @returns Memberships for mentioned users. */
|
|
95
|
-
export declare function findMentionedMemberships(conversationId: string, userIds: string[]):
|
|
113
|
+
export declare function findMentionedMemberships(conversationId: string, userIds: string[]): import("@prisma/client/runtime/library.js").PrismaPromise<{
|
|
96
114
|
id: string;
|
|
97
115
|
userId: string;
|
|
98
116
|
role: import(".prisma/client").$Enums.ConversationRole;
|
|
@@ -103,13 +121,37 @@ export declare function findMentionedMemberships(conversationId: string, userIds
|
|
|
103
121
|
lastViewedMentionAt: Date | null;
|
|
104
122
|
}[]>;
|
|
105
123
|
/** @returns Message by ID with sender. */
|
|
106
|
-
export declare function findMessageById(messageId: string): Prisma.
|
|
124
|
+
export declare function findMessageById(messageId: string): import("@prisma/client/runtime/library.js").DynamicModelExtensionFluentApi<Prisma.TypeMap<import("@prisma/client/runtime/library.js").InternalArgs & {
|
|
125
|
+
result: {
|
|
126
|
+
userProfile: {
|
|
127
|
+
profilePicture: () => {
|
|
128
|
+
needs: {
|
|
129
|
+
profilePicture: true;
|
|
130
|
+
};
|
|
131
|
+
compute(profile: {
|
|
132
|
+
profilePicture: string | null;
|
|
133
|
+
}): string | null;
|
|
134
|
+
};
|
|
135
|
+
profilePictureThumbnail: () => {
|
|
136
|
+
needs: {
|
|
137
|
+
profilePictureThumbnail: true;
|
|
138
|
+
};
|
|
139
|
+
compute(profile: {
|
|
140
|
+
profilePictureThumbnail: string | null;
|
|
141
|
+
}): string | null;
|
|
142
|
+
};
|
|
143
|
+
};
|
|
144
|
+
};
|
|
145
|
+
model: {};
|
|
146
|
+
query: {};
|
|
147
|
+
client: {};
|
|
148
|
+
}, {}>, "Message", "findUnique", null> & import("@prisma/client/runtime/library.js").PrismaPromise<({
|
|
107
149
|
sender: {
|
|
108
150
|
id: string;
|
|
109
151
|
username: string;
|
|
110
152
|
profile: {
|
|
111
|
-
displayName: string | null;
|
|
112
153
|
profilePicture: string | null;
|
|
154
|
+
displayName: string | null;
|
|
113
155
|
} | null;
|
|
114
156
|
};
|
|
115
157
|
} & {
|
|
@@ -117,19 +159,37 @@ export declare function findMessageById(messageId: string): Prisma.Prisma__Messa
|
|
|
117
159
|
meta: Prisma.JsonValue | null;
|
|
118
160
|
id: string;
|
|
119
161
|
createdAt: Date;
|
|
120
|
-
conversationId: string;
|
|
121
162
|
content: string;
|
|
122
163
|
senderId: string;
|
|
164
|
+
conversationId: string;
|
|
123
165
|
runJobId: string | null;
|
|
124
|
-
}) | null
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
166
|
+
}) | null>;
|
|
167
|
+
/** @returns Message by ID with minimal sender. */
|
|
168
|
+
export declare function findMessageByIdMinimal(messageId: string): import("@prisma/client/runtime/library.js").DynamicModelExtensionFluentApi<Prisma.TypeMap<import("@prisma/client/runtime/library.js").InternalArgs & {
|
|
169
|
+
result: {
|
|
170
|
+
userProfile: {
|
|
171
|
+
profilePicture: () => {
|
|
172
|
+
needs: {
|
|
173
|
+
profilePicture: true;
|
|
174
|
+
};
|
|
175
|
+
compute(profile: {
|
|
176
|
+
profilePicture: string | null;
|
|
177
|
+
}): string | null;
|
|
178
|
+
};
|
|
179
|
+
profilePictureThumbnail: () => {
|
|
180
|
+
needs: {
|
|
181
|
+
profilePictureThumbnail: true;
|
|
182
|
+
};
|
|
183
|
+
compute(profile: {
|
|
184
|
+
profilePictureThumbnail: string | null;
|
|
185
|
+
}): string | null;
|
|
186
|
+
};
|
|
128
187
|
};
|
|
129
188
|
};
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
|
|
189
|
+
model: {};
|
|
190
|
+
query: {};
|
|
191
|
+
client: {};
|
|
192
|
+
}, {}>, "Message", "findUnique", null> & import("@prisma/client/runtime/library.js").PrismaPromise<({
|
|
133
193
|
sender: {
|
|
134
194
|
id: string;
|
|
135
195
|
username: string;
|
|
@@ -139,19 +199,13 @@ export declare function findMessageByIdMinimal(messageId: string): Prisma.Prisma
|
|
|
139
199
|
meta: Prisma.JsonValue | null;
|
|
140
200
|
id: string;
|
|
141
201
|
createdAt: Date;
|
|
142
|
-
conversationId: string;
|
|
143
202
|
content: string;
|
|
144
203
|
senderId: string;
|
|
204
|
+
conversationId: string;
|
|
145
205
|
runJobId: string | null;
|
|
146
|
-
}) | null
|
|
147
|
-
datasources: {
|
|
148
|
-
db: {
|
|
149
|
-
url: string;
|
|
150
|
-
};
|
|
151
|
-
};
|
|
152
|
-
}>;
|
|
206
|
+
}) | null>;
|
|
153
207
|
/** Count messages in conversation after date, excluding sender's own. */
|
|
154
|
-
export declare function countUnreadMessages(conversationId: string, userId: string, after?: Date):
|
|
208
|
+
export declare function countUnreadMessages(conversationId: string, userId: string, after?: Date): import("@prisma/client/runtime/library.js").PrismaPromise<number>;
|
|
155
209
|
/** Count mentions of user in conversation after date. */
|
|
156
|
-
export declare function countUnreadMentions(conversationId: string, userId: string, after?: Date):
|
|
210
|
+
export declare function countUnreadMentions(conversationId: string, userId: string, after?: Date): import("@prisma/client/runtime/library.js").PrismaPromise<number>;
|
|
157
211
|
//# sourceMappingURL=message.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message.d.ts","sourceRoot":"/","sources":["models/message.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAG7C;;;;GAIG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;CAUQ,CAAC;AA8CvC,oDAAoD;AACpD,wBAAgB,0BAA0B,CAAC,cAAc,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM
|
|
1
|
+
{"version":3,"file":"message.d.ts","sourceRoot":"/","sources":["models/message.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAG7C;;;;GAIG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;CAUQ,CAAC;AA8CvC,oDAAoD;AACpD,wBAAgB,0BAA0B,CAAC,cAAc,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAOhF;AAED,gEAAgE;AAChE,wBAAgB,YAAY,CAC1B,cAAc,EAAE,MAAM,EACtB,OAAO,EAAE;IACP,MAAM,CAAC,EAAE,IAAI,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAaF;AAED,gDAAgD;AAChD,wBAAgB,wBAAwB,CACtC,cAAc,EAAE,MAAM,EACtB,OAAO,EAAE,MAAM,EAAE;;;;;;;;;KAQlB;AAED,0CAA0C;AAC1C,wBAAgB,eAAe,CAAC,SAAS,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WAShD;AAED,kDAAkD;AAClD,wBAAgB,sBAAsB,CAAC,SAAS,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WASvD;AAED,yEAAyE;AACzE,wBAAgB,mBAAmB,CACjC,cAAc,EAAE,MAAM,EACtB,MAAM,EAAE,MAAM,EACd,KAAK,CAAC,EAAE,IAAI,qEASb;AAED,yDAAyD;AACzD,wBAAgB,mBAAmB,CACjC,cAAc,EAAE,MAAM,EACtB,MAAM,EAAE,MAAM,EACd,KAAK,CAAC,EAAE,IAAI,qEAYb"}
|
|
@@ -1,30 +1,72 @@
|
|
|
1
1
|
/** @returns Class if user is a student. */
|
|
2
|
-
export declare function findClassWithStudent(classId: string, studentId: string): import(".prisma/client").Prisma.
|
|
3
|
-
|
|
2
|
+
export declare function findClassWithStudent(classId: string, studentId: string): import("@prisma/client/runtime/library.js").DynamicModelExtensionFluentApi<import(".prisma/client").Prisma.TypeMap<import("@prisma/client/runtime/library.js").InternalArgs & {
|
|
3
|
+
result: {
|
|
4
|
+
userProfile: {
|
|
5
|
+
profilePicture: () => {
|
|
6
|
+
needs: {
|
|
7
|
+
profilePicture: true;
|
|
8
|
+
};
|
|
9
|
+
compute(profile: {
|
|
10
|
+
profilePicture: string | null;
|
|
11
|
+
}): string | null;
|
|
12
|
+
};
|
|
13
|
+
profilePictureThumbnail: () => {
|
|
14
|
+
needs: {
|
|
15
|
+
profilePictureThumbnail: true;
|
|
16
|
+
};
|
|
17
|
+
compute(profile: {
|
|
18
|
+
profilePictureThumbnail: string | null;
|
|
19
|
+
}): string | null;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
model: {};
|
|
24
|
+
query: {};
|
|
25
|
+
client: {};
|
|
26
|
+
}, {}>, "Class", "findFirst", null> & import("@prisma/client/runtime/library.js").PrismaPromise<{
|
|
27
|
+
section: string;
|
|
4
28
|
id: string;
|
|
29
|
+
name: string;
|
|
5
30
|
schoolId: string | null;
|
|
6
|
-
subject: string;
|
|
7
31
|
color: string | null;
|
|
8
|
-
|
|
32
|
+
subject: string;
|
|
9
33
|
syllabus: string | null;
|
|
10
34
|
departmentId: string | null;
|
|
11
35
|
discussionsEnabled: boolean;
|
|
12
36
|
studentsCanCreateDiscussions: boolean;
|
|
13
37
|
studentsCanReply: boolean;
|
|
14
|
-
} | null
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
38
|
+
} | null>;
|
|
39
|
+
/** @returns Submission for assignment and student. */
|
|
40
|
+
export declare function findSubmissionByAssignmentAndStudent(assignmentId: string, studentId: string): import("@prisma/client/runtime/library.js").DynamicModelExtensionFluentApi<import(".prisma/client").Prisma.TypeMap<import("@prisma/client/runtime/library.js").InternalArgs & {
|
|
41
|
+
result: {
|
|
42
|
+
userProfile: {
|
|
43
|
+
profilePicture: () => {
|
|
44
|
+
needs: {
|
|
45
|
+
profilePicture: true;
|
|
46
|
+
};
|
|
47
|
+
compute(profile: {
|
|
48
|
+
profilePicture: string | null;
|
|
49
|
+
}): string | null;
|
|
50
|
+
};
|
|
51
|
+
profilePictureThumbnail: () => {
|
|
52
|
+
needs: {
|
|
53
|
+
profilePictureThumbnail: true;
|
|
54
|
+
};
|
|
55
|
+
compute(profile: {
|
|
56
|
+
profilePictureThumbnail: string | null;
|
|
57
|
+
}): string | null;
|
|
58
|
+
};
|
|
18
59
|
};
|
|
19
60
|
};
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
|
|
61
|
+
model: {};
|
|
62
|
+
query: {};
|
|
63
|
+
client: {};
|
|
64
|
+
}, {}>, "Submission", "findFirst", null> & import("@prisma/client/runtime/library.js").PrismaPromise<{
|
|
23
65
|
id: string;
|
|
24
66
|
createdAt: Date;
|
|
25
67
|
assignmentId: string;
|
|
26
|
-
modifiedAt: Date;
|
|
27
68
|
studentId: string;
|
|
69
|
+
modifiedAt: Date;
|
|
28
70
|
extendedResponse: string | null;
|
|
29
71
|
gradeReceived: number | null;
|
|
30
72
|
recommendationState: import(".prisma/client").$Enums.SubmissionRecommendationState;
|
|
@@ -35,21 +77,39 @@ export declare function findSubmissionByAssignmentAndStudent(assignmentId: strin
|
|
|
35
77
|
submittedAt: Date | null;
|
|
36
78
|
submitted: boolean | null;
|
|
37
79
|
returned: boolean | null;
|
|
38
|
-
} | null
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
80
|
+
} | null>;
|
|
81
|
+
/** @returns Newton chat if user is a member, with conversation and assignment. */
|
|
82
|
+
export declare function findNewtonChatByIdAndMember(newtonChatId: string, userId: string): import("@prisma/client/runtime/library.js").DynamicModelExtensionFluentApi<import(".prisma/client").Prisma.TypeMap<import("@prisma/client/runtime/library.js").InternalArgs & {
|
|
83
|
+
result: {
|
|
84
|
+
userProfile: {
|
|
85
|
+
profilePicture: () => {
|
|
86
|
+
needs: {
|
|
87
|
+
profilePicture: true;
|
|
88
|
+
};
|
|
89
|
+
compute(profile: {
|
|
90
|
+
profilePicture: string | null;
|
|
91
|
+
}): string | null;
|
|
92
|
+
};
|
|
93
|
+
profilePictureThumbnail: () => {
|
|
94
|
+
needs: {
|
|
95
|
+
profilePictureThumbnail: true;
|
|
96
|
+
};
|
|
97
|
+
compute(profile: {
|
|
98
|
+
profilePictureThumbnail: string | null;
|
|
99
|
+
}): string | null;
|
|
100
|
+
};
|
|
42
101
|
};
|
|
43
102
|
};
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
|
|
103
|
+
model: {};
|
|
104
|
+
query: {};
|
|
105
|
+
client: {};
|
|
106
|
+
}, {}>, "NewtonChat", "findFirst", null> & import("@prisma/client/runtime/library.js").PrismaPromise<({
|
|
47
107
|
submission: {
|
|
48
108
|
assignment: {
|
|
49
|
-
id: string;
|
|
50
109
|
class: {
|
|
51
110
|
subject: string;
|
|
52
111
|
};
|
|
112
|
+
id: string;
|
|
53
113
|
title: string;
|
|
54
114
|
instructions: string;
|
|
55
115
|
};
|
|
@@ -57,8 +117,8 @@ export declare function findNewtonChatByIdAndMember(newtonChatId: string, userId
|
|
|
57
117
|
id: string;
|
|
58
118
|
createdAt: Date;
|
|
59
119
|
assignmentId: string;
|
|
60
|
-
modifiedAt: Date;
|
|
61
120
|
studentId: string;
|
|
121
|
+
modifiedAt: Date;
|
|
62
122
|
extendedResponse: string | null;
|
|
63
123
|
gradeReceived: number | null;
|
|
64
124
|
recommendationState: import(".prisma/client").$Enums.SubmissionRecommendationState;
|
|
@@ -77,18 +137,12 @@ export declare function findNewtonChatByIdAndMember(newtonChatId: string, userId
|
|
|
77
137
|
id: string;
|
|
78
138
|
createdAt: Date;
|
|
79
139
|
updatedAt: Date;
|
|
140
|
+
title: string;
|
|
80
141
|
submissionId: string;
|
|
81
142
|
conversationId: string;
|
|
82
|
-
|
|
83
|
-
}) | null, null, import("@prisma/client/runtime/library.js").DefaultArgs, {
|
|
84
|
-
datasources: {
|
|
85
|
-
db: {
|
|
86
|
-
url: string;
|
|
87
|
-
};
|
|
88
|
-
};
|
|
89
|
-
}>;
|
|
143
|
+
}) | null>;
|
|
90
144
|
/** @returns Conversation members for given user IDs. */
|
|
91
|
-
export declare function findConversationMembersByUserIds(conversationId: string, userIds: string[]): import("
|
|
145
|
+
export declare function findConversationMembersByUserIds(conversationId: string, userIds: string[]): import("@prisma/client/runtime/library.js").PrismaPromise<{
|
|
92
146
|
id: string;
|
|
93
147
|
userId: string;
|
|
94
148
|
role: import(".prisma/client").$Enums.ConversationRole;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"newtonChat.d.ts","sourceRoot":"/","sources":["models/newtonChat.ts"],"names":[],"mappings":"AAKA,2CAA2C;AAC3C,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM
|
|
1
|
+
{"version":3,"file":"newtonChat.d.ts","sourceRoot":"/","sources":["models/newtonChat.ts"],"names":[],"mappings":"AAKA,2CAA2C;AAC3C,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAOtE;AAED,sDAAsD;AACtD,wBAAgB,oCAAoC,CAClD,YAAY,EAAE,MAAM,EACpB,SAAS,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAQlB;AAED,kFAAkF;AAClF,wBAAgB,2BAA2B,CACzC,YAAY,EAAE,MAAM,EACpB,MAAM,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WAyBf;AAED,wDAAwD;AACxD,wBAAgB,gCAAgC,CAC9C,cAAc,EAAE,MAAM,EACtB,OAAO,EAAE,MAAM,EAAE;;;;;;;;;KAQlB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** @returns Notifications for a receiver, newest first. */
|
|
2
|
-
export declare function findNotificationsByReceiverId(receiverId: string): import("
|
|
2
|
+
export declare function findNotificationsByReceiverId(receiverId: string): import("@prisma/client/runtime/library.js").PrismaPromise<({
|
|
3
3
|
sender: {
|
|
4
4
|
username: string;
|
|
5
5
|
} | null;
|
|
@@ -12,11 +12,35 @@ export declare function findNotificationsByReceiverId(receiverId: string): impor
|
|
|
12
12
|
title: string;
|
|
13
13
|
content: string;
|
|
14
14
|
senderId: string | null;
|
|
15
|
-
receiverId: string;
|
|
16
15
|
read: boolean;
|
|
16
|
+
receiverId: string;
|
|
17
17
|
})[]>;
|
|
18
18
|
/** @returns Notification by ID. */
|
|
19
|
-
export declare function findNotificationByIdForReceiver(id: string, receiverId: string): import(".prisma/client").Prisma.
|
|
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 & {
|
|
20
|
+
result: {
|
|
21
|
+
userProfile: {
|
|
22
|
+
profilePicture: () => {
|
|
23
|
+
needs: {
|
|
24
|
+
profilePicture: true;
|
|
25
|
+
};
|
|
26
|
+
compute(profile: {
|
|
27
|
+
profilePicture: string | null;
|
|
28
|
+
}): string | null;
|
|
29
|
+
};
|
|
30
|
+
profilePictureThumbnail: () => {
|
|
31
|
+
needs: {
|
|
32
|
+
profilePictureThumbnail: true;
|
|
33
|
+
};
|
|
34
|
+
compute(profile: {
|
|
35
|
+
profilePictureThumbnail: string | null;
|
|
36
|
+
}): string | null;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
model: {};
|
|
41
|
+
query: {};
|
|
42
|
+
client: {};
|
|
43
|
+
}, {}>, "Notification", "findFirst", null> & import("@prisma/client/runtime/library.js").PrismaPromise<({
|
|
20
44
|
sender: {
|
|
21
45
|
username: string;
|
|
22
46
|
} | null;
|
|
@@ -29,41 +53,53 @@ export declare function findNotificationByIdForReceiver(id: string, receiverId:
|
|
|
29
53
|
title: string;
|
|
30
54
|
content: string;
|
|
31
55
|
senderId: string | null;
|
|
32
|
-
receiverId: string;
|
|
33
56
|
read: boolean;
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
db: {
|
|
37
|
-
url: string;
|
|
38
|
-
};
|
|
39
|
-
};
|
|
40
|
-
}>;
|
|
57
|
+
receiverId: string;
|
|
58
|
+
}) | null>;
|
|
41
59
|
/** Create a notification for one receiver. */
|
|
42
60
|
export declare function createNotification(data: {
|
|
43
61
|
receiverId: string;
|
|
44
62
|
title: string;
|
|
45
63
|
content: string;
|
|
46
|
-
}): import(".prisma/client").Prisma.
|
|
64
|
+
}): import("@prisma/client/runtime/library.js").DynamicModelExtensionFluentApi<import(".prisma/client").Prisma.TypeMap<import("@prisma/client/runtime/library.js").InternalArgs & {
|
|
65
|
+
result: {
|
|
66
|
+
userProfile: {
|
|
67
|
+
profilePicture: () => {
|
|
68
|
+
needs: {
|
|
69
|
+
profilePicture: true;
|
|
70
|
+
};
|
|
71
|
+
compute(profile: {
|
|
72
|
+
profilePicture: string | null;
|
|
73
|
+
}): string | null;
|
|
74
|
+
};
|
|
75
|
+
profilePictureThumbnail: () => {
|
|
76
|
+
needs: {
|
|
77
|
+
profilePictureThumbnail: true;
|
|
78
|
+
};
|
|
79
|
+
compute(profile: {
|
|
80
|
+
profilePictureThumbnail: string | null;
|
|
81
|
+
}): string | null;
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
model: {};
|
|
86
|
+
query: {};
|
|
87
|
+
client: {};
|
|
88
|
+
}, {}>, "Notification", "create", never> & import("@prisma/client/runtime/library.js").PrismaPromise<{
|
|
47
89
|
id: string;
|
|
48
90
|
createdAt: Date;
|
|
49
91
|
title: string;
|
|
50
92
|
content: string;
|
|
51
93
|
senderId: string | null;
|
|
52
|
-
receiverId: string;
|
|
53
94
|
read: boolean;
|
|
54
|
-
|
|
55
|
-
datasources: {
|
|
56
|
-
db: {
|
|
57
|
-
url: string;
|
|
58
|
-
};
|
|
59
|
-
};
|
|
95
|
+
receiverId: string;
|
|
60
96
|
}>;
|
|
61
97
|
/** Create multiple notifications in one call. */
|
|
62
98
|
export declare function createManyNotifications(data: Array<{
|
|
63
99
|
receiverId: string;
|
|
64
100
|
title: string;
|
|
65
101
|
content: string;
|
|
66
|
-
}>): import("
|
|
102
|
+
}>): import("@prisma/client/runtime/library.js").PrismaPromise<import("@prisma/client/runtime/library.js").GetBatchResult>;
|
|
67
103
|
/** Mark a receiver's notification as read. */
|
|
68
104
|
export declare function markNotificationAsReadForReceiver(id: string, receiverId: string): Promise<({
|
|
69
105
|
sender: {
|
|
@@ -78,7 +114,7 @@ export declare function markNotificationAsReadForReceiver(id: string, receiverId
|
|
|
78
114
|
title: string;
|
|
79
115
|
content: string;
|
|
80
116
|
senderId: string | null;
|
|
81
|
-
receiverId: string;
|
|
82
117
|
read: boolean;
|
|
118
|
+
receiverId: string;
|
|
83
119
|
}) | null>;
|
|
84
120
|
//# sourceMappingURL=notification.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notification.d.ts","sourceRoot":"/","sources":["models/notification.ts"],"names":[],"mappings":"AAUA,2DAA2D;AAC3D,wBAAgB,6BAA6B,CAAC,UAAU,EAAE,MAAM;;;;;;;;;;;;;;;MAM/D;AAED,mCAAmC;AACnC,wBAAgB,+BAA+B,CAAC,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM
|
|
1
|
+
{"version":3,"file":"notification.d.ts","sourceRoot":"/","sources":["models/notification.ts"],"names":[],"mappings":"AAUA,2DAA2D;AAC3D,wBAAgB,6BAA6B,CAAC,UAAU,EAAE,MAAM;;;;;;;;;;;;;;;MAM/D;AAED,mCAAmC;AACnC,wBAAgB,+BAA+B,CAAC,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WAK7E;AAED,8CAA8C;AAC9C,wBAAgB,kBAAkB,CAAC,IAAI,EAAE;IACvC,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;CACjB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAIA;AAED,iDAAiD;AACjD,wBAAgB,uBAAuB,CACrC,IAAI,EAAE,KAAK,CAAC;IAAE,UAAU,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC,yHAKpE;AAED,8CAA8C;AAC9C,wBAAsB,iCAAiC,CAAC,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM;;;;;;;;;;;;;;;WAWrF"}
|