@goscribe/server 1.0.8 → 1.0.9

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 (57) hide show
  1. package/AUTH_FRONTEND_SPEC.md +21 -0
  2. package/CHAT_FRONTEND_SPEC.md +474 -0
  3. package/MEETINGSUMMARY_FRONTEND_SPEC.md +28 -0
  4. package/PODCAST_FRONTEND_SPEC.md +595 -0
  5. package/STUDYGUIDE_FRONTEND_SPEC.md +18 -0
  6. package/WORKSHEETS_FRONTEND_SPEC.md +26 -0
  7. package/WORKSPACE_FRONTEND_SPEC.md +47 -0
  8. package/dist/lib/ai-session.d.ts +26 -0
  9. package/dist/lib/ai-session.js +343 -0
  10. package/dist/lib/inference.d.ts +2 -0
  11. package/dist/lib/inference.js +21 -0
  12. package/dist/lib/pusher.d.ts +14 -0
  13. package/dist/lib/pusher.js +94 -0
  14. package/dist/lib/storage.d.ts +10 -2
  15. package/dist/lib/storage.js +63 -6
  16. package/dist/routers/_app.d.ts +840 -58
  17. package/dist/routers/_app.js +6 -0
  18. package/dist/routers/ai-session.d.ts +0 -0
  19. package/dist/routers/ai-session.js +1 -0
  20. package/dist/routers/auth.d.ts +1 -0
  21. package/dist/routers/auth.js +6 -4
  22. package/dist/routers/chat.d.ts +171 -0
  23. package/dist/routers/chat.js +270 -0
  24. package/dist/routers/flashcards.d.ts +37 -0
  25. package/dist/routers/flashcards.js +128 -0
  26. package/dist/routers/meetingsummary.d.ts +0 -0
  27. package/dist/routers/meetingsummary.js +377 -0
  28. package/dist/routers/podcast.d.ts +277 -0
  29. package/dist/routers/podcast.js +847 -0
  30. package/dist/routers/studyguide.d.ts +54 -0
  31. package/dist/routers/studyguide.js +125 -0
  32. package/dist/routers/worksheets.d.ts +138 -51
  33. package/dist/routers/worksheets.js +317 -7
  34. package/dist/routers/workspace.d.ts +162 -7
  35. package/dist/routers/workspace.js +440 -8
  36. package/dist/server.js +6 -2
  37. package/package.json +11 -4
  38. package/prisma/migrations/20250826124819_add_worksheet_difficulty_and_estimated_time/migration.sql +213 -0
  39. package/prisma/migrations/20250826133236_add_worksheet_question_progress/migration.sql +31 -0
  40. package/prisma/migrations/migration_lock.toml +3 -0
  41. package/prisma/schema.prisma +87 -6
  42. package/prisma/seed.mjs +135 -0
  43. package/src/lib/ai-session.ts +411 -0
  44. package/src/lib/inference.ts +21 -0
  45. package/src/lib/pusher.ts +104 -0
  46. package/src/lib/storage.ts +89 -6
  47. package/src/routers/_app.ts +6 -0
  48. package/src/routers/auth.ts +8 -4
  49. package/src/routers/chat.ts +275 -0
  50. package/src/routers/flashcards.ts +142 -0
  51. package/src/routers/meetingsummary.ts +416 -0
  52. package/src/routers/podcast.ts +934 -0
  53. package/src/routers/studyguide.ts +144 -0
  54. package/src/routers/worksheets.ts +336 -7
  55. package/src/routers/workspace.ts +487 -8
  56. package/src/server.ts +7 -2
  57. package/test-ai-integration.js +134 -0
@@ -46,6 +46,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
46
46
  email: string | null;
47
47
  name: string | null;
48
48
  image: string | null;
49
+ token: string;
49
50
  };
50
51
  meta: object;
51
52
  }>;
@@ -82,7 +83,37 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
82
83
  transformer: true;
83
84
  }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
84
85
  list: import("@trpc/server").TRPCQueryProcedure<{
85
- input: void;
86
+ input: {
87
+ parentId?: string | undefined;
88
+ };
89
+ output: {
90
+ workspaces: {
91
+ id: string;
92
+ createdAt: Date;
93
+ updatedAt: Date;
94
+ ownerId: string;
95
+ title: string;
96
+ description: string | null;
97
+ folderId: string | null;
98
+ shareLink: string | null;
99
+ }[];
100
+ folders: {
101
+ name: string;
102
+ id: string;
103
+ createdAt: Date;
104
+ updatedAt: Date;
105
+ ownerId: string;
106
+ parentId: string | null;
107
+ }[];
108
+ };
109
+ meta: object;
110
+ }>;
111
+ create: import("@trpc/server").TRPCMutationProcedure<{
112
+ input: {
113
+ name: string;
114
+ description?: string | undefined;
115
+ parentId?: string | undefined;
116
+ };
86
117
  output: {
87
118
  id: string;
88
119
  createdAt: Date;
@@ -91,22 +122,22 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
91
122
  title: string;
92
123
  description: string | null;
93
124
  folderId: string | null;
94
- }[];
125
+ shareLink: string | null;
126
+ };
95
127
  meta: object;
