@goscribe/server 1.0.7 → 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 (74) 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/context.d.ts +1 -1
  9. package/dist/lib/ai-session.d.ts +26 -0
  10. package/dist/lib/ai-session.js +343 -0
  11. package/dist/lib/auth.js +10 -6
  12. package/dist/lib/inference.d.ts +2 -0
  13. package/dist/lib/inference.js +21 -0
  14. package/dist/lib/pusher.d.ts +14 -0
  15. package/dist/lib/pusher.js +94 -0
  16. package/dist/lib/storage.d.ts +10 -2
  17. package/dist/lib/storage.js +63 -6
  18. package/dist/routers/_app.d.ts +878 -100
  19. package/dist/routers/_app.js +8 -2
  20. package/dist/routers/ai-session.d.ts +0 -0
  21. package/dist/routers/ai-session.js +1 -0
  22. package/dist/routers/auth.d.ts +13 -11
  23. package/dist/routers/auth.js +50 -21
  24. package/dist/routers/chat.d.ts +171 -0
  25. package/dist/routers/chat.js +270 -0
  26. package/dist/routers/flashcards.d.ts +51 -39
  27. package/dist/routers/flashcards.js +143 -31
  28. package/dist/routers/meetingsummary.d.ts +0 -0
  29. package/dist/routers/meetingsummary.js +377 -0
  30. package/dist/routers/podcast.d.ts +277 -0
  31. package/dist/routers/podcast.js +847 -0
  32. package/dist/routers/studyguide.d.ts +54 -0
  33. package/dist/routers/studyguide.js +125 -0
  34. package/dist/routers/worksheets.d.ts +147 -40
  35. package/dist/routers/worksheets.js +348 -33
  36. package/dist/routers/workspace.d.ts +163 -8
  37. package/dist/routers/workspace.js +453 -8
  38. package/dist/server.d.ts +1 -1
  39. package/dist/server.js +7 -2
  40. package/dist/trpc.d.ts +5 -5
  41. package/package.json +11 -3
  42. package/prisma/migrations/20250826124819_add_worksheet_difficulty_and_estimated_time/migration.sql +213 -0
  43. package/prisma/migrations/20250826133236_add_worksheet_question_progress/migration.sql +31 -0
  44. package/prisma/migrations/migration_lock.toml +3 -0
  45. package/prisma/schema.prisma +87 -6
  46. package/prisma/seed.mjs +135 -0
  47. package/src/lib/ai-session.ts +411 -0
  48. package/src/lib/auth.ts +1 -1
  49. package/src/lib/inference.ts +21 -0
  50. package/src/lib/pusher.ts +104 -0
  51. package/src/lib/storage.ts +89 -6
  52. package/src/routers/_app.ts +6 -0
  53. package/src/routers/auth.ts +8 -4
  54. package/src/routers/chat.ts +275 -0
  55. package/src/routers/flashcards.ts +151 -33
  56. package/src/routers/meetingsummary.ts +416 -0
  57. package/src/routers/podcast.ts +934 -0
  58. package/src/routers/studyguide.ts +144 -0
  59. package/src/routers/worksheets.ts +346 -18
  60. package/src/routers/workspace.ts +500 -8
  61. package/src/server.ts +7 -2
  62. package/test-ai-integration.js +134 -0
  63. package/dist/context.d.ts.map +0 -1
  64. package/dist/index.d.ts.map +0 -1
  65. package/dist/lib/auth.d.ts.map +0 -1
  66. package/dist/lib/file.d.ts.map +0 -1
  67. package/dist/lib/prisma.d.ts.map +0 -1
  68. package/dist/lib/storage.d.ts.map +0 -1
  69. package/dist/routers/_app.d.ts.map +0 -1
  70. package/dist/routers/auth.d.ts.map +0 -1
  71. package/dist/routers/sample.js +0 -21
  72. package/dist/routers/workspace.d.ts.map +0 -1
  73. package/dist/server.d.ts.map +0 -1
  74. package/dist/trpc.d.ts.map +0 -1
