@studious-lms/server 1.2.43 → 1.2.45

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.
@@ -5183,6 +5183,32 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
5183
5183
  };
5184
5184
  meta: object;
5185
5185
  }>;
5186
+ getReplies: import("@trpc/server").TRPCQueryProcedure<{
5187
+ input: {
5188
+ commentId: string;
5189
+ };
5190
+ output: ({
5191
+ author: {
5192
+ id: string;
5193
+ username: string;
5194
+ profile: {
5195
+ displayName: string | null;
5196
+ profilePicture: string | null;
5197
+ profilePictureThumbnail: string | null;
5198
+ } | null;
5199
+ };
5200
+ } & {
5201
+ id: string;
5202
+ content: string;
5203
+ createdAt: Date;
5204
+ modifiedAt: Date | null;
5205
+ announcementId: string | null;
5206
+ parentCommentId: string | null;
5207
+ authorId: string;
5208
+ studentQuestionProgressId: string | null;
5209
+ })[];
5210
+ meta: object;
5211
+ }>;
5186
5212
  replyToComment: import("@trpc/server").TRPCMutationProcedure<{
5187
5213
  input: {
5188
5214
  content: string;
@@ -10443,6 +10469,32 @@ export declare const createCaller: import("@trpc/server").TRPCRouterCaller<{
10443
10469
  };
10444
10470
  meta: object;
10445
10471
  }>;
10472
+ getReplies: import("@trpc/server").TRPCQueryProcedure<{
10473
+ input: {
10474
+ commentId: string;
10475
+ };
10476
+ output: ({
10477
+ author: {
10478
+ id: string;
10479
+ username: string;
10480
+ profile: {
10481
+ displayName: string | null;
10482
+ profilePicture: string | null;
10483
+ profilePictureThumbnail: string | null;
10484
+ } | null;
10485
+ };
10486
+ } & {
10487
+ id: string;
10488
+ content: string;
10489
+ createdAt: Date;
10490
+ modifiedAt: Date | null;
10491
+ announcementId: string | null;
10492
+ parentCommentId: string | null;
10493
+ authorId: string;
10494
+ studentQuestionProgressId: string | null;
10495
+ })[];
10496
+ meta: object;
10497
+ }>;
10446
10498
  replyToComment: import("@trpc/server").TRPCMutationProcedure<{
10447
10499
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAAiC,CAAC"}
@@ -86,6 +86,32 @@ export declare const commentRouter: import("@trpc/server").TRPCBuiltRouter<{
86
86
  };
87
87
  meta: object;
88
88
  }>;
89
+ getReplies: import("@trpc/server").TRPCQueryProcedure<{
90
+ input: {
91
+ commentId: string;
92
+ };
93
+ output: ({
94
+ author: {
95
+ id: string;
96
+ username: string;
97
+ profile: {
98
+ displayName: string | null;
99
+ profilePicture: string | null;
100
+ profilePictureThumbnail: string | null;
101
+ } | null;
102
+ };
103
+ } & {
104
+ id: string;
105
+ content: string;
106
+ createdAt: Date;
107
+ modifiedAt: Date | null;
108
+ announcementId: string | null;
109
+ parentCommentId: string | null;
110
+ authorId: string;
111
+ studentQuestionProgressId: string | null;
112
+ })[];
113
+ meta: object;
114
+ }>;
89
115
  replyToComment: import("@trpc/server").TRPCMutationProcedure<{
90
116
  input: {
91
117
  content: string;
@@ -1 +1 @@
1
- {"version":3,"file":"comment.d.ts","sourceRoot":"/","sources":["routers/comment.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoCzB,CAAC;AAEF,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyOxB,CAAC"}
1
+ {"version":3,"file":"comment.d.ts","sourceRoot":"/","sources":["routers/comment.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoCzB,CAAC;AAEF,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmQxB,CAAC"}
@@ -1,5 +1,5 @@
1
1
 
2
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="4481463d-a4d2-5285-8d70-5314c7700df3")}catch(e){}}();
2
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="d03138fb-c066-50f2-b192-9eb9b9e92ced")}catch(e){}}();
3
3
  import { createTRPCRouter, protectedProcedure } from "../trpc.js";