96
128
  }>;
97
- create: import("@trpc/server").TRPCMutationProcedure<{
129
+ createFolder: import("@trpc/server").TRPCMutationProcedure<{
98
130
  input: {
99
131
  name: string;
100
- description?: string | undefined;
132
+ parentId?: string | undefined;
101
133
  };
102
134
  output: {
135
+ name: string;
103
136
  id: string;
104
137
  createdAt: Date;
105
138
  updatedAt: Date;
106
139
  ownerId: string;
107
- title: string;
108
- description: string | null;
109
- folderId: string | null;
140
+ parentId: string | null;
110
141
  };
111
142
  meta: object;
112
143
  }>;
@@ -115,6 +146,42 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
115
146
  id: string;
116
147
  };
117
148
  output: {
149
+ folder: {
150
+ name: string;
151
+ id: string;
152
+ createdAt: Date;
153
+ updatedAt: Date;
154
+ ownerId: string;
155
+ parentId: string | null;
156
+ } | null;
157
+ uploads: {
158
+ meta: import("@prisma/client/runtime/library").JsonValue | null;
159
+ name: string;
160
+ id: string;
161
+ createdAt: Date;
162
+ userId: string;
163
+ workspaceId: string;
164
+ mimeType: string;
165
+ size: number;
166
+ bucket: string | null;
167
+ objectKey: string | null;
168
+ url: string | null;
169
+ checksum: string | null;
170
+ }[];
171
+ artifacts: {
172
+ id: string;
173
+ createdAt: Date;
174
+ updatedAt: Date;
175
+ title: string;
176
+ description: string | null;
177
+ workspaceId: string;
178
+ type: import("@prisma/client").$Enums.ArtifactType;
179
+ isArchived: boolean;
180
+ difficulty: import("@prisma/client").$Enums.Difficulty | null;
181
+ estimatedTime: string | null;
182
+ createdById: string | null;
183
+ }[];
184
+ } & {
118
185
  id: string;
119
186
  createdAt: Date;
120
187
  updatedAt: Date;
@@ -122,6 +189,30 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
122
189
  title: string;
123
190
  description: string | null;
124
191
  folderId: string | null;
192
+ shareLink: string | null;
193
+ };
194
+ meta: object;
195
+ }>;
196
+ share: import("@trpc/server").TRPCQueryProcedure<{
197
+ input: {
198
+ id: string;
199
+ };
200
+ 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;
125
216
  };
126
217
  meta: object;
127
218
  }>;
@@ -139,6 +230,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
139
230
  title: string;
140
231
  description: string | null;
141
232
  folderId: string | null;
233
+ shareLink: string | null;
142
234
  };
143
235
  meta: object;
144
236
  }>;
@@ -149,6 +241,30 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
149
241
  output: boolean;
150
242
  meta: object;
151
243
  }>;
244
+ getFolderInformation: import("@trpc/server").TRPCQueryProcedure<{
245
+ input: {
246
+ id: string;
247
+ };
248
+ output: {
249
+ folder: {
250
+ name: string;
251
+ id: string;
252
+ createdAt: Date;
253
+ updatedAt: Date;
254
+ ownerId: string;
255
+ parentId: string | null;
256
+ };
257
+ parents: {
258
+ name: string;
259
+ id: string;
260
+ createdAt: Date;
261
+ updatedAt: Date;
262
+ ownerId: string;
263
+ parentId: string | null;
264
+ }[];
265
+ };
266
+ meta: object;
267
+ }>;
152
268
  uploadFiles: import("@trpc/server").TRPCMutationProcedure<{
153
269
  input: {
154
270
  id: string;
@@ -172,6 +288,46 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
172
288
  output: boolean;
173
289
  meta: object;
174
290
  }>;
291
+ uploadAndAnalyzeMedia: import("@trpc/server").TRPCMutationProcedure<{
292
+ input: {
293
+ workspaceId: string;
294
+ file: {
295
+ filename: string;
296
+ contentType: string;
297
+ size: number;
298
+ content: string;
299
+ };
300
+ generateStudyGuide?: boolean | undefined;
301
+ generateFlashcards?: boolean | undefined;
302
+ generateWorksheet?: boolean | undefined;
303
+ };
304
+ output: {
305
+ filename: string;
306
+ artifacts: {
307
+ studyGuide: any | null;
308
+ flashcards: any | null;
309
+ worksheet: any | null;
310
+ };
311
+ };
312
+ meta: object;
313
+ }>;
314
+ search: import("@trpc/server").TRPCQueryProcedure<{
315
+ input: {
316
+ query: string;
317
+ limit?: number | undefined;
318
+ };
319
+ output: {
320
+ id: string;
321
+ createdAt: Date;
322
+ updatedAt: Date;
323
+ ownerId: string;
324
+ title: string;
325
+ description: string | null;
326
+ folderId: string | null;
327
+ shareLink: string | null;
328
+ }[];
329
+ meta: object;
330
+ }>;
175
331
  }>>;
