@goscribe/server 1.0.10 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. package/ANALYSIS_PROGRESS_SPEC.md +463 -0
  2. package/PROGRESS_QUICK_REFERENCE.md +239 -0
  3. package/dist/lib/ai-session.d.ts +20 -9
  4. package/dist/lib/ai-session.js +316 -80
  5. package/dist/lib/auth.d.ts +35 -2
  6. package/dist/lib/auth.js +88 -15
  7. package/dist/lib/env.d.ts +32 -0
  8. package/dist/lib/env.js +46 -0
  9. package/dist/lib/errors.d.ts +33 -0
  10. package/dist/lib/errors.js +78 -0
  11. package/dist/lib/inference.d.ts +4 -1
  12. package/dist/lib/inference.js +9 -11
  13. package/dist/lib/logger.d.ts +62 -0
  14. package/dist/lib/logger.js +342 -0
  15. package/dist/lib/podcast-prompts.d.ts +43 -0
  16. package/dist/lib/podcast-prompts.js +135 -0
  17. package/dist/lib/pusher.d.ts +1 -0
  18. package/dist/lib/pusher.js +14 -2
  19. package/dist/lib/storage.d.ts +3 -3
  20. package/dist/lib/storage.js +51 -47
  21. package/dist/lib/validation.d.ts +51 -0
  22. package/dist/lib/validation.js +64 -0
  23. package/dist/routers/_app.d.ts +697 -111
  24. package/dist/routers/_app.js +5 -0
  25. package/dist/routers/auth.d.ts +11 -1
  26. package/dist/routers/chat.d.ts +11 -1
  27. package/dist/routers/flashcards.d.ts +205 -6
  28. package/dist/routers/flashcards.js +144 -66
  29. package/dist/routers/members.d.ts +165 -0
  30. package/dist/routers/members.js +531 -0
  31. package/dist/routers/podcast.d.ts +78 -63
  32. package/dist/routers/podcast.js +330 -393
  33. package/dist/routers/studyguide.d.ts +11 -1
  34. package/dist/routers/worksheets.d.ts +124 -13
  35. package/dist/routers/worksheets.js +123 -50
  36. package/dist/routers/workspace.d.ts +213 -26
  37. package/dist/routers/workspace.js +303 -181
  38. package/dist/server.js +12 -4
  39. package/dist/services/flashcard-progress.service.d.ts +183 -0
  40. package/dist/services/flashcard-progress.service.js +383 -0
  41. package/dist/services/flashcard.service.d.ts +183 -0
  42. package/dist/services/flashcard.service.js +224 -0
  43. package/dist/services/podcast-segment-reorder.d.ts +0 -0
  44. package/dist/services/podcast-segment-reorder.js +107 -0
  45. package/dist/services/podcast.service.d.ts +0 -0
  46. package/dist/services/podcast.service.js +326 -0
  47. package/dist/services/worksheet.service.d.ts +0 -0
  48. package/dist/services/worksheet.service.js +295 -0
  49. package/dist/trpc.d.ts +13 -2
  50. package/dist/trpc.js +55 -6
  51. package/dist/types/index.d.ts +126 -0
  52. package/dist/types/index.js +1 -0
  53. package/package.json +3 -2
  54. package/prisma/schema.prisma +142 -4
  55. package/src/lib/ai-session.ts +356 -85
  56. package/src/lib/auth.ts +113 -19
  57. package/src/lib/env.ts +59 -0
  58. package/src/lib/errors.ts +92 -0
  59. package/src/lib/inference.ts +11 -11
  60. package/src/lib/logger.ts +405 -0
  61. package/src/lib/pusher.ts +15 -3
  62. package/src/lib/storage.ts +56 -51
  63. package/src/lib/validation.ts +75 -0
  64. package/src/routers/_app.ts +5 -0
  65. package/src/routers/chat.ts +2 -23
  66. package/src/routers/flashcards.ts +108 -24
  67. package/src/routers/members.ts +586 -0
  68. package/src/routers/podcast.ts +385 -420
  69. package/src/routers/worksheets.ts +117 -35
  70. package/src/routers/workspace.ts +328 -195
  71. package/src/server.ts +13 -4
  72. package/src/services/flashcard-progress.service.ts +541 -0
  73. package/src/trpc.ts +59 -6
  74. package/src/types/index.ts +165 -0
  75. package/AUTH_FRONTEND_SPEC.md +0 -21
  76. package/CHAT_FRONTEND_SPEC.md +0 -474
  77. package/DATABASE_SETUP.md +0 -165
  78. package/MEETINGSUMMARY_FRONTEND_SPEC.md +0 -28
  79. package/PODCAST_FRONTEND_SPEC.md +0 -595
  80. package/STUDYGUIDE_FRONTEND_SPEC.md +0 -18
  81. package/WORKSHEETS_FRONTEND_SPEC.md +0 -26
  82. package/WORKSPACE_FRONTEND_SPEC.md +0 -47
  83. package/test-ai-integration.js +0 -134
@@ -8,7 +8,17 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
8
8
  cookies: Record<string, string | undefined>;
9
9
  };
10
10
  meta: object;
11
- errorShape: import("@trpc/server").TRPCDefaultErrorShape;
11
+ errorShape: {
12
+ data: {
13
+ zodError: string | null;
14
+ code: import("@trpc/server").TRPC_ERROR_CODE_KEY;
15
+ httpStatus: number;
16
+ path?: string;
17
+ stack?: string;
18
+ };
19
+ message: string;
20
+ code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
21
+ };
12
22
  transformer: true;
13
23
  }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
14
24
  auth: import("@trpc/server").TRPCBuiltRouter<{
@@ -20,7 +30,17 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
20
30
  cookies: Record<string, string | undefined>;
21
31
  };
22
32
  meta: object;
23
- errorShape: import("@trpc/server").TRPCDefaultErrorShape;
33
+ errorShape: {
34
+ data: {
35
+ zodError: string | null;
36
+ code: import("@trpc/server").TRPC_ERROR_CODE_KEY;
37
+ httpStatus: number;
38
+ path?: string;
39
+ stack?: string;
40
+ };
41
+ message: string;
42
+ code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
43
+ };
24
44
  transformer: true;
25
45
  }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
26
46
  signup: import("@trpc/server").TRPCMutationProcedure<{
@@ -79,7 +99,17 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
79
99
  cookies: Record<string, string | undefined>;
80
100
  };