@@ -4,14 +4,44 @@ export declare const workspace: import("@trpc/server").TRPCBuiltRouter<{
4
4
  session: any;
5
5
  req: import("express").Request<import("express-serve-static-core").ParamsDictionary, any, any, import("qs").ParsedQs, Record<string, any>>;
6
6
  res: import("express").Response<any, Record<string, any>>;
7
- cookies: any;
7
+ cookies: Record<string, string | undefined>;
8
8
  };
9
9
  meta: object;
10
10
  errorShape: import("@trpc/server").TRPCDefaultErrorShape;
11
11
  transformer: true;
12
12
  }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
13
13
  list: import("@trpc/server").TRPCQueryProcedure<{
14
- input: void;
14
+ input: {
15
+ parentId?: string | undefined;
16
+ };
17
+ output: {
18
+ workspaces: {
19
+ id: string;
20
+ createdAt: Date;
21
+ updatedAt: Date;
22
+ ownerId: string;
23
+ title: string;
24
+ description: string | null;
25
+ folderId: string | null;
26
+ shareLink: string | null;
27
+ }[];
28
+ folders: {
29
+ name: string;
30
+ id: string;
31
+ createdAt: Date;
32
+ updatedAt: Date;
33
+ ownerId: string;
34
+ parentId: string | null;
35
+ }[];
36
+ };
37
+ meta: object;
38
+ }>;
39
+ create: import("@trpc/server").TRPCMutationProcedure<{
40
+ input: {
41
+ name: string;
42
+ description?: string | undefined;
43
+ parentId?: string | undefined;
44
+ };
15
45
  output: {
16
46
  id: string;
17
47
  createdAt: Date;
@@ -20,22 +50,22 @@ export declare const workspace: import("@trpc/server").TRPCBuiltRouter<{
20
50
  title: string;
21
51
  description: string | null;
22
52
  folderId: string | null;
23
- }[];
53
+ shareLink: string | null;
54
+ };
24
55
  meta: object;
25
56
  }>;
26
- create: import("@trpc/server").TRPCMutationProcedure<{
57
+ createFolder: import("@trpc/server").TRPCMutationProcedure<{
27
58
  input: {
28
59
  name: string;
29
- description?: string | undefined;
60
+ parentId?: string | undefined;
30
61
  };
31
62
  output: {
63
+ name: string;
32
64
  id: string;
33
65
  createdAt: Date;
34
66
  updatedAt: Date;
35
67
  ownerId: string;
36
- title: string;
37
- description: string | null;
38
- folderId: string | null;
68
+ parentId: string | null;
39
69
  };
40
70
  meta: object;
41
71
  }>;
@@ -44,6 +74,42 @@ export declare const workspace: import("@trpc/server").TRPCBuiltRouter<{
44
74
  id: string;
45
75
  };
46
76
  output: {
77
+ folder: {
78
+ name: string;
79
+ id: string;
80
+ createdAt: Date;
81
+ updatedAt: Date;
82
+ ownerId: string;
83
+ parentId: string | null;
84
+ } | null;
85
+ uploads: {
86
+ meta: import("@prisma/client/runtime/library").JsonValue | null;
87
+ name: string;
88
+ id: string;
89
+ createdAt: Date;
90
+ userId: string;
91
+ workspaceId: string;
92
+ mimeType: string;
93
+ size: number;
94
+ bucket: string | null;
95
+ objectKey: string | null;
96
+ url: string | null;
97
+ checksum: string | null;
98
+ }[];
99
+ artifacts: {
100
+ id: string;
101
+ createdAt: Date;
102
+ updatedAt: Date;
103
+ title: string;
104
+ description: string | null;
105
+ workspaceId: string;
106
+ type: import("@prisma/client").$Enums.ArtifactType;
107
+ isArchived: boolean;
108
+ difficulty: import("@prisma/client").$Enums.Difficulty | null;
109
+ estimatedTime: string | null;
110
+ createdById: string | null;
111
+ }[];
112
+ } & {
47
113
  id: string;
48
114
  createdAt: Date;
49
115
  updatedAt: Date;
@@ -51,6 +117,30 @@ export declare const workspace: import("@trpc/server").TRPCBuiltRouter<{
51
117
  title: string;
52
118
  description: string | null;
53
119
  folderId: string | null;
120
+ shareLink: string | null;
121
+ };
122
+ meta: object;
123
+ }>;
124
+ share: import("@trpc/server").TRPCQueryProcedure<{
125
+ input: {
126
+ id: string;
127
+ };
128
+ output: {
129
+ shareLink: string | null;
130
+ } | undefined;
131
+ meta: object;
132
+ }>;
133
+ join: import("@trpc/server").TRPCMutationProcedure<{
134
+ input: {
135
+ shareLink: string;
136
+ };
137
+ output: {
138
+ id: string;
139
+ title: string;
140
+ description: string | null;
141
+ ownerId: string;
142
+ createdAt: Date;
143
+ updatedAt: Date;
54
144
  };
55
145
  meta: object;
56
146
  }>;
@@ -68,6 +158,7 @@ export declare const workspace: import("@trpc/server").TRPCBuiltRouter<{
68
158
  title: string;
69
159
  description: string | null;
70
160
  folderId: string | null;
161
+ shareLink: string | null;
71
162
  };
72
163
  meta: object;
73
164
  }>;