176
332
  flashcards: import("@trpc/server").TRPCBuiltRouter<{
177
333
  ctx: {
@@ -204,9 +360,12 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
204
360
  createdAt: Date;
205
361
  updatedAt: Date;
206
362
  title: string;
363
+ description: string | null;
207
364
  workspaceId: string;
208
365
  type: import("@prisma/client").$Enums.ArtifactType;
209
366
  isArchived: boolean;
367
+ difficulty: import("@prisma/client").$Enums.Difficulty | null;
368
+ estimatedTime: string | null;
210
369
  createdById: string | null;
211
370
  })[];
212
371
  meta: object;
@@ -271,6 +430,40 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
271
430
  output: boolean;
272
431
  meta: object;
273
432
  }>;
433
+ deleteSet: import("@trpc/server").TRPCMutationProcedure<{
434
+ input: {
435
+ setId: string;
436
+ };
437
+ output: boolean;
438
+ meta: object;
439
+ }>;
440
+ generateFromPrompt: import("@trpc/server").TRPCMutationProcedure<{
441
+ input: {
442
+ workspaceId: string;
443
+ prompt: string;
444
+ numCards?: number | undefined;
445
+ difficulty?: "easy" | "medium" | "hard" | undefined;
446
+ title?: string | undefined;
447
+ tags?: string[] | undefined;
448
+ };
449
+ output: {
450
+ artifact: {
451
+ id: string;
452
+ createdAt: Date;
453
+ updatedAt: Date;
454
+ title: string;
455
+ description: string | null;
456
+ workspaceId: string;
457
+ type: import("@prisma/client").$Enums.ArtifactType;
458
+ isArchived: boolean;
459
+ difficulty: import("@prisma/client").$Enums.Difficulty | null;
460
+ estimatedTime: string | null;
461
+ createdById: string | null;
462
+ };
463
+ createdCards: number;
464
+ };
465
+ meta: object;
466
+ }>;
274
467
  }>>;