81
101
  meta: object;
82
- errorShape: import("@trpc/server").TRPCDefaultErrorShape;
102
+ errorShape: {
103
+ data: {
104
+ zodError: string | null;
105
+ code: import("@trpc/server").TRPC_ERROR_CODE_KEY;
106
+ httpStatus: number;
107
+ path?: string;
108
+ stack?: string;
109
+ };
110
+ message: string;
111
+ code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
112
+ };
83
113
  transformer: true;
84
114
  }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
85
115
  list: import("@trpc/server").TRPCQueryProcedure<{
@@ -92,10 +122,13 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
92
122
  createdAt: Date;
93
123
  updatedAt: Date;
94
124
  ownerId: string;
125
+ color: string;
95
126
  title: string;
96
127
  description: string | null;
128
+ icon: string;
97
129
  folderId: string | null;
98
- shareLink: string | null;
130
+ fileBeingAnalyzed: boolean;
131
+ analysisProgress: import("@prisma/client/runtime/library").JsonValue | null;
99
132
  }[];
100
133
  folders: {
101
134
  name: string;
@@ -104,6 +137,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
104
137
  updatedAt: Date;
105
138
  ownerId: string;
106
139
  parentId: string | null;
140
+ color: string;
107
141
  }[];
108
142
  };
109
143
  meta: object;
@@ -119,16 +153,20 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
119
153
  createdAt: Date;
120
154
  updatedAt: Date;
121
155
  ownerId: string;
156
+ color: string;
122
157
  title: string;
123
158
  description: string | null;
159
+ icon: string;
124
160
  folderId: string | null;
125
- shareLink: string | null;
161
+ fileBeingAnalyzed: boolean;
162
+ analysisProgress: import("@prisma/client/runtime/library").JsonValue | null;
126
163
  };
127
164
  meta: object;
128
165
  }>;
129
166
  createFolder: import("@trpc/server").TRPCMutationProcedure<{
130
167
  input: {
131
168
  name: string;
169
+ color?: string | undefined;
132
170
  parentId?: string | undefined;
133
171
  };
134
172
  output: {
@@ -138,6 +176,39 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
138
176
  updatedAt: Date;
139
177
  ownerId: string;
140
178
  parentId: string | null;
179
+ color: string;
180
+ };
181
+ meta: object;
182
+ }>;
183
+ updateFolder: import("@trpc/server").TRPCMutationProcedure<{
184
+ input: {
185
+ id: string;
186
+ name?: string | undefined;
187
+ color?: string | undefined;
188
+ };
189
+ output: {
190
+ name: string;
191
+ id: string;
192
+ createdAt: Date;
193
+ updatedAt: Date;
194
+ ownerId: string;
195
+ parentId: string | null;
196
+ color: string;
197
+ };
198
+ meta: object;
199
+ }>;
200
+ deleteFolder: import("@trpc/server").TRPCMutationProcedure<{
201
+ input: {
202
+ id: string;
203
+ };
204
+ output: {
205
+ name: string;
206
+ id: string;
207
+ createdAt: Date;
208
+ updatedAt: Date;
209
+ ownerId: string;
210
+ parentId: string | null;
211
+ color: string;
141
212
  };
142
213
  meta: object;
143
214
  }>;
@@ -153,6 +224,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
153
224
  updatedAt: Date;
154
225
  ownerId: string;
155
226
  parentId: string | null;
227
+ color: string;
156
228
  } | null;
157
229
  uploads: {
158
230
  meta: import("@prisma/client/runtime/library").JsonValue | null;
@@ -177,8 +249,11 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
177
249
  workspaceId: string;
178
250
  type: import("@prisma/client").$Enums.ArtifactType;
179
251
  isArchived: boolean;
252
+ generating: boolean;
253
+ generatingMetadata: import("@prisma/client/runtime/library").JsonValue | null;
180
254
  difficulty: import("@prisma/client").$Enums.Difficulty | null;
181
255
  estimatedTime: string | null;
256
+ imageObjectKey: string | null;
182
257
  createdById: string | null;
183
258
  }[];
184
259
  } & {
@@ -186,33 +261,24 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
186
261
  createdAt: Date;
187
262
  updatedAt: Date;
188
263
  ownerId: string;
264
+ color: string;
189
265
  title: string;
190
266
  description: string | null;
267
+ icon: string;
191
268
  folderId: string | null;
192
- shareLink: string | null;
269
+ fileBeingAnalyzed: boolean;
270
+ analysisProgress: import("@prisma/client/runtime/library").JsonValue | null;
193
271
  };
194
272
  meta: object;
195
273
  }>;
196
- share: import("@trpc/server").TRPCQueryProcedure<{
197
- input: {
198
- id: string;
199
- };
274
+ getStats: import("@trpc/server").TRPCQueryProcedure<{
275
+ input: void;
200
276
  output: {
201
- shareLink: string | null;
202
- } | undefined;
203
- meta: object;
204
- }>;
205
- join: import("@trpc/server").TRPCMutationProcedure<{
206
- input: {
207
- shareLink: string;
208
- };
209
- output: {
210
- id: string;
211
- title: string;
212
- description: string | null;
213
- ownerId: string;
214
- createdAt: Date;
215
- updatedAt: Date;
277
+ workspaces: number;
278
+ folders: number;
279
+ lastUpdated: Date | undefined;
280
+ spaceUsed: number;
281
+ spaceLeft: number;
216
282
  };
217
283
  meta: object;
218
284
  }>;
@@ -221,16 +287,21 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
221
287
  id: string;
222
288
  name?: string | undefined;
223
289
  description?: string | undefined;
290
+ color?: string | undefined;
291
+ icon?: string | undefined;
224
292
  };
225
293
  output: {
226
294
  id: string;
227
295
  createdAt: Date;
228
296
  updatedAt: Date;
229
297
  ownerId: string;
298
+ color: string;
230
299
  title: string;
231
300
  description: string | null;
301
+ icon: string;
232
302
  folderId: string | null;
233
- shareLink: string | null;
303
+ fileBeingAnalyzed: boolean;
304
+ analysisProgress: import("@prisma/client/runtime/library").JsonValue | null;
234
305
  };
235
306
  meta: object;
236
307
  }>;
@@ -253,6 +324,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
253
324
  updatedAt: Date;
254
325
  ownerId: string;
255
326
  parentId: string | null;
327
+ color: string;
256
328
  };