@@ -78,6 +169,30 @@ export declare const workspace: import("@trpc/server").TRPCBuiltRouter<{
78
169
  output: boolean;
79
170
  meta: object;
80
171
  }>;
172
+ getFolderInformation: import("@trpc/server").TRPCQueryProcedure<{
173
+ input: {
174
+ id: string;
175
+ };
176
+ output: {
177
+ folder: {
178
+ name: string;
179
+ id: string;
180
+ createdAt: Date;
181
+ updatedAt: Date;
182
+ ownerId: string;
183
+ parentId: string | null;
184
+ };
185
+ parents: {
186
+ name: string;
187
+ id: string;
188
+ createdAt: Date;
189
+ updatedAt: Date;
190
+ ownerId: string;
191
+ parentId: string | null;
192
+ }[];
193
+ };
194
+ meta: object;
195
+ }>;
81
196
  uploadFiles: import("@trpc/server").TRPCMutationProcedure<{
82
197
  input: {
83
198
  id: string;
@@ -101,4 +216,44 @@ export declare const workspace: import("@trpc/server").TRPCBuiltRouter<{
101
216
  output: boolean;
102
217
  meta: object;
103
218
  }>;
219
+ uploadAndAnalyzeMedia: import("@trpc/server").TRPCMutationProcedure<{
220
+ input: {
221
+ workspaceId: string;
222
+ file: {
223
+ filename: string;
224
+ contentType: string;
225
+ size: number;
226
+ content: string;
227
+ };
228
+ generateStudyGuide?: boolean | undefined;
229
+ generateFlashcards?: boolean | undefined;
230
+ generateWorksheet?: boolean | undefined;
231
+ };
232
+ output: {
233
+ filename: string;
234
+ artifacts: {
235
+ studyGuide: any | null;
236
+ flashcards: any | null;
237
+ worksheet: any | null;
238
+ };
239
+ };
240
+ meta: object;
241
+ }>;
242
+ search: import("@trpc/server").TRPCQueryProcedure<{
243
+ input: {
244
+ query: string;
245
+ limit?: number | undefined;
246
+ };
247
+ output: {
248
+ id: string;
249
+ createdAt: Date;
250
+ updatedAt: Date;
251
+ ownerId: string;
252
+ title: string;
253
+ description: string | null;
254
+ folderId: string | null;
255
+ shareLink: string | null;
256
+ }[];
257
+ meta: object;
258
+ }>;
104
259
  }>>;