275
468
  worksheets: import("@trpc/server").TRPCBuiltRouter<{
276
469
  ctx: {
@@ -288,87 +481,63 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
288
481
  input: {
289
482
  workspaceId: string;
290
483
  };
291
- output: ({
292
- versions: {
293
- id: string;
294
- createdAt: Date;
295
- createdById: string | null;
296
- artifactId: string;
297
- content: string;
298
- data: import("@prisma/client/runtime/library").JsonValue | null;
299
- version: number;
300
- }[];
301
- questions: {
302
- meta: import("@prisma/client/runtime/library").JsonValue | null;
303
- id: string;
304
- createdAt: Date;
305
- artifactId: string;
306
- order: number;
307
- prompt: string;
308
- answer: string | null;
309
- difficulty: import("@prisma/client").$Enums.Difficulty;
310
- }[];
311
- } & {
312
- id: string;
313
- createdAt: Date;
314
- updatedAt: Date;
315
- title: string;
316
- workspaceId: string;
317
- type: import("@prisma/client").$Enums.ArtifactType;
318
- isArchived: boolean;
319
- createdById: string | null;
320
- })[];
484
+ output: any;
321
485
  meta: object;
322
486
  }>;
323
- createWorksheet: import("@trpc/server").TRPCMutationProcedure<{
487
+ create: import("@trpc/server").TRPCMutationProcedure<{
324
488
  input: {
325
489
  workspaceId: string;
326
490
  title: string;
327
- };
328
- output: {
329
- id: string;
330
- createdAt: Date;
331
- updatedAt: Date;
332
- title: string;
333
- workspaceId: string;
334
- type: import("@prisma/client").$Enums.ArtifactType;
335
- isArchived: boolean;
336
- createdById: string | null;
337
- };
338
- meta: object;
339
- }>;
340
- get: import("@trpc/server").TRPCQueryProcedure<{
341
- input: {
342
- worksheetId: string;
491
+ description?: string | undefined;
492
+ difficulty?: "EASY" | "MEDIUM" | "HARD" | undefined;
493
+ estimatedTime?: string | undefined;
494
+ problems?: {
495
+ question: string;
496
+ answer: string;
497
+ type?: "TEXT" | "MULTIPLE_CHOICE" | "NUMERIC" | "TRUE_FALSE" | "MATCHING" | "FILL_IN_THE_BLANK" | undefined;
498
+ options?: string[] | undefined;
499
+ }[] | undefined;
343
500
  };
344
501
  output: {
345
502
  questions: {
346
503
  meta: import("@prisma/client/runtime/library").JsonValue | null;
347
504
  id: string;
348
505
  createdAt: Date;
506
+ type: import("@prisma/client").$Enums.QuestionType;
507
+ difficulty: import("@prisma/client").$Enums.Difficulty;
349
508
  artifactId: string;
350
509
  order: number;
351
510
  prompt: string;
352
511
  answer: string | null;
353
- difficulty: import("@prisma/client").$Enums.Difficulty;
354
512
  }[];
355
513
  } & {
356
514
  id: string;
357
515
  createdAt: Date;
358
516
  updatedAt: Date;
359
517
  title: string;
518
+ description: string | null;
360
519
  workspaceId: string;
361
520
  type: import("@prisma/client").$Enums.ArtifactType;
362
521
  isArchived: boolean;
522
+ difficulty: import("@prisma/client").$Enums.Difficulty | null;
523
+ estimatedTime: string | null;
363
524
  createdById: string | null;
364
525
  };
365
526
  meta: object;
366
527
  }>;
528
+ get: import("@trpc/server").TRPCQueryProcedure<{
529
+ input: {
530
+ worksheetId: string;
531
+ };
532
+ output: any;
533
+ meta: object;
534
+ }>;
367
535
  createWorksheetQuestion: import("@trpc/server").TRPCMutationProcedure<{
368
536
  input: {
369
537
  worksheetId: string;
370
538
  prompt: string;
371
539
  answer?: string | undefined;
540
+ type?: "TEXT" | "MULTIPLE_CHOICE" | "NUMERIC" | "TRUE_FALSE" | "MATCHING" | "FILL_IN_THE_BLANK" | undefined;
372
541
  difficulty?: "EASY" | "MEDIUM" | "HARD" | undefined;
373
542
  order?: number | undefined;
374
543
  meta?: Record<string, unknown> | undefined;
@@ -377,11 +546,12 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
377
546
  meta: import("@prisma/client/runtime/library").JsonValue | null;
378
547
  id: string;
379
548
  createdAt: Date;
549
+ type: import("@prisma/client").$Enums.QuestionType;
550
+ difficulty: import("@prisma/client").$Enums.Difficulty;
380
551
  artifactId: string;
381
552
  order: number;
382
553
  prompt: string;
383
554
  answer: string | null;
384
- difficulty: import("@prisma/client").$Enums.Difficulty;
385
555
  };
386
556
  meta: object;
387
557
  }>;
@@ -390,6 +560,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
390
560
  worksheetQuestionId: string;
391
561
  prompt?: string | undefined;
392
562
  answer?: string | undefined;
563
+ type?: "TEXT" | "MULTIPLE_CHOICE" | "NUMERIC" | "TRUE_FALSE" | "MATCHING" | "FILL_IN_THE_BLANK" | undefined;
393
564
  difficulty?: "EASY" | "MEDIUM" | "HARD" | undefined;
394
565
  order?: number | undefined;
395
566
  meta?: Record<string, unknown> | undefined;
@@ -398,11 +569,12 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
398
569
  meta: import("@prisma/client/runtime/library").JsonValue | null;
399
570
  id: string;
400
571
  createdAt: Date;
572
+ type: import("@prisma/client").$Enums.QuestionType;
573
+ difficulty: import("@prisma/client").$Enums.Difficulty;
401
574
  artifactId: string;
402
575
  order: number;
403
576
  prompt: string;
404
577
  answer: string | null;
405
- difficulty: import("@prisma/client").$Enums.Difficulty;
406
578
  };
407
579
  meta: object;
408
580
  }>;
@@ -413,13 +585,623 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
413
585
  output: boolean;
414
586
  meta: object;
415
587
  }>;