4
4
  import { z } from "zod";
5
5
  import { prisma } from "../lib/prisma.js";
@@ -61,6 +61,32 @@ export const commentRouter = createTRPCRouter({
61
61
  }
62
62
  return comment;
63
63
  }),
64
+ getReplies: protectedProcedure
65
+ .input(z.object({
66
+ commentId: z.string(),
67
+ }))
68
+ .query(async ({ ctx, input }) => {
69
+ const replies = await prisma.comment.findMany({
70
+ where: { parentCommentId: input.commentId
71
+ },
72
+ include: {
73
+ author: {
74
+ select: {
75
+ id: true,
76
+ username: true,
77
+ profile: {
78
+ select: {
79
+ displayName: true,
80
+ profilePicture: true,
81
+ profilePictureThumbnail: true,
82
+ },
83
+ },
84
+ },
85
+ },
86
+ }
87
+ });
88
+ return replies;
89
+ }),
64
90
  replyToComment: protectedProcedure
65
91
  .input(z.object({
66
92
  parentCommentId: z.string(),
@@ -249,4 +275,4 @@ export const commentRouter = createTRPCRouter({
249
275
  }),
250
276
  });
251
277
  //# sourceMappingURL=comment.js.map
252
- //# debugId=4481463d-a4d2-5285-8d70-5314c7700df3
278
+ //# debugId=d03138fb-c066-50f2-b192-9eb9b9e92ced
@@ -1 +1 @@
1
- {"version":3,"file":"comment.js","sources":["routers/comment.ts"],"sourceRoot":"/","sourcesContent":["import { createTRPCRouter, protectedProcedure } from \"../trpc.js\";\nimport { z } from \"zod\";\nimport { prisma } from \"../lib/prisma.js\";\nimport { TRPCError } from \"@trpc/server\";\n\nexport const commentSelect = {\n id: true,\n content: true,\n createdAt: true,\n modifiedAt: true,\n author: {\n select: {\n id: true,\n username: true,\n profile: {\n select: {\n displayName: true,\n profilePicture: true,\n profilePictureThumbnail: true,\n },\n },\n },\n },\n reactions: {\n select: {\n type: true,\n user: {\n select: {\n id: true,\n username: true,\n profile: {\n select: {\n displayName: true,\n profilePicture: true,\n profilePictureThumbnail: true,\n },\n },\n },\n },\n },\n },\n};\n\nexport const commentRouter = createTRPCRouter({\n get: protectedProcedure\n .input(z.object({\n id: z.string(),\n }))\n .query(async ({ ctx, input }) => {\n const comment = await prisma.comment.findUnique({\n where: { id: input.id },\n select: {\n ...commentSelect,\n }\n });\n if (!comment) {\n throw new TRPCError({\n code: \"NOT_FOUND\",\n message: \"Comment not found\",\n });\n }\n\n return comment;\n }),\n replyToComment: protectedProcedure\n .input(z.object({\n parentCommentId: z.string(),\n content: z.string(),\n }))\n .mutation(async ({ ctx, input }) => {\n const { parentCommentId, content } = input;\n\n const newComment = await prisma.comment.create({\n data: {\n parentCommentId,\n content,\n authorId: ctx.user!.id,\n },\n });\n\n return newComment;\n }), \n addReaction: protectedProcedure\n .input(z.object({\n id: z.string(),\n type: z.enum(['THUMBSUP', 'CELEBRATE', 'CARE', 'HEART', 'IDEA', 'HAPPY']),\n }))\n .mutation(async ({ ctx, input }) => {\n if (!ctx.user) {\n throw new TRPCError({\n code: \"UNAUTHORIZED\",\n message: \"User must be authenticated\",\n });\n }\n\n // Exactly one of announcementId or commentId must be provided\n const comment = await prisma.comment.findUnique({\n where: { id: input.id },\n });\n\n const userId = ctx.user.id;\n\n // Verify the announcement or comment exists and belongs to the class\n if (comment) {\n const announcement = await prisma.announcement.findFirst({\n where: {\n id: input.id,\n },\n });\n\n // Upsert reaction: update if exists, create if not\n const reaction = await prisma.reaction.upsert({\n where: {\n userId_commentId: {\n userId,\n commentId: input.id,\n },\n },\n update: {\n type: input.type,\n },\n create: {\n type: input.type,\n userId,\n commentId: input.id,\n },\n include: {\n user: {\n select: {\n id: true,\n username: true,\n profile: {\n select: {\n displayName: true,\n profilePicture: true,\n profilePictureThumbnail: true,\n },\n },\n },\n },\n },\n });\n\n return { reaction };\n }\n\n throw new TRPCError({\n code: \"INTERNAL_SERVER_ERROR\",\n message: \"Unexpected error\",\n });\n }),\n\nremoveReaction: protectedProcedure\n .input(z.object({\n commentId: z.string().optional(),\n }))\n .mutation(async ({ ctx, input }) => {\n if (!ctx.user) {\n throw new TRPCError({\n code: \"UNAUTHORIZED\",\n message: \"User must be authenticated\",\n });\n }\n\n // Exactly one of announcementId or commentId must be provided\n if (!input.commentId) {\n throw new TRPCError({\n code: \"BAD_REQUEST\",\n message: \"Either announcementId or commentId must be provided\",\n });\n }\n\n const userId = ctx.user.id;\n\n const reaction = await prisma.reaction.findUnique({\n where: {\n userId_commentId: {\n userId,\n commentId: input.commentId,\n },\n },\n });\n\n if (!reaction) {\n throw new TRPCError({\n code: \"NOT_FOUND\",\n message: \"Reaction not found\",\n });\n }\n\n await prisma.reaction.delete({\n where: { id: reaction.id },\n });\n\n return { success: true };\n\n }),\n\ngetReactions: protectedProcedure\n .input(z.object({\n commentId: z.string().optional(),\n }))\n .query(async ({ ctx, input }) => {\n if (!ctx.user) {\n throw new TRPCError({\n code: \"UNAUTHORIZED\",\n message: \"User must be authenticated\",\n });\n }\n\n // Exactly one of announcementId or commentId must be provided\n if (!input.commentId) {\n throw new TRPCError({\n code: \"BAD_REQUEST\",\n message: \"Either announcementId or commentId must be provided\",\n });\n }\n\n const userId = ctx.user.id;\n\n // Verify comment exists\n const comment = await prisma.comment.findUnique({\n where: { id: input.commentId },\n include: {\n announcement: {\n select: {\n classId: true,\n },\n },\n },\n });\n\n if (!comment) {\n throw new TRPCError({\n code: \"NOT_FOUND\",\n message: \"Comment not found\",\n });\n }\n\n // Get reaction counts by type\n const reactionCounts = await prisma.reaction.groupBy({\n by: ['type'],\n where: { commentId: input.commentId },\n _count: { type: true },\n });\n\n // Get current user's reaction\n const userReaction = await prisma.reaction.findUnique({\n where: {\n userId_commentId: {\n userId,\n commentId: input.commentId,\n },\n },\n });\n\n // Format counts\n const counts = {\n THUMBSUP: 0,\n CELEBRATE: 0,\n CARE: 0,\n HEART: 0,\n IDEA: 0,\n HAPPY: 0,\n };\n\n reactionCounts.forEach((item) => {\n counts[item.type as keyof typeof counts] = item._count.type;\n });\n\n return {\n counts,\n userReaction: userReaction?.type || null,\n total: reactionCounts.reduce((sum, item) => sum + item._count.type, 0),\n };\n }),\n});"],"names":[],"mappings":";;AAAA,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAClE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,MAAM,CAAC,MAAM,aAAa,GAAG;IACzB,EAAE,EAAE,IAAI;IACR,OAAO,EAAE,IAAI;IACb,SAAS,EAAE,IAAI;IACf,UAAU,EAAE,IAAI;IAChB,MAAM,EAAE;QACJ,MAAM,EAAE;YACJ,EAAE,EAAE,IAAI;YACR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OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;YAC5B,MAAM,CAAC,IAAI,CAAC,IAA2B,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC;QAChE,CAAC,CAAC,CAAC;QAEH,OAAO;YACH,MAAM;YACN,YAAY,EAAE,YAAY,EAAE,IAAI,IAAI,IAAI;YACxC,KAAK,EAAE,cAAc,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE,CAAC,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC;SACzE,CAAC;IACV,CAAC,CAAC;CACL,CAAC,CAAC","debug_id":"4481463d-a4d2-5285-8d70-5314c7700df3"}
1
+ {"version":3,"file":"comment.js","sources":["routers/comment.ts"],"sourceRoot":"/","sourcesContent":["import { createTRPCRouter, protectedProcedure } from \"../trpc.js\";\nimport { z } from \"zod\";\nimport { prisma } from \"../lib/prisma.js\";\nimport { TRPCError } from \"@trpc/server\";\n\nexport const commentSelect = {\n id: true,\n content: true,\n createdAt: true,\n modifiedAt: true,\n author: {\n select: {\n id: true,\n username: true,\n profile: {\n select: {\n displayName: true,\n profilePicture: true,\n profilePictureThumbnail: true,\n },\n },\n },\n },\n reactions: {\n select: {\n type: true,\n user: {\n select: {\n id: true,\n username: true,\n profile: {\n select: {\n displayName: true,\n profilePicture: true,\n profilePictureThumbnail: true,\n },\n },\n },\n },\n },\n },\n};\n\nexport const commentRouter = createTRPCRouter({\n get: protectedProcedure\n .input(z.object({\n id: z.string(),\n }))\n .query(async ({ ctx, input }) => {\n const comment = await prisma.comment.findUnique({\n where: { id: input.id },\n select: {\n ...commentSelect,\n }\n });\n if (!comment) {\n throw new TRPCError({\n code: \"NOT_FOUND\",\n message: \"Comment not found\",\n });\n }\n\n return comment;\n }),\n getReplies: protectedProcedure\n .input(z.object({\n commentId: z.string(),\n }))\n .query(async ({ ctx, input }) => {\n const replies = await prisma.comment.findMany({\n where: { parentCommentId: input.commentId\n },\n include: {\n author: {\n select: {\n id: true,\n username: true,\n profile: {\n select: {\n displayName: true,\n profilePicture: true,\n profilePictureThumbnail: true,\n },\n },\n },\n },\n }\n });\n return replies;\n }),\n replyToComment: protectedProcedure\n .input(z.object({\n parentCommentId: z.string(),\n content: z.string(),\n }))\n .mutation(async ({ ctx, input }) => {\n const { parentCommentId, content } = input;\n\n const newComment = await prisma.comment.create({\n data: {\n parentCommentId,\n content,\n authorId: ctx.user!.id,\n },\n });\n\n return newComment;\n }), \n addReaction: protectedProcedure\n .input(z.object({\n id: z.string(),\n type: z.enum(['THUMBSUP', 'CELEBRATE', 'CARE', 'HEART', 'IDEA', 'HAPPY']),\n }))\n .mutation(async ({ ctx, input }) => {\n if (!ctx.user) {\n throw new TRPCError({\n code: \"UNAUTHORIZED\",\n message: \"User must be authenticated\",\n });\n }\n\n // Exactly one of announcementId or commentId must be provided\n const comment = await prisma.comment.findUnique({\n where: { id: input.id },\n });\n\n const userId = ctx.user.id;\n\n // Verify the announcement or comment exists and belongs to the class\n if (comment) {\n const announcement = await prisma.announcement.findFirst({\n where: {\n id: input.id,\n },\n });\n\n // Upsert reaction: update if exists, create if not\n const reaction = await prisma.reaction.upsert({\n where: {\n userId_commentId: {\n userId,\n commentId: input.id,\n },\n },\n update: {\n type: input.type,\n },\n create: {\n type: input.type,\n userId,\n commentId: input.id,\n },\n include: {\n user: {\n select: {\n id: true,\n username: true,\n profile: {\n select: {\n displayName: true,\n profilePicture: true,\n profilePictureThumbnail: true,\n },\n },\n },\n },\n },\n });\n\n return { reaction };\n }\n\n throw new TRPCError({\n code: \"INTERNAL_SERVER_ERROR\",\n message: \"Unexpected error\",\n });\n }),\n\nremoveReaction: protectedProcedure\n .input(z.object({\n commentId: z.string().optional(),\n }))\n .mutation(async ({ ctx, input }) => {\n if (!ctx.user) {\n throw new TRPCError({\n code: \"UNAUTHORIZED\",\n message: \"User must be authenticated\",\n });\n }\n\n // Exactly one of announcementId or commentId must be provided\n if (!input.commentId) {\n throw new TRPCError({\n code: \"BAD_REQUEST\",\n message: \"Either announcementId or commentId must be provided\",\n });\n }\n\n const userId = ctx.user.id;\n\n const reaction = await prisma.reaction.findUnique({\n where: {\n userId_commentId: {\n userId,\n commentId: input.commentId,\n },\n },\n });\n\n if (!reaction) {\n throw new TRPCError({\n code: \"NOT_FOUND\",\n message: \"Reaction not found\",\n });\n }\n\n await prisma.reaction.delete({\n where: { id: reaction.id },\n });\n\n return { success: true };\n\n }),\n\ngetReactions: protectedProcedure\n .input(z.object({\n commentId: z.string().optional(),\n }))\n .query(async ({ ctx, input }) => {\n if (!ctx.user) {\n throw new TRPCError({\n code: \"UNAUTHORIZED\",\n message: \"User must be authenticated\",\n });\n }\n\n // Exactly one of announcementId or commentId must be provided\n if (!input.commentId) {\n throw new TRPCError({\n code: \"BAD_REQUEST\",\n message: \"Either announcementId or commentId must be provided\",\n });\n }\n\n const userId = ctx.user.id;\n\n // Verify comment exists\n const comment = await prisma.comment.findUnique({\n where: { id: input.commentId },\n include: {\n announcement: {\n select: {\n classId: true,\n },\n },\n },\n });\n\n if (!comment) {\n throw new TRPCError({\n code: \"NOT_FOUND\",\n message: \"Comment not found\",\n });\n }\n\n // Get reaction counts by type\n const reactionCounts = await prisma.reaction.groupBy({\n by: ['type'],\n where: { commentId: input.commentId },\n _count: { type: true },\n });\n\n // Get current user's reaction\n const userReaction = await prisma.reaction.findUnique({\n where: {\n userId_commentId: {\n userId,\n commentId: input.commentId,\n },\n },\n });\n\n // Format counts\n const counts = {\n THUMBSUP: 0,\n CELEBRATE: 0,\n CARE: 0,\n HEART: 0,\n IDEA: 0,\n HAPPY: 0,\n };\n\n reactionCounts.forEach((item) => {\n counts[item.type as keyof typeof counts] = item._count.type;\n });\n\n return {\n counts,\n userReaction: userReaction?.type || null,\n total: reactionCounts.reduce((sum, item) => sum + item._count.type, 0),\n };\n }),\n});"],"names":[],"mappings":";;AAAA,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,YAA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,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE,CAAC,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC;SACzE,CAAC;IACV,CAAC,CAAC;CACL,CAAC,CAAC","debug_id":"d03138fb-c066-50f2-b192-9eb9b9e92ced"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@studious-lms/server",
3
- "version": "1.2.43",
3
+ "version": "1.2.45",
4
4
  "description": "Backend server for Studious application",
5
5
  "main": "dist/exportType.js",
6
6
  "types": "dist/exportType.d.ts",
@@ -62,6 +62,32 @@ export const commentRouter = createTRPCRouter({
62
62
 
63
63
  return comment;
64
64
  }),
65
+ getReplies: protectedProcedure
66
+ .input(z.object({
67
+ commentId: z.string(),
68
+ }))
69
+ .query(async ({ ctx, input }) => {
70
+ const replies = await prisma.comment.findMany({
71
+ where: { parentCommentId: input.commentId
72
+ },
73
+ include: {
74
+ author: {
75
+ select: {
76
+ id: true,
77
+ username: true,
78
+ profile: {
79
+ select: {
80
+ displayName: true,
81
+ profilePicture: true,
82
+ profilePictureThumbnail: true,
83
+ },
84
+ },
85
+ },
86
+ },
87
+ }
88
+ });
89
+ return replies;
90
+ }),
65
91
  replyToComment: protectedProcedure
66
92
  .input(z.object({
67
93
  parentCommentId: z.string(),