257
329
  parents: {
258
330
  name: string;
@@ -261,6 +333,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
261
333
  updatedAt: Date;
262
334
  ownerId: string;
263
335
  parentId: string | null;
336
+ color: string;
264
337
  }[];
265
338
  };
266
339
  meta: object;
@@ -321,13 +394,146 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
321
394
  createdAt: Date;
322
395
  updatedAt: Date;
323
396
  ownerId: string;
397
+ color: string;
324
398
  title: string;
325
399
  description: string | null;
400
+ icon: string;
326
401
  folderId: string | null;
327
- shareLink: string | null;
402
+ fileBeingAnalyzed: boolean;
403
+ analysisProgress: import("@prisma/client/runtime/library").JsonValue | null;
328
404
  }[];
329
405
  meta: object;
330
406
  }>;
407
+ members: import("@trpc/server").TRPCBuiltRouter<{
408
+ ctx: {
409
+ db: import("@prisma/client").PrismaClient<import("@prisma/client").Prisma.PrismaClientOptions, never, import("@prisma/client/runtime/library").DefaultArgs>;
410
+ session: any;
411
+ req: import("express").Request<import("express-serve-static-core").ParamsDictionary, any, any, import("qs").ParsedQs, Record<string, any>>;
412
+ res: import("express").Response<any, Record<string, any>>;
413
+ cookies: Record<string, string | undefined>;
414
+ };
415
+ meta: object;
416
+ errorShape: {
417
+ data: {
418
+ zodError: string | null;
419
+ code: import("@trpc/server").TRPC_ERROR_CODE_KEY;
420
+ httpStatus: number;
421
+ path?: string;
422
+ stack?: string;
423
+ };
424
+ message: string;
425
+ code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
426
+ };
427
+ transformer: true;
428
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
429
+ getMembers: import("@trpc/server").TRPCQueryProcedure<{
430
+ input: {
431
+ workspaceId: string;
432
+ };
433
+ output: ({
434
+ id: string;
435
+ name: string;
436
+ email: string;
437
+ image: string | null;
438
+ role: "admin" | "member";
439
+ joinedAt: Date;
440
+ } | {
441
+ id: string;
442
+ name: string;
443
+ email: string;
444
+ image: string | null;
445
+ role: "owner";
446
+ joinedAt: Date;
447
+ })[];
448
+ meta: object;
449
+ }>;
450
+ getCurrentUserRole: import("@trpc/server").TRPCQueryProcedure<{
451
+ input: {
452
+ workspaceId: string;
453
+ };
454
+ output: "admin" | "member" | "owner";
455
+ meta: object;
456
+ }>;
457
+ inviteMember: import("@trpc/server").TRPCMutationProcedure<{
458
+ input: {
459
+ workspaceId: string;
460
+ email: string;
461
+ role?: "admin" | "member" | undefined;
462
+ };
463
+ output: {
464
+ invitationId: string;
465
+ token: string;
466
+ email: string;
467
+ role: string;
468
+ expiresAt: Date;
469
+ workspaceTitle: string;
470
+ invitedByName: string | null;
471
+ };
472
+ meta: object;
473
+ }>;
474
+ acceptInvite: import("@trpc/server").TRPCMutationProcedure<{
475
+ input: {
476
+ token: string;
477
+ };
478
+ output: {
479
+ workspaceId: string;
480
+ workspaceTitle: string;
481
+ role: string;
482
+ ownerName: string | null;
483
+ };
484
+ meta: object;
485
+ }>;
486
+ changeMemberRole: import("@trpc/server").TRPCMutationProcedure<{
487
+ input: {
488
+ workspaceId: string;
489
+ memberId: string;
490
+ role: "admin" | "member";
491
+ };
492
+ output: {
493
+ memberId: string;
494
+ role: "admin" | "member";
495
+ memberName: string | null;
496
+ message: string;
497
+ };
498
+ meta: object;
499
+ }>;
500
+ removeMember: import("@trpc/server").TRPCMutationProcedure<{
501
+ input: {
502
+ workspaceId: string;
503
+ memberId: string;
504
+ };
505
+ output: {
506
+ memberId: string;
507
+ message: string;
508
+ };
509
+ meta: object;
510
+ }>;
511
+ getPendingInvitations: import("@trpc/server").TRPCQueryProcedure<{
512
+ input: {
513
+ workspaceId: string;
514
+ };
515
+ output: {
516
+ id: string;
517
+ email: string;
518
+ role: string;
519
+ token: string;
520
+ expiresAt: Date;
521
+ createdAt: Date;
522
+ invitedByName: string | null;
523
+ }[];
524
+ meta: object;
525
+ }>;
526
+ cancelInvitation: import("@trpc/server").TRPCMutationProcedure<{
527
+ input: {
528
+ invitationId: string;
529
+ };
530
+ output: {
531
+ invitationId: string;
532
+ message: string;
533
+ };
534
+ meta: object;
535
+ }>;
536
+ }>>;
331
537
  }>>;
332
538
  flashcards: import("@trpc/server").TRPCBuiltRouter<{
333
539
  ctx: {
@@ -338,7 +544,17 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
338
544
  cookies: Record<string, string | undefined>;
339
545
  };
340
546
  meta: object;
341
- errorShape: import("@trpc/server").TRPCDefaultErrorShape;
547
+ errorShape: {
548
+ data: {
549
+ zodError: string | null;
550
+ code: import("@trpc/server").TRPC_ERROR_CODE_KEY;
551
+ httpStatus: number;
552
+ path?: string;
553
+ stack?: string;
554
+ };
555
+ message: string;
556
+ code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
557
+ };
342
558
  transformer: true;
343
559
  }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
344
560
  listSets: import("@trpc/server").TRPCQueryProcedure<{
@@ -364,8 +580,11 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
364
580
  workspaceId: string;
365
581
  type: import("@prisma/client").$Enums.ArtifactType;
366
582
  isArchived: boolean;
583
+ generating: boolean;
584
+ generatingMetadata: import("@prisma/client/runtime/library").JsonValue | null;
367
585
  difficulty: import("@prisma/client").$Enums.Difficulty | null;
368
586
  estimatedTime: string | null;
587
+ imageObjectKey: string | null;
369
588
  createdById: string | null;
370
589
  })[];
371
590
  meta: object;
@@ -374,15 +593,40 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
374
593
  input: {
375
594
  workspaceId: string;
376
595
  };
377
- output: {
596
+ output: ({
597
+ progress: {
598
+ id: string;
599
+ createdAt: Date;
600
+ updatedAt: Date;
601
+ userId: string;
602
+ flashcardId: string;
603
+ timesStudied: number;
604
+ timesCorrect: number;
605
+ timesIncorrect: number;
606
+ timesIncorrectConsecutive: number;
607
+ easeFactor: number;
608
+ interval: number;
609
+ repetitions: number;
610
+ masteryLevel: number;
611
+ lastStudiedAt: Date | null;
612
+ nextReviewAt: Date | null;
613
+ }[];
614
+ } & {
378
615
  id: string;
379
616
  createdAt: Date;
380
617
  artifactId: string;
618
+ order: number;
381
619
  front: string;
382
620
  back: string;
383
621
  tags: string[];
384
- order: number;
385
- }[];
622
+ })[];
623
+ meta: object;
624
+ }>;
625
+ isGenerating: import("@trpc/server").TRPCQueryProcedure<{
626
+ input: {
627
+ workspaceId: string;
628
+ };
629
+ output: boolean | undefined;
386
630
  meta: object;
387
631
  }>;
388
632
  createCard: import("@trpc/server").TRPCMutationProcedure<{
@@ -397,10 +641,10 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
397
641
  id: string;
398
642
  createdAt: Date;
399
643
  artifactId: string;
644
+ order: number;
400
645
  front: string;
401
646
  back: string;
402
647
  tags: string[];
403
- order: number;
404
648
  };
405
649
  meta: object;
406
650
  }>;
@@ -416,10 +660,10 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
416
660
  id: string;
417
661
  createdAt: Date;
418
662
  artifactId: string;
663
+ order: number;
419
664
  front: string;
420
665
  back: string;
421
666
  tags: string[];
422
- order: number;
423
667
  };
424
668
  meta: object;
425
669
  }>;
@@ -456,14 +700,175 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
456
700
  workspaceId: string;
457
701
  type: import("@prisma/client").$Enums.ArtifactType;
458
702
  isArchived: boolean;
703
+ generating: boolean;
704
+ generatingMetadata: import("@prisma/client/runtime/library").JsonValue | null;
459
705
  difficulty: import("@prisma/client").$Enums.Difficulty | null;
460
706
  estimatedTime: string | null;
707
+ imageObjectKey: string | null;
461
708
  createdById: string | null;
462
709
  };
463
710
  createdCards: number;
464
711
  };
465
712
  meta: object;
466
713
  }>;
714
+ recordStudyAttempt: import("@trpc/server").TRPCMutationProcedure<{
715
+ input: {
716
+ flashcardId: string;
717
+ isCorrect: boolean;
718
+ confidence?: "easy" | "medium" | "hard" | undefined;
719
+ timeSpentMs?: number | undefined;
720
+ };
721
+ output: {
722
+ flashcard: {
723
+ id: string;
724
+ createdAt: Date;
725
+ artifactId: string;
726
+ order: number;
727
+ front: string;
728
+ back: string;
729
+ tags: string[];
730
+ };
731
+ } & {
732
+ id: string;
733
+ createdAt: Date;
734
+ updatedAt: Date;
735
+ userId: string;
736
+ flashcardId: string;
737
+ timesStudied: number;
738
+ timesCorrect: number;
739
+ timesIncorrect: number;
740
+ timesIncorrectConsecutive: number;
741
+ easeFactor: number;
742
+ interval: number;
743
+ repetitions: number;
744
+ masteryLevel: number;
745
+ lastStudiedAt: Date | null;
746
+ nextReviewAt: Date | null;
747
+ };
748
+ meta: object;
749
+ }>;
750
+ getSetProgress: import("@trpc/server").TRPCQueryProcedure<{
751
+ input: {
752
+ artifactId: string;
753
+ };
754
+ output: {
755
+ flashcardId: any;
756
+ front: any;
757
+ back: any;
758
+ progress: {
759
+ id: string;
760
+ createdAt: Date;
761
+ updatedAt: Date;
762
+ userId: string;
763
+ flashcardId: string;
764
+ timesStudied: number;
765
+ timesCorrect: number;
766
+ timesIncorrect: number;
767
+ timesIncorrectConsecutive: number;
768
+ easeFactor: number;
769
+ interval: number;
770
+ repetitions: number;
771
+ masteryLevel: number;
772
+ lastStudiedAt: Date | null;
773
+ nextReviewAt: Date | null;
774
+ } | null;
775
+ }[];
776
+ meta: object;
777
+ }>;
778
+ getDueFlashcards: import("@trpc/server").TRPCQueryProcedure<{
779
+ input: {
780
+ workspaceId: string;
781
+ };
782
+ output: ({
783
+ artifact: {
784
+ id: string;
785
+ createdAt: Date;
786
+ updatedAt: Date;
787
+ title: string;
788
+ description: string | null;
789
+ workspaceId: string;
790
+ type: import("@prisma/client").$Enums.ArtifactType;
791
+ isArchived: boolean;
792
+ generating: boolean;
793
+ generatingMetadata: import("@prisma/client/runtime/library").JsonValue | null;
794
+ difficulty: import("@prisma/client").$Enums.Difficulty | null;
795
+ estimatedTime: string | null;
796
+ imageObjectKey: string | null;
797
+ createdById: string | null;
798
+ };
799
+ } & {
800
+ id: string;
801
+ createdAt: Date;
802
+ artifactId: string;
803
+ order: number;
804
+ front: string;
805
+ back: string;
806
+ tags: string[];
807
+ })[];
808
+ meta: object;
809
+ }>;
810
+ getSetStatistics: import("@trpc/server").TRPCQueryProcedure<{
811
+ input: {
812
+ artifactId: string;
813
+ };
814
+ output: {
815
+ totalCards: number;
816
+ studiedCards: number;
817
+ unstudiedCards: number;
818
+ masteredCards: number;
819
+ dueForReview: number;
820
+ averageMastery: number;
821
+ successRate: number;
822
+ totalAttempts: number;
823
+ totalCorrect: number;
824
+ };
825
+ meta: object;
826
+ }>;
827
+ resetProgress: import("@trpc/server").TRPCMutationProcedure<{
828
+ input: {
829
+ flashcardId: string;
830
+ };
831
+ output: import("@prisma/client").Prisma.BatchPayload;
832
+ meta: object;
833
+ }>;
834
+ recordStudySession: import("@trpc/server").TRPCMutationProcedure<{
835
+ input: {
836
+ attempts: {
837
+ flashcardId: string;
838
+ isCorrect: boolean;
839
+ confidence?: "easy" | "medium" | "hard" | undefined;
840
+ timeSpentMs?: number | undefined;
841
+ }[];
842
+ };
843
+ output: ({
844
+ flashcard: {
845
+ id: string;
846
+ createdAt: Date;
847
+ artifactId: string;
848
+ order: number;
849
+ front: string;
850
+ back: string;
851
+ tags: string[];
852
+ };
853
+ } & {
854
+ id: string;
855
+ createdAt: Date;
856
+ updatedAt: Date;
857
+ userId: string;
858
+ flashcardId: string;
859
+ timesStudied: number;
860
+ timesCorrect: number;
861
+ timesIncorrect: number;
862
+ timesIncorrectConsecutive: number;
863
+ easeFactor: number;
864
+ interval: number;
865
+ repetitions: number;
866
+ masteryLevel: number;
867
+ lastStudiedAt: Date | null;
868
+ nextReviewAt: Date | null;
869
+ })[];
870
+ meta: object;
871
+ }>;
467
872
  }>>;
468
873
  worksheets: import("@trpc/server").TRPCBuiltRouter<{
469
874
  ctx: {
@@ -474,14 +879,60 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
474
879
  cookies: Record<string, string | undefined>;
475
880
  };
476
881
  meta: object;
477
- errorShape: import("@trpc/server").TRPCDefaultErrorShape;
882
+ errorShape: {
883
+ data: {
884
+ zodError: string | null;
885
+ code: import("@trpc/server").TRPC_ERROR_CODE_KEY;
886
+ httpStatus: number;
887
+ path?: string;
888
+ stack?: string;
889
+ };
890
+ message: string;
891
+ code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
892
+ };
478
893
  transformer: true;
479
894
  }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
480
895
  list: import("@trpc/server").TRPCQueryProcedure<{
481
896
  input: {
482
897
  workspaceId: string;
483
898
  };
484
- output: any;
899
+ output: ({
900
+ versions: {
901
+ id: string;
902
+ createdAt: Date;
903
+ createdById: string | null;
904
+ artifactId: string;
905
+ content: string;
906
+ data: import("@prisma/client/runtime/library").JsonValue | null;
907
+ version: number;
908
+ }[];
909
+ questions: {
910
+ meta: import("@prisma/client/runtime/library").JsonValue | null;
911
+ id: string;
912
+ createdAt: Date;
913
+ type: import("@prisma/client").$Enums.QuestionType;
914
+ difficulty: import("@prisma/client").$Enums.Difficulty;
915
+ artifactId: string;
916
+ prompt: string;
917
+ answer: string | null;
918
+ order: number;
919
+ }[];
920
+ } & {
921
+ id: string;
922
+ createdAt: Date;
923
+ updatedAt: Date;
924
+ title: string;
925
+ description: string | null;
926
+ workspaceId: string;
927
+ type: import("@prisma/client").$Enums.ArtifactType;
928
+ isArchived: boolean;
929
+ generating: boolean;
930
+ generatingMetadata: import("@prisma/client/runtime/library").JsonValue | null;
931
+ difficulty: import("@prisma/client").$Enums.Difficulty | null;
932
+ estimatedTime: string | null;
933
+ imageObjectKey: string | null;
934
+ createdById: string | null;
935
+ })[];
485
936
  meta: object;
486
937
  }>;
487
938
  create: import("@trpc/server").TRPCMutationProcedure<{
@@ -494,7 +945,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
494
945
  problems?: {
495
946
  question: string;
496
947
  answer: string;
497
- type?: "TEXT" | "MULTIPLE_CHOICE" | "NUMERIC" | "TRUE_FALSE" | "MATCHING" | "FILL_IN_THE_BLANK" | undefined;
948
+ type?: "MULTIPLE_CHOICE" | "TEXT" | "NUMERIC" | "TRUE_FALSE" | "MATCHING" | "FILL_IN_THE_BLANK" | undefined;
498
949
  options?: string[] | undefined;
499
950
  }[] | undefined;
500
951
  };
@@ -506,9 +957,9 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
506
957
  type: import("@prisma/client").$Enums.QuestionType;
507
958
  difficulty: import("@prisma/client").$Enums.Difficulty;
508
959
  artifactId: string;
509
- order: number;
510
960
  prompt: string;
511
961
  answer: string | null;
962
+ order: number;
512
963
  }[];
513
964
  } & {
514
965
  id: string;
@@ -519,8 +970,11 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
519
970
  workspaceId: string;
520
971
  type: import("@prisma/client").$Enums.ArtifactType;
521
972
  isArchived: boolean;
973
+ generating: boolean;
974
+ generatingMetadata: import("@prisma/client/runtime/library").JsonValue | null;
522
975
  difficulty: import("@prisma/client").$Enums.Difficulty | null;
523
976
  estimatedTime: string | null;
977
+ imageObjectKey: string | null;
524
978
  createdById: string | null;
525
979
  };
526
980
  meta: object;
@@ -529,7 +983,34 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
529
983
  input: {
530
984
  worksheetId: string;
531
985
  };
532
- output: any;
986
+ output: {
987
+ questions: {
988
+ meta: import("@prisma/client/runtime/library").JsonValue | null;
989
+ id: string;
990
+ createdAt: Date;
991
+ type: import("@prisma/client").$Enums.QuestionType;
992
+ difficulty: import("@prisma/client").$Enums.Difficulty;
993
+ artifactId: string;
994
+ prompt: string;
995
+ answer: string | null;
996
+ order: number;
997
+ }[];
998
+ } & {
999
+ id: string;
1000
+ createdAt: Date;
1001
+ updatedAt: Date;
1002
+ title: string;
1003
+ description: string | null;
1004
+ workspaceId: string;
1005
+ type: import("@prisma/client").$Enums.ArtifactType;
1006
+ isArchived: boolean;
1007
+ generating: boolean;
1008
+ generatingMetadata: import("@prisma/client/runtime/library").JsonValue | null;
1009
+ difficulty: import("@prisma/client").$Enums.Difficulty | null;
1010
+ estimatedTime: string | null;
1011
+ imageObjectKey: string | null;
1012
+ createdById: string | null;
1013
+ };
533
1014
  meta: object;
534
1015
  }>;
535
1016
  createWorksheetQuestion: import("@trpc/server").TRPCMutationProcedure<{
@@ -537,7 +1018,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
537
1018
  worksheetId: string;
538
1019
  prompt: string;
539
1020
  answer?: string | undefined;
540
- type?: "TEXT" | "MULTIPLE_CHOICE" | "NUMERIC" | "TRUE_FALSE" | "MATCHING" | "FILL_IN_THE_BLANK" | undefined;
1021
+ type?: "MULTIPLE_CHOICE" | "TEXT" | "NUMERIC" | "TRUE_FALSE" | "MATCHING" | "FILL_IN_THE_BLANK" | undefined;
541
1022
  difficulty?: "EASY" | "MEDIUM" | "HARD" | undefined;
542
1023
  order?: number | undefined;
543
1024
  meta?: Record<string, unknown> | undefined;
@@ -549,9 +1030,9 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
549
1030
  type: import("@prisma/client").$Enums.QuestionType;
550
1031
  difficulty: import("@prisma/client").$Enums.Difficulty;
551
1032
  artifactId: string;
552
- order: number;
553
1033
  prompt: string;
554
1034
  answer: string | null;
1035
+ order: number;
555
1036
  };
556
1037
  meta: object;
557
1038
  }>;
@@ -560,7 +1041,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
560
1041
  worksheetQuestionId: string;
561
1042
  prompt?: string | undefined;
562
1043
  answer?: string | undefined;
563
- type?: "TEXT" | "MULTIPLE_CHOICE" | "NUMERIC" | "TRUE_FALSE" | "MATCHING" | "FILL_IN_THE_BLANK" | undefined;
1044
+ type?: "MULTIPLE_CHOICE" | "TEXT" | "NUMERIC" | "TRUE_FALSE" | "MATCHING" | "FILL_IN_THE_BLANK" | undefined;
564
1045
  difficulty?: "EASY" | "MEDIUM" | "HARD" | undefined;
565
1046
  order?: number | undefined;
566
1047
  meta?: Record<string, unknown> | undefined;
@@ -572,9 +1053,9 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
572
1053
  type: import("@prisma/client").$Enums.QuestionType;
573
1054
  difficulty: import("@prisma/client").$Enums.Difficulty;
574
1055
  artifactId: string;
575
- order: number;
576
1056
  prompt: string;
577
1057
  answer: string | null;
1058
+ order: number;
578
1059
  };
579
1060
  meta: object;
580
1061
  }>;
@@ -590,6 +1071,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
590
1071
  problemId: string;
591
1072
  completed: boolean;
592
1073
  answer?: string | undefined;
1074
+ correct?: boolean | undefined;
593
1075
  };
594
1076
  output: {
595
1077
  meta: import("@prisma/client/runtime/library").JsonValue | null;
@@ -598,8 +1080,9 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
598
1080
  updatedAt: Date;
599
1081
  userId: string;
600
1082
  worksheetQuestionId: string;
601
- completed: boolean;
1083
+ modified: boolean;
602
1084
  userAnswer: string | null;
1085
+ correct: boolean | null;
603
1086
  completedAt: Date | null;
604
1087
  attempts: number;
605
1088
  timeSpentSec: number | null;
@@ -617,8 +1100,9 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
617
1100
  updatedAt: Date;
618
1101
  userId: string;
619
1102
  worksheetQuestionId: string;
620
- completed: boolean;
1103
+ modified: boolean;
621
1104
  userAnswer: string | null;
1105
+ correct: boolean | null;
622
1106
  completedAt: Date | null;
623
1107
  attempts: number;
624
1108
  timeSpentSec: number | null;
@@ -636,7 +1120,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
636
1120
  question: string;
637
1121
  answer: string;
638
1122
  id?: string | undefined;
639
- type?: "TEXT" | "MULTIPLE_CHOICE" | "NUMERIC" | "TRUE_FALSE" | "MATCHING" | "FILL_IN_THE_BLANK" | undefined;
1123
+ type?: "MULTIPLE_CHOICE" | "TEXT" | "NUMERIC" | "TRUE_FALSE" | "MATCHING" | "FILL_IN_THE_BLANK" | undefined;
640
1124
  options?: string[] | undefined;
641
1125
  }[] | undefined;
642
1126
  };
@@ -648,9 +1132,9 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
648
1132
  type: import("@prisma/client").$Enums.QuestionType;
649
1133
  difficulty: import("@prisma/client").$Enums.Difficulty;
650
1134
  artifactId: string;
651
- order: number;
652
1135
  prompt: string;
653
1136
  answer: string | null;
1137
+ order: number;
654
1138
  }[];
655
1139
  } & {
656
1140
  id: string;
@@ -661,8 +1145,11 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
661
1145
  workspaceId: string;
662
1146
  type: import("@prisma/client").$Enums.ArtifactType;
663
1147
  isArchived: boolean;
1148
+ generating: boolean;
1149
+ generatingMetadata: import("@prisma/client/runtime/library").JsonValue | null;
664
1150
  difficulty: import("@prisma/client").$Enums.Difficulty | null;
665
1151
  estimatedTime: string | null;
1152
+ imageObjectKey: string | null;
666
1153
  createdById: string | null;
667
1154
  };
668
1155
  meta: object;
@@ -693,13 +1180,42 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
693
1180
  workspaceId: string;
694
1181
  type: import("@prisma/client").$Enums.ArtifactType;
695
1182
  isArchived: boolean;
1183
+ generating: boolean;
1184
+ generatingMetadata: import("@prisma/client/runtime/library").JsonValue | null;
696
1185
  difficulty: import("@prisma/client").$Enums.Difficulty | null;
697
1186
  estimatedTime: string | null;
1187
+ imageObjectKey: string | null;
698
1188
  createdById: string | null;
699
1189
  };
700
1190
  };
701
1191
  meta: object;
702
1192
  }>;
1193
+ checkAnswer: import("@trpc/server").TRPCMutationProcedure<{
1194
+ input: {
1195
+ worksheetId: string;
1196
+ questionId: string;
1197
+ answer: string;
1198
+ };
1199
+ output: {
1200
+ isCorrect: boolean;
1201
+ userMarkScheme: import("../types/index.js").UserMarkScheme | null;
1202
+ progress: {
1203
+ meta: import("@prisma/client/runtime/library").JsonValue | null;
1204
+ id: string;
1205
+ createdAt: Date;
1206
+ updatedAt: Date;
1207
+ userId: string;
1208
+ worksheetQuestionId: string;
1209
+ modified: boolean;
1210
+ userAnswer: string | null;
1211
+ correct: boolean | null;
1212
+ completedAt: Date | null;
1213
+ attempts: number;
1214
+ timeSpentSec: number | null;
1215
+ };
1216
+ };
1217
+ meta: object;
1218
+ }>;
703
1219
  }>>;
704
1220
  studyguide: import("@trpc/server").TRPCBuiltRouter<{
705
1221
  ctx: {
@@ -710,7 +1226,17 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
710
1226
  cookies: Record<string, string | undefined>;
711
1227
  };
712
1228
  meta: object;
713
- errorShape: import("@trpc/server").TRPCDefaultErrorShape;
1229
+ errorShape: {
1230
+ data: {
1231
+ zodError: string | null;
1232
+ code: import("@trpc/server").TRPC_ERROR_CODE_KEY;
1233
+ httpStatus: number;
1234
+ path?: string;
1235
+ stack?: string;
1236
+ };
1237
+ message: string;
1238
+ code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
1239
+ };
714
1240
  transformer: true;
715
1241
  }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
716
1242
  get: import("@trpc/server").TRPCQueryProcedure<{
@@ -764,44 +1290,34 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
764
1290
  cookies: Record<string, string | undefined>;
765
1291
  };
766
1292
  meta: object;
767
- errorShape: import("@trpc/server").TRPCDefaultErrorShape;
1293
+ errorShape: {
1294
+ data: {
1295
+ zodError: string | null;
1296
+ code: import("@trpc/server").TRPC_ERROR_CODE_KEY;
1297
+ httpStatus: number;
1298
+ path?: string;
1299
+ stack?: string;
1300
+ };
1301
+ message: string;
1302
+ code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
1303
+ };
768
1304
  transformer: true;
769
1305
  }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
770
1306
  listEpisodes: import("@trpc/server").TRPCQueryProcedure<{
771
1307
  input: {
772
1308
  workspaceId: string;
773
1309
  };
774
- output: ({
1310
+ output: {
775
1311
  id: string;
776
1312
  title: string;
777
1313
  description: string | null;
778
- metadata: null;
779
- segments: never[];
780
- createdAt: Date;
781
- updatedAt: Date;
782
- workspaceId: string;
783
- type: import("@prisma/client").$Enums.ArtifactType;
784
- createdById: string | null;
785
- isArchived: boolean;
786
- } | {
787
- id: string;
788
- title: string;
789
- description: string | undefined;
790
1314
  metadata: {
791
1315
  title: string;
792
1316
  totalDuration: number;
793
- voice: string;
794
- speed: number;
795
- segments: {
1317
+ speakers: {
796
1318
  id: string;
797
- title: string;
798
- content: string;
799
- startTime: number;
800
- duration: number;
801
- keyPoints: string[];
802
- order: number;
803
- audioUrl?: string | undefined;
804
- objectKey?: string | undefined;
1319
+ role: "host" | "guest" | "expert";
1320
+ name?: string | undefined;
805
1321
  }[];
806
1322
  summary: {
807
1323
  executiveSummary: string;
@@ -814,7 +1330,8 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
814
1330
  };
815
1331
  generatedAt: string;
816
1332
  description?: string | undefined;
817
- };
1333
+ } | null;
1334
+ imageUrl: string | null;
818
1335
  segments: ({
819
1336
  id: string;
820
1337
  title: string;
@@ -827,7 +1344,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
827
1344
  id: string;
828
1345
  title: string;
829
1346
  audioUrl: null;
830
- objectKey: string | undefined;
1347
+ objectKey: string | null;
831
1348
  startTime: number;
832
1349
  duration: number;
833
1350
  order: number;
@@ -835,10 +1352,12 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
835
1352
  createdAt: Date;
836
1353
  updatedAt: Date;
837
1354
  workspaceId: string;
1355
+ generating: boolean;
1356
+ generatingMetadata: import("@prisma/client/runtime/library").JsonValue;
838
1357
  type: import("@prisma/client").$Enums.ArtifactType;
839
1358
  createdById: string | null;
840
1359
  isArchived: boolean;
841
- })[];
1360
+ }[];
842
1361
  meta: object;
843
1362
  }>;
844
1363
  getEpisode: import("@trpc/server").TRPCQueryProcedure<{
@@ -852,18 +1371,10 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
852
1371
  metadata: {
853
1372
  title: string;
854
1373
  totalDuration: number;
855
- voice: string;
856
- speed: number;
857
- segments: {
1374
+ speakers: {
858
1375
  id: string;
859
- title: string;
860
- content: string;
861
- startTime: number;
862
- duration: number;
863
- keyPoints: string[];
864
- order: number;
865
- audioUrl?: string | undefined;
866
- objectKey?: string | undefined;
1376
+ role: "host" | "guest" | "expert";
1377
+ name?: string | undefined;
867
1378
  }[];
868
1379
  summary: {
869
1380
  executiveSummary: string;
@@ -877,6 +1388,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
877
1388
  generatedAt: string;
878
1389
  description?: string | undefined;
879
1390
  };
1391
+ imageUrl: string | null;
880
1392
  segments: ({
881
1393
  id: string;
882
1394
  title: string;
@@ -892,7 +1404,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
892
1404
  title: string;
893
1405
  content: string;
894
1406
  audioUrl: null;
895
- objectKey: string | undefined;
1407
+ objectKey: string | null;
896
1408
  startTime: number;
897
1409
  duration: number;
898
1410
  keyPoints: string[];
@@ -911,7 +1423,11 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
911
1423
  title: string;
912
1424
  userPrompt: string;
913
1425
  description?: string | undefined;
914
- voice?: "alloy" | "echo" | "fable" | "onyx" | "nova" | "shimmer" | undefined;
1426
+ speakers?: {
1427
+ id: string;
1428
+ role: "host" | "guest" | "expert";
1429
+ name?: string | undefined;
1430
+ }[] | undefined;
915
1431
  speed?: number | undefined;
916
1432
  generateIntro?: boolean | undefined;
917
1433
  generateOutro?: boolean | undefined;
@@ -926,39 +1442,38 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
926
1442
  title: any;
927
1443
  description: string | undefined;
928
1444
  totalDuration: number;
929
- voice: "alloy" | "echo" | "fable" | "onyx" | "nova" | "shimmer";
930
- speed: number;
931
- segments: {
1445
+ summary: any;
1446
+ speakers: {
932
1447
  id: string;
933
- title: any;
934
- content: any;
935
- objectKey: string;
936
- startTime: number;
937
- duration: number;
938
- keyPoints: any;
939
- order: any;
1448
+ role: "host" | "guest" | "expert";
1449
+ name?: string | undefined;
940
1450
  }[];
941
- summary: any;
942
1451
  generatedAt: string;
943
1452
  };
944
1453
  content: string;
945
1454
  };
946
1455
  meta: object;
947
1456
  }>;
948
- regenerateSegment: import("@trpc/server").TRPCMutationProcedure<{
1457
+ deleteSegment: import("@trpc/server").TRPCMutationProcedure<{
949
1458
  input: {
950
- episodeId: string;
951
1459
  segmentId: string;
952
- newContent?: string | undefined;
953
- voice?: "alloy" | "echo" | "fable" | "onyx" | "nova" | "shimmer" | undefined;
954
- speed?: number | undefined;
955
1460
  };
956
1461
  output: {
957
- segmentId: string;
958
- audioUrl: string | undefined;
959
- duration: number;
1462
+ meta: import("@prisma/client/runtime/library").JsonValue | null;
1463
+ id: string;
1464
+ createdAt: Date;
1465
+ updatedAt: Date;
1466
+ title: string;
1467
+ objectKey: string | null;
1468
+ generating: boolean;
1469
+ generatingMetadata: import("@prisma/client/runtime/library").JsonValue | null;
1470
+ artifactId: string;
960
1471
  content: string;
961
- totalDuration: number;
1472
+ duration: number;
1473
+ order: number;
1474
+ startTime: number;
1475
+ keyPoints: string[];
1476
+ audioUrl: string | null;
962
1477
  };
963
1478
  meta: object;
964
1479
  }>;
@@ -988,8 +1503,11 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
988
1503
  title: string;
989
1504
  description: string | undefined;
990
1505
  totalDuration: number;
991
- voice: string;
992
- speed: number;
1506
+ speakers: {
1507
+ id: string;
1508
+ role: "host" | "guest" | "expert";
1509
+ name?: string | undefined;
1510
+ }[];
993
1511
  };
994
1512
  };
995
1513
  meta: object;
@@ -1009,8 +1527,11 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
1009
1527
  workspaceId: string;
1010
1528
  type: import("@prisma/client").$Enums.ArtifactType;
1011
1529
  isArchived: boolean;
1530
+ generating: boolean;
1531
+ generatingMetadata: import("@prisma/client/runtime/library").JsonValue | null;
1012
1532
  difficulty: import("@prisma/client").$Enums.Difficulty | null;
1013
1533
  estimatedTime: string | null;
1534
+ imageObjectKey: string | null;
1014
1535
  createdById: string | null;
1015
1536
  };
1016
1537
  meta: object;
@@ -1022,6 +1543,26 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
1022
1543
  output: boolean;
1023
1544
  meta: object;
1024
1545
  }>;
1546
+ getSegment: import("@trpc/server").TRPCQueryProcedure<{
1547
+ input: {
1548
+ segmentId: string;
1549
+ };
1550
+ output: {
1551
+ id: string;
1552
+ title: string;
1553
+ content: string;
1554
+ startTime: number;
1555
+ duration: number;
1556
+ order: number;
1557
+ keyPoints: string[];
1558
+ audioUrl: string | null;
1559
+ objectKey: string | null;
1560
+ meta: import("@prisma/client/runtime/library").JsonValue;
1561
+ createdAt: Date;
1562
+ updatedAt: Date;
1563
+ };
1564
+ meta: object;
1565
+ }>;
1025
1566
  getAvailableVoices: import("@trpc/server").TRPCQueryProcedure<{
1026
1567
  input: void;
1027
1568
  output: {
@@ -1041,7 +1582,17 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
1041
1582
  cookies: Record<string, string | undefined>;
1042
1583
  };
1043
1584
  meta: object;
1044
- errorShape: import("@trpc/server").TRPCDefaultErrorShape;
1585
+ errorShape: {
1586
+ data: {
1587
+ zodError: string | null;
1588
+ code: import("@trpc/server").TRPC_ERROR_CODE_KEY;
1589
+ httpStatus: number;
1590
+ path?: string;
1591
+ stack?: string;
1592
+ };
1593
+ message: string;
1594
+ code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
1595
+ };
1045
1596
  transformer: true;
1046
1597
  }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
1047
1598
  getChannels: import("@trpc/server").TRPCQueryProcedure<{
@@ -1203,6 +1754,41 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
1203
1754
  meta: object;
1204
1755
  }>;
1205
1756
  }>>;
1757
+ member: import("@trpc/server").TRPCBuiltRouter<{
1758
+ ctx: {
1759
+ db: import("@prisma/client").PrismaClient<import("@prisma/client").Prisma.PrismaClientOptions, never, import("@prisma/client/runtime/library").DefaultArgs>;
1760
+ session: any;
1761
+ req: import("express").Request<import("express-serve-static-core").ParamsDictionary, any, any, import("qs").ParsedQs, Record<string, any>>;
1762
+ res: import("express").Response<any, Record<string, any>>;
1763
+ cookies: Record<string, string | undefined>;
1764
+ };
1765
+ meta: object;
1766
+ errorShape: {
1767
+ data: {
1768
+ zodError: string | null;
1769
+ code: import("@trpc/server").TRPC_ERROR_CODE_KEY;
1770
+ httpStatus: number;
1771
+ path?: string;
1772
+ stack?: string;
1773
+ };
1774
+ message: string;
1775
+ code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
1776
+ };
1777
+ transformer: true;
1778
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
1779
+ acceptInvite: import("@trpc/server").TRPCMutationProcedure<{
1780
+ input: {
1781
+ token: string;
1782
+ };
1783
+ output: {
1784
+ workspaceId: string;
1785
+ workspaceTitle: string;
1786
+ role: string;
1787
+ ownerName: string | null;
1788
+ };
1789
+ meta: object;
1790
+ }>;
1791
+ }>>;
1206
1792
  }>>;
1207
1793
  export type AppRouter = typeof appRouter;
1208
1794
  export type RouterInputs = inferRouterInputs<AppRouter>;