416
- deleteWorksheet: import("@trpc/server").TRPCMutationProcedure<{
588
+ updateProblemStatus: import("@trpc/server").TRPCMutationProcedure<{
589
+ input: {
590
+ problemId: string;
591
+ completed: boolean;
592
+ answer?: string | undefined;
593
+ };
594
+ output: {
595
+ meta: import("@prisma/client/runtime/library").JsonValue | null;
596
+ id: string;
597
+ createdAt: Date;
598
+ updatedAt: Date;
599
+ userId: string;
600
+ worksheetQuestionId: string;
601
+ completed: boolean;
602
+ userAnswer: string | null;
603
+ completedAt: Date | null;
604
+ attempts: number;
605
+ timeSpentSec: number | null;
606
+ };
607
+ meta: object;
608
+ }>;
609
+ getProgress: import("@trpc/server").TRPCQueryProcedure<{
417
610
  input: {
418
611
  worksheetId: string;
419
612
  };
613
+ output: {
614
+ meta: import("@prisma/client/runtime/library").JsonValue | null;
615
+ id: string;
616
+ createdAt: Date;
617
+ updatedAt: Date;
618
+ userId: string;
619
+ worksheetQuestionId: string;
620
+ completed: boolean;
621
+ userAnswer: string | null;
622
+ completedAt: Date | null;
623
+ attempts: number;
624
+ timeSpentSec: number | null;
625
+ }[];
626
+ meta: object;
627
+ }>;
628
+ update: import("@trpc/server").TRPCMutationProcedure<{
629
+ input: {
630
+ id: string;
631
+ title?: string | undefined;
632
+ description?: string | undefined;
633
+ difficulty?: "EASY" | "MEDIUM" | "HARD" | undefined;
634
+ estimatedTime?: string | undefined;
635
+ problems?: {
636
+ question: string;
637
+ answer: string;
638
+ id?: string | undefined;
639
+ type?: "TEXT" | "MULTIPLE_CHOICE" | "NUMERIC" | "TRUE_FALSE" | "MATCHING" | "FILL_IN_THE_BLANK" | undefined;
640
+ options?: string[] | undefined;
641
+ }[] | undefined;
642
+ };
643
+ output: {
644
+ questions: {
645
+ meta: import("@prisma/client/runtime/library").JsonValue | null;
646
+ id: string;
647
+ createdAt: Date;
648
+ type: import("@prisma/client").$Enums.QuestionType;
649
+ difficulty: import("@prisma/client").$Enums.Difficulty;
650
+ artifactId: string;
651
+ order: number;
652
+ prompt: string;
653
+ answer: string | null;
654
+ }[];
655
+ } & {
656
+ id: string;
657
+ createdAt: Date;
658
+ updatedAt: Date;
659
+ title: string;
660
+ description: string | null;
661
+ workspaceId: string;
662
+ type: import("@prisma/client").$Enums.ArtifactType;
663
+ isArchived: boolean;
664
+ difficulty: import("@prisma/client").$Enums.Difficulty | null;
665
+ estimatedTime: string | null;
666
+ createdById: string | null;
667
+ };
668
+ meta: object;
669
+ }>;
670
+ delete: import("@trpc/server").TRPCMutationProcedure<{
671
+ input: {
672
+ id: string;
673
+ };
420
674
  output: boolean;
421
675
  meta: object;
422
676
  }>;
677
+ generateFromPrompt: import("@trpc/server").TRPCMutationProcedure<{
678
+ input: {
679
+ workspaceId: string;
680
+ prompt: string;
681
+ numQuestions?: number | undefined;
682
+ difficulty?: "easy" | "medium" | "hard" | undefined;
683
+ title?: string | undefined;
684
+ estimatedTime?: string | undefined;
685
+ };
686
+ output: {
687
+ artifact: {
688
+ id: string;
689
+ createdAt: Date;
690
+ updatedAt: Date;
691
+ title: string;
692
+ description: string | null;
693
+ workspaceId: string;
694
+ type: import("@prisma/client").$Enums.ArtifactType;
695
+ isArchived: boolean;
696
+ difficulty: import("@prisma/client").$Enums.Difficulty | null;
697
+ estimatedTime: string | null;
698
+ createdById: string | null;
699
+ };
700
+ };
701
+ meta: object;
702
+ }>;
703
+ }>>;
704
+ studyguide: import("@trpc/server").TRPCBuiltRouter<{
705
+ ctx: {
706
+ db: import("@prisma/client").PrismaClient<import("@prisma/client").Prisma.PrismaClientOptions, never, import("@prisma/client/runtime/library").DefaultArgs>;
707
+ session: any;
708
+ req: import("express").Request<import("express-serve-static-core").ParamsDictionary, any, any, import("qs").ParsedQs, Record<string, any>>;
709
+ res: import("express").Response<any, Record<string, any>>;
710
+ cookies: Record<string, string | undefined>;
711
+ };
712
+ meta: object;
713
+ errorShape: import("@trpc/server").TRPCDefaultErrorShape;
714
+ transformer: true;
715
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
716
+ get: import("@trpc/server").TRPCQueryProcedure<{
717
+ input: {
718
+ workspaceId: string;
719
+ };
720
+ output: {
721
+ artifactId: string;
722
+ title: string;
723
+ latestVersion: {
724
+ id: string;
725
+ createdAt: Date;
726
+ createdById: string | null;
727
+ artifactId: string;
728
+ content: string;
729
+ data: import("@prisma/client/runtime/library").JsonValue | null;
730
+ version: number;
731
+ };
732
+ };
733
+ meta: object;
734
+ }>;
735
+ edit: import("@trpc/server").TRPCMutationProcedure<{
736
+ input: {
737
+ workspaceId: string;
738
+ content: string;
739
+ studyGuideId?: string | undefined;
740
+ data?: Record<string, unknown> | undefined;
741
+ title?: string | undefined;
742
+ };
743
+ output: {
744
+ artifactId: string;
745
+ version: {
746
+ id: string;
747
+ createdAt: Date;
748
+ createdById: string | null;
749
+ artifactId: string;
750
+ content: string;
751
+ data: import("@prisma/client/runtime/library").JsonValue | null;
752
+ version: number;
753
+ };
754
+ };
755
+ meta: object;
756
+ }>;
757
+ }>>;
758
+ podcast: import("@trpc/server").TRPCBuiltRouter<{
759
+ ctx: {
760
+ db: import("@prisma/client").PrismaClient<import("@prisma/client").Prisma.PrismaClientOptions, never, import("@prisma/client/runtime/library").DefaultArgs>;
761
+ session: any;
762
+ req: import("express").Request<import("express-serve-static-core").ParamsDictionary, any, any, import("qs").ParsedQs, Record<string, any>>;
763
+ res: import("express").Response<any, Record<string, any>>;
764
+ cookies: Record<string, string | undefined>;
765
+ };
766
+ meta: object;
767
+ errorShape: import("@trpc/server").TRPCDefaultErrorShape;
768
+ transformer: true;
769
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
770
+ listEpisodes: import("@trpc/server").TRPCQueryProcedure<{
771
+ input: {
772
+ workspaceId: string;
773
+ };
774
+ output: ({
775
+ id: string;
776
+ title: string;
777
+ 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
+ metadata: {
791
+ title: string;
792
+ totalDuration: number;
793
+ voice: string;
794
+ speed: number;
795
+ segments: {
796
+ 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;
805
+ }[];
806
+ summary: {
807
+ executiveSummary: string;
808
+ learningObjectives: string[];
809
+ keyConcepts: string[];
810
+ followUpActions: string[];
811
+ targetAudience: string;
812
+ prerequisites: string[];
813
+ tags: string[];
814
+ };
815
+ generatedAt: string;
816
+ description?: string | undefined;
817
+ };
818
+ segments: ({
819
+ id: string;
820
+ title: string;
821
+ audioUrl: string;
822
+ objectKey: string;
823
+ startTime: number;
824
+ duration: number;
825
+ order: number;
826
+ } | {
827
+ id: string;
828
+ title: string;
829
+ audioUrl: null;
830
+ objectKey: string | undefined;
831
+ startTime: number;
832
+ duration: number;
833
+ order: number;
834
+ })[];
835
+ createdAt: Date;
836
+ updatedAt: Date;
837
+ workspaceId: string;
838
+ type: import("@prisma/client").$Enums.ArtifactType;
839
+ createdById: string | null;
840
+ isArchived: boolean;
841
+ })[];
842
+ meta: object;
843
+ }>;
844
+ getEpisode: import("@trpc/server").TRPCQueryProcedure<{
845
+ input: {
846
+ episodeId: string;
847
+ };
848
+ output: {
849
+ id: string;
850
+ title: string;
851
+ description: string | undefined;
852
+ metadata: {
853
+ title: string;
854
+ totalDuration: number;
855
+ voice: string;
856
+ speed: number;
857
+ segments: {
858
+ 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;
867
+ }[];
868
+ summary: {
869
+ executiveSummary: string;
870
+ learningObjectives: string[];
871
+ keyConcepts: string[];
872
+ followUpActions: string[];
873
+ targetAudience: string;
874
+ prerequisites: string[];
875
+ tags: string[];
876
+ };
877
+ generatedAt: string;
878
+ description?: string | undefined;
879
+ };
880
+ segments: ({
881
+ id: string;
882
+ title: string;
883
+ content: string;
884
+ audioUrl: string;
885
+ objectKey: string;
886
+ startTime: number;
887
+ duration: number;
888
+ keyPoints: string[];
889
+ order: number;
890
+ } | {
891
+ id: string;
892
+ title: string;
893
+ content: string;
894
+ audioUrl: null;
895
+ objectKey: string | undefined;
896
+ startTime: number;
897
+ duration: number;
898
+ keyPoints: string[];
899
+ order: number;
900
+ })[];
901
+ content: string;
902
+ createdAt: Date;
903
+ updatedAt: Date;
904
+ };
905
+ meta: object;
906
+ }>;
907
+ generateEpisode: import("@trpc/server").TRPCMutationProcedure<{
908
+ input: {
909
+ workspaceId: string;
910
+ podcastData: {
911
+ title: string;
912
+ userPrompt: string;
913
+ description?: string | undefined;
914
+ voice?: "alloy" | "echo" | "fable" | "onyx" | "nova" | "shimmer" | undefined;
915
+ speed?: number | undefined;
916
+ generateIntro?: boolean | undefined;
917
+ generateOutro?: boolean | undefined;
918
+ segmentByTopics?: boolean | undefined;
919
+ };
920
+ };
921
+ output: {
922
+ id: string;
923
+ title: any;
924
+ description: string | undefined;
925
+ metadata: {
926
+ title: any;
927
+ description: string | undefined;
928
+ totalDuration: number;
929
+ voice: "alloy" | "echo" | "fable" | "onyx" | "nova" | "shimmer";
930
+ speed: number;
931
+ segments: {
932
+ id: string;
933
+ title: any;
934
+ content: any;
935
+ objectKey: string;
936
+ startTime: number;
937
+ duration: number;
938
+ keyPoints: any;
939
+ order: any;
940
+ }[];
941
+ summary: any;
942
+ generatedAt: string;
943
+ };
944
+ content: string;
945
+ };
946
+ meta: object;
947
+ }>;
948
+ regenerateSegment: import("@trpc/server").TRPCMutationProcedure<{
949
+ input: {
950
+ episodeId: string;
951
+ segmentId: string;
952
+ newContent?: string | undefined;
953
+ voice?: "alloy" | "echo" | "fable" | "onyx" | "nova" | "shimmer" | undefined;
954
+ speed?: number | undefined;
955
+ };
956
+ output: {
957
+ segmentId: string;
958
+ audioUrl: string | undefined;
959
+ duration: number;
960
+ content: string;
961
+ totalDuration: number;
962
+ };
963
+ meta: object;
964
+ }>;
965
+ getEpisodeSchema: import("@trpc/server").TRPCQueryProcedure<{
966
+ input: {
967
+ episodeId: string;
968
+ };
969
+ output: {
970
+ segments: {
971
+ id: string;
972
+ title: string;
973
+ startTime: number;
974
+ duration: number;
975
+ keyPoints: string[];
976
+ order: number;
977
+ }[];
978
+ summary: {
979
+ executiveSummary: string;
980
+ learningObjectives: string[];
981
+ keyConcepts: string[];
982
+ followUpActions: string[];
983
+ targetAudience: string;
984
+ prerequisites: string[];
985
+ tags: string[];
986
+ };
987
+ metadata: {
988
+ title: string;
989
+ description: string | undefined;
990
+ totalDuration: number;
991
+ voice: string;
992
+ speed: number;
993
+ };
994
+ };
995
+ meta: object;
996
+ }>;
997
+ updateEpisode: import("@trpc/server").TRPCMutationProcedure<{
998
+ input: {
999
+ episodeId: string;
1000
+ title?: string | undefined;
1001
+ description?: string | undefined;
1002
+ };
1003
+ output: {
1004
+ id: string;
1005
+ createdAt: Date;
1006
+ updatedAt: Date;
1007
+ title: string;
1008
+ description: string | null;
1009
+ workspaceId: string;
1010
+ type: import("@prisma/client").$Enums.ArtifactType;
1011
+ isArchived: boolean;
1012
+ difficulty: import("@prisma/client").$Enums.Difficulty | null;
1013
+ estimatedTime: string | null;
1014
+ createdById: string | null;
1015
+ };
1016
+ meta: object;
1017
+ }>;
1018
+ deleteEpisode: import("@trpc/server").TRPCMutationProcedure<{
1019
+ input: {
1020
+ episodeId: string;
1021
+ };
1022
+ output: boolean;
1023
+ meta: object;
1024
+ }>;
1025
+ getAvailableVoices: import("@trpc/server").TRPCQueryProcedure<{
1026
+ input: void;
1027
+ output: {
1028
+ id: string;
1029
+ name: string;
1030
+ description: string;
1031
+ }[];
1032
+ meta: object;
1033
+ }>;
1034
+ }>>;
1035
+ chat: import("@trpc/server").TRPCBuiltRouter<{
1036
+ ctx: {
1037
+ db: import("@prisma/client").PrismaClient<import("@prisma/client").Prisma.PrismaClientOptions, never, import("@prisma/client/runtime/library").DefaultArgs>;
1038
+ session: any;
1039
+ req: import("express").Request<import("express-serve-static-core").ParamsDictionary, any, any, import("qs").ParsedQs, Record<string, any>>;
1040
+ res: import("express").Response<any, Record<string, any>>;
1041
+ cookies: Record<string, string | undefined>;
1042
+ };
1043
+ meta: object;
1044
+ errorShape: import("@trpc/server").TRPCDefaultErrorShape;
1045
+ transformer: true;
1046
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
1047
+ getChannels: import("@trpc/server").TRPCQueryProcedure<{
1048
+ input: {
1049
+ workspaceId: string;
1050
+ };
1051
+ output: {
1052
+ name: string;
1053
+ id: string;
1054
+ createdAt: Date;
1055
+ workspaceId: string;
1056
+ }[];
1057
+ meta: object;
1058
+ }>;
1059
+ getChannel: import("@trpc/server").TRPCQueryProcedure<{
1060
+ input: {
1061
+ workspaceId?: string | undefined;
1062
+ channelId?: string | undefined;
1063
+ };
1064
+ output: {
1065
+ chats: ({
1066
+ user: {
1067
+ name: string | null;
1068
+ id: string;
1069
+ image: string | null;
1070
+ } | null;
1071
+ } & {
1072
+ id: string;
1073
+ createdAt: Date;
1074
+ updatedAt: Date;
1075
+ userId: string | null;
1076
+ channelId: string;
1077
+ message: string;
1078
+ })[];
1079
+ } & {
1080
+ name: string;
1081
+ id: string;
1082
+ createdAt: Date;
1083
+ workspaceId: string;
1084
+ };
1085
+ meta: object;
1086
+ }>;
1087
+ removeChannel: import("@trpc/server").TRPCMutationProcedure<{
1088
+ input: {
1089
+ workspaceId: string;
1090
+ channelId: string;
1091
+ };
1092
+ output: {
1093
+ success: boolean;
1094
+ };
1095
+ meta: object;
1096
+ }>;
1097
+ editChannel: import("@trpc/server").TRPCMutationProcedure<{
1098
+ input: {
1099
+ workspaceId: string;
1100
+ channelId: string;
1101
+ name: string;
1102
+ };
1103
+ output: {
1104
+ chats: ({
1105
+ user: {
1106
+ name: string | null;
1107
+ id: string;
1108
+ image: string | null;
1109
+ } | null;
1110
+ } & {
1111
+ id: string;
1112
+ createdAt: Date;
1113
+ updatedAt: Date;
1114
+ userId: string | null;
1115
+ channelId: string;
1116
+ message: string;
1117
+ })[];
1118
+ } & {
1119
+ name: string;
1120
+ id: string;
1121
+ createdAt: Date;
1122
+ workspaceId: string;
1123
+ };
1124
+ meta: object;
1125
+ }>;
1126
+ createChannel: import("@trpc/server").TRPCMutationProcedure<{
1127
+ input: {
1128
+ workspaceId: string;
1129
+ name: string;
1130
+ };
1131
+ output: {
1132
+ chats: ({
1133
+ user: {
1134
+ name: string | null;
1135
+ id: string;
1136
+ image: string | null;
1137
+ } | null;
1138
+ } & {
1139
+ id: string;
1140
+ createdAt: Date;
1141
+ updatedAt: Date;
1142
+ userId: string | null;
1143
+ channelId: string;
1144
+ message: string;
1145
+ })[];
1146
+ } & {
1147
+ name: string;
1148
+ id: string;
1149
+ createdAt: Date;
1150
+ workspaceId: string;
1151
+ };
1152
+ meta: object;
1153
+ }>;
1154
+ postMessage: import("@trpc/server").TRPCMutationProcedure<{
1155
+ input: {
1156
+ channelId: string;
1157
+ message: string;
1158
+ };
1159
+ output: {
1160
+ user: {
1161
+ name: string | null;
1162
+ id: string;
1163
+ image: string | null;
1164
+ } | null;
1165
+ } & {
1166
+ id: string;
1167
+ createdAt: Date;
1168
+ updatedAt: Date;
1169
+ userId: string | null;
1170
+ channelId: string;
1171
+ message: string;
1172
+ };
1173
+ meta: object;
1174
+ }>;
1175
+ editMessage: import("@trpc/server").TRPCMutationProcedure<{
1176
+ input: {
1177
+ chatId: string;
1178
+ message: string;
1179
+ };
1180
+ output: {
1181
+ user: {
1182
+ name: string | null;
1183
+ id: string;
1184
+ image: string | null;
1185
+ } | null;
1186
+ } & {
1187
+ id: string;
1188
+ createdAt: Date;
1189
+ updatedAt: Date;
1190
+ userId: string | null;
1191
+ channelId: string;
1192
+ message: string;
1193
+ };
1194
+ meta: object;
1195
+ }>;
1196
+ deleteMessage: import("@trpc/server").TRPCMutationProcedure<{
1197
+ input: {
1198
+ chatId: string;
1199
+ };
1200
+ output: {
1201
+ success: boolean;
1202
+ };
1203
+ meta: object;
1204
+ }>;
423
1205
  }>>;
424
1206
  }>>;
425
1207
  export type AppRouter = typeof appRouter;