@studious-lms/server 1.2.34 → 1.2.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/routers/_app.d.ts +302 -200
- package/dist/routers/_app.d.ts.map +1 -1
- package/dist/routers/_app.js +2 -0
- package/dist/routers/announcement.d.ts +8 -4
- package/dist/routers/announcement.d.ts.map +1 -1
- package/dist/routers/comment.d.ts +124 -0
- package/dist/routers/comment.d.ts.map +1 -0
- package/dist/routers/comment.js +241 -0
- package/dist/routers/worksheet.d.ts +34 -109
- package/dist/routers/worksheet.d.ts.map +1 -1
- package/dist/routers/worksheet.js +79 -74
- package/package.json +1 -1
- package/prisma/schema.prisma +11 -4
- package/src/routers/_app.ts +2 -0
- package/src/routers/announcement.ts +3 -3
- package/src/routers/comment.ts +268 -0
- package/src/routers/worksheet.ts +80 -77
package/dist/routers/_app.d.ts
CHANGED
|
@@ -1014,9 +1014,10 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
1014
1014
|
content: string;
|
|
1015
1015
|
createdAt: Date;
|
|
1016
1016
|
modifiedAt: Date | null;
|
|
1017
|
-
announcementId: string;
|
|
1017
|
+
announcementId: string | null;
|
|
1018
1018
|
parentCommentId: string | null;
|
|
1019
1019
|
authorId: string;
|
|
1020
|
+
studentQuestionProgressId: string | null;
|
|
1020
1021
|
};
|
|
1021
1022
|
};
|
|
1022
1023
|
meta: object;
|
|
@@ -1042,9 +1043,10 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
1042
1043
|
content: string;
|
|
1043
1044
|
createdAt: Date;
|
|
1044
1045
|
modifiedAt: Date | null;
|
|
1045
|
-
announcementId: string;
|
|
1046
|
+
announcementId: string | null;
|
|
1046
1047
|
parentCommentId: string | null;
|
|
1047
1048
|
authorId: string;
|
|
1049
|
+
studentQuestionProgressId: string | null;
|
|
1048
1050
|
};
|
|
1049
1051
|
};
|
|
1050
1052
|
meta: object;
|
|
@@ -1090,18 +1092,20 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
1090
1092
|
content: string;
|
|
1091
1093
|
createdAt: Date;
|
|
1092
1094
|
modifiedAt: Date | null;
|
|
1093
|
-
announcementId: string;
|
|
1095
|
+
announcementId: string | null;
|
|
1094
1096
|
parentCommentId: string | null;
|
|
1095
1097
|
authorId: string;
|
|
1098
|
+
studentQuestionProgressId: string | null;
|
|
1096
1099
|
})[];
|
|
1097
1100
|
} & {
|
|
1098
1101
|
id: string;
|
|
1099
1102
|
content: string;
|
|
1100
1103
|
createdAt: Date;
|
|
1101
1104
|
modifiedAt: Date | null;
|
|
1102
|
-
announcementId: string;
|
|
1105
|
+
announcementId: string | null;
|
|
1103
1106
|
parentCommentId: string | null;
|
|
1104
1107
|
authorId: string;
|
|
1108
|
+
studentQuestionProgressId: string | null;
|
|
1105
1109
|
})[];
|
|
1106
1110
|
};
|
|
1107
1111
|
meta: object;
|
|
@@ -4845,7 +4849,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
4845
4849
|
order: number | null;
|
|
4846
4850
|
markScheme: import("@prisma/client/runtime/library.js").JsonValue | null;
|
|
4847
4851
|
updatedAt: Date;
|
|
4848
|
-
points: number
|
|
4852
|
+
points: number;
|
|
4849
4853
|
question: string;
|
|
4850
4854
|
worksheetId: string;
|
|
4851
4855
|
answer: string;
|
|
@@ -4935,7 +4939,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
4935
4939
|
order: number | null;
|
|
4936
4940
|
markScheme: import("@prisma/client/runtime/library.js").JsonValue | null;
|
|
4937
4941
|
updatedAt: Date;
|
|
4938
|
-
points: number
|
|
4942
|
+
points: number;
|
|
4939
4943
|
question: string;
|
|
4940
4944
|
worksheetId: string;
|
|
4941
4945
|
answer: string;
|
|
@@ -4973,7 +4977,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
4973
4977
|
order: number | null;
|
|
4974
4978
|
markScheme: import("@prisma/client/runtime/library.js").JsonValue | null;
|
|
4975
4979
|
updatedAt: Date;
|
|
4976
|
-
points: number
|
|
4980
|
+
points: number;
|
|
4977
4981
|
question: string;
|
|
4978
4982
|
worksheetId: string;
|
|
4979
4983
|
answer: string;
|
|
@@ -4993,7 +4997,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
4993
4997
|
order: number | null;
|
|
4994
4998
|
markScheme: import("@prisma/client/runtime/library.js").JsonValue | null;
|
|
4995
4999
|
updatedAt: Date;
|
|
4996
|
-
points: number
|
|
5000
|
+
points: number;
|
|
4997
5001
|
question: string;
|
|
4998
5002
|
worksheetId: string;
|
|
4999
5003
|
answer: string;
|
|
@@ -5011,11 +5015,13 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
5011
5015
|
feedback: string | null;
|
|
5012
5016
|
studentId: string;
|
|
5013
5017
|
createdAt: Date;
|
|
5014
|
-
updatedAt: Date;
|
|
5018
|
+
updatedAt: Date | null;
|
|
5019
|
+
points: number;
|
|
5015
5020
|
questionId: string;
|
|
5016
5021
|
response: string;
|
|
5017
|
-
isCorrect: boolean;
|
|
5018
5022
|
studentWorksheetResponseId: string | null;
|
|
5023
|
+
isCorrect: boolean;
|
|
5024
|
+
markschemeState: import("@prisma/client/runtime/library.js").JsonValue | null;
|
|
5019
5025
|
}[];
|
|
5020
5026
|
} & {
|
|
5021
5027
|
id: string;
|
|
@@ -5041,11 +5047,13 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
5041
5047
|
feedback: string | null;
|
|
5042
5048
|
studentId: string;
|
|
5043
5049
|
createdAt: Date;
|
|
5044
|
-
updatedAt: Date;
|
|
5050
|
+
updatedAt: Date | null;
|
|
5051
|
+
points: number;
|
|
5045
5052
|
questionId: string;
|
|
5046
5053
|
response: string;
|
|
5047
|
-
isCorrect: boolean;
|
|
5048
5054
|
studentWorksheetResponseId: string | null;
|
|
5055
|
+
isCorrect: boolean;
|
|
5056
|
+
markschemeState: import("@prisma/client/runtime/library.js").JsonValue | null;
|
|
5049
5057
|
}[];
|
|
5050
5058
|
} & {
|
|
5051
5059
|
id: string;
|
|
@@ -5069,11 +5077,13 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
5069
5077
|
feedback: string | null;
|
|
5070
5078
|
studentId: string;
|
|
5071
5079
|
createdAt: Date;
|
|
5072
|
-
updatedAt: Date;
|
|
5080
|
+
updatedAt: Date | null;
|
|
5081
|
+
points: number;
|
|
5073
5082
|
questionId: string;
|
|
5074
5083
|
response: string;
|
|
5075
|
-
isCorrect: boolean;
|
|
5076
5084
|
studentWorksheetResponseId: string | null;
|
|
5085
|
+
isCorrect: boolean;
|
|
5086
|
+
markschemeState: import("@prisma/client/runtime/library.js").JsonValue | null;
|
|
5077
5087
|
}[];
|
|
5078
5088
|
} & {
|
|
5079
5089
|
id: string;
|
|
@@ -5087,115 +5097,156 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
5087
5097
|
};
|
|
5088
5098
|
meta: object;
|
|
5089
5099
|
}>;
|
|
5090
|
-
|
|
5100
|
+
gradeAnswer: import("@trpc/server").TRPCMutationProcedure<{
|
|
5091
5101
|
input: {
|
|
5092
|
-
|
|
5093
|
-
|
|
5102
|
+
questionId: string;
|
|
5103
|
+
studentWorksheetResponseId: string;
|
|
5104
|
+
isCorrect: boolean;
|
|
5105
|
+
feedback?: string | undefined;
|
|
5106
|
+
points?: number | undefined;
|
|
5107
|
+
response?: string | undefined;
|
|
5108
|
+
responseId?: string | undefined;
|
|
5109
|
+
markschemeState?: any;
|
|
5110
|
+
};
|
|
5111
|
+
output: any;
|
|
5112
|
+
meta: object;
|
|
5113
|
+
}>;
|
|
5114
|
+
addComment: import("@trpc/server").TRPCMutationProcedure<{
|
|
5115
|
+
input: {
|
|
5116
|
+
comment: string;
|
|
5117
|
+
responseId: string;
|
|
5118
|
+
};
|
|
5119
|
+
output: {
|
|
5120
|
+
id: string;
|
|
5121
|
+
content: string;
|
|
5122
|
+
createdAt: Date;
|
|
5123
|
+
modifiedAt: Date | null;
|
|
5124
|
+
announcementId: string | null;
|
|
5125
|
+
parentCommentId: string | null;
|
|
5126
|
+
authorId: string;
|
|
5127
|
+
studentQuestionProgressId: string | null;
|
|
5128
|
+
};
|
|
5129
|
+
meta: object;
|
|
5130
|
+
}>;
|
|
5131
|
+
}>>;
|
|
5132
|
+
comment: import("@trpc/server").TRPCBuiltRouter<{
|
|
5133
|
+
ctx: import("../trpc.js").Context;
|
|
5134
|
+
meta: object;
|
|
5135
|
+
errorShape: {
|
|
5136
|
+
data: {
|
|
5137
|
+
zodError: import("zod").typeToFlattenedError<any, string> | null;
|
|
5138
|
+
prismaError: import("../utils/prismaErrorHandler.js").PrismaErrorInfo | null;
|
|
5139
|
+
code: import("@trpc/server").TRPC_ERROR_CODE_KEY;
|
|
5140
|
+
httpStatus: number;
|
|
5141
|
+
path?: string;
|
|
5142
|
+
stack?: string;
|
|
5143
|
+
};
|
|
5144
|
+
message: string;
|
|
5145
|
+
code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
|
|
5146
|
+
};
|
|
5147
|
+
transformer: false;
|
|
5148
|
+
}, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
|
|
5149
|
+
get: import("@trpc/server").TRPCQueryProcedure<{
|
|
5150
|
+
input: {
|
|
5151
|
+
id: string;
|
|
5094
5152
|
};
|
|
5095
5153
|
output: {
|
|
5096
|
-
|
|
5097
|
-
|
|
5098
|
-
|
|
5154
|
+
reactions: {
|
|
5155
|
+
type: import(".prisma/client").$Enums.ReactionType;
|
|
5156
|
+
user: {
|
|
5099
5157
|
id: string;
|
|
5100
|
-
|
|
5101
|
-
|
|
5102
|
-
|
|
5103
|
-
|
|
5104
|
-
|
|
5105
|
-
|
|
5106
|
-
question: string;
|
|
5107
|
-
worksheetId: string;
|
|
5108
|
-
answer: string;
|
|
5158
|
+
username: string;
|
|
5159
|
+
profile: {
|
|
5160
|
+
displayName: string | null;
|
|
5161
|
+
profilePicture: string | null;
|
|
5162
|
+
profilePictureThumbnail: string | null;
|
|
5163
|
+
} | null;
|
|
5109
5164
|
};
|
|
5110
|
-
}
|
|
5165
|
+
}[];
|
|
5166
|
+
replies: {
|
|
5111
5167
|
id: string;
|
|
5112
|
-
|
|
5113
|
-
|
|
5114
|
-
|
|
5115
|
-
|
|
5116
|
-
|
|
5117
|
-
|
|
5118
|
-
|
|
5119
|
-
|
|
5120
|
-
|
|
5121
|
-
|
|
5168
|
+
content: string;
|
|
5169
|
+
author: {
|
|
5170
|
+
id: string;
|
|
5171
|
+
username: string;
|
|
5172
|
+
profile: {
|
|
5173
|
+
displayName: string | null;
|
|
5174
|
+
profilePicture: string | null;
|
|
5175
|
+
profilePictureThumbnail: string | null;
|
|
5176
|
+
} | null;
|
|
5177
|
+
};
|
|
5178
|
+
}[];
|
|
5179
|
+
} | null;
|
|
5180
|
+
meta: object;
|
|
5181
|
+
}>;
|
|
5182
|
+
replyToComment: import("@trpc/server").TRPCMutationProcedure<{
|
|
5183
|
+
input: {
|
|
5184
|
+
content: string;
|
|
5185
|
+
parentCommentId: string;
|
|
5186
|
+
};
|
|
5187
|
+
output: {
|
|
5122
5188
|
id: string;
|
|
5123
|
-
|
|
5124
|
-
studentId: string;
|
|
5189
|
+
content: string;
|
|
5125
5190
|
createdAt: Date;
|
|
5126
|
-
|
|
5127
|
-
|
|
5128
|
-
|
|
5129
|
-
|
|
5191
|
+
modifiedAt: Date | null;
|
|
5192
|
+
announcementId: string | null;
|
|
5193
|
+
parentCommentId: string | null;
|
|
5194
|
+
authorId: string;
|
|
5195
|
+
studentQuestionProgressId: string | null;
|
|
5130
5196
|
};
|
|
5131
5197
|
meta: object;
|
|
5132
5198
|
}>;
|
|
5133
|
-
|
|
5199
|
+
addReaction: import("@trpc/server").TRPCMutationProcedure<{
|
|
5134
5200
|
input: {
|
|
5135
|
-
|
|
5201
|
+
type: "THUMBSUP" | "CELEBRATE" | "CARE" | "HEART" | "IDEA" | "HAPPY";
|
|
5202
|
+
id: string;
|
|
5136
5203
|
};
|
|
5137
|
-
output:
|
|
5138
|
-
|
|
5139
|
-
|
|
5140
|
-
username: string;
|
|
5141
|
-
profile: {
|
|
5142
|
-
displayName: string | null;
|
|
5143
|
-
profilePicture: string | null;
|
|
5144
|
-
} | null;
|
|
5145
|
-
};
|
|
5146
|
-
responses: ({
|
|
5147
|
-
question: {
|
|
5148
|
-
type: import(".prisma/client").$Enums.WorksheetQuestionType;
|
|
5204
|
+
output: {
|
|
5205
|
+
reaction: {
|
|
5206
|
+
user: {
|
|
5149
5207
|
id: string;
|
|
5150
|
-
|
|
5151
|
-
|
|
5152
|
-
|
|
5153
|
-
|
|
5154
|
-
|
|
5155
|
-
|
|
5156
|
-
question: string;
|
|
5157
|
-
worksheetId: string;
|
|
5158
|
-
answer: string;
|
|
5208
|
+
username: string;
|
|
5209
|
+
profile: {
|
|
5210
|
+
displayName: string | null;
|
|
5211
|
+
profilePicture: string | null;
|
|
5212
|
+
profilePictureThumbnail: string | null;
|
|
5213
|
+
} | null;
|
|
5159
5214
|
};
|
|
5160
5215
|
} & {
|
|
5216
|
+
type: import(".prisma/client").$Enums.ReactionType;
|
|
5161
5217
|
id: string;
|
|
5162
|
-
|
|
5163
|
-
studentId: string;
|
|
5218
|
+
userId: string;
|
|
5164
5219
|
createdAt: Date;
|
|
5165
|
-
|
|
5166
|
-
|
|
5167
|
-
|
|
5168
|
-
|
|
5169
|
-
studentWorksheetResponseId: string | null;
|
|
5170
|
-
})[];
|
|
5171
|
-
} & {
|
|
5172
|
-
id: string;
|
|
5173
|
-
submissionId: string | null;
|
|
5174
|
-
studentId: string;
|
|
5175
|
-
createdAt: Date;
|
|
5176
|
-
updatedAt: Date;
|
|
5177
|
-
submittedAt: Date | null;
|
|
5178
|
-
submitted: boolean;
|
|
5179
|
-
worksheetId: string;
|
|
5180
|
-
}) | null;
|
|
5220
|
+
announcementId: string | null;
|
|
5221
|
+
commentId: string | null;
|
|
5222
|
+
};
|
|
5223
|
+
};
|
|
5181
5224
|
meta: object;
|
|
5182
5225
|
}>;
|
|
5183
|
-
|
|
5226
|
+
removeReaction: import("@trpc/server").TRPCMutationProcedure<{
|
|
5184
5227
|
input: {
|
|
5185
|
-
|
|
5186
|
-
isCorrect: boolean;
|
|
5187
|
-
feedback?: string | undefined;
|
|
5228
|
+
commentId?: string | undefined;
|
|
5188
5229
|
};
|
|
5189
5230
|
output: {
|
|
5190
|
-
|
|
5191
|
-
|
|
5192
|
-
|
|
5193
|
-
|
|
5194
|
-
|
|
5195
|
-
|
|
5196
|
-
|
|
5197
|
-
|
|
5198
|
-
|
|
5231
|
+
success: boolean;
|
|
5232
|
+
};
|
|
5233
|
+
meta: object;
|
|
5234
|
+
}>;
|
|
5235
|
+
getReactions: import("@trpc/server").TRPCQueryProcedure<{
|
|
5236
|
+
input: {
|
|
5237
|
+
commentId?: string | undefined;
|
|
5238
|
+
};
|
|
5239
|
+
output: {
|
|
5240
|
+
counts: {
|
|
5241
|
+
THUMBSUP: number;
|
|
5242
|
+
CELEBRATE: number;
|
|
5243
|
+
CARE: number;
|
|
5244
|
+
HEART: number;
|
|
5245
|
+
IDEA: number;
|
|
5246
|
+
HAPPY: number;
|
|
5247
|
+
};
|
|
5248
|
+
userReaction: import(".prisma/client").$Enums.ReactionType | null;
|
|
5249
|
+
total: number;
|
|
5199
5250
|
};
|
|
5200
5251
|
meta: object;
|
|
5201
5252
|
}>;
|
|
@@ -6219,9 +6270,10 @@ export declare const createCaller: import("@trpc/server").TRPCRouterCaller<{
|
|
|
6219
6270
|
content: string;
|
|
6220
6271
|
createdAt: Date;
|
|
6221
6272
|
modifiedAt: Date | null;
|
|
6222
|
-
announcementId: string;
|
|
6273
|
+
announcementId: string | null;
|
|
6223
6274
|
parentCommentId: string | null;
|
|
6224
6275
|
authorId: string;
|
|
6276
|
+
studentQuestionProgressId: string | null;
|
|
6225
6277
|
};
|
|
6226
6278
|
};
|
|
6227
6279
|
meta: object;
|
|
@@ -6247,9 +6299,10 @@ export declare const createCaller: import("@trpc/server").TRPCRouterCaller<{
|
|
|
6247
6299
|
content: string;
|
|
6248
6300
|
createdAt: Date;
|
|
6249
6301
|
modifiedAt: Date | null;
|
|
6250
|
-
announcementId: string;
|
|
6302
|
+
announcementId: string | null;
|
|
6251
6303
|
parentCommentId: string | null;
|
|
6252
6304
|
authorId: string;
|
|
6305
|
+
studentQuestionProgressId: string | null;
|
|
6253
6306
|
};
|
|
6254
6307
|
};
|
|
6255
6308
|
meta: object;
|
|
@@ -6295,18 +6348,20 @@ export declare const createCaller: import("@trpc/server").TRPCRouterCaller<{
|
|
|
6295
6348
|
content: string;
|
|
6296
6349
|
createdAt: Date;
|
|
6297
6350
|
modifiedAt: Date | null;
|
|
6298
|
-
announcementId: string;
|
|
6351
|
+
announcementId: string | null;
|
|
6299
6352
|
parentCommentId: string | null;
|
|
6300
6353
|
authorId: string;
|
|
6354
|
+
studentQuestionProgressId: string | null;
|
|
6301
6355
|
})[];
|
|
6302
6356
|
} & {
|
|
6303
6357
|
id: string;
|
|
6304
6358
|
content: string;
|
|
6305
6359
|
createdAt: Date;
|
|
6306
6360
|
modifiedAt: Date | null;
|
|
6307
|
-
announcementId: string;
|
|
6361
|
+
announcementId: string | null;
|
|
6308
6362
|
parentCommentId: string | null;
|
|
6309
6363
|
authorId: string;
|
|
6364
|
+
studentQuestionProgressId: string | null;
|
|
6310
6365
|
})[];
|
|
6311
6366
|
};
|
|
6312
6367
|
meta: object;
|
|
@@ -10050,7 +10105,7 @@ export declare const createCaller: import("@trpc/server").TRPCRouterCaller<{
|
|
|
10050
10105
|
order: number | null;
|
|
10051
10106
|
markScheme: import("@prisma/client/runtime/library.js").JsonValue | null;
|
|
10052
10107
|
updatedAt: Date;
|
|
10053
|
-
points: number
|
|
10108
|
+
points: number;
|
|
10054
10109
|
question: string;
|
|
10055
10110
|
worksheetId: string;
|
|
10056
10111
|
answer: string;
|
|
@@ -10140,7 +10195,7 @@ export declare const createCaller: import("@trpc/server").TRPCRouterCaller<{
|
|
|
10140
10195
|
order: number | null;
|
|
10141
10196
|
markScheme: import("@prisma/client/runtime/library.js").JsonValue | null;
|
|
10142
10197
|
updatedAt: Date;
|
|
10143
|
-
points: number
|
|
10198
|
+
points: number;
|
|
10144
10199
|
question: string;
|
|
10145
10200
|
worksheetId: string;
|
|
10146
10201
|
answer: string;
|
|
@@ -10178,7 +10233,7 @@ export declare const createCaller: import("@trpc/server").TRPCRouterCaller<{
|
|
|
10178
10233
|
order: number | null;
|
|
10179
10234
|
markScheme: import("@prisma/client/runtime/library.js").JsonValue | null;
|
|
10180
10235
|
updatedAt: Date;
|
|
10181
|
-
points: number
|
|
10236
|
+
points: number;
|
|
10182
10237
|
question: string;
|
|
10183
10238
|
worksheetId: string;
|
|
10184
10239
|
answer: string;
|
|
@@ -10198,7 +10253,7 @@ export declare const createCaller: import("@trpc/server").TRPCRouterCaller<{
|
|
|
10198
10253
|
order: number | null;
|
|
10199
10254
|
markScheme: import("@prisma/client/runtime/library.js").JsonValue | null;
|
|
10200
10255
|
updatedAt: Date;
|
|
10201
|
-
points: number
|
|
10256
|
+
points: number;
|
|
10202
10257
|
question: string;
|
|
10203
10258
|
worksheetId: string;
|
|
10204
10259
|
answer: string;
|
|
@@ -10216,11 +10271,13 @@ export declare const createCaller: import("@trpc/server").TRPCRouterCaller<{
|
|
|
10216
10271
|
feedback: string | null;
|
|
10217
10272
|
studentId: string;
|
|
10218
10273
|
createdAt: Date;
|
|
10219
|
-
updatedAt: Date;
|
|
10274
|
+
updatedAt: Date | null;
|
|
10275
|
+
points: number;
|
|
10220
10276
|
questionId: string;
|
|
10221
10277
|
response: string;
|
|
10222
|
-
isCorrect: boolean;
|
|
10223
10278
|
studentWorksheetResponseId: string | null;
|
|
10279
|
+
isCorrect: boolean;
|
|
10280
|
+
markschemeState: import("@prisma/client/runtime/library.js").JsonValue | null;
|
|
10224
10281
|
}[];
|
|
10225
10282
|
} & {
|
|
10226
10283
|
id: string;
|
|
@@ -10246,11 +10303,13 @@ export declare const createCaller: import("@trpc/server").TRPCRouterCaller<{
|
|
|
10246
10303
|
feedback: string | null;
|
|
10247
10304
|
studentId: string;
|
|
10248
10305
|
createdAt: Date;
|
|
10249
|
-
updatedAt: Date;
|
|
10306
|
+
updatedAt: Date | null;
|
|
10307
|
+
points: number;
|
|
10250
10308
|
questionId: string;
|
|
10251
10309
|
response: string;
|
|
10252
|
-
isCorrect: boolean;
|
|
10253
10310
|
studentWorksheetResponseId: string | null;
|
|
10311
|
+
isCorrect: boolean;
|
|
10312
|
+
markschemeState: import("@prisma/client/runtime/library.js").JsonValue | null;
|
|
10254
10313
|
}[];
|
|
10255
10314
|
} & {
|
|
10256
10315
|
id: string;
|
|
@@ -10274,11 +10333,13 @@ export declare const createCaller: import("@trpc/server").TRPCRouterCaller<{
|
|
|
10274
10333
|
feedback: string | null;
|
|
10275
10334
|
studentId: string;
|
|
10276
10335
|
createdAt: Date;
|
|
10277
|
-
updatedAt: Date;
|
|
10336
|
+
updatedAt: Date | null;
|
|
10337
|
+
points: number;
|
|
10278
10338
|
questionId: string;
|
|
10279
10339
|
response: string;
|
|
10280
|
-
isCorrect: boolean;
|
|
10281
10340
|
studentWorksheetResponseId: string | null;
|
|
10341
|
+
isCorrect: boolean;
|
|
10342
|
+
markschemeState: import("@prisma/client/runtime/library.js").JsonValue | null;
|
|
10282
10343
|
}[];
|
|
10283
10344
|
} & {
|
|
10284
10345
|
id: string;
|
|
@@ -10292,115 +10353,156 @@ export declare const createCaller: import("@trpc/server").TRPCRouterCaller<{
|
|
|
10292
10353
|
};
|
|
10293
10354
|
meta: object;
|
|
10294
10355
|
}>;
|
|
10295
|
-
|
|
10356
|
+
gradeAnswer: import("@trpc/server").TRPCMutationProcedure<{
|
|
10296
10357
|
input: {
|
|
10297
|
-
|
|
10298
|
-
|
|
10358
|
+
questionId: string;
|
|
10359
|
+
studentWorksheetResponseId: string;
|
|
10360
|
+
isCorrect: boolean;
|
|
10361
|
+
feedback?: string | undefined;
|
|
10362
|
+
points?: number | undefined;
|
|
10363
|
+
response?: string | undefined;
|
|
10364
|
+
responseId?: string | undefined;
|
|
10365
|
+
markschemeState?: any;
|
|
10366
|
+
};
|
|
10367
|
+
output: any;
|
|
10368
|
+
meta: object;
|
|
10369
|
+
}>;
|
|
10370
|
+
addComment: import("@trpc/server").TRPCMutationProcedure<{
|
|
10371
|
+
input: {
|
|
10372
|
+
comment: string;
|
|
10373
|
+
responseId: string;
|
|
10374
|
+
};
|
|
10375
|
+
output: {
|
|
10376
|
+
id: string;
|
|
10377
|
+
content: string;
|
|
10378
|
+
createdAt: Date;
|
|
10379
|
+
modifiedAt: Date | null;
|
|
10380
|
+
announcementId: string | null;
|
|
10381
|
+
parentCommentId: string | null;
|
|
10382
|
+
authorId: string;
|
|
10383
|
+
studentQuestionProgressId: string | null;
|
|
10384
|
+
};
|
|
10385
|
+
meta: object;
|
|
10386
|
+
}>;
|
|
10387
|
+
}>>;
|
|
10388
|
+
comment: import("@trpc/server").TRPCBuiltRouter<{
|
|
10389
|
+
ctx: import("../trpc.js").Context;
|
|
10390
|
+
meta: object;
|
|
10391
|
+
errorShape: {
|
|
10392
|
+
data: {
|
|
10393
|
+
zodError: import("zod").typeToFlattenedError<any, string> | null;
|
|
10394
|
+
prismaError: import("../utils/prismaErrorHandler.js").PrismaErrorInfo | null;
|
|
10395
|
+
code: import("@trpc/server").TRPC_ERROR_CODE_KEY;
|
|
10396
|
+
httpStatus: number;
|
|
10397
|
+
path?: string;
|
|
10398
|
+
stack?: string;
|
|
10399
|
+
};
|
|
10400
|
+
message: string;
|
|
10401
|
+
code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
|
|
10402
|
+
};
|
|
10403
|
+
transformer: false;
|
|
10404
|
+
}, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
|
|
10405
|
+
get: import("@trpc/server").TRPCQueryProcedure<{
|
|
10406
|
+
input: {
|
|
10407
|
+
id: string;
|
|
10299
10408
|
};
|
|
10300
10409
|
output: {
|
|
10301
|
-
|
|
10302
|
-
|
|
10303
|
-
|
|
10410
|
+
reactions: {
|
|
10411
|
+
type: import(".prisma/client").$Enums.ReactionType;
|
|
10412
|
+
user: {
|
|
10304
10413
|
id: string;
|
|
10305
|
-
|
|
10306
|
-
|
|
10307
|
-
|
|
10308
|
-
|
|
10309
|
-
|
|
10310
|
-
|
|
10311
|
-
question: string;
|
|
10312
|
-
worksheetId: string;
|
|
10313
|
-
answer: string;
|
|
10414
|
+
username: string;
|
|
10415
|
+
profile: {
|
|
10416
|
+
displayName: string | null;
|
|
10417
|
+
profilePicture: string | null;
|
|
10418
|
+
profilePictureThumbnail: string | null;
|
|
10419
|
+
} | null;
|
|
10314
10420
|
};
|
|
10315
|
-
}
|
|
10421
|
+
}[];
|
|
10422
|
+
replies: {
|
|
10316
10423
|
id: string;
|
|
10317
|
-
|
|
10318
|
-
|
|
10319
|
-
|
|
10320
|
-
|
|
10321
|
-
|
|
10322
|
-
|
|
10323
|
-
|
|
10324
|
-
|
|
10325
|
-
|
|
10326
|
-
|
|
10424
|
+
content: string;
|
|
10425
|
+
author: {
|
|
10426
|
+
id: string;
|
|
10427
|
+
username: string;
|
|
10428
|
+
profile: {
|
|
10429
|
+
displayName: string | null;
|
|
10430
|
+
profilePicture: string | null;
|
|
10431
|
+
profilePictureThumbnail: string | null;
|
|
10432
|
+
} | null;
|
|
10433
|
+
};
|
|
10434
|
+
}[];
|
|
10435
|
+
} | null;
|
|
10436
|
+
meta: object;
|
|
10437
|
+
}>;
|
|
10438
|
+
replyToComment: import("@trpc/server").TRPCMutationProcedure<{
|
|
10439
|
+
input: {
|
|
10440
|
+
content: string;
|
|
10441
|
+
parentCommentId: string;
|
|
10442
|
+
};
|
|
10443
|
+
output: {
|
|
10327
10444
|
id: string;
|
|
10328
|
-
|
|
10329
|
-
studentId: string;
|
|
10445
|
+
content: string;
|
|
10330
10446
|
createdAt: Date;
|
|
10331
|
-
|
|
10332
|
-
|
|
10333
|
-
|
|
10334
|
-
|
|
10447
|
+
modifiedAt: Date | null;
|
|
10448
|
+
announcementId: string | null;
|
|
10449
|
+
parentCommentId: string | null;
|
|
10450
|
+
authorId: string;
|
|
10451
|
+
studentQuestionProgressId: string | null;
|
|
10335
10452
|
};
|
|
10336
10453
|
meta: object;
|
|
10337
10454
|
}>;
|
|
10338
|
-
|
|
10455
|
+
addReaction: import("@trpc/server").TRPCMutationProcedure<{
|
|
10339
10456
|
input: {
|
|
10340
|
-
|
|
10457
|
+
type: "THUMBSUP" | "CELEBRATE" | "CARE" | "HEART" | "IDEA" | "HAPPY";
|
|
10458
|
+
id: string;
|
|
10341
10459
|
};
|
|
10342
|
-
output:
|
|
10343
|
-
|
|
10344
|
-
|
|
10345
|
-
username: string;
|
|
10346
|
-
profile: {
|
|
10347
|
-
displayName: string | null;
|
|
10348
|
-
profilePicture: string | null;
|
|
10349
|
-
} | null;
|
|
10350
|
-
};
|
|
10351
|
-
responses: ({
|
|
10352
|
-
question: {
|
|
10353
|
-
type: import(".prisma/client").$Enums.WorksheetQuestionType;
|
|
10460
|
+
output: {
|
|
10461
|
+
reaction: {
|
|
10462
|
+
user: {
|
|
10354
10463
|
id: string;
|
|
10355
|
-
|
|
10356
|
-
|
|
10357
|
-
|
|
10358
|
-
|
|
10359
|
-
|
|
10360
|
-
|
|
10361
|
-
question: string;
|
|
10362
|
-
worksheetId: string;
|
|
10363
|
-
answer: string;
|
|
10464
|
+
username: string;
|
|
10465
|
+
profile: {
|
|
10466
|
+
displayName: string | null;
|
|
10467
|
+
profilePicture: string | null;
|
|
10468
|
+
profilePictureThumbnail: string | null;
|
|
10469
|
+
} | null;
|
|
10364
10470
|
};
|
|
10365
10471
|
} & {
|
|
10472
|
+
type: import(".prisma/client").$Enums.ReactionType;
|
|
10366
10473
|
id: string;
|
|
10367
|
-
|
|
10368
|
-
studentId: string;
|
|
10474
|
+
userId: string;
|
|
10369
10475
|
createdAt: Date;
|
|
10370
|
-
|
|
10371
|
-
|
|
10372
|
-
|
|
10373
|
-
|
|
10374
|
-
studentWorksheetResponseId: string | null;
|
|
10375
|
-
})[];
|
|
10376
|
-
} & {
|
|
10377
|
-
id: string;
|
|
10378
|
-
submissionId: string | null;
|
|
10379
|
-
studentId: string;
|
|
10380
|
-
createdAt: Date;
|
|
10381
|
-
updatedAt: Date;
|
|
10382
|
-
submittedAt: Date | null;
|
|
10383
|
-
submitted: boolean;
|
|
10384
|
-
worksheetId: string;
|
|
10385
|
-
}) | null;
|
|
10476
|
+
announcementId: string | null;
|
|
10477
|
+
commentId: string | null;
|
|
10478
|
+
};
|
|
10479
|
+
};
|
|
10386
10480
|
meta: object;
|
|
10387
10481
|
}>;
|
|
10388
|
-
|
|
10482
|
+
removeReaction: import("@trpc/server").TRPCMutationProcedure<{
|
|
10389
10483
|
input: {
|
|
10390
|
-
|
|
10391
|
-
isCorrect: boolean;
|
|
10392
|
-
feedback?: string | undefined;
|
|
10484
|
+
commentId?: string | undefined;
|
|
10393
10485
|
};
|
|
10394
10486
|
output: {
|
|
10395
|
-
|
|
10396
|
-
|
|
10397
|
-
|
|
10398
|
-
|
|
10399
|
-
|
|
10400
|
-
|
|
10401
|
-
|
|
10402
|
-
|
|
10403
|
-
|
|
10487
|
+
success: boolean;
|
|
10488
|
+
};
|
|
10489
|
+
meta: object;
|
|
10490
|
+
}>;
|
|
10491
|
+
getReactions: import("@trpc/server").TRPCQueryProcedure<{
|
|
10492
|
+
input: {
|
|
10493
|
+
commentId?: string | undefined;
|
|
10494
|
+
};
|
|
10495
|
+
output: {
|
|
10496
|
+
counts: {
|
|
10497
|
+
THUMBSUP: number;
|
|
10498
|
+
CELEBRATE: number;
|
|
10499
|
+
CARE: number;
|
|
10500
|
+
HEART: number;
|
|
10501
|
+
IDEA: number;
|
|
10502
|
+
HAPPY: number;
|
|
10503
|
+
};
|
|
10504
|
+
userReaction: import(".prisma/client").$Enums.ReactionType | null;
|
|
10505
|
+
total: number;
|
|
10404
10506
|
};
|
|
10405
10507
|
meta: object;
|
|
10406
10508
|
}>;
|