@goscribe/server 1.3.0 → 1.3.1
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/context.d.ts +5 -1
- package/dist/lib/activity_human_description.d.ts +13 -0
- package/dist/lib/activity_human_description.js +221 -0
- package/dist/lib/activity_human_description.test.d.ts +1 -0
- package/dist/lib/activity_human_description.test.js +16 -0
- package/dist/lib/activity_log_service.d.ts +87 -0
- package/dist/lib/activity_log_service.js +276 -0
- package/dist/lib/activity_log_service.test.d.ts +1 -0
- package/dist/lib/activity_log_service.test.js +27 -0
- package/dist/lib/ai-session.d.ts +15 -2
- package/dist/lib/ai-session.js +147 -85
- package/dist/lib/constants.d.ts +13 -0
- package/dist/lib/constants.js +12 -0
- package/dist/lib/email.d.ts +11 -0
- package/dist/lib/email.js +193 -0
- package/dist/lib/env.d.ts +13 -0
- package/dist/lib/env.js +16 -0
- package/dist/lib/inference.d.ts +4 -1
- package/dist/lib/inference.js +3 -3
- package/dist/lib/logger.d.ts +4 -4
- package/dist/lib/logger.js +30 -8
- package/dist/lib/notification-service.d.ts +152 -0
- package/dist/lib/notification-service.js +473 -0
- package/dist/lib/notification-service.test.d.ts +1 -0
- package/dist/lib/notification-service.test.js +87 -0
- package/dist/lib/prisma.d.ts +2 -1
- package/dist/lib/prisma.js +5 -1
- package/dist/lib/pusher.d.ts +23 -0
- package/dist/lib/pusher.js +69 -5
- package/dist/lib/retry.d.ts +15 -0
- package/dist/lib/retry.js +37 -0
- package/dist/lib/storage.js +2 -2
- package/dist/lib/stripe.d.ts +9 -0
- package/dist/lib/stripe.js +36 -0
- package/dist/lib/subscription_service.d.ts +37 -0
- package/dist/lib/subscription_service.js +654 -0
- package/dist/lib/usage_service.d.ts +26 -0
- package/dist/lib/usage_service.js +59 -0
- package/dist/lib/worksheet-generation.d.ts +91 -0
- package/dist/lib/worksheet-generation.js +95 -0
- package/dist/lib/worksheet-generation.test.d.ts +1 -0
- package/dist/lib/worksheet-generation.test.js +20 -0
- package/dist/lib/workspace-access.d.ts +18 -0
- package/dist/lib/workspace-access.js +13 -0
- package/dist/routers/_app.d.ts +1349 -253
- package/dist/routers/_app.js +10 -0
- package/dist/routers/admin.d.ts +361 -0
- package/dist/routers/admin.js +633 -0
- package/dist/routers/annotations.d.ts +219 -0
- package/dist/routers/annotations.js +187 -0
- package/dist/routers/auth.d.ts +88 -7
- package/dist/routers/auth.js +339 -19
- package/dist/routers/chat.d.ts +6 -12
- package/dist/routers/copilot.d.ts +199 -0
- package/dist/routers/copilot.js +571 -0
- package/dist/routers/flashcards.d.ts +47 -81
- package/dist/routers/flashcards.js +143 -27
- package/dist/routers/members.d.ts +36 -7
- package/dist/routers/members.js +200 -19
- package/dist/routers/notifications.d.ts +99 -0
- package/dist/routers/notifications.js +127 -0
- package/dist/routers/payment.d.ts +89 -0
- package/dist/routers/payment.js +403 -0
- package/dist/routers/podcast.d.ts +8 -13
- package/dist/routers/podcast.js +54 -31
- package/dist/routers/studyguide.d.ts +1 -29
- package/dist/routers/studyguide.js +80 -71
- package/dist/routers/worksheets.d.ts +105 -38
- package/dist/routers/worksheets.js +258 -68
- package/dist/routers/workspace.d.ts +139 -60
- package/dist/routers/workspace.js +455 -315
- package/dist/scripts/purge-deleted-users.d.ts +1 -0
- package/dist/scripts/purge-deleted-users.js +149 -0
- package/dist/server.js +130 -10
- package/dist/services/flashcard-progress.service.d.ts +18 -66
- package/dist/services/flashcard-progress.service.js +51 -42
- package/dist/trpc.d.ts +20 -21
- package/dist/trpc.js +150 -1
- package/package.json +1 -1
package/dist/routers/_app.d.ts
CHANGED
|
@@ -1,12 +1,6 @@
|
|
|
1
1
|
import { inferRouterInputs, inferRouterOutputs } from '@trpc/server';
|
|
2
2
|
export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
3
|
-
ctx:
|
|
4
|
-
db: import("@prisma/client").PrismaClient<import("@prisma/client").Prisma.PrismaClientOptions, never, import("@prisma/client/runtime/library").DefaultArgs>;
|
|
5
|
-
session: any;
|
|
6
|
-
req: import("express").Request<import("express-serve-static-core").ParamsDictionary, any, any, import("qs").ParsedQs, Record<string, any>>;
|
|
7
|
-
res: import("express").Response<any, Record<string, any>>;
|
|
8
|
-
cookies: Record<string, string | undefined>;
|
|
9
|
-
};
|
|
3
|
+
ctx: import("../context.js").Context;
|
|
10
4
|
meta: object;
|
|
11
5
|
errorShape: {
|
|
12
6
|
data: {
|
|
@@ -22,13 +16,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
22
16
|
transformer: true;
|
|
23
17
|
}, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
|
|
24
18
|
auth: import("@trpc/server").TRPCBuiltRouter<{
|
|
25
|
-
ctx:
|
|
26
|
-
db: import("@prisma/client").PrismaClient<import("@prisma/client").Prisma.PrismaClientOptions, never, import("@prisma/client/runtime/library").DefaultArgs>;
|
|
27
|
-
session: any;
|
|
28
|
-
req: import("express").Request<import("express-serve-static-core").ParamsDictionary, any, any, import("qs").ParsedQs, Record<string, any>>;
|
|
29
|
-
res: import("express").Response<any, Record<string, any>>;
|
|
30
|
-
cookies: Record<string, string | undefined>;
|
|
31
|
-
};
|
|
19
|
+
ctx: import("../context.js").Context;
|
|
32
20
|
meta: object;
|
|
33
21
|
errorShape: {
|
|
34
22
|
data: {
|
|
@@ -53,6 +41,17 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
53
41
|
};
|
|
54
42
|
meta: object;
|
|
55
43
|
}>;
|
|
44
|
+
changePassword: import("@trpc/server").TRPCMutationProcedure<{
|
|
45
|
+
input: {
|
|
46
|
+
currentPassword: string;
|
|
47
|
+
newPassword: string;
|
|
48
|
+
};
|
|
49
|
+
output: {
|
|
50
|
+
success: boolean;
|
|
51
|
+
message: string;
|
|
52
|
+
};
|
|
53
|
+
meta: object;
|
|
54
|
+
}>;
|
|
56
55
|
uploadProfilePicture: import("@trpc/server").TRPCMutationProcedure<{
|
|
57
56
|
input: void;
|
|
58
57
|
output: {
|
|
@@ -62,6 +61,13 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
62
61
|
};
|
|
63
62
|
meta: object;
|
|
64
63
|
}>;
|
|
64
|
+
confirmProfileUpdate: import("@trpc/server").TRPCMutationProcedure<{
|
|
65
|
+
input: void;
|
|
66
|
+
output: {
|
|
67
|
+
success: boolean;
|
|
68
|
+
};
|
|
69
|
+
meta: object;
|
|
70
|
+
}>;
|
|
65
71
|
signup: import("@trpc/server").TRPCMutationProcedure<{
|
|
66
72
|
input: {
|
|
67
73
|
name: string;
|
|
@@ -75,6 +81,24 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
75
81
|
};
|
|
76
82
|
meta: object;
|
|
77
83
|
}>;
|
|
84
|
+
verifyEmail: import("@trpc/server").TRPCMutationProcedure<{
|
|
85
|
+
input: {
|
|
86
|
+
token: string;
|
|
87
|
+
};
|
|
88
|
+
output: {
|
|
89
|
+
success: boolean;
|
|
90
|
+
message: string;
|
|
91
|
+
};
|
|
92
|
+
meta: object;
|
|
93
|
+
}>;
|
|
94
|
+
resendVerification: import("@trpc/server").TRPCMutationProcedure<{
|
|
95
|
+
input: void;
|
|
96
|
+
output: {
|
|
97
|
+
success: boolean;
|
|
98
|
+
message: string;
|
|
99
|
+
};
|
|
100
|
+
meta: object;
|
|
101
|
+
}>;
|
|
78
102
|
login: import("@trpc/server").TRPCMutationProcedure<{
|
|
79
103
|
input: {
|
|
80
104
|
email: string;
|
|
@@ -88,6 +112,27 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
88
112
|
};
|
|
89
113
|
meta: object;
|
|
90
114
|
}>;
|
|
115
|
+
requestPasswordReset: import("@trpc/server").TRPCMutationProcedure<{
|
|
116
|
+
input: {
|
|
117
|
+
email: string;
|
|
118
|
+
};
|
|
119
|
+
output: {
|
|
120
|
+
success: true;
|
|
121
|
+
message: string;
|
|
122
|
+
};
|
|
123
|
+
meta: object;
|
|
124
|
+
}>;
|
|
125
|
+
resetPassword: import("@trpc/server").TRPCMutationProcedure<{
|
|
126
|
+
input: {
|
|
127
|
+
token: string;
|
|
128
|
+
newPassword: string;
|
|
129
|
+
};
|
|
130
|
+
output: {
|
|
131
|
+
success: boolean;
|
|
132
|
+
message: string;
|
|
133
|
+
};
|
|
134
|
+
meta: object;
|
|
135
|
+
}>;
|
|
91
136
|
getSession: import("@trpc/server").TRPCQueryProcedure<{
|
|
92
137
|
input: void;
|
|
93
138
|
output: {
|
|
@@ -95,10 +140,34 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
95
140
|
id: string;
|
|
96
141
|
email: string | null;
|
|
97
142
|
name: string | null;
|
|
143
|
+
emailVerified: boolean;
|
|
144
|
+
profilePicture: string | null;
|
|
145
|
+
role: {
|
|
146
|
+
name: string;
|
|
147
|
+
id: string;
|
|
148
|
+
} | null;
|
|
98
149
|
};
|
|
99
150
|
};
|
|
100
151
|
meta: object;
|
|
101
152
|
}>;
|
|
153
|
+
requestAccountDeletion: import("@trpc/server").TRPCMutationProcedure<{
|
|
154
|
+
input: void;
|
|
155
|
+
output: {
|
|
156
|
+
success: boolean;
|
|
157
|
+
message: string;
|
|
158
|
+
};
|
|
159
|
+
meta: object;
|
|
160
|
+
}>;
|
|
161
|
+
restoreAccount: import("@trpc/server").TRPCMutationProcedure<{
|
|
162
|
+
input: {
|
|
163
|
+
token: string;
|
|
164
|
+
};
|
|
165
|
+
output: {
|
|
166
|
+
success: boolean;
|
|
167
|
+
message: string;
|
|
168
|
+
};
|
|
169
|
+
meta: object;
|
|
170
|
+
}>;
|
|
102
171
|
logout: import("@trpc/server").TRPCMutationProcedure<{
|
|
103
172
|
input: void;
|
|
104
173
|
output: {
|
|
@@ -108,13 +177,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
108
177
|
}>;
|
|
109
178
|
}>>;
|
|
110
179
|
workspace: import("@trpc/server").TRPCBuiltRouter<{
|
|
111
|
-
ctx:
|
|
112
|
-
db: import("@prisma/client").PrismaClient<import("@prisma/client").Prisma.PrismaClientOptions, never, import("@prisma/client/runtime/library").DefaultArgs>;
|
|
113
|
-
session: any;
|
|
114
|
-
req: import("express").Request<import("express-serve-static-core").ParamsDictionary, any, any, import("qs").ParsedQs, Record<string, any>>;
|
|
115
|
-
res: import("express").Response<any, Record<string, any>>;
|
|
116
|
-
cookies: Record<string, string | undefined>;
|
|
117
|
-
};
|
|
180
|
+
ctx: import("../context.js").Context;
|
|
118
181
|
meta: object;
|
|
119
182
|
errorShape: {
|
|
120
183
|
data: {
|
|
@@ -138,10 +201,11 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
138
201
|
id: string;
|
|
139
202
|
createdAt: Date;
|
|
140
203
|
updatedAt: Date;
|
|
141
|
-
ownerId: string;
|
|
142
|
-
color: string;
|
|
143
204
|
title: string;
|
|
144
205
|
description: string | null;
|
|
206
|
+
ownerId: string;
|
|
207
|
+
color: string;
|
|
208
|
+
markerColor: string | null;
|
|
145
209
|
icon: string;
|
|
146
210
|
folderId: string | null;
|
|
147
211
|
fileBeingAnalyzed: boolean;
|
|
@@ -156,7 +220,46 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
156
220
|
ownerId: string;
|
|
157
221
|
parentId: string | null;
|
|
158
222
|
color: string;
|
|
223
|
+
markerColor: string | null;
|
|
224
|
+
}[];
|
|
225
|
+
};
|
|
226
|
+
meta: object;
|
|
227
|
+
}>;
|
|
228
|
+
getTree: import("@trpc/server").TRPCQueryProcedure<{
|
|
229
|
+
input: void;
|
|
230
|
+
output: {
|
|
231
|
+
folders: {
|
|
232
|
+
name: string;
|
|
233
|
+
id: string;
|
|
234
|
+
createdAt: Date;
|
|
235
|
+
updatedAt: Date;
|
|
236
|
+
ownerId: string;
|
|
237
|
+
parentId: string | null;
|
|
238
|
+
color: string;
|
|
239
|
+
markerColor: string | null;
|
|
159
240
|
}[];
|
|
241
|
+
workspaces: ({
|
|
242
|
+
uploads: {
|
|
243
|
+
name: string;
|
|
244
|
+
id: string;
|
|
245
|
+
createdAt: Date;
|
|
246
|
+
mimeType: string;
|
|
247
|
+
}[];
|
|
248
|
+
} & {
|
|
249
|
+
id: string;
|
|
250
|
+
createdAt: Date;
|
|
251
|
+
updatedAt: Date;
|
|
252
|
+
title: string;
|
|
253
|
+
description: string | null;
|
|
254
|
+
ownerId: string;
|
|
255
|
+
color: string;
|
|
256
|
+
markerColor: string | null;
|
|
257
|
+
icon: string;
|
|
258
|
+
folderId: string | null;
|
|
259
|
+
fileBeingAnalyzed: boolean;
|
|
260
|
+
analysisProgress: import("@prisma/client/runtime/library").JsonValue | null;
|
|
261
|
+
needsAnalysis: boolean;
|
|
262
|
+
})[];
|
|
160
263
|
};
|
|
161
264
|
meta: object;
|
|
162
265
|
}>;
|
|
@@ -170,10 +273,11 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
170
273
|
id: string;
|
|
171
274
|
createdAt: Date;
|
|
172
275
|
updatedAt: Date;
|
|
173
|
-
ownerId: string;
|
|
174
|
-
color: string;
|
|
175
276
|
title: string;
|
|
176
277
|
description: string | null;
|
|
278
|
+
ownerId: string;
|
|
279
|
+
color: string;
|
|
280
|
+
markerColor: string | null;
|
|
177
281
|
icon: string;
|
|
178
282
|
folderId: string | null;
|
|
179
283
|
fileBeingAnalyzed: boolean;
|
|
@@ -196,6 +300,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
196
300
|
ownerId: string;
|
|
197
301
|
parentId: string | null;
|
|
198
302
|
color: string;
|
|
303
|
+
markerColor: string | null;
|
|
199
304
|
};
|
|
200
305
|
meta: object;
|
|
201
306
|
}>;
|
|
@@ -203,7 +308,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
203
308
|
input: {
|
|
204
309
|
id: string;
|
|
205
310
|
name?: string | undefined;
|
|
206
|
-
|
|
311
|
+
markerColor?: string | null | undefined;
|
|
207
312
|
};
|
|
208
313
|
output: {
|
|
209
314
|
name: string;
|
|
@@ -213,6 +318,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
213
318
|
ownerId: string;
|
|
214
319
|
parentId: string | null;
|
|
215
320
|
color: string;
|
|
321
|
+
markerColor: string | null;
|
|
216
322
|
};
|
|
217
323
|
meta: object;
|
|
218
324
|
}>;
|
|
@@ -228,6 +334,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
228
334
|
ownerId: string;
|
|
229
335
|
parentId: string | null;
|
|
230
336
|
color: string;
|
|
337
|
+
markerColor: string | null;
|
|
231
338
|
};
|
|
232
339
|
meta: object;
|
|
233
340
|
}>;
|
|
@@ -244,14 +351,32 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
244
351
|
ownerId: string;
|
|
245
352
|
parentId: string | null;
|
|
246
353
|
color: string;
|
|
354
|
+
markerColor: string | null;
|
|
247
355
|
} | null;
|
|
356
|
+
artifacts: {
|
|
357
|
+
id: string;
|
|
358
|
+
createdAt: Date;
|
|
359
|
+
updatedAt: Date;
|
|
360
|
+
workspaceId: string;
|
|
361
|
+
type: import("@prisma/client").$Enums.ArtifactType;
|
|
362
|
+
title: string;
|
|
363
|
+
isArchived: boolean;
|
|
364
|
+
difficulty: import("@prisma/client").$Enums.Difficulty | null;
|
|
365
|
+
estimatedTime: string | null;
|
|
366
|
+
createdById: string | null;
|
|
367
|
+
description: string | null;
|
|
368
|
+
generating: boolean;
|
|
369
|
+
generatingMetadata: import("@prisma/client/runtime/library").JsonValue | null;
|
|
370
|
+
worksheetConfig: import("@prisma/client/runtime/library").JsonValue | null;
|
|
371
|
+
imageObjectKey: string | null;
|
|
372
|
+
}[];
|
|
248
373
|
uploads: {
|
|
249
374
|
meta: import("@prisma/client/runtime/library").JsonValue | null;
|
|
250
375
|
name: string;
|
|
251
376
|
id: string;
|
|
252
377
|
createdAt: Date;
|
|
253
|
-
userId: string | null;
|
|
254
378
|
workspaceId: string | null;
|
|
379
|
+
userId: string | null;
|
|
255
380
|
mimeType: string;
|
|
256
381
|
size: number;
|
|
257
382
|
bucket: string | null;
|
|
@@ -260,30 +385,15 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
260
385
|
checksum: string | null;
|
|
261
386
|
aiTranscription: import("@prisma/client/runtime/library").JsonValue | null;
|
|
262
387
|
}[];
|
|
263
|
-
artifacts: {
|
|
264
|
-
id: string;
|
|
265
|
-
createdAt: Date;
|
|
266
|
-
updatedAt: Date;
|
|
267
|
-
title: string;
|
|
268
|
-
description: string | null;
|
|
269
|
-
workspaceId: string;
|
|
270
|
-
type: import("@prisma/client").$Enums.ArtifactType;
|
|
271
|
-
isArchived: boolean;
|
|
272
|
-
generating: boolean;
|
|
273
|
-
generatingMetadata: import("@prisma/client/runtime/library").JsonValue | null;
|
|
274
|
-
difficulty: import("@prisma/client").$Enums.Difficulty | null;
|
|
275
|
-
estimatedTime: string | null;
|
|
276
|
-
imageObjectKey: string | null;
|
|
277
|
-
createdById: string | null;
|
|
278
|
-
}[];
|
|
279
388
|
} & {
|
|
280
389
|
id: string;
|
|
281
390
|
createdAt: Date;
|
|
282
391
|
updatedAt: Date;
|
|
283
|
-
ownerId: string;
|
|
284
|
-
color: string;
|
|
285
392
|
title: string;
|
|
286
393
|
description: string | null;
|
|
394
|
+
ownerId: string;
|
|
395
|
+
color: string;
|
|
396
|
+
markerColor: string | null;
|
|
287
397
|
icon: string;
|
|
288
398
|
folderId: string | null;
|
|
289
399
|
fileBeingAnalyzed: boolean;
|
|
@@ -303,22 +413,42 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
303
413
|
};
|
|
304
414
|
meta: object;
|
|
305
415
|
}>;
|
|
416
|
+
getStudyAnalytics: import("@trpc/server").TRPCQueryProcedure<{
|
|
417
|
+
input: void;
|
|
418
|
+
output: {
|
|
419
|
+
streak: number;
|
|
420
|
+
totalStudyDays: number;
|
|
421
|
+
weeklyActivity: boolean[];
|
|
422
|
+
flashcards: {
|
|
423
|
+
total: number;
|
|
424
|
+
mastered: number;
|
|
425
|
+
dueForReview: number;
|
|
426
|
+
};
|
|
427
|
+
worksheets: {
|
|
428
|
+
completed: number;
|
|
429
|
+
correct: number;
|
|
430
|
+
accuracy: number;
|
|
431
|
+
};
|
|
432
|
+
};
|
|
433
|
+
meta: object;
|
|
434
|
+
}>;
|
|
306
435
|
update: import("@trpc/server").TRPCMutationProcedure<{
|
|
307
436
|
input: {
|
|
308
437
|
id: string;
|
|
309
438
|
name?: string | undefined;
|
|
310
439
|
description?: string | undefined;
|
|
311
|
-
|
|
440
|
+
markerColor?: string | null | undefined;
|
|
312
441
|
icon?: string | undefined;
|
|
313
442
|
};
|
|
314
443
|
output: {
|
|
315
444
|
id: string;
|
|
316
445
|
createdAt: Date;
|
|
317
446
|
updatedAt: Date;
|
|
318
|
-
ownerId: string;
|
|
319
|
-
color: string;
|
|
320
447
|
title: string;
|
|
321
448
|
description: string | null;
|
|
449
|
+
ownerId: string;
|
|
450
|
+
color: string;
|
|
451
|
+
markerColor: string | null;
|
|
322
452
|
icon: string;
|
|
323
453
|
folderId: string | null;
|
|
324
454
|
fileBeingAnalyzed: boolean;
|
|
@@ -347,6 +477,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
347
477
|
ownerId: string;
|
|
348
478
|
parentId: string | null;
|
|
349
479
|
color: string;
|
|
480
|
+
markerColor: string | null;
|
|
350
481
|
};
|
|
351
482
|
parents: {
|
|
352
483
|
name: string;
|
|
@@ -356,6 +487,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
356
487
|
ownerId: string;
|
|
357
488
|
parentId: string | null;
|
|
358
489
|
color: string;
|
|
490
|
+
markerColor: string | null;
|
|
359
491
|
}[];
|
|
360
492
|
};
|
|
361
493
|
meta: object;
|
|
@@ -369,10 +501,11 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
369
501
|
id: string;
|
|
370
502
|
createdAt: Date;
|
|
371
503
|
updatedAt: Date;
|
|
372
|
-
ownerId: string;
|
|
373
|
-
color: string;
|
|
374
504
|
title: string;
|
|
375
505
|
description: string | null;
|
|
506
|
+
ownerId: string;
|
|
507
|
+
color: string;
|
|
508
|
+
markerColor: string | null;
|
|
376
509
|
icon: string;
|
|
377
510
|
folderId: string | null;
|
|
378
511
|
fileBeingAnalyzed: boolean;
|
|
@@ -384,10 +517,11 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
384
517
|
id: string;
|
|
385
518
|
createdAt: Date;
|
|
386
519
|
updatedAt: Date;
|
|
387
|
-
ownerId: string;
|
|
388
|
-
color: string;
|
|
389
520
|
title: string;
|
|
390
521
|
description: string | null;
|
|
522
|
+
ownerId: string;
|
|
523
|
+
color: string;
|
|
524
|
+
markerColor: string | null;
|
|
391
525
|
icon: string;
|
|
392
526
|
folderId: string | null;
|
|
393
527
|
fileBeingAnalyzed: boolean;
|
|
@@ -468,32 +602,14 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
468
602
|
search: import("@trpc/server").TRPCQueryProcedure<{
|
|
469
603
|
input: {
|
|
470
604
|
query: string;
|
|
605
|
+
color?: string | undefined;
|
|
471
606
|
limit?: number | undefined;
|
|
472
607
|
};
|
|
473
|
-
output:
|
|
474
|
-
id: string;
|
|
475
|
-
createdAt: Date;
|
|
476
|
-
updatedAt: Date;
|
|
477
|
-
ownerId: string;
|
|
478
|
-
color: string;
|
|
479
|
-
title: string;
|
|
480
|
-
description: string | null;
|
|
481
|
-
icon: string;
|
|
482
|
-
folderId: string | null;
|
|
483
|
-
fileBeingAnalyzed: boolean;
|
|
484
|
-
analysisProgress: import("@prisma/client/runtime/library").JsonValue | null;
|
|
485
|
-
needsAnalysis: boolean;
|
|
486
|
-
}[];
|
|
608
|
+
output: any[];
|
|
487
609
|
meta: object;
|
|
488
610
|
}>;
|
|
489
611
|
members: import("@trpc/server").TRPCBuiltRouter<{
|
|
490
|
-
ctx:
|
|
491
|
-
db: import("@prisma/client").PrismaClient<import("@prisma/client").Prisma.PrismaClientOptions, never, import("@prisma/client/runtime/library").DefaultArgs>;
|
|
492
|
-
session: any;
|
|
493
|
-
req: import("express").Request<import("express-serve-static-core").ParamsDictionary, any, any, import("qs").ParsedQs, Record<string, any>>;
|
|
494
|
-
res: import("express").Response<any, Record<string, any>>;
|
|
495
|
-
cookies: Record<string, string | undefined>;
|
|
496
|
-
};
|
|
612
|
+
ctx: import("../context.js").Context;
|
|
497
613
|
meta: object;
|
|
498
614
|
errorShape: {
|
|
499
615
|
data: {
|
|
@@ -574,6 +690,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
574
690
|
token: string;
|
|
575
691
|
};
|
|
576
692
|
output: {
|
|
693
|
+
message?: string | undefined;
|
|
577
694
|
workspaceId: string;
|
|
578
695
|
workspaceTitle: string;
|
|
579
696
|
role: string;
|
|
@@ -631,16 +748,38 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
631
748
|
};
|
|
632
749
|
meta: object;
|
|
633
750
|
}>;
|
|
751
|
+
resendInvitation: import("@trpc/server").TRPCMutationProcedure<{
|
|
752
|
+
input: {
|
|
753
|
+
invitationId: string;
|
|
754
|
+
};
|
|
755
|
+
output: {
|
|
756
|
+
invitationId: string;
|
|
757
|
+
message: string;
|
|
758
|
+
};
|
|
759
|
+
meta: object;
|
|
760
|
+
}>;
|
|
761
|
+
getAllInvitationsDebug: import("@trpc/server").TRPCQueryProcedure<{
|
|
762
|
+
input: {
|
|
763
|
+
workspaceId: string;
|
|
764
|
+
};
|
|
765
|
+
output: {
|
|
766
|
+
id: string;
|
|
767
|
+
email: string;
|
|
768
|
+
createdAt: Date;
|
|
769
|
+
updatedAt: Date;
|
|
770
|
+
workspaceId: string;
|
|
771
|
+
role: string;
|
|
772
|
+
token: string;
|
|
773
|
+
invitedById: string;
|
|
774
|
+
acceptedAt: Date | null;
|
|
775
|
+
expiresAt: Date;
|
|
776
|
+
}[];
|
|
777
|
+
meta: object;
|
|
778
|
+
}>;
|
|
634
779
|
}>>;
|
|
635
780
|
}>>;
|
|
636
781
|
flashcards: import("@trpc/server").TRPCBuiltRouter<{
|
|
637
|
-
ctx:
|
|
638
|
-
db: import("@prisma/client").PrismaClient<import("@prisma/client").Prisma.PrismaClientOptions, never, import("@prisma/client/runtime/library").DefaultArgs>;
|
|
639
|
-
session: any;
|
|
640
|
-
req: import("express").Request<import("express-serve-static-core").ParamsDictionary, any, any, import("qs").ParsedQs, Record<string, any>>;
|
|
641
|
-
res: import("express").Response<any, Record<string, any>>;
|
|
642
|
-
cookies: Record<string, string | undefined>;
|
|
643
|
-
};
|
|
782
|
+
ctx: import("../context.js").Context;
|
|
644
783
|
meta: object;
|
|
645
784
|
errorShape: {
|
|
646
785
|
data: {
|
|
@@ -673,17 +812,18 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
673
812
|
id: string;
|
|
674
813
|
createdAt: Date;
|
|
675
814
|
updatedAt: Date;
|
|
676
|
-
title: string;
|
|
677
|
-
description: string | null;
|
|
678
815
|
workspaceId: string;
|
|
679
816
|
type: import("@prisma/client").$Enums.ArtifactType;
|
|
817
|
+
title: string;
|
|
680
818
|
isArchived: boolean;
|
|
681
|
-
generating: boolean;
|
|
682
|
-
generatingMetadata: import("@prisma/client/runtime/library").JsonValue | null;
|
|
683
819
|
difficulty: import("@prisma/client").$Enums.Difficulty | null;
|
|
684
820
|
estimatedTime: string | null;
|
|
685
|
-
imageObjectKey: string | null;
|
|
686
821
|
createdById: string | null;
|
|
822
|
+
description: string | null;
|
|
823
|
+
generating: boolean;
|
|
824
|
+
generatingMetadata: import("@prisma/client/runtime/library").JsonValue | null;
|
|
825
|
+
worksheetConfig: import("@prisma/client/runtime/library").JsonValue | null;
|
|
826
|
+
imageObjectKey: string | null;
|
|
687
827
|
})[];
|
|
688
828
|
meta: object;
|
|
689
829
|
}>;
|
|
@@ -717,6 +857,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
717
857
|
front: string;
|
|
718
858
|
back: string;
|
|
719
859
|
tags: string[];
|
|
860
|
+
acceptedAnswers: string[];
|
|
720
861
|
})[];
|
|
721
862
|
meta: object;
|
|
722
863
|
}>;
|
|
@@ -732,6 +873,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
732
873
|
workspaceId: string;
|
|
733
874
|
front: string;
|
|
734
875
|
back: string;
|
|
876
|
+
acceptedAnswers?: string[] | undefined;
|
|
735
877
|
tags?: string[] | undefined;
|
|
736
878
|
order?: number | undefined;
|
|
737
879
|
};
|
|
@@ -743,6 +885,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
743
885
|
front: string;
|
|
744
886
|
back: string;
|
|
745
887
|
tags: string[];
|
|
888
|
+
acceptedAnswers: string[];
|
|
746
889
|
};
|
|
747
890
|
meta: object;
|
|
748
891
|
}>;
|
|
@@ -751,6 +894,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
751
894
|
cardId: string;
|
|
752
895
|
front?: string | undefined;
|
|
753
896
|
back?: string | undefined;
|
|
897
|
+
acceptedAnswers?: string[] | undefined;
|
|
754
898
|
tags?: string[] | undefined;
|
|
755
899
|
order?: number | undefined;
|
|
756
900
|
};
|
|
@@ -762,6 +906,20 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
762
906
|
front: string;
|
|
763
907
|
back: string;
|
|
764
908
|
tags: string[];
|
|
909
|
+
acceptedAnswers: string[];
|
|
910
|
+
};
|
|
911
|
+
meta: object;
|
|
912
|
+
}>;
|
|
913
|
+
gradeTypedAnswer: import("@trpc/server").TRPCMutationProcedure<{
|
|
914
|
+
input: {
|
|
915
|
+
flashcardId: string;
|
|
916
|
+
userAnswer: string;
|
|
917
|
+
};
|
|
918
|
+
output: {
|
|
919
|
+
isCorrect: boolean;
|
|
920
|
+
confidence: number;
|
|
921
|
+
reason: string;
|
|
922
|
+
matchedAnswer: string | null;
|
|
765
923
|
};
|
|
766
924
|
meta: object;
|
|
767
925
|
}>;
|
|
@@ -793,17 +951,18 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
793
951
|
id: string;
|
|
794
952
|
createdAt: Date;
|
|
795
953
|
updatedAt: Date;
|
|
796
|
-
title: string;
|
|
797
|
-
description: string | null;
|
|
798
954
|
workspaceId: string;
|
|
799
955
|
type: import("@prisma/client").$Enums.ArtifactType;
|
|
956
|
+
title: string;
|
|
800
957
|
isArchived: boolean;
|
|
801
|
-
generating: boolean;
|
|
802
|
-
generatingMetadata: import("@prisma/client/runtime/library").JsonValue | null;
|
|
803
958
|
difficulty: import("@prisma/client").$Enums.Difficulty | null;
|
|
804
959
|
estimatedTime: string | null;
|
|
805
|
-
imageObjectKey: string | null;
|
|
806
960
|
createdById: string | null;
|
|
961
|
+
description: string | null;
|
|
962
|
+
generating: boolean;
|
|
963
|
+
generatingMetadata: import("@prisma/client/runtime/library").JsonValue | null;
|
|
964
|
+
worksheetConfig: import("@prisma/client/runtime/library").JsonValue | null;
|
|
965
|
+
imageObjectKey: string | null;
|
|
807
966
|
};
|
|
808
967
|
createdCards: number;
|
|
809
968
|
};
|
|
@@ -816,33 +975,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
816
975
|
confidence?: "easy" | "medium" | "hard" | undefined;
|
|
817
976
|
timeSpentMs?: number | undefined;
|
|
818
977
|
};
|
|
819
|
-
output:
|
|
820
|
-
flashcard: {
|
|
821
|
-
id: string;
|
|
822
|
-
createdAt: Date;
|
|
823
|
-
artifactId: string;
|
|
824
|
-
order: number;
|
|
825
|
-
front: string;
|
|
826
|
-
back: string;
|
|
827
|
-
tags: string[];
|
|
828
|
-
};
|
|
829
|
-
} & {
|
|
830
|
-
id: string;
|
|
831
|
-
createdAt: Date;
|
|
832
|
-
updatedAt: Date;
|
|
833
|
-
userId: string;
|
|
834
|
-
flashcardId: string;
|
|
835
|
-
timesStudied: number;
|
|
836
|
-
timesCorrect: number;
|
|
837
|
-
timesIncorrect: number;
|
|
838
|
-
timesIncorrectConsecutive: number;
|
|
839
|
-
easeFactor: number;
|
|
840
|
-
interval: number;
|
|
841
|
-
repetitions: number;
|
|
842
|
-
masteryLevel: number;
|
|
843
|
-
lastStudiedAt: Date | null;
|
|
844
|
-
nextReviewAt: Date | null;
|
|
845
|
-
};
|
|
978
|
+
output: any;
|
|
846
979
|
meta: object;
|
|
847
980
|
}>;
|
|
848
981
|
getSetProgress: import("@trpc/server").TRPCQueryProcedure<{
|
|
@@ -882,17 +1015,18 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
882
1015
|
id: string;
|
|
883
1016
|
createdAt: Date;
|
|
884
1017
|
updatedAt: Date;
|
|
885
|
-
title: string;
|
|
886
|
-
description: string | null;
|
|
887
1018
|
workspaceId: string;
|
|
888
1019
|
type: import("@prisma/client").$Enums.ArtifactType;
|
|
1020
|
+
title: string;
|
|
889
1021
|
isArchived: boolean;
|
|
890
|
-
generating: boolean;
|
|
891
|
-
generatingMetadata: import("@prisma/client/runtime/library").JsonValue | null;
|
|
892
1022
|
difficulty: import("@prisma/client").$Enums.Difficulty | null;
|
|
893
1023
|
estimatedTime: string | null;
|
|
894
|
-
imageObjectKey: string | null;
|
|
895
1024
|
createdById: string | null;
|
|
1025
|
+
description: string | null;
|
|
1026
|
+
generating: boolean;
|
|
1027
|
+
generatingMetadata: import("@prisma/client/runtime/library").JsonValue | null;
|
|
1028
|
+
worksheetConfig: import("@prisma/client/runtime/library").JsonValue | null;
|
|
1029
|
+
imageObjectKey: string | null;
|
|
896
1030
|
};
|
|
897
1031
|
} & {
|
|
898
1032
|
id: string;
|
|
@@ -902,22 +1036,24 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
902
1036
|
front: string;
|
|
903
1037
|
back: string;
|
|
904
1038
|
tags: string[];
|
|
1039
|
+
acceptedAnswers: string[];
|
|
905
1040
|
}) | {
|
|
906
1041
|
artifact: {
|
|
907
1042
|
id: string;
|
|
908
1043
|
createdAt: Date;
|
|
909
1044
|
updatedAt: Date;
|
|
910
|
-
title: string;
|
|
911
|
-
description: string | null;
|
|
912
1045
|
workspaceId: string;
|
|
913
1046
|
type: import("@prisma/client").$Enums.ArtifactType;
|
|
1047
|
+
title: string;
|
|
914
1048
|
isArchived: boolean;
|
|
915
|
-
generating: boolean;
|
|
916
|
-
generatingMetadata: import("@prisma/client/runtime/library").JsonValue | null;
|
|
917
1049
|
difficulty: import("@prisma/client").$Enums.Difficulty | null;
|
|
918
1050
|
estimatedTime: string | null;
|
|
919
|
-
imageObjectKey: string | null;
|
|
920
1051
|
createdById: string | null;
|
|
1052
|
+
description: string | null;
|
|
1053
|
+
generating: boolean;
|
|
1054
|
+
generatingMetadata: import("@prisma/client/runtime/library").JsonValue | null;
|
|
1055
|
+
worksheetConfig: import("@prisma/client/runtime/library").JsonValue | null;
|
|
1056
|
+
imageObjectKey: string | null;
|
|
921
1057
|
};
|
|
922
1058
|
id: string;
|
|
923
1059
|
createdAt: Date;
|
|
@@ -926,6 +1062,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
926
1062
|
front: string;
|
|
927
1063
|
back: string;
|
|
928
1064
|
tags: string[];
|
|
1065
|
+
acceptedAnswers: string[];
|
|
929
1066
|
})[];
|
|
930
1067
|
meta: object;
|
|
931
1068
|
}>;
|
|
@@ -962,44 +1099,12 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
962
1099
|
timeSpentMs?: number | undefined;
|
|
963
1100
|
}[];
|
|
964
1101
|
};
|
|
965
|
-
output:
|
|
966
|
-
flashcard: {
|
|
967
|
-
id: string;
|
|
968
|
-
createdAt: Date;
|
|
969
|
-
artifactId: string;
|
|
970
|
-
order: number;
|
|
971
|
-
front: string;
|
|
972
|
-
back: string;
|
|
973
|
-
tags: string[];
|
|
974
|
-
};
|
|
975
|
-
} & {
|
|
976
|
-
id: string;
|
|
977
|
-
createdAt: Date;
|
|
978
|
-
updatedAt: Date;
|
|
979
|
-
userId: string;
|
|
980
|
-
flashcardId: string;
|
|
981
|
-
timesStudied: number;
|
|
982
|
-
timesCorrect: number;
|
|
983
|
-
timesIncorrect: number;
|
|
984
|
-
timesIncorrectConsecutive: number;
|
|
985
|
-
easeFactor: number;
|
|
986
|
-
interval: number;
|
|
987
|
-
repetitions: number;
|
|
988
|
-
masteryLevel: number;
|
|
989
|
-
lastStudiedAt: Date | null;
|
|
990
|
-
nextReviewAt: Date | null;
|
|
991
|
-
})[];
|
|
1102
|
+
output: any[];
|
|
992
1103
|
meta: object;
|
|
993
1104
|
}>;
|
|
994
1105
|
}>>;
|
|
995
1106
|
worksheets: import("@trpc/server").TRPCBuiltRouter<{
|
|
996
|
-
ctx:
|
|
997
|
-
db: import("@prisma/client").PrismaClient<import("@prisma/client").Prisma.PrismaClientOptions, never, import("@prisma/client/runtime/library").DefaultArgs>;
|
|
998
|
-
session: any;
|
|
999
|
-
req: import("express").Request<import("express-serve-static-core").ParamsDictionary, any, any, import("qs").ParsedQs, Record<string, any>>;
|
|
1000
|
-
res: import("express").Response<any, Record<string, any>>;
|
|
1001
|
-
cookies: Record<string, string | undefined>;
|
|
1002
|
-
};
|
|
1107
|
+
ctx: import("../context.js").Context;
|
|
1003
1108
|
meta: object;
|
|
1004
1109
|
errorShape: {
|
|
1005
1110
|
data: {
|
|
@@ -1043,20 +1148,80 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
1043
1148
|
id: string;
|
|
1044
1149
|
createdAt: Date;
|
|
1045
1150
|
updatedAt: Date;
|
|
1046
|
-
title: string;
|
|
1047
|
-
description: string | null;
|
|
1048
1151
|
workspaceId: string;
|
|
1049
1152
|
type: import("@prisma/client").$Enums.ArtifactType;
|
|
1153
|
+
title: string;
|
|
1050
1154
|
isArchived: boolean;
|
|
1051
|
-
generating: boolean;
|
|
1052
|
-
generatingMetadata: import("@prisma/client/runtime/library").JsonValue | null;
|
|
1053
1155
|
difficulty: import("@prisma/client").$Enums.Difficulty | null;
|
|
1054
1156
|
estimatedTime: string | null;
|
|
1055
|
-
imageObjectKey: string | null;
|
|
1056
1157
|
createdById: string | null;
|
|
1158
|
+
description: string | null;
|
|
1159
|
+
generating: boolean;
|
|
1160
|
+
generatingMetadata: import("@prisma/client/runtime/library").JsonValue | null;
|
|
1161
|
+
worksheetConfig: import("@prisma/client/runtime/library").JsonValue | null;
|
|
1162
|
+
imageObjectKey: string | null;
|
|
1057
1163
|
})[];
|
|
1058
1164
|
meta: object;
|
|
1059
1165
|
}>;
|
|
1166
|
+
listPresets: import("@trpc/server").TRPCQueryProcedure<{
|
|
1167
|
+
input: {
|
|
1168
|
+
workspaceId: string;
|
|
1169
|
+
};
|
|
1170
|
+
output: {
|
|
1171
|
+
name: string;
|
|
1172
|
+
id: string;
|
|
1173
|
+
createdAt: Date;
|
|
1174
|
+
updatedAt: Date;
|
|
1175
|
+
workspaceId: string | null;
|
|
1176
|
+
userId: string | null;
|
|
1177
|
+
isSystem: boolean;
|
|
1178
|
+
config: import("@prisma/client/runtime/library").JsonValue;
|
|
1179
|
+
}[];
|
|
1180
|
+
meta: object;
|
|
1181
|
+
}>;
|
|
1182
|
+
createPreset: import("@trpc/server").TRPCMutationProcedure<{
|
|
1183
|
+
input: {
|
|
1184
|
+
name: string;
|
|
1185
|
+
config: Record<string, unknown>;
|
|
1186
|
+
workspaceId?: string | undefined;
|
|
1187
|
+
};
|
|
1188
|
+
output: {
|
|
1189
|
+
name: string;
|
|
1190
|
+
id: string;
|
|
1191
|
+
createdAt: Date;
|
|
1192
|
+
updatedAt: Date;
|
|
1193
|
+
workspaceId: string | null;
|
|
1194
|
+
userId: string | null;
|
|
1195
|
+
isSystem: boolean;
|
|
1196
|
+
config: import("@prisma/client/runtime/library").JsonValue;
|
|
1197
|
+
};
|
|
1198
|
+
meta: object;
|
|
1199
|
+
}>;
|
|
1200
|
+
updatePreset: import("@trpc/server").TRPCMutationProcedure<{
|
|
1201
|
+
input: {
|
|
1202
|
+
id: string;
|
|
1203
|
+
name?: string | undefined;
|
|
1204
|
+
config?: Record<string, unknown> | undefined;
|
|
1205
|
+
};
|
|
1206
|
+
output: {
|
|
1207
|
+
name: string;
|
|
1208
|
+
id: string;
|
|
1209
|
+
createdAt: Date;
|
|
1210
|
+
updatedAt: Date;
|
|
1211
|
+
workspaceId: string | null;
|
|
1212
|
+
userId: string | null;
|
|
1213
|
+
isSystem: boolean;
|
|
1214
|
+
config: import("@prisma/client/runtime/library").JsonValue;
|
|
1215
|
+
};
|
|
1216
|
+
meta: object;
|
|
1217
|
+
}>;
|
|
1218
|
+
deletePreset: import("@trpc/server").TRPCMutationProcedure<{
|
|
1219
|
+
input: {
|
|
1220
|
+
id: string;
|
|
1221
|
+
};
|
|
1222
|
+
output: boolean;
|
|
1223
|
+
meta: object;
|
|
1224
|
+
}>;
|
|
1060
1225
|
create: import("@trpc/server").TRPCMutationProcedure<{
|
|
1061
1226
|
input: {
|
|
1062
1227
|
workspaceId: string;
|
|
@@ -1087,17 +1252,18 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
1087
1252
|
id: string;
|
|
1088
1253
|
createdAt: Date;
|
|
1089
1254
|
updatedAt: Date;
|
|
1090
|
-
title: string;
|
|
1091
|
-
description: string | null;
|
|
1092
1255
|
workspaceId: string;
|
|
1093
1256
|
type: import("@prisma/client").$Enums.ArtifactType;
|
|
1257
|
+
title: string;
|
|
1094
1258
|
isArchived: boolean;
|
|
1095
|
-
generating: boolean;
|
|
1096
|
-
generatingMetadata: import("@prisma/client/runtime/library").JsonValue | null;
|
|
1097
1259
|
difficulty: import("@prisma/client").$Enums.Difficulty | null;
|
|
1098
1260
|
estimatedTime: string | null;
|
|
1099
|
-
imageObjectKey: string | null;
|
|
1100
1261
|
createdById: string | null;
|
|
1262
|
+
description: string | null;
|
|
1263
|
+
generating: boolean;
|
|
1264
|
+
generatingMetadata: import("@prisma/client/runtime/library").JsonValue | null;
|
|
1265
|
+
worksheetConfig: import("@prisma/client/runtime/library").JsonValue | null;
|
|
1266
|
+
imageObjectKey: string | null;
|
|
1101
1267
|
};
|
|
1102
1268
|
meta: object;
|
|
1103
1269
|
}>;
|
|
@@ -1121,17 +1287,18 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
1121
1287
|
id: string;
|
|
1122
1288
|
createdAt: Date;
|
|
1123
1289
|
updatedAt: Date;
|
|
1124
|
-
title: string;
|
|
1125
|
-
description: string | null;
|
|
1126
1290
|
workspaceId: string;
|
|
1127
1291
|
type: import("@prisma/client").$Enums.ArtifactType;
|
|
1292
|
+
title: string;
|
|
1128
1293
|
isArchived: boolean;
|
|
1129
|
-
generating: boolean;
|
|
1130
|
-
generatingMetadata: import("@prisma/client/runtime/library").JsonValue | null;
|
|
1131
1294
|
difficulty: import("@prisma/client").$Enums.Difficulty | null;
|
|
1132
1295
|
estimatedTime: string | null;
|
|
1133
|
-
imageObjectKey: string | null;
|
|
1134
1296
|
createdById: string | null;
|
|
1297
|
+
description: string | null;
|
|
1298
|
+
generating: boolean;
|
|
1299
|
+
generatingMetadata: import("@prisma/client/runtime/library").JsonValue | null;
|
|
1300
|
+
worksheetConfig: import("@prisma/client/runtime/library").JsonValue | null;
|
|
1301
|
+
imageObjectKey: string | null;
|
|
1135
1302
|
};
|
|
1136
1303
|
meta: object;
|
|
1137
1304
|
}>;
|
|
@@ -1202,12 +1369,12 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
1202
1369
|
updatedAt: Date;
|
|
1203
1370
|
userId: string;
|
|
1204
1371
|
worksheetQuestionId: string;
|
|
1205
|
-
modified: boolean;
|
|
1206
1372
|
userAnswer: string | null;
|
|
1207
|
-
correct: boolean | null;
|
|
1208
1373
|
completedAt: Date | null;
|
|
1209
1374
|
attempts: number;
|
|
1210
1375
|
timeSpentSec: number | null;
|
|
1376
|
+
correct: boolean | null;
|
|
1377
|
+
modified: boolean;
|
|
1211
1378
|
};
|
|
1212
1379
|
meta: object;
|
|
1213
1380
|
}>;
|
|
@@ -1222,12 +1389,12 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
1222
1389
|
updatedAt: Date;
|
|
1223
1390
|
userId: string;
|
|
1224
1391
|
worksheetQuestionId: string;
|
|
1225
|
-
modified: boolean;
|
|
1226
1392
|
userAnswer: string | null;
|
|
1227
|
-
correct: boolean | null;
|
|
1228
1393
|
completedAt: Date | null;
|
|
1229
1394
|
attempts: number;
|
|
1230
1395
|
timeSpentSec: number | null;
|
|
1396
|
+
correct: boolean | null;
|
|
1397
|
+
modified: boolean;
|
|
1231
1398
|
}[];
|
|
1232
1399
|
meta: object;
|
|
1233
1400
|
}>;
|
|
@@ -1262,17 +1429,18 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
1262
1429
|
id: string;
|
|
1263
1430
|
createdAt: Date;
|
|
1264
1431
|
updatedAt: Date;
|
|
1265
|
-
title: string;
|
|
1266
|
-
description: string | null;
|
|
1267
1432
|
workspaceId: string;
|
|
1268
1433
|
type: import("@prisma/client").$Enums.ArtifactType;
|
|
1434
|
+
title: string;
|
|
1269
1435
|
isArchived: boolean;
|
|
1270
|
-
generating: boolean;
|
|
1271
|
-
generatingMetadata: import("@prisma/client/runtime/library").JsonValue | null;
|
|
1272
1436
|
difficulty: import("@prisma/client").$Enums.Difficulty | null;
|
|
1273
1437
|
estimatedTime: string | null;
|
|
1274
|
-
imageObjectKey: string | null;
|
|
1275
1438
|
createdById: string | null;
|
|
1439
|
+
description: string | null;
|
|
1440
|
+
generating: boolean;
|
|
1441
|
+
generatingMetadata: import("@prisma/client/runtime/library").JsonValue | null;
|
|
1442
|
+
worksheetConfig: import("@prisma/client/runtime/library").JsonValue | null;
|
|
1443
|
+
imageObjectKey: string | null;
|
|
1276
1444
|
};
|
|
1277
1445
|
meta: object;
|
|
1278
1446
|
}>;
|
|
@@ -1289,6 +1457,15 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
1289
1457
|
prompt: string;
|
|
1290
1458
|
numQuestions?: number | undefined;
|
|
1291
1459
|
difficulty?: "easy" | "medium" | "hard" | undefined;
|
|
1460
|
+
mode?: "practice" | "quiz" | undefined;
|
|
1461
|
+
presetId?: string | undefined;
|
|
1462
|
+
configOverride?: {
|
|
1463
|
+
mode?: "practice" | "quiz" | undefined;
|
|
1464
|
+
numQuestions?: number | undefined;
|
|
1465
|
+
difficulty?: "easy" | "medium" | "hard" | undefined;
|
|
1466
|
+
questionTypes?: ("MULTIPLE_CHOICE" | "TEXT" | "NUMERIC" | "TRUE_FALSE" | "MATCHING" | "FILL_IN_THE_BLANK")[] | undefined;
|
|
1467
|
+
mcqRatio?: number | undefined;
|
|
1468
|
+
} | undefined;
|
|
1292
1469
|
title?: string | undefined;
|
|
1293
1470
|
estimatedTime?: string | undefined;
|
|
1294
1471
|
};
|
|
@@ -1297,17 +1474,18 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
1297
1474
|
id: string;
|
|
1298
1475
|
createdAt: Date;
|
|
1299
1476
|
updatedAt: Date;
|
|
1300
|
-
title: string;
|
|
1301
|
-
description: string | null;
|
|
1302
1477
|
workspaceId: string;
|
|
1303
1478
|
type: import("@prisma/client").$Enums.ArtifactType;
|
|
1479
|
+
title: string;
|
|
1304
1480
|
isArchived: boolean;
|
|
1305
|
-
generating: boolean;
|
|
1306
|
-
generatingMetadata: import("@prisma/client/runtime/library").JsonValue | null;
|
|
1307
1481
|
difficulty: import("@prisma/client").$Enums.Difficulty | null;
|
|
1308
1482
|
estimatedTime: string | null;
|
|
1309
|
-
imageObjectKey: string | null;
|
|
1310
1483
|
createdById: string | null;
|
|
1484
|
+
description: string | null;
|
|
1485
|
+
generating: boolean;
|
|
1486
|
+
generatingMetadata: import("@prisma/client/runtime/library").JsonValue | null;
|
|
1487
|
+
worksheetConfig: import("@prisma/client/runtime/library").JsonValue | null;
|
|
1488
|
+
imageObjectKey: string | null;
|
|
1311
1489
|
};
|
|
1312
1490
|
};
|
|
1313
1491
|
meta: object;
|
|
@@ -1328,25 +1506,19 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
1328
1506
|
updatedAt: Date;
|
|
1329
1507
|
userId: string;
|
|
1330
1508
|
worksheetQuestionId: string;
|
|
1331
|
-
modified: boolean;
|
|
1332
1509
|
userAnswer: string | null;
|
|
1333
|
-
correct: boolean | null;
|
|
1334
1510
|
completedAt: Date | null;
|
|
1335
1511
|
attempts: number;
|
|
1336
1512
|
timeSpentSec: number | null;
|
|
1513
|
+
correct: boolean | null;
|
|
1514
|
+
modified: boolean;
|
|
1337
1515
|
};
|
|
1338
1516
|
};
|
|
1339
1517
|
meta: object;
|
|
1340
1518
|
}>;
|
|
1341
1519
|
}>>;
|
|
1342
1520
|
studyguide: import("@trpc/server").TRPCBuiltRouter<{
|
|
1343
|
-
ctx:
|
|
1344
|
-
db: import("@prisma/client").PrismaClient<import("@prisma/client").Prisma.PrismaClientOptions, never, import("@prisma/client/runtime/library").DefaultArgs>;
|
|
1345
|
-
session: any;
|
|
1346
|
-
req: import("express").Request<import("express-serve-static-core").ParamsDictionary, any, any, import("qs").ParsedQs, Record<string, any>>;
|
|
1347
|
-
res: import("express").Response<any, Record<string, any>>;
|
|
1348
|
-
cookies: Record<string, string | undefined>;
|
|
1349
|
-
};
|
|
1521
|
+
ctx: import("../context.js").Context;
|
|
1350
1522
|
meta: object;
|
|
1351
1523
|
errorShape: {
|
|
1352
1524
|
data: {
|
|
@@ -1380,37 +1552,9 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
1380
1552
|
};
|
|
1381
1553
|
meta: object;
|
|
1382
1554
|
}>;
|
|
1383
|
-
edit: import("@trpc/server").TRPCMutationProcedure<{
|
|
1384
|
-
input: {
|
|
1385
|
-
workspaceId: string;
|
|
1386
|
-
content: string;
|
|
1387
|
-
studyGuideId?: string | undefined;
|
|
1388
|
-
data?: Record<string, unknown> | undefined;
|
|
1389
|
-
title?: string | undefined;
|
|
1390
|
-
};
|
|
1391
|
-
output: {
|
|
1392
|
-
artifactId: string;
|
|
1393
|
-
version: {
|
|
1394
|
-
id: string;
|
|
1395
|
-
createdAt: Date;
|
|
1396
|
-
createdById: string | null;
|
|
1397
|
-
artifactId: string;
|
|
1398
|
-
content: string;
|
|
1399
|
-
data: import("@prisma/client/runtime/library").JsonValue | null;
|
|
1400
|
-
version: number;
|
|
1401
|
-
};
|
|
1402
|
-
};
|
|
1403
|
-
meta: object;
|
|
1404
|
-
}>;
|
|
1405
1555
|
}>>;
|
|
1406
1556
|
podcast: import("@trpc/server").TRPCBuiltRouter<{
|
|
1407
|
-
ctx:
|
|
1408
|
-
db: import("@prisma/client").PrismaClient<import("@prisma/client").Prisma.PrismaClientOptions, never, import("@prisma/client/runtime/library").DefaultArgs>;
|
|
1409
|
-
session: any;
|
|
1410
|
-
req: import("express").Request<import("express-serve-static-core").ParamsDictionary, any, any, import("qs").ParsedQs, Record<string, any>>;
|
|
1411
|
-
res: import("express").Response<any, Record<string, any>>;
|
|
1412
|
-
cookies: Record<string, string | undefined>;
|
|
1413
|
-
};
|
|
1557
|
+
ctx: import("../context.js").Context;
|
|
1414
1558
|
meta: object;
|
|
1415
1559
|
errorShape: {
|
|
1416
1560
|
data: {
|
|
@@ -1586,11 +1730,11 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
1586
1730
|
createdAt: Date;
|
|
1587
1731
|
updatedAt: Date;
|
|
1588
1732
|
title: string;
|
|
1589
|
-
objectKey: string | null;
|
|
1590
1733
|
generating: boolean;
|
|
1591
1734
|
generatingMetadata: import("@prisma/client/runtime/library").JsonValue | null;
|
|
1592
1735
|
artifactId: string;
|
|
1593
1736
|
content: string;
|
|
1737
|
+
objectKey: string | null;
|
|
1594
1738
|
duration: number;
|
|
1595
1739
|
order: number;
|
|
1596
1740
|
startTime: number;
|
|
@@ -1644,17 +1788,18 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
1644
1788
|
id: string;
|
|
1645
1789
|
createdAt: Date;
|
|
1646
1790
|
updatedAt: Date;
|
|
1647
|
-
title: string;
|
|
1648
|
-
description: string | null;
|
|
1649
1791
|
workspaceId: string;
|
|
1650
1792
|
type: import("@prisma/client").$Enums.ArtifactType;
|
|
1793
|
+
title: string;
|
|
1651
1794
|
isArchived: boolean;
|
|
1652
|
-
generating: boolean;
|
|
1653
|
-
generatingMetadata: import("@prisma/client/runtime/library").JsonValue | null;
|
|
1654
1795
|
difficulty: import("@prisma/client").$Enums.Difficulty | null;
|
|
1655
1796
|
estimatedTime: string | null;
|
|
1656
|
-
imageObjectKey: string | null;
|
|
1657
1797
|
createdById: string | null;
|
|
1798
|
+
description: string | null;
|
|
1799
|
+
generating: boolean;
|
|
1800
|
+
generatingMetadata: import("@prisma/client/runtime/library").JsonValue | null;
|
|
1801
|
+
worksheetConfig: import("@prisma/client/runtime/library").JsonValue | null;
|
|
1802
|
+
imageObjectKey: string | null;
|
|
1658
1803
|
};
|
|
1659
1804
|
meta: object;
|
|
1660
1805
|
}>;
|
|
@@ -1696,13 +1841,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
1696
1841
|
}>;
|
|
1697
1842
|
}>>;
|
|
1698
1843
|
chat: import("@trpc/server").TRPCBuiltRouter<{
|
|
1699
|
-
ctx:
|
|
1700
|
-
db: import("@prisma/client").PrismaClient<import("@prisma/client").Prisma.PrismaClientOptions, never, import("@prisma/client/runtime/library").DefaultArgs>;
|
|
1701
|
-
session: any;
|
|
1702
|
-
req: import("express").Request<import("express-serve-static-core").ParamsDictionary, any, any, import("qs").ParsedQs, Record<string, any>>;
|
|
1703
|
-
res: import("express").Response<any, Record<string, any>>;
|
|
1704
|
-
cookies: Record<string, string | undefined>;
|
|
1705
|
-
};
|
|
1844
|
+
ctx: import("../context.js").Context;
|
|
1706
1845
|
meta: object;
|
|
1707
1846
|
errorShape: {
|
|
1708
1847
|
data: {
|
|
@@ -1744,8 +1883,8 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
1744
1883
|
id: string;
|
|
1745
1884
|
createdAt: Date;
|
|
1746
1885
|
updatedAt: Date;
|
|
1747
|
-
userId: string | null;
|
|
1748
1886
|
channelId: string;
|
|
1887
|
+
userId: string | null;
|
|
1749
1888
|
message: string;
|
|
1750
1889
|
})[];
|
|
1751
1890
|
} & {
|
|
@@ -1782,8 +1921,8 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
1782
1921
|
id: string;
|
|
1783
1922
|
createdAt: Date;
|
|
1784
1923
|
updatedAt: Date;
|
|
1785
|
-
userId: string | null;
|
|
1786
1924
|
channelId: string;
|
|
1925
|
+
userId: string | null;
|
|
1787
1926
|
message: string;
|
|
1788
1927
|
})[];
|
|
1789
1928
|
} & {
|
|
@@ -1809,8 +1948,8 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
1809
1948
|
id: string;
|
|
1810
1949
|
createdAt: Date;
|
|
1811
1950
|
updatedAt: Date;
|
|
1812
|
-
userId: string | null;
|
|
1813
1951
|
channelId: string;
|
|
1952
|
+
userId: string | null;
|
|
1814
1953
|
message: string;
|
|
1815
1954
|
})[];
|
|
1816
1955
|
} & {
|
|
@@ -1835,8 +1974,8 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
1835
1974
|
id: string;
|
|
1836
1975
|
createdAt: Date;
|
|
1837
1976
|
updatedAt: Date;
|
|
1838
|
-
userId: string | null;
|
|
1839
1977
|
channelId: string;
|
|
1978
|
+
userId: string | null;
|
|
1840
1979
|
message: string;
|
|
1841
1980
|
};
|
|
1842
1981
|
meta: object;
|
|
@@ -1855,8 +1994,8 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
1855
1994
|
id: string;
|
|
1856
1995
|
createdAt: Date;
|
|
1857
1996
|
updatedAt: Date;
|
|
1858
|
-
userId: string | null;
|
|
1859
1997
|
channelId: string;
|
|
1998
|
+
userId: string | null;
|
|
1860
1999
|
message: string;
|
|
1861
2000
|
};
|
|
1862
2001
|
meta: object;
|
|
@@ -1871,14 +2010,970 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
1871
2010
|
meta: object;
|
|
1872
2011
|
}>;
|
|
1873
2012
|
}>>;
|
|
1874
|
-
|
|
1875
|
-
ctx:
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
2013
|
+
annotations: import("@trpc/server").TRPCBuiltRouter<{
|
|
2014
|
+
ctx: import("../context.js").Context;
|
|
2015
|
+
meta: object;
|
|
2016
|
+
errorShape: {
|
|
2017
|
+
data: {
|
|
2018
|
+
zodError: string | null;
|
|
2019
|
+
code: import("@trpc/server").TRPC_ERROR_CODE_KEY;
|
|
2020
|
+
httpStatus: number;
|
|
2021
|
+
path?: string;
|
|
2022
|
+
stack?: string;
|
|
2023
|
+
};
|
|
2024
|
+
message: string;
|
|
2025
|
+
code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
|
|
1881
2026
|
};
|
|
2027
|
+
transformer: true;
|
|
2028
|
+
}, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
|
|
2029
|
+
listHighlights: import("@trpc/server").TRPCQueryProcedure<{
|
|
2030
|
+
input: {
|
|
2031
|
+
artifactVersionId: string;
|
|
2032
|
+
};
|
|
2033
|
+
output: ({
|
|
2034
|
+
user: {
|
|
2035
|
+
name: string | null;
|
|
2036
|
+
id: string;
|
|
2037
|
+
profilePicture: {
|
|
2038
|
+
meta: import("@prisma/client/runtime/library").JsonValue | null;
|
|
2039
|
+
name: string;
|
|
2040
|
+
id: string;
|
|
2041
|
+
createdAt: Date;
|
|
2042
|
+
workspaceId: string | null;
|
|
2043
|
+
userId: string | null;
|
|
2044
|
+
mimeType: string;
|
|
2045
|
+
size: number;
|
|
2046
|
+
bucket: string | null;
|
|
2047
|
+
objectKey: string | null;
|
|
2048
|
+
url: string | null;
|
|
2049
|
+
checksum: string | null;
|
|
2050
|
+
aiTranscription: import("@prisma/client/runtime/library").JsonValue | null;
|
|
2051
|
+
} | null;
|
|
2052
|
+
};
|
|
2053
|
+
comments: ({
|
|
2054
|
+
user: {
|
|
2055
|
+
name: string | null;
|
|
2056
|
+
id: string;
|
|
2057
|
+
profilePicture: {
|
|
2058
|
+
meta: import("@prisma/client/runtime/library").JsonValue | null;
|
|
2059
|
+
name: string;
|
|
2060
|
+
id: string;
|
|
2061
|
+
createdAt: Date;
|
|
2062
|
+
workspaceId: string | null;
|
|
2063
|
+
userId: string | null;
|
|
2064
|
+
mimeType: string;
|
|
2065
|
+
size: number;
|
|
2066
|
+
bucket: string | null;
|
|
2067
|
+
objectKey: string | null;
|
|
2068
|
+
url: string | null;
|
|
2069
|
+
checksum: string | null;
|
|
2070
|
+
aiTranscription: import("@prisma/client/runtime/library").JsonValue | null;
|
|
2071
|
+
} | null;
|
|
2072
|
+
};
|
|
2073
|
+
} & {
|
|
2074
|
+
id: string;
|
|
2075
|
+
createdAt: Date;
|
|
2076
|
+
updatedAt: Date;
|
|
2077
|
+
content: string;
|
|
2078
|
+
userId: string;
|
|
2079
|
+
highlightId: string;
|
|
2080
|
+
})[];
|
|
2081
|
+
} & {
|
|
2082
|
+
id: string;
|
|
2083
|
+
createdAt: Date;
|
|
2084
|
+
updatedAt: Date;
|
|
2085
|
+
userId: string;
|
|
2086
|
+
color: string;
|
|
2087
|
+
artifactVersionId: string;
|
|
2088
|
+
startOffset: number;
|
|
2089
|
+
endOffset: number;
|
|
2090
|
+
selectedText: string;
|
|
2091
|
+
})[];
|
|
2092
|
+
meta: object;
|
|
2093
|
+
}>;
|
|
2094
|
+
createHighlight: import("@trpc/server").TRPCMutationProcedure<{
|
|
2095
|
+
input: {
|
|
2096
|
+
artifactVersionId: string;
|
|
2097
|
+
startOffset: number;
|
|
2098
|
+
endOffset: number;
|
|
2099
|
+
selectedText: string;
|
|
2100
|
+
color?: string | undefined;
|
|
2101
|
+
};
|
|
2102
|
+
output: {
|
|
2103
|
+
user: {
|
|
2104
|
+
name: string | null;
|
|
2105
|
+
id: string;
|
|
2106
|
+
profilePicture: {
|
|
2107
|
+
meta: import("@prisma/client/runtime/library").JsonValue | null;
|
|
2108
|
+
name: string;
|
|
2109
|
+
id: string;
|
|
2110
|
+
createdAt: Date;
|
|
2111
|
+
workspaceId: string | null;
|
|
2112
|
+
userId: string | null;
|
|
2113
|
+
mimeType: string;
|
|
2114
|
+
size: number;
|
|
2115
|
+
bucket: string | null;
|
|
2116
|
+
objectKey: string | null;
|
|
2117
|
+
url: string | null;
|
|
2118
|
+
checksum: string | null;
|
|
2119
|
+
aiTranscription: import("@prisma/client/runtime/library").JsonValue | null;
|
|
2120
|
+
} | null;
|
|
2121
|
+
};
|
|
2122
|
+
comments: {
|
|
2123
|
+
id: string;
|
|
2124
|
+
createdAt: Date;
|
|
2125
|
+
updatedAt: Date;
|
|
2126
|
+
content: string;
|
|
2127
|
+
userId: string;
|
|
2128
|
+
highlightId: string;
|
|
2129
|
+
}[];
|
|
2130
|
+
} & {
|
|
2131
|
+
id: string;
|
|
2132
|
+
createdAt: Date;
|
|
2133
|
+
updatedAt: Date;
|
|
2134
|
+
userId: string;
|
|
2135
|
+
color: string;
|
|
2136
|
+
artifactVersionId: string;
|
|
2137
|
+
startOffset: number;
|
|
2138
|
+
endOffset: number;
|
|
2139
|
+
selectedText: string;
|
|
2140
|
+
};
|
|
2141
|
+
meta: object;
|
|
2142
|
+
}>;
|
|
2143
|
+
deleteHighlight: import("@trpc/server").TRPCMutationProcedure<{
|
|
2144
|
+
input: {
|
|
2145
|
+
highlightId: string;
|
|
2146
|
+
};
|
|
2147
|
+
output: {
|
|
2148
|
+
success: boolean;
|
|
2149
|
+
};
|
|
2150
|
+
meta: object;
|
|
2151
|
+
}>;
|
|
2152
|
+
addComment: import("@trpc/server").TRPCMutationProcedure<{
|
|
2153
|
+
input: {
|
|
2154
|
+
highlightId: string;
|
|
2155
|
+
content: string;
|
|
2156
|
+
};
|
|
2157
|
+
output: {
|
|
2158
|
+
user: {
|
|
2159
|
+
name: string | null;
|
|
2160
|
+
id: string;
|
|
2161
|
+
profilePicture: {
|
|
2162
|
+
meta: import("@prisma/client/runtime/library").JsonValue | null;
|
|
2163
|
+
name: string;
|
|
2164
|
+
id: string;
|
|
2165
|
+
createdAt: Date;
|
|
2166
|
+
workspaceId: string | null;
|
|
2167
|
+
userId: string | null;
|
|
2168
|
+
mimeType: string;
|
|
2169
|
+
size: number;
|
|
2170
|
+
bucket: string | null;
|
|
2171
|
+
objectKey: string | null;
|
|
2172
|
+
url: string | null;
|
|
2173
|
+
checksum: string | null;
|
|
2174
|
+
aiTranscription: import("@prisma/client/runtime/library").JsonValue | null;
|
|
2175
|
+
} | null;
|
|
2176
|
+
};
|
|
2177
|
+
} & {
|
|
2178
|
+
id: string;
|
|
2179
|
+
createdAt: Date;
|
|
2180
|
+
updatedAt: Date;
|
|
2181
|
+
content: string;
|
|
2182
|
+
userId: string;
|
|
2183
|
+
highlightId: string;
|
|
2184
|
+
};
|
|
2185
|
+
meta: object;
|
|
2186
|
+
}>;
|
|
2187
|
+
updateComment: import("@trpc/server").TRPCMutationProcedure<{
|
|
2188
|
+
input: {
|
|
2189
|
+
commentId: string;
|
|
2190
|
+
content: string;
|
|
2191
|
+
};
|
|
2192
|
+
output: {
|
|
2193
|
+
user: {
|
|
2194
|
+
name: string | null;
|
|
2195
|
+
id: string;
|
|
2196
|
+
profilePicture: {
|
|
2197
|
+
meta: import("@prisma/client/runtime/library").JsonValue | null;
|
|
2198
|
+
name: string;
|
|
2199
|
+
id: string;
|
|
2200
|
+
createdAt: Date;
|
|
2201
|
+
workspaceId: string | null;
|
|
2202
|
+
userId: string | null;
|
|
2203
|
+
mimeType: string;
|
|
2204
|
+
size: number;
|
|
2205
|
+
bucket: string | null;
|
|
2206
|
+
objectKey: string | null;
|
|
2207
|
+
url: string | null;
|
|
2208
|
+
checksum: string | null;
|
|
2209
|
+
aiTranscription: import("@prisma/client/runtime/library").JsonValue | null;
|
|
2210
|
+
} | null;
|
|
2211
|
+
};
|
|
2212
|
+
} & {
|
|
2213
|
+
id: string;
|
|
2214
|
+
createdAt: Date;
|
|
2215
|
+
updatedAt: Date;
|
|
2216
|
+
content: string;
|
|
2217
|
+
userId: string;
|
|
2218
|
+
highlightId: string;
|
|
2219
|
+
};
|
|
2220
|
+
meta: object;
|
|
2221
|
+
}>;
|
|
2222
|
+
deleteComment: import("@trpc/server").TRPCMutationProcedure<{
|
|
2223
|
+
input: {
|
|
2224
|
+
commentId: string;
|
|
2225
|
+
};
|
|
2226
|
+
output: {
|
|
2227
|
+
success: boolean;
|
|
2228
|
+
};
|
|
2229
|
+
meta: object;
|
|
2230
|
+
}>;
|
|
2231
|
+
}>>;
|
|
2232
|
+
admin: import("@trpc/server").TRPCBuiltRouter<{
|
|
2233
|
+
ctx: import("../context.js").Context;
|
|
2234
|
+
meta: object;
|
|
2235
|
+
errorShape: {
|
|
2236
|
+
data: {
|
|
2237
|
+
zodError: string | null;
|
|
2238
|
+
code: import("@trpc/server").TRPC_ERROR_CODE_KEY;
|
|
2239
|
+
httpStatus: number;
|
|
2240
|
+
path?: string;
|
|
2241
|
+
stack?: string;
|
|
2242
|
+
};
|
|
2243
|
+
message: string;
|
|
2244
|
+
code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
|
|
2245
|
+
};
|
|
2246
|
+
transformer: true;
|
|
2247
|
+
}, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
|
|
2248
|
+
getSystemStats: import("@trpc/server").TRPCQueryProcedure<{
|
|
2249
|
+
input: void;
|
|
2250
|
+
output: {
|
|
2251
|
+
totalUsers: number;
|
|
2252
|
+
totalWorkspaces: number;
|
|
2253
|
+
totalSubscriptions: number;
|
|
2254
|
+
revenue: number;
|
|
2255
|
+
subscriptionRevenue: number;
|
|
2256
|
+
topupRevenue: number;
|
|
2257
|
+
};
|
|
2258
|
+
meta: object;
|
|
2259
|
+
}>;
|
|
2260
|
+
listUsers: import("@trpc/server").TRPCQueryProcedure<{
|
|
2261
|
+
input: {
|
|
2262
|
+
page?: number | undefined;
|
|
2263
|
+
pageSize?: number | undefined;
|
|
2264
|
+
search?: string | undefined;
|
|
2265
|
+
emailVerified?: "all" | "yes" | "no" | undefined;
|
|
2266
|
+
joinedFrom?: unknown;
|
|
2267
|
+
joinedTo?: unknown;
|
|
2268
|
+
};
|
|
2269
|
+
output: {
|
|
2270
|
+
users: any[];
|
|
2271
|
+
page: number;
|
|
2272
|
+
pageSize: number;
|
|
2273
|
+
totalCount: number;
|
|
2274
|
+
totalPages: number;
|
|
2275
|
+
};
|
|
2276
|
+
meta: object;
|
|
2277
|
+
}>;
|
|
2278
|
+
listInvoices: import("@trpc/server").TRPCQueryProcedure<{
|
|
2279
|
+
input: {
|
|
2280
|
+
page?: number | undefined;
|
|
2281
|
+
pageSize?: number | undefined;
|
|
2282
|
+
search?: string | undefined;
|
|
2283
|
+
status?: string | undefined;
|
|
2284
|
+
type?: "SUBSCRIPTION" | "TOPUP" | undefined;
|
|
2285
|
+
userId?: string | undefined;
|
|
2286
|
+
from?: unknown;
|
|
2287
|
+
to?: unknown;
|
|
2288
|
+
};
|
|
2289
|
+
output: {
|
|
2290
|
+
items: any;
|
|
2291
|
+
page: number;
|
|
2292
|
+
pageSize: number;
|
|
2293
|
+
totalCount: any;
|
|
2294
|
+
totalPages: number;
|
|
2295
|
+
};
|
|
2296
|
+
meta: object;
|
|
2297
|
+
}>;
|
|
2298
|
+
listWorkspaces: import("@trpc/server").TRPCQueryProcedure<{
|
|
2299
|
+
input: {
|
|
2300
|
+
limit?: number | undefined;
|
|
2301
|
+
cursor?: string | null | undefined;
|
|
2302
|
+
};
|
|
2303
|
+
output: {
|
|
2304
|
+
workspaces: ({
|
|
2305
|
+
owner: {
|
|
2306
|
+
name: string | null;
|
|
2307
|
+
email: string | null;
|
|
2308
|
+
};
|
|
2309
|
+
} & {
|
|
2310
|
+
id: string;
|
|
2311
|
+
createdAt: Date;
|
|
2312
|
+
updatedAt: Date;
|
|
2313
|
+
title: string;
|
|
2314
|
+
description: string | null;
|
|
2315
|
+
ownerId: string;
|
|
2316
|
+
color: string;
|
|
2317
|
+
markerColor: string | null;
|
|
2318
|
+
icon: string;
|
|
2319
|
+
folderId: string | null;
|
|
2320
|
+
fileBeingAnalyzed: boolean;
|
|
2321
|
+
analysisProgress: import("@prisma/client/runtime/library").JsonValue | null;
|
|
2322
|
+
needsAnalysis: boolean;
|
|
2323
|
+
})[];
|
|
2324
|
+
nextCursor: string | undefined;
|
|
2325
|
+
};
|
|
2326
|
+
meta: object;
|
|
2327
|
+
}>;
|
|
2328
|
+
updateUserRole: import("@trpc/server").TRPCMutationProcedure<{
|
|
2329
|
+
input: {
|
|
2330
|
+
userId: string;
|
|
2331
|
+
roleName: string;
|
|
2332
|
+
};
|
|
2333
|
+
output: {
|
|
2334
|
+
name: string | null;
|
|
2335
|
+
id: string;
|
|
2336
|
+
email: string | null;
|
|
2337
|
+
emailVerified: Date | null;
|
|
2338
|
+
passwordHash: string | null;
|
|
2339
|
+
createdAt: Date;
|
|
2340
|
+
updatedAt: Date;
|
|
2341
|
+
fileAssetId: string | null;
|
|
2342
|
+
roleId: string | null;
|
|
2343
|
+
deletedAt: Date | null;
|
|
2344
|
+
stripe_customer_id: string | null;
|
|
2345
|
+
};
|
|
2346
|
+
meta: object;
|
|
2347
|
+
}>;
|
|
2348
|
+
listPlans: import("@trpc/server").TRPCQueryProcedure<{
|
|
2349
|
+
input: void;
|
|
2350
|
+
output: ({
|
|
2351
|
+
limit: {
|
|
2352
|
+
id: string;
|
|
2353
|
+
createdAt: Date;
|
|
2354
|
+
updatedAt: Date;
|
|
2355
|
+
planId: string;
|
|
2356
|
+
maxStorageBytes: bigint;
|
|
2357
|
+
maxWorksheets: number;
|
|
2358
|
+
maxFlashcards: number;
|
|
2359
|
+
maxPodcasts: number;
|
|
2360
|
+
maxStudyGuides: number;
|
|
2361
|
+
} | null;
|
|
2362
|
+
} & {
|
|
2363
|
+
name: string;
|
|
2364
|
+
id: string;
|
|
2365
|
+
createdAt: Date;
|
|
2366
|
+
type: string;
|
|
2367
|
+
description: string | null;
|
|
2368
|
+
interval: string | null;
|
|
2369
|
+
active: boolean;
|
|
2370
|
+
price: number;
|
|
2371
|
+
stripePriceId: string;
|
|
2372
|
+
})[];
|
|
2373
|
+
meta: object;
|
|
2374
|
+
}>;
|
|
2375
|
+
upsertPlan: import("@trpc/server").TRPCMutationProcedure<{
|
|
2376
|
+
input: {
|
|
2377
|
+
name: string;
|
|
2378
|
+
type: string;
|
|
2379
|
+
price: number;
|
|
2380
|
+
interval: string | null;
|
|
2381
|
+
limits: {
|
|
2382
|
+
maxStorageBytes: number;
|
|
2383
|
+
maxWorksheets: number;
|
|
2384
|
+
maxFlashcards: number;
|
|
2385
|
+
maxPodcasts?: number | undefined;
|
|
2386
|
+
maxStudyGuides?: number | undefined;
|
|
2387
|
+
};
|
|
2388
|
+
id?: string | undefined;
|
|
2389
|
+
description?: string | undefined;
|
|
2390
|
+
stripePriceId?: string | undefined;
|
|
2391
|
+
active?: boolean | undefined;
|
|
2392
|
+
};
|
|
2393
|
+
output: {
|
|
2394
|
+
name: string;
|
|
2395
|
+
id: string;
|
|
2396
|
+
createdAt: Date;
|
|
2397
|
+
type: string;
|
|
2398
|
+
description: string | null;
|
|
2399
|
+
interval: string | null;
|
|
2400
|
+
active: boolean;
|
|
2401
|
+
price: number;
|
|
2402
|
+
stripePriceId: string;
|
|
2403
|
+
};
|
|
2404
|
+
meta: object;
|
|
2405
|
+
}>;
|
|
2406
|
+
deletePlan: import("@trpc/server").TRPCMutationProcedure<{
|
|
2407
|
+
input: {
|
|
2408
|
+
id: string;
|
|
2409
|
+
};
|
|
2410
|
+
output: {
|
|
2411
|
+
success: boolean;
|
|
2412
|
+
message: string;
|
|
2413
|
+
};
|
|
2414
|
+
meta: object;
|
|
2415
|
+
}>;
|
|
2416
|
+
getUserInvoices: import("@trpc/server").TRPCQueryProcedure<{
|
|
2417
|
+
input: {
|
|
2418
|
+
userId: string;
|
|
2419
|
+
limit?: number | undefined;
|
|
2420
|
+
};
|
|
2421
|
+
output: any;
|
|
2422
|
+
meta: object;
|
|
2423
|
+
}>;
|
|
2424
|
+
getUserDetailedInfo: import("@trpc/server").TRPCQueryProcedure<{
|
|
2425
|
+
input: {
|
|
2426
|
+
userId: string;
|
|
2427
|
+
};
|
|
2428
|
+
output: {
|
|
2429
|
+
totalSpent: number;
|
|
2430
|
+
purchasedCredits: {
|
|
2431
|
+
type: import("@prisma/client").$Enums.ArtifactType;
|
|
2432
|
+
amount: number;
|
|
2433
|
+
}[];
|
|
2434
|
+
profilePicture: string | null;
|
|
2435
|
+
role: {
|
|
2436
|
+
name: string;
|
|
2437
|
+
id: string;
|
|
2438
|
+
} | null;
|
|
2439
|
+
_count: {
|
|
2440
|
+
artifacts: number;
|
|
2441
|
+
workspaces: number;
|
|
2442
|
+
};
|
|
2443
|
+
subscriptions: ({
|
|
2444
|
+
plan: {
|
|
2445
|
+
name: string;
|
|
2446
|
+
id: string;
|
|
2447
|
+
createdAt: Date;
|
|
2448
|
+
type: string;
|
|
2449
|
+
description: string | null;
|
|
2450
|
+
interval: string | null;
|
|
2451
|
+
active: boolean;
|
|
2452
|
+
price: number;
|
|
2453
|
+
stripePriceId: string;
|
|
2454
|
+
};
|
|
2455
|
+
} & {
|
|
2456
|
+
id: string;
|
|
2457
|
+
createdAt: Date;
|
|
2458
|
+
userId: string;
|
|
2459
|
+
planId: string;
|
|
2460
|
+
stripeSubscriptionId: string;
|
|
2461
|
+
stripeCustomerId: string | null;
|
|
2462
|
+
status: string;
|
|
2463
|
+
currentPeriodStart: Date;
|
|
2464
|
+
currentPeriodEnd: Date;
|
|
2465
|
+
cancelAt: Date | null;
|
|
2466
|
+
canceledAt: Date | null;
|
|
2467
|
+
})[];
|
|
2468
|
+
name: string | null;
|
|
2469
|
+
id: string;
|
|
2470
|
+
email: string | null;
|
|
2471
|
+
emailVerified: Date | null;
|
|
2472
|
+
passwordHash: string | null;
|
|
2473
|
+
createdAt: Date;
|
|
2474
|
+
updatedAt: Date;
|
|
2475
|
+
fileAssetId: string | null;
|
|
2476
|
+
roleId: string | null;
|
|
2477
|
+
deletedAt: Date | null;
|
|
2478
|
+
stripe_customer_id: string | null;
|
|
2479
|
+
};
|
|
2480
|
+
meta: object;
|
|
2481
|
+
}>;
|
|
2482
|
+
debugInvoices: import("@trpc/server").TRPCQueryProcedure<{
|
|
2483
|
+
input: void;
|
|
2484
|
+
output: {
|
|
2485
|
+
count: any;
|
|
2486
|
+
all: any;
|
|
2487
|
+
};
|
|
2488
|
+
meta: object;
|
|
2489
|
+
}>;
|
|
2490
|
+
listResourcePrices: import("@trpc/server").TRPCQueryProcedure<{
|
|
2491
|
+
input: void;
|
|
2492
|
+
output: {
|
|
2493
|
+
id: string;
|
|
2494
|
+
updatedAt: Date;
|
|
2495
|
+
resourceType: import("@prisma/client").$Enums.ArtifactType;
|
|
2496
|
+
priceCents: number;
|
|
2497
|
+
}[];
|
|
2498
|
+
meta: object;
|
|
2499
|
+
}>;
|
|
2500
|
+
upsertResourcePrice: import("@trpc/server").TRPCMutationProcedure<{
|
|
2501
|
+
input: {
|
|
2502
|
+
resourceType: "STUDY_GUIDE" | "FLASHCARD_SET" | "WORKSHEET" | "MEETING_SUMMARY" | "PODCAST_EPISODE" | "STORAGE";
|
|
2503
|
+
priceCents: number;
|
|
2504
|
+
};
|
|
2505
|
+
output: {
|
|
2506
|
+
id: string;
|
|
2507
|
+
updatedAt: Date;
|
|
2508
|
+
resourceType: import("@prisma/client").$Enums.ArtifactType;
|
|
2509
|
+
priceCents: number;
|
|
2510
|
+
};
|
|
2511
|
+
meta: object;
|
|
2512
|
+
}>;
|
|
2513
|
+
listRecentInvoices: import("@trpc/server").TRPCQueryProcedure<{
|
|
2514
|
+
input: {
|
|
2515
|
+
limit?: number | undefined;
|
|
2516
|
+
};
|
|
2517
|
+
output: any;
|
|
2518
|
+
meta: object;
|
|
2519
|
+
}>;
|
|
2520
|
+
activityList: import("@trpc/server").TRPCQueryProcedure<{
|
|
2521
|
+
input: {
|
|
2522
|
+
from?: unknown;
|
|
2523
|
+
to?: unknown;
|
|
2524
|
+
actorUserId?: string | undefined;
|
|
2525
|
+
workspaceId?: string | undefined;
|
|
2526
|
+
category?: "AUTH" | "WORKSPACE" | "BILLING" | "ADMIN" | "CONTENT" | "SYSTEM" | undefined;
|
|
2527
|
+
status?: "SUCCESS" | "FAILURE" | undefined;
|
|
2528
|
+
search?: string | undefined;
|
|
2529
|
+
page?: number | undefined;
|
|
2530
|
+
limit?: number | undefined;
|
|
2531
|
+
};
|
|
2532
|
+
output: {
|
|
2533
|
+
items: {
|
|
2534
|
+
id: string;
|
|
2535
|
+
createdAt: Date;
|
|
2536
|
+
action: string;
|
|
2537
|
+
description: string;
|
|
2538
|
+
category: import("@prisma/client").$Enums.ActivityLogCategory;
|
|
2539
|
+
trpcPath: string | null;
|
|
2540
|
+
status: import("@prisma/client").$Enums.ActivityLogStatus;
|
|
2541
|
+
durationMs: number;
|
|
2542
|
+
errorCode: string | null;
|
|
2543
|
+
ipAddress: string | null;
|
|
2544
|
+
actor: {
|
|
2545
|
+
name: string | null;
|
|
2546
|
+
id: string;
|
|
2547
|
+
email: string | null;
|
|
2548
|
+
} | null;
|
|
2549
|
+
workspace: {
|
|
2550
|
+
id: string;
|
|
2551
|
+
title: string;
|
|
2552
|
+
} | null;
|
|
2553
|
+
metadata: import("@prisma/client/runtime/library").JsonValue;
|
|
2554
|
+
}[];
|
|
2555
|
+
page: number;
|
|
2556
|
+
pageSize: number;
|
|
2557
|
+
totalCount: number;
|
|
2558
|
+
totalPages: number;
|
|
2559
|
+
};
|
|
2560
|
+
meta: object;
|
|
2561
|
+
}>;
|
|
2562
|
+
activityExportCsv: import("@trpc/server").TRPCQueryProcedure<{
|
|
2563
|
+
input: {
|
|
2564
|
+
from?: unknown;
|
|
2565
|
+
to?: unknown;
|
|
2566
|
+
actorUserId?: string | undefined;
|
|
2567
|
+
workspaceId?: string | undefined;
|
|
2568
|
+
category?: "AUTH" | "WORKSPACE" | "BILLING" | "ADMIN" | "CONTENT" | "SYSTEM" | undefined;
|
|
2569
|
+
status?: "SUCCESS" | "FAILURE" | undefined;
|
|
2570
|
+
search?: string | undefined;
|
|
2571
|
+
maxRows?: number | undefined;
|
|
2572
|
+
};
|
|
2573
|
+
output: {
|
|
2574
|
+
csv: string;
|
|
2575
|
+
count: number;
|
|
2576
|
+
};
|
|
2577
|
+
meta: object;
|
|
2578
|
+
}>;
|
|
2579
|
+
activityPurgeRetention: import("@trpc/server").TRPCMutationProcedure<{
|
|
2580
|
+
input: void;
|
|
2581
|
+
output: {
|
|
2582
|
+
deleted: number;
|
|
2583
|
+
retentionDays: number;
|
|
2584
|
+
cutoff: Date;
|
|
2585
|
+
};
|
|
2586
|
+
meta: object;
|
|
2587
|
+
}>;
|
|
2588
|
+
}>>;
|
|
2589
|
+
payment: import("@trpc/server").TRPCBuiltRouter<{
|
|
2590
|
+
ctx: import("../context.js").Context;
|
|
2591
|
+
meta: object;
|
|
2592
|
+
errorShape: {
|
|
2593
|
+
data: {
|
|
2594
|
+
zodError: string | null;
|
|
2595
|
+
code: import("@trpc/server").TRPC_ERROR_CODE_KEY;
|
|
2596
|
+
httpStatus: number;
|
|
2597
|
+
path?: string;
|
|
2598
|
+
stack?: string;
|
|
2599
|
+
};
|
|
2600
|
+
message: string;
|
|
2601
|
+
code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
|
|
2602
|
+
};
|
|
2603
|
+
transformer: true;
|
|
2604
|
+
}, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
|
|
2605
|
+
getPlans: import("@trpc/server").TRPCQueryProcedure<{
|
|
2606
|
+
input: void;
|
|
2607
|
+
output: any[];
|
|
2608
|
+
meta: object;
|
|
2609
|
+
}>;
|
|
2610
|
+
createCheckoutSession: import("@trpc/server").TRPCMutationProcedure<{
|
|
2611
|
+
input: {
|
|
2612
|
+
planId: string;
|
|
2613
|
+
};
|
|
2614
|
+
output: {
|
|
2615
|
+
url: any;
|
|
2616
|
+
};
|
|
2617
|
+
meta: object;
|
|
2618
|
+
}>;
|
|
2619
|
+
confirmCheckoutSuccess: import("@trpc/server").TRPCMutationProcedure<{
|
|
2620
|
+
input: {
|
|
2621
|
+
sessionId: string;
|
|
2622
|
+
};
|
|
2623
|
+
output: {
|
|
2624
|
+
confirmed: boolean;
|
|
2625
|
+
reason: string;
|
|
2626
|
+
kind?: undefined;
|
|
2627
|
+
} | {
|
|
2628
|
+
confirmed: boolean;
|
|
2629
|
+
kind: "payment";
|
|
2630
|
+
reason?: undefined;
|
|
2631
|
+
} | {
|
|
2632
|
+
confirmed: boolean;
|
|
2633
|
+
kind: "subscription";
|
|
2634
|
+
reason?: undefined;
|
|
2635
|
+
};
|
|
2636
|
+
meta: object;
|
|
2637
|
+
}>;
|
|
2638
|
+
createResourcePurchaseSession: import("@trpc/server").TRPCMutationProcedure<{
|
|
2639
|
+
input: {
|
|
2640
|
+
resourceType: "STUDY_GUIDE" | "FLASHCARD_SET" | "WORKSHEET" | "MEETING_SUMMARY" | "PODCAST_EPISODE" | "STORAGE";
|
|
2641
|
+
quantity?: number | undefined;
|
|
2642
|
+
};
|
|
2643
|
+
output: {
|
|
2644
|
+
url: any;
|
|
2645
|
+
};
|
|
2646
|
+
meta: object;
|
|
2647
|
+
}>;
|
|
2648
|
+
getUsageOverview: import("@trpc/server").TRPCQueryProcedure<{
|
|
2649
|
+
input: void;
|
|
2650
|
+
output: {
|
|
2651
|
+
usage: import("../lib/usage_service.js").UserUsage;
|
|
2652
|
+
limits: {
|
|
2653
|
+
id: string;
|
|
2654
|
+
planId: string;
|
|
2655
|
+
maxStorageBytes: bigint;
|
|
2656
|
+
maxWorksheets: number;
|
|
2657
|
+
maxFlashcards: number;
|
|
2658
|
+
maxPodcasts: number;
|
|
2659
|
+
maxStudyGuides: number;
|
|
2660
|
+
createdAt: Date;
|
|
2661
|
+
updatedAt: Date;
|
|
2662
|
+
} | null;
|
|
2663
|
+
hasActivePlan: boolean;
|
|
2664
|
+
};
|
|
2665
|
+
meta: object;
|
|
2666
|
+
}>;
|
|
2667
|
+
getResourcePrices: import("@trpc/server").TRPCQueryProcedure<{
|
|
2668
|
+
input: void;
|
|
2669
|
+
output: {
|
|
2670
|
+
id: string;
|
|
2671
|
+
updatedAt: Date;
|
|
2672
|
+
resourceType: import("@prisma/client").$Enums.ArtifactType;
|
|
2673
|
+
priceCents: number;
|
|
2674
|
+
}[];
|
|
2675
|
+
meta: object;
|
|
2676
|
+
}>;
|
|
2677
|
+
}>>;
|
|
2678
|
+
copilot: import("@trpc/server").TRPCBuiltRouter<{
|
|
2679
|
+
ctx: import("../context.js").Context;
|
|
2680
|
+
meta: object;
|
|
2681
|
+
errorShape: {
|
|
2682
|
+
data: {
|
|
2683
|
+
zodError: string | null;
|
|
2684
|
+
code: import("@trpc/server").TRPC_ERROR_CODE_KEY;
|
|
2685
|
+
httpStatus: number;
|
|
2686
|
+
path?: string;
|
|
2687
|
+
stack?: string;
|
|
2688
|
+
};
|
|
2689
|
+
message: string;
|
|
2690
|
+
code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
|
|
2691
|
+
};
|
|
2692
|
+
transformer: true;
|
|
2693
|
+
}, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
|
|
2694
|
+
listConversations: import("@trpc/server").TRPCQueryProcedure<{
|
|
2695
|
+
input: {
|
|
2696
|
+
workspaceId: string;
|
|
2697
|
+
};
|
|
2698
|
+
output: {
|
|
2699
|
+
id: string;
|
|
2700
|
+
title: string;
|
|
2701
|
+
updatedAt: Date;
|
|
2702
|
+
preview: string;
|
|
2703
|
+
}[];
|
|
2704
|
+
meta: object;
|
|
2705
|
+
}>;
|
|
2706
|
+
getConversation: import("@trpc/server").TRPCQueryProcedure<{
|
|
2707
|
+
input: {
|
|
2708
|
+
workspaceId: string;
|
|
2709
|
+
conversationId: string;
|
|
2710
|
+
};
|
|
2711
|
+
output: {
|
|
2712
|
+
id: string;
|
|
2713
|
+
title: string;
|
|
2714
|
+
messages: {
|
|
2715
|
+
id: string;
|
|
2716
|
+
role: string;
|
|
2717
|
+
content: string;
|
|
2718
|
+
createdAt: Date;
|
|
2719
|
+
}[];
|
|
2720
|
+
};
|
|
2721
|
+
meta: object;
|
|
2722
|
+
}>;
|
|
2723
|
+
createConversation: import("@trpc/server").TRPCMutationProcedure<{
|
|
2724
|
+
input: {
|
|
2725
|
+
workspaceId: string;
|
|
2726
|
+
title?: string | undefined;
|
|
2727
|
+
};
|
|
2728
|
+
output: {
|
|
2729
|
+
id: string;
|
|
2730
|
+
title: string;
|
|
2731
|
+
updatedAt: Date;
|
|
2732
|
+
};
|
|
2733
|
+
meta: object;
|
|
2734
|
+
}>;
|
|
2735
|
+
deleteConversation: import("@trpc/server").TRPCMutationProcedure<{
|
|
2736
|
+
input: {
|
|
2737
|
+
workspaceId: string;
|
|
2738
|
+
conversationId: string;
|
|
2739
|
+
};
|
|
2740
|
+
output: {
|
|
2741
|
+
success: boolean;
|
|
2742
|
+
};
|
|
2743
|
+
meta: object;
|
|
2744
|
+
}>;
|
|
2745
|
+
ask: import("@trpc/server").TRPCMutationProcedure<{
|
|
2746
|
+
input: {
|
|
2747
|
+
context: {
|
|
2748
|
+
workspaceId: string;
|
|
2749
|
+
artifactId: string;
|
|
2750
|
+
artifactType: "flashcards" | "worksheet" | "study-guide" | "notes";
|
|
2751
|
+
documentContent: string;
|
|
2752
|
+
selectedText?: string | undefined;
|
|
2753
|
+
viewportText?: string | undefined;
|
|
2754
|
+
cursorPosition?: {
|
|
2755
|
+
start: number;
|
|
2756
|
+
end: number;
|
|
2757
|
+
} | undefined;
|
|
2758
|
+
metadata?: {
|
|
2759
|
+
flashcardId?: string | undefined;
|
|
2760
|
+
questionId?: string | undefined;
|
|
2761
|
+
documentId?: string | undefined;
|
|
2762
|
+
} | undefined;
|
|
2763
|
+
};
|
|
2764
|
+
message: string;
|
|
2765
|
+
conversationId?: string | undefined;
|
|
2766
|
+
};
|
|
2767
|
+
output: {
|
|
2768
|
+
answer: string;
|
|
2769
|
+
highlights: {
|
|
2770
|
+
start: number;
|
|
2771
|
+
end: number;
|
|
2772
|
+
label?: string | undefined;
|
|
2773
|
+
}[];
|
|
2774
|
+
};
|
|
2775
|
+
meta: object;
|
|
2776
|
+
}>;
|
|
2777
|
+
explainSelection: import("@trpc/server").TRPCMutationProcedure<{
|
|
2778
|
+
input: {
|
|
2779
|
+
context: {
|
|
2780
|
+
workspaceId: string;
|
|
2781
|
+
artifactId: string;
|
|
2782
|
+
artifactType: "flashcards" | "worksheet" | "study-guide" | "notes";
|
|
2783
|
+
documentContent: string;
|
|
2784
|
+
selectedText?: string | undefined;
|
|
2785
|
+
viewportText?: string | undefined;
|
|
2786
|
+
cursorPosition?: {
|
|
2787
|
+
start: number;
|
|
2788
|
+
end: number;
|
|
2789
|
+
} | undefined;
|
|
2790
|
+
metadata?: {
|
|
2791
|
+
flashcardId?: string | undefined;
|
|
2792
|
+
questionId?: string | undefined;
|
|
2793
|
+
documentId?: string | undefined;
|
|
2794
|
+
} | undefined;
|
|
2795
|
+
};
|
|
2796
|
+
message?: string | undefined;
|
|
2797
|
+
conversationId?: string | undefined;
|
|
2798
|
+
};
|
|
2799
|
+
output: {
|
|
2800
|
+
answer: string;
|
|
2801
|
+
};
|
|
2802
|
+
meta: object;
|
|
2803
|
+
}>;
|
|
2804
|
+
suggestHighlights: import("@trpc/server").TRPCMutationProcedure<{
|
|
2805
|
+
input: {
|
|
2806
|
+
context: {
|
|
2807
|
+
workspaceId: string;
|
|
2808
|
+
artifactId: string;
|
|
2809
|
+
artifactType: "flashcards" | "worksheet" | "study-guide" | "notes";
|
|
2810
|
+
documentContent: string;
|
|
2811
|
+
selectedText?: string | undefined;
|
|
2812
|
+
viewportText?: string | undefined;
|
|
2813
|
+
cursorPosition?: {
|
|
2814
|
+
start: number;
|
|
2815
|
+
end: number;
|
|
2816
|
+
} | undefined;
|
|
2817
|
+
metadata?: {
|
|
2818
|
+
flashcardId?: string | undefined;
|
|
2819
|
+
questionId?: string | undefined;
|
|
2820
|
+
documentId?: string | undefined;
|
|
2821
|
+
} | undefined;
|
|
2822
|
+
};
|
|
2823
|
+
message?: string | undefined;
|
|
2824
|
+
conversationId?: string | undefined;
|
|
2825
|
+
};
|
|
2826
|
+
output: {
|
|
2827
|
+
answer: string;
|
|
2828
|
+
highlights: {
|
|
2829
|
+
start: number;
|
|
2830
|
+
end: number;
|
|
2831
|
+
label?: string | undefined;
|
|
2832
|
+
}[];
|
|
2833
|
+
};
|
|
2834
|
+
meta: object;
|
|
2835
|
+
}>;
|
|
2836
|
+
generateFlashcards: import("@trpc/server").TRPCMutationProcedure<{
|
|
2837
|
+
input: {
|
|
2838
|
+
context: {
|
|
2839
|
+
workspaceId: string;
|
|
2840
|
+
artifactId: string;
|
|
2841
|
+
artifactType: "flashcards" | "worksheet" | "study-guide" | "notes";
|
|
2842
|
+
documentContent: string;
|
|
2843
|
+
selectedText?: string | undefined;
|
|
2844
|
+
viewportText?: string | undefined;
|
|
2845
|
+
cursorPosition?: {
|
|
2846
|
+
start: number;
|
|
2847
|
+
end: number;
|
|
2848
|
+
} | undefined;
|
|
2849
|
+
metadata?: {
|
|
2850
|
+
flashcardId?: string | undefined;
|
|
2851
|
+
questionId?: string | undefined;
|
|
2852
|
+
documentId?: string | undefined;
|
|
2853
|
+
} | undefined;
|
|
2854
|
+
};
|
|
2855
|
+
message?: string | undefined;
|
|
2856
|
+
numCards?: number | undefined;
|
|
2857
|
+
conversationId?: string | undefined;
|
|
2858
|
+
};
|
|
2859
|
+
output: {
|
|
2860
|
+
answer: string;
|
|
2861
|
+
artifactId: string;
|
|
2862
|
+
flashcards: {
|
|
2863
|
+
id: string;
|
|
2864
|
+
createdAt: Date;
|
|
2865
|
+
artifactId: string;
|
|
2866
|
+
order: number;
|
|
2867
|
+
front: string;
|
|
2868
|
+
back: string;
|
|
2869
|
+
tags: string[];
|
|
2870
|
+
acceptedAnswers: string[];
|
|
2871
|
+
}[];
|
|
2872
|
+
};
|
|
2873
|
+
meta: object;
|
|
2874
|
+
}>;
|
|
2875
|
+
}>>;
|
|
2876
|
+
notifications: import("@trpc/server").TRPCBuiltRouter<{
|
|
2877
|
+
ctx: import("../context.js").Context;
|
|
2878
|
+
meta: object;
|
|
2879
|
+
errorShape: {
|
|
2880
|
+
data: {
|
|
2881
|
+
zodError: string | null;
|
|
2882
|
+
code: import("@trpc/server").TRPC_ERROR_CODE_KEY;
|
|
2883
|
+
httpStatus: number;
|
|
2884
|
+
path?: string;
|
|
2885
|
+
stack?: string;
|
|
2886
|
+
};
|
|
2887
|
+
message: string;
|
|
2888
|
+
code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
|
|
2889
|
+
};
|
|
2890
|
+
transformer: true;
|
|
2891
|
+
}, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
|
|
2892
|
+
list: import("@trpc/server").TRPCQueryProcedure<{
|
|
2893
|
+
input: {
|
|
2894
|
+
cursor?: string | undefined;
|
|
2895
|
+
limit?: number | undefined;
|
|
2896
|
+
unreadOnly?: boolean | undefined;
|
|
2897
|
+
types?: string[] | undefined;
|
|
2898
|
+
};
|
|
2899
|
+
output: {
|
|
2900
|
+
items: ({
|
|
2901
|
+
workspace: {
|
|
2902
|
+
id: string;
|
|
2903
|
+
title: string;
|
|
2904
|
+
} | null;
|
|
2905
|
+
actor: {
|
|
2906
|
+
name: string | null;
|
|
2907
|
+
id: string;
|
|
2908
|
+
email: string | null;
|
|
2909
|
+
} | null;
|
|
2910
|
+
} & {
|
|
2911
|
+
id: string;
|
|
2912
|
+
createdAt: Date;
|
|
2913
|
+
updatedAt: Date;
|
|
2914
|
+
workspaceId: string | null;
|
|
2915
|
+
type: string;
|
|
2916
|
+
title: string;
|
|
2917
|
+
content: string | null;
|
|
2918
|
+
userId: string;
|
|
2919
|
+
actorUserId: string | null;
|
|
2920
|
+
body: string;
|
|
2921
|
+
actionUrl: string | null;
|
|
2922
|
+
metadata: import("@prisma/client/runtime/library").JsonValue | null;
|
|
2923
|
+
priority: import("@prisma/client").$Enums.NotificationPriority;
|
|
2924
|
+
sourceId: string | null;
|
|
2925
|
+
read: boolean;
|
|
2926
|
+
readAt: Date | null;
|
|
2927
|
+
deliveredAt: Date | null;
|
|
2928
|
+
})[];
|
|
2929
|
+
nextCursor: string | undefined;
|
|
2930
|
+
};
|
|
2931
|
+
meta: object;
|
|
2932
|
+
}>;
|
|
2933
|
+
unreadCount: import("@trpc/server").TRPCQueryProcedure<{
|
|
2934
|
+
input: void;
|
|
2935
|
+
output: {
|
|
2936
|
+
count: number;
|
|
2937
|
+
};
|
|
2938
|
+
meta: object;
|
|
2939
|
+
}>;
|
|
2940
|
+
markRead: import("@trpc/server").TRPCMutationProcedure<{
|
|
2941
|
+
input: {
|
|
2942
|
+
id: string;
|
|
2943
|
+
};
|
|
2944
|
+
output: {
|
|
2945
|
+
success: boolean;
|
|
2946
|
+
};
|
|
2947
|
+
meta: object;
|
|
2948
|
+
}>;
|
|
2949
|
+
markManyRead: import("@trpc/server").TRPCMutationProcedure<{
|
|
2950
|
+
input: {
|
|
2951
|
+
ids: string[];
|
|
2952
|
+
};
|
|
2953
|
+
output: {
|
|
2954
|
+
success: boolean;
|
|
2955
|
+
};
|
|
2956
|
+
meta: object;
|
|
2957
|
+
}>;
|
|
2958
|
+
markAllRead: import("@trpc/server").TRPCMutationProcedure<{
|
|
2959
|
+
input: void;
|
|
2960
|
+
output: {
|
|
2961
|
+
success: boolean;
|
|
2962
|
+
};
|
|
2963
|
+
meta: object;
|
|
2964
|
+
}>;
|
|
2965
|
+
delete: import("@trpc/server").TRPCMutationProcedure<{
|
|
2966
|
+
input: {
|
|
2967
|
+
id: string;
|
|
2968
|
+
};
|
|
2969
|
+
output: {
|
|
2970
|
+
success: boolean;
|
|
2971
|
+
};
|
|
2972
|
+
meta: object;
|
|
2973
|
+
}>;
|
|
2974
|
+
}>>;
|
|
2975
|
+
member: import("@trpc/server").TRPCBuiltRouter<{
|
|
2976
|
+
ctx: import("../context.js").Context;
|
|
1882
2977
|
meta: object;
|
|
1883
2978
|
errorShape: {
|
|
1884
2979
|
data: {
|
|
@@ -1898,6 +2993,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
1898
2993
|
token: string;
|
|
1899
2994
|
};
|
|
1900
2995
|
output: {
|
|
2996
|
+
message?: string | undefined;
|
|
1901
2997
|
workspaceId: string;
|
|
1902
2998
|
workspaceTitle: string;
|
|
1903
2999
|
role: string;
|