@goscribe/server 1.3.3 → 1.5.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 (378) hide show
  1. package/.env.example +12 -0
  2. package/.vscode/settings.json +3 -0
  3. package/REFACTOR_NOTES.md +60 -0
  4. package/TESTING_PROMPT.md +225 -0
  5. package/dist/controllers/admin.controller.d.ts +715 -0
  6. package/dist/controllers/admin.controller.js +9 -0
  7. package/dist/controllers/annotations.controller.d.ts +439 -0
  8. package/dist/controllers/annotations.controller.js +9 -0
  9. package/dist/controllers/app-router.controller.d.ts +3011 -0
  10. package/dist/controllers/app-router.controller.js +38 -0
  11. package/dist/controllers/app-router.controller.test.d.ts +1 -0
  12. package/dist/controllers/app-router.controller.test.js +36 -0
  13. package/dist/controllers/auth.controller.d.ts +323 -0
  14. package/dist/controllers/auth.controller.js +9 -0
  15. package/dist/controllers/base.controller.d.ts +4 -0
  16. package/dist/controllers/base.controller.js +5 -0
  17. package/dist/controllers/chat.controller.d.ts +341 -0
  18. package/dist/controllers/chat.controller.js +9 -0
  19. package/dist/controllers/copilot.controller.d.ts +397 -0
  20. package/dist/controllers/copilot.controller.js +9 -0
  21. package/dist/controllers/flashcards.controller.d.ts +651 -0
  22. package/dist/controllers/flashcards.controller.js +9 -0
  23. package/dist/controllers/members.controller.d.ts +339 -0
  24. package/dist/controllers/members.controller.js +9 -0
  25. package/dist/controllers/notifications.controller.d.ts +199 -0
  26. package/dist/controllers/notifications.controller.js +9 -0
  27. package/dist/controllers/payment.controller.d.ts +181 -0
  28. package/dist/controllers/payment.controller.js +9 -0
  29. package/dist/controllers/podcast.controller.d.ts +575 -0
  30. package/dist/controllers/podcast.controller.js +9 -0
  31. package/dist/controllers/router-module.controller.d.ts +5 -0
  32. package/dist/controllers/router-module.controller.js +6 -0
  33. package/dist/controllers/studyguide.controller.d.ts +73 -0
  34. package/dist/controllers/studyguide.controller.js +9 -0
  35. package/dist/controllers/worksheets.controller.d.ts +829 -0
  36. package/dist/controllers/worksheets.controller.js +9 -0
  37. package/dist/controllers/workspace.controller.d.ts +1207 -0
  38. package/dist/controllers/workspace.controller.js +9 -0
  39. package/dist/lib/activity_human_description.test.js +16 -15
  40. package/dist/lib/activity_log_service.test.js +28 -23
  41. package/dist/lib/ai/config.d.ts +20 -0
  42. package/dist/lib/ai/config.js +31 -0
  43. package/dist/lib/ai/embedding-client.d.ts +8 -0
  44. package/dist/lib/ai/embedding-client.js +30 -0
  45. package/dist/lib/ai/index.d.ts +47 -0
  46. package/dist/lib/ai/index.js +28 -0
  47. package/dist/lib/ai/inference-backend/client.d.ts +28 -0
  48. package/dist/lib/ai/inference-backend/client.js +301 -0
  49. package/dist/lib/ai/inference-backend/mocks.d.ts +12 -0
  50. package/dist/lib/ai/inference-backend/mocks.js +133 -0
  51. package/dist/lib/ai/inference-backend/types.d.ts +44 -0
  52. package/dist/lib/ai/inference-backend/types.js +1 -0
  53. package/dist/lib/ai/json-parse.d.ts +2 -0
  54. package/dist/lib/ai/json-parse.js +34 -0
  55. package/dist/lib/ai/llm-client.d.ts +6 -0
  56. package/dist/lib/ai/llm-client.js +19 -0
  57. package/dist/lib/ai/mock.d.ts +2 -0
  58. package/dist/lib/ai/mock.js +10 -0
  59. package/dist/lib/ai/types.d.ts +9 -0
  60. package/dist/lib/ai/types.js +1 -0
  61. package/dist/lib/chunking.d.ts +19 -0
  62. package/dist/lib/chunking.js +47 -0
  63. package/dist/lib/curated-kb-seed.d.ts +12 -0
  64. package/dist/lib/curated-kb-seed.js +155 -0
  65. package/dist/lib/email.js +67 -108
  66. package/dist/lib/embeddings.d.ts +2 -0
  67. package/dist/lib/embeddings.js +1 -0
  68. package/dist/lib/ensure-curated-kb-catalog.d.ts +6 -0
  69. package/dist/lib/ensure-curated-kb-catalog.js +53 -0
  70. package/dist/lib/env.d.ts +1 -5
  71. package/dist/lib/env.js +2 -7
  72. package/dist/lib/inference.d.ts +1 -8
  73. package/dist/lib/inference.js +1 -19
  74. package/dist/lib/kb-meta.d.ts +8 -0
  75. package/dist/lib/kb-meta.js +77 -0
  76. package/dist/lib/note-text.d.ts +1 -0
  77. package/dist/lib/note-text.js +47 -0
  78. package/dist/lib/notification-service.test.js +37 -36
  79. package/dist/lib/pdf.d.ts +11 -0
  80. package/dist/lib/pdf.js +11 -0
  81. package/dist/lib/usage_service.d.ts +2 -1
  82. package/dist/lib/usage_service.js +30 -12
  83. package/dist/lib/worksheet-generation.js +4 -4
  84. package/dist/lib/worksheet-generation.test.js +32 -17
  85. package/dist/lib/workspace-kb.d.ts +5 -0
  86. package/dist/lib/workspace-kb.js +7 -0
  87. package/dist/models/controller-context.model.d.ts +8 -0
  88. package/dist/models/controller-context.model.js +1 -0
  89. package/dist/repositories/artifact.repository.d.ts +60 -0
  90. package/dist/repositories/artifact.repository.js +40 -0
  91. package/dist/repositories/base.repository.d.ts +14 -0
  92. package/dist/repositories/base.repository.js +14 -0
  93. package/dist/repositories/invitation.repository.d.ts +94 -0
  94. package/dist/repositories/invitation.repository.js +44 -0
  95. package/dist/repositories/notification.repository.d.ts +72 -0
  96. package/dist/repositories/notification.repository.js +44 -0
  97. package/dist/repositories/router-module.repository.d.ts +10 -0
  98. package/dist/repositories/router-module.repository.js +14 -0
  99. package/dist/repositories/user.repository.d.ts +74 -0
  100. package/dist/repositories/user.repository.js +37 -0
  101. package/dist/repositories/workspace-member.repository.d.ts +31 -0
  102. package/dist/repositories/workspace-member.repository.js +31 -0
  103. package/dist/repositories/workspace.repository.d.ts +97 -0
  104. package/dist/repositories/workspace.repository.js +79 -0
  105. package/dist/routers/_app.d.ts +528 -33
  106. package/dist/routers/_app.js +4 -0
  107. package/dist/routers/admin.d.ts +0 -4
  108. package/dist/routers/admin.js +21 -549
  109. package/dist/routers/annotations.js +12 -170
  110. package/dist/routers/artifactVersions.d.ts +65 -0
  111. package/dist/routers/artifactVersions.js +14 -0
  112. package/dist/routers/auth.d.ts +0 -6
  113. package/dist/routers/auth.js +36 -421
  114. package/dist/routers/chat.js +15 -229
  115. package/dist/routers/copilot.d.ts +14 -13
  116. package/dist/routers/copilot.js +13 -532
  117. package/dist/routers/flashcards.d.ts +5 -5
  118. package/dist/routers/flashcards.js +23 -349
  119. package/dist/routers/knowledgeBase.d.ts +421 -0
  120. package/dist/routers/knowledgeBase.js +118 -0
  121. package/dist/routers/members.d.ts +0 -41
  122. package/dist/routers/members.js +22 -710
  123. package/dist/routers/notes.d.ts +94 -0
  124. package/dist/routers/notes.js +37 -0
  125. package/dist/routers/notifications.js +7 -109
  126. package/dist/routers/payment.d.ts +3 -2
  127. package/dist/routers/payment.js +11 -393
  128. package/dist/routers/podcast.d.ts +1 -1
  129. package/dist/routers/podcast.js +11 -784
  130. package/dist/routers/studyguide.js +3 -129
  131. package/dist/routers/worksheets.d.ts +29 -14
  132. package/dist/routers/worksheets.js +49 -628
  133. package/dist/routers/workspace.d.ts +0 -4
  134. package/dist/routers/workspace.js +28 -922
  135. package/dist/scripts/purge-deleted-users.js +2 -2
  136. package/dist/server.js +10 -3
  137. package/dist/services/activity/activity-human-description.service.d.ts +13 -0
  138. package/dist/services/activity/activity-human-description.service.js +221 -0
  139. package/dist/services/activity/activity-human-description.service.test.d.ts +1 -0
  140. package/dist/services/activity/activity-human-description.service.test.js +16 -0
  141. package/dist/services/activity/activity-log.service.d.ts +87 -0
  142. package/dist/services/activity/activity-log.service.js +276 -0
  143. package/dist/services/activity/activity-log.service.test.d.ts +1 -0
  144. package/dist/services/activity/activity-log.service.test.js +27 -0
  145. package/dist/services/activity-human-description.service.d.ts +13 -0
  146. package/dist/services/activity-human-description.service.js +221 -0
  147. package/dist/services/activity-human-description.service.test.d.ts +1 -0
  148. package/dist/services/activity-human-description.service.test.js +16 -0
  149. package/dist/services/activity-log.service.d.ts +87 -0
  150. package/dist/services/activity-log.service.js +276 -0
  151. package/dist/services/activity-log.service.test.d.ts +1 -0
  152. package/dist/services/activity-log.service.test.js +27 -0
  153. package/dist/services/admin/admin.service.d.ts +270 -0
  154. package/dist/services/admin/admin.service.js +476 -0
  155. package/dist/services/admin.service.d.ts +270 -0
  156. package/dist/services/admin.service.js +476 -0
  157. package/dist/services/ai/ai-session.service.d.ts +5 -0
  158. package/dist/services/ai/ai-session.service.js +4 -0
  159. package/dist/services/ai-session.service.d.ts +60 -0
  160. package/dist/services/ai-session.service.js +561 -0
  161. package/dist/services/annotation.service.d.ts +177 -0
  162. package/dist/services/annotation.service.js +154 -0
  163. package/dist/services/artifact-notification.service.d.ts +14 -0
  164. package/dist/services/artifact-notification.service.js +20 -0
  165. package/dist/services/artifact-version.service.d.ts +38 -0
  166. package/dist/services/artifact-version.service.js +129 -0
  167. package/dist/services/artifacts/annotation.service.d.ts +177 -0
  168. package/dist/services/artifacts/annotation.service.js +154 -0
  169. package/dist/services/artifacts/artifact-version.service.d.ts +38 -0
  170. package/dist/services/artifacts/artifact-version.service.js +129 -0
  171. package/dist/services/artifacts/chat.service.d.ts +127 -0
  172. package/dist/services/artifacts/chat.service.js +182 -0
  173. package/dist/services/artifacts/study-guide.service.d.ts +18 -0
  174. package/dist/services/artifacts/study-guide.service.js +65 -0
  175. package/dist/services/auth/auth.service.d.ts +94 -0
  176. package/dist/services/auth/auth.service.js +368 -0
  177. package/dist/services/auth.service.d.ts +94 -0
  178. package/dist/services/auth.service.js +368 -0
  179. package/dist/services/base.service.d.ts +14 -0
  180. package/dist/services/base.service.js +14 -0
  181. package/dist/services/billing/payment.service.d.ts +55 -0
  182. package/dist/services/billing/payment.service.js +368 -0
  183. package/dist/services/billing/subscription.service.d.ts +37 -0
  184. package/dist/services/billing/subscription.service.js +654 -0
  185. package/dist/services/billing/usage.service.d.ts +27 -0
  186. package/dist/services/billing/usage.service.js +77 -0
  187. package/dist/services/chat.service.d.ts +127 -0
  188. package/dist/services/chat.service.js +182 -0
  189. package/dist/services/content/copilot.service.d.ts +113 -0
  190. package/dist/services/content/copilot.service.js +453 -0
  191. package/dist/services/content/flashcard-progress.service.d.ts +159 -0
  192. package/dist/services/content/flashcard-progress.service.js +432 -0
  193. package/dist/services/content/flashcard.service.d.ts +140 -0
  194. package/dist/services/content/flashcard.service.js +326 -0
  195. package/dist/services/content/media-analysis.service.d.ts +23 -0
  196. package/dist/services/content/media-analysis.service.js +404 -0
  197. package/dist/services/content/podcast.service.d.ts +267 -0
  198. package/dist/services/content/podcast.service.js +653 -0
  199. package/dist/services/content/worksheet-content.service.d.ts +37 -0
  200. package/dist/services/content/worksheet-content.service.js +84 -0
  201. package/dist/services/content/worksheet-content.service.test.d.ts +1 -0
  202. package/dist/services/content/worksheet-content.service.test.js +69 -0
  203. package/dist/services/content/worksheet-generation.service.d.ts +91 -0
  204. package/dist/services/content/worksheet-generation.service.js +95 -0
  205. package/dist/services/content/worksheet-generation.service.test.d.ts +1 -0
  206. package/dist/services/content/worksheet-generation.service.test.js +20 -0
  207. package/dist/services/content/worksheet.service.d.ts +347 -0
  208. package/dist/services/content/worksheet.service.js +599 -0
  209. package/dist/services/copilot.service.d.ts +116 -0
  210. package/dist/services/copilot.service.js +447 -0
  211. package/dist/services/flashcard-progress.service.d.ts +2 -2
  212. package/dist/services/flashcard-progress.service.js +3 -2
  213. package/dist/services/flashcard.service.d.ts +140 -0
  214. package/dist/services/flashcard.service.js +325 -0
  215. package/dist/services/invitation.service.d.ts +66 -0
  216. package/dist/services/invitation.service.js +348 -0
  217. package/dist/services/knowledge/knowledge-base.service.d.ts +316 -0
  218. package/dist/services/knowledge/knowledge-base.service.js +544 -0
  219. package/dist/services/knowledge-base.service.d.ts +316 -0
  220. package/dist/services/knowledge-base.service.js +536 -0
  221. package/dist/services/media-analysis.service.d.ts +23 -0
  222. package/dist/services/media-analysis.service.js +384 -0
  223. package/dist/services/member.service.d.ts +36 -0
  224. package/dist/services/member.service.js +193 -0
  225. package/dist/services/members/invitation.service.d.ts +66 -0
  226. package/dist/services/members/invitation.service.js +348 -0
  227. package/dist/services/members/member.service.d.ts +36 -0
  228. package/dist/services/members/member.service.js +193 -0
  229. package/dist/services/note.service.d.ts +55 -0
  230. package/dist/services/note.service.js +111 -0
  231. package/dist/services/notification.service.d.ts +214 -0
  232. package/dist/services/notification.service.js +550 -0
  233. package/dist/services/notification.service.test.d.ts +1 -0
  234. package/dist/services/notification.service.test.js +87 -0
  235. package/dist/services/notifications/notification.service.d.ts +214 -0
  236. package/dist/services/notifications/notification.service.js +550 -0
  237. package/dist/services/notifications/notification.service.test.d.ts +1 -0
  238. package/dist/services/notifications/notification.service.test.js +87 -0
  239. package/dist/services/payment.service.d.ts +55 -0
  240. package/dist/services/payment.service.js +368 -0
  241. package/dist/services/podcast.service.d.ts +267 -0
  242. package/dist/services/podcast.service.js +654 -0
  243. package/dist/services/router-module.service.d.ts +7 -0
  244. package/dist/services/router-module.service.js +10 -0
  245. package/dist/services/study-guide.service.d.ts +18 -0
  246. package/dist/services/study-guide.service.js +65 -0
  247. package/dist/services/subscription.service.d.ts +37 -0
  248. package/dist/services/subscription.service.js +654 -0
  249. package/dist/services/usage-limit-policy.service.d.ts +12 -0
  250. package/dist/services/usage-limit-policy.service.js +22 -0
  251. package/dist/services/usage-limit-policy.service.test.d.ts +1 -0
  252. package/dist/services/usage-limit-policy.service.test.js +46 -0
  253. package/dist/services/usage.service.d.ts +27 -0
  254. package/dist/services/usage.service.js +77 -0
  255. package/dist/services/worksheet-content.service.d.ts +42 -0
  256. package/dist/services/worksheet-content.service.js +84 -0
  257. package/dist/services/worksheet-content.service.test.d.ts +1 -0
  258. package/dist/services/worksheet-content.service.test.js +69 -0
  259. package/dist/services/worksheet-generation.service.d.ts +91 -0
  260. package/dist/services/worksheet-generation.service.js +95 -0
  261. package/dist/services/worksheet-generation.service.test.d.ts +1 -0
  262. package/dist/services/worksheet-generation.service.test.js +20 -0
  263. package/dist/services/worksheet.service.d.ts +385 -0
  264. package/dist/services/worksheet.service.js +596 -0
  265. package/dist/services/workspace/workspace-analytics.service.d.ts +24 -0
  266. package/dist/services/workspace/workspace-analytics.service.js +95 -0
  267. package/dist/services/workspace/workspace-kb.service.d.ts +40 -0
  268. package/dist/services/workspace/workspace-kb.service.js +184 -0
  269. package/dist/services/workspace/workspace.service.d.ts +307 -0
  270. package/dist/services/workspace/workspace.service.js +394 -0
  271. package/dist/services/workspace-analytics.service.d.ts +24 -0
  272. package/dist/services/workspace-analytics.service.js +95 -0
  273. package/dist/services/workspace-kb.service.d.ts +40 -0
  274. package/dist/services/workspace-kb.service.js +184 -0
  275. package/dist/services/workspace-progress.service.d.ts +27 -0
  276. package/dist/services/workspace-progress.service.js +56 -0
  277. package/dist/services/workspace-progress.service.test.d.ts +1 -0
  278. package/dist/services/workspace-progress.service.test.js +49 -0
  279. package/dist/services/workspace.service.d.ts +307 -0
  280. package/dist/services/workspace.service.js +390 -0
  281. package/dist/trpc.js +2 -2
  282. package/package.json +5 -6
  283. package/prisma/migrations/20260509000001_add_knowledge_base/migration.sql +99 -0
  284. package/prisma/migrations/20260509000002_curate_knowledge_base/migration.sql +52 -0
  285. package/prisma/migrations/20260522000000_add_notes/migration.sql +27 -0
  286. package/prisma/migrations/20260524000000_remove_notes/migration.sql +3 -0
  287. package/prisma/schema.prisma +150 -48
  288. package/prisma/seed.mjs +67 -0
  289. package/scripts/debug/README.md +4 -0
  290. package/src/README.md +63 -0
  291. package/src/lib/ai/config.ts +34 -0
  292. package/src/lib/ai/embedding-client.ts +47 -0
  293. package/src/lib/ai/index.ts +62 -0
  294. package/src/lib/ai/inference-backend/client.ts +479 -0
  295. package/src/lib/ai/inference-backend/mocks.ts +171 -0
  296. package/src/lib/ai/inference-backend/types.ts +50 -0
  297. package/src/lib/ai/json-parse.ts +35 -0
  298. package/src/lib/ai/llm-client.ts +31 -0
  299. package/src/lib/ai/mock.ts +12 -0
  300. package/src/lib/ai/types.ts +11 -0
  301. package/src/lib/chunking.ts +81 -0
  302. package/src/lib/curated-kb-seed.ts +164 -0
  303. package/src/lib/email.ts +77 -115
  304. package/src/lib/embeddings.ts +9 -0
  305. package/src/lib/ensure-curated-kb-catalog.ts +60 -0
  306. package/src/lib/env.ts +2 -7
  307. package/src/lib/inference.ts +1 -21
  308. package/src/lib/kb-meta.ts +81 -0
  309. package/src/lib/pdf.ts +23 -0
  310. package/src/lib/workspace-kb.ts +7 -0
  311. package/src/repositories/artifact.repository.ts +55 -0
  312. package/src/repositories/base.repository.ts +19 -0
  313. package/src/repositories/invitation.repository.ts +53 -0
  314. package/src/repositories/notification.repository.ts +53 -0
  315. package/src/repositories/user.repository.ts +44 -0
  316. package/src/repositories/workspace-member.repository.ts +38 -0
  317. package/src/repositories/workspace.repository.ts +89 -0
  318. package/src/routers/_app.ts +4 -0
  319. package/src/routers/admin.ts +124 -692
  320. package/src/routers/annotations.ts +25 -203
  321. package/src/routers/artifactVersions.ts +32 -0
  322. package/src/routers/auth.ts +81 -519
  323. package/src/routers/chat.ts +42 -245
  324. package/src/routers/copilot.ts +41 -666
  325. package/src/routers/flashcards.ts +108 -404
  326. package/src/routers/knowledgeBase.ts +216 -0
  327. package/src/routers/members.ts +60 -782
  328. package/src/routers/notifications.ts +15 -117
  329. package/src/routers/payment.ts +37 -446
  330. package/src/routers/podcast.ts +36 -898
  331. package/src/routers/studyguide.ts +5 -144
  332. package/src/routers/worksheets.ts +171 -735
  333. package/src/routers/workspace.ts +138 -1109
  334. package/src/scripts/purge-deleted-users.ts +2 -2
  335. package/src/server.ts +10 -3
  336. package/src/{lib/activity_human_description.test.ts → services/activity/activity-human-description.service.test.ts} +1 -1
  337. package/src/{lib/activity_log_service.test.ts → services/activity/activity-log.service.test.ts} +1 -1
  338. package/src/{lib/activity_log_service.ts → services/activity/activity-log.service.ts} +2 -2
  339. package/src/services/admin/admin.service.ts +612 -0
  340. package/src/services/ai/ai-session.service.ts +5 -0
  341. package/src/services/artifacts/annotation.service.ts +189 -0
  342. package/src/services/artifacts/artifact-version.service.ts +151 -0
  343. package/src/services/artifacts/chat.service.ts +197 -0
  344. package/src/services/artifacts/study-guide.service.ts +72 -0
  345. package/src/services/auth/auth.service.ts +473 -0
  346. package/src/services/base.service.ts +19 -0
  347. package/src/services/billing/payment.service.ts +436 -0
  348. package/src/{lib/subscription_service.ts → services/billing/subscription.service.ts} +5 -5
  349. package/src/{lib/usage_service.ts → services/billing/usage.service.ts} +32 -12
  350. package/src/services/content/copilot.service.ts +596 -0
  351. package/src/services/{flashcard-progress.service.ts → content/flashcard-progress.service.ts} +6 -3
  352. package/src/services/content/flashcard.service.ts +394 -0
  353. package/src/services/content/media-analysis.service.ts +556 -0
  354. package/src/services/content/podcast.service.ts +777 -0
  355. package/src/services/content/worksheet-content.service.test.ts +83 -0
  356. package/src/services/content/worksheet-content.service.ts +117 -0
  357. package/src/{lib/worksheet-generation.test.ts → services/content/worksheet-generation.service.test.ts} +1 -1
  358. package/src/services/content/worksheet.service.ts +751 -0
  359. package/src/services/knowledge/knowledge-base.service.ts +705 -0
  360. package/src/services/members/invitation.service.ts +427 -0
  361. package/src/services/members/member.service.ts +241 -0
  362. package/src/{lib/notification-service.test.ts → services/notifications/notification.service.test.ts} +2 -2
  363. package/src/{lib/notification-service.ts → services/notifications/notification.service.ts} +102 -1
  364. package/src/services/workspace/workspace-analytics.service.ts +107 -0
  365. package/src/services/workspace/workspace-kb.service.ts +273 -0
  366. package/src/services/workspace/workspace.service.ts +481 -0
  367. package/src/trpc.ts +2 -2
  368. package/src/lib/ai-session.ts +0 -704
  369. package/src/lib/workspace-access.ts +0 -13
  370. /package/{check-difficulty.cjs → scripts/debug/check-difficulty.cjs} +0 -0
  371. /package/{check-questions.cjs → scripts/debug/check-questions.cjs} +0 -0
  372. /package/{db-summary.cjs → scripts/debug/db-summary.cjs} +0 -0
  373. /package/{mcq-test.cjs → scripts/debug/mcq-test.cjs} +0 -0
  374. /package/{test-generate.js → scripts/debug/test-generate.js} +0 -0
  375. /package/{test-ratio.cjs → scripts/debug/test-ratio.cjs} +0 -0
  376. /package/{zod-test.cjs → scripts/debug/zod-test.cjs} +0 -0
  377. /package/src/{lib/activity_human_description.ts → services/activity/activity-human-description.service.ts} +0 -0
  378. /package/src/{lib/worksheet-generation.ts → services/content/worksheet-generation.service.ts} +0 -0
@@ -0,0 +1,3011 @@
1
+ /**
2
+ * Composition root. Every domain is mounted through its dedicated MVC
3
+ * controller -> service -> repository chain defined under src/controllers,
4
+ * src/services, and src/repositories.
5
+ */
6
+ export declare function createAppRouterFromControllers(): import("@trpc/server").TRPCBuiltRouter<{
7
+ ctx: import("../context.js").Context;
8
+ meta: object;
9
+ errorShape: {
10
+ data: {
11
+ zodError: string | null;
12
+ code: import("@trpc/server").TRPC_ERROR_CODE_KEY;
13
+ httpStatus: number;
14
+ path?: string;
15
+ stack?: string;
16
+ };
17
+ message: string;
18
+ code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
19
+ };
20
+ transformer: true;
21
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
22
+ auth: import("@trpc/server").TRPCBuiltRouter<{
23
+ ctx: import("../context.js").Context;
24
+ meta: object;
25
+ errorShape: {
26
+ data: {
27
+ zodError: string | null;
28
+ code: import("@trpc/server").TRPC_ERROR_CODE_KEY;
29
+ httpStatus: number;
30
+ path?: string;
31
+ stack?: string;
32
+ };
33
+ message: string;
34
+ code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
35
+ };
36
+ transformer: true;
37
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
38
+ updateProfile: import("@trpc/server").TRPCMutationProcedure<{
39
+ input: {
40
+ name: string;
41
+ };
42
+ output: {
43
+ success: boolean;
44
+ message: string;
45
+ };
46
+ meta: object;
47
+ }>;
48
+ changePassword: import("@trpc/server").TRPCMutationProcedure<{
49
+ input: {
50
+ currentPassword: string;
51
+ newPassword: string;
52
+ };
53
+ output: {
54
+ success: boolean;
55
+ message: string;
56
+ };
57
+ meta: object;
58
+ }>;
59
+ uploadProfilePicture: import("@trpc/server").TRPCMutationProcedure<{
60
+ input: void;
61
+ output: {
62
+ success: boolean;
63
+ message: string;
64
+ signedUrl: string;
65
+ };
66
+ meta: object;
67
+ }>;
68
+ confirmProfileUpdate: import("@trpc/server").TRPCMutationProcedure<{
69
+ input: void;
70
+ output: {
71
+ success: boolean;
72
+ };
73
+ meta: object;
74
+ }>;
75
+ signup: import("@trpc/server").TRPCMutationProcedure<{
76
+ input: {
77
+ name: string;
78
+ email: string;
79
+ password: string;
80
+ };
81
+ output: {
82
+ id: string;
83
+ email: string | null;
84
+ name: string | null;
85
+ };
86
+ meta: object;
87
+ }>;
88
+ verifyEmail: import("@trpc/server").TRPCMutationProcedure<{
89
+ input: {
90
+ token: string;
91
+ };
92
+ output: {
93
+ success: boolean;
94
+ message: string;
95
+ };
96
+ meta: object;
97
+ }>;
98
+ resendVerification: import("@trpc/server").TRPCMutationProcedure<{
99
+ input: void;
100
+ output: {
101
+ success: boolean;
102
+ message: string;
103
+ };
104
+ meta: object;
105
+ }>;
106
+ login: import("@trpc/server").TRPCMutationProcedure<{
107
+ input: {
108
+ email: string;
109
+ password: string;
110
+ };
111
+ output: {
112
+ id: string;
113
+ email: string | null;
114
+ name: string | null;
115
+ token: string;
116
+ };
117
+ meta: object;
118
+ }>;
119
+ requestPasswordReset: import("@trpc/server").TRPCMutationProcedure<{
120
+ input: {
121
+ email: string;
122
+ };
123
+ output: {
124
+ success: true;
125
+ message: string;
126
+ };
127
+ meta: object;
128
+ }>;
129
+ resetPassword: import("@trpc/server").TRPCMutationProcedure<{
130
+ input: {
131
+ token: string;
132
+ newPassword: string;
133
+ };
134
+ output: {
135
+ success: boolean;
136
+ message: string;
137
+ };
138
+ meta: object;
139
+ }>;
140
+ getSession: import("@trpc/server").TRPCQueryProcedure<{
141
+ input: void;
142
+ output: {
143
+ user: {
144
+ id: string;
145
+ email: string | null;
146
+ name: string | null;
147
+ emailVerified: boolean;
148
+ profilePicture: string | null;
149
+ role: {
150
+ name: string;
151
+ id: string;
152
+ } | null;
153
+ };
154
+ };
155
+ meta: object;
156
+ }>;
157
+ requestAccountDeletion: import("@trpc/server").TRPCMutationProcedure<{
158
+ input: void;
159
+ output: {
160
+ success: boolean;
161
+ message: string;
162
+ };
163
+ meta: object;
164
+ }>;
165
+ restoreAccount: import("@trpc/server").TRPCMutationProcedure<{
166
+ input: {
167
+ token: string;
168
+ };
169
+ output: {
170
+ success: boolean;
171
+ message: string;
172
+ };
173
+ meta: object;
174
+ }>;
175
+ logout: import("@trpc/server").TRPCMutationProcedure<{
176
+ input: void;
177
+ output: {
178
+ success: boolean;
179
+ };
180
+ meta: object;
181
+ }>;
182
+ }>>;
183
+ workspace: import("@trpc/server").TRPCBuiltRouter<{
184
+ ctx: import("../context.js").Context;
185
+ meta: object;
186
+ errorShape: {
187
+ data: {
188
+ zodError: string | null;
189
+ code: import("@trpc/server").TRPC_ERROR_CODE_KEY;
190
+ httpStatus: number;
191
+ path?: string;
192
+ stack?: string;
193
+ };
194
+ message: string;
195
+ code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
196
+ };
197
+ transformer: true;
198
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
199
+ list: import("@trpc/server").TRPCQueryProcedure<{
200
+ input: {
201
+ parentId?: string | undefined;
202
+ };
203
+ output: {
204
+ workspaces: {
205
+ id: string;
206
+ createdAt: Date;
207
+ updatedAt: Date;
208
+ title: string;
209
+ description: string | null;
210
+ ownerId: string;
211
+ color: string;
212
+ markerColor: string | null;
213
+ icon: string;
214
+ folderId: string | null;
215
+ fileBeingAnalyzed: boolean;
216
+ analysisProgress: import("@prisma/client/runtime/library").JsonValue | null;
217
+ needsAnalysis: boolean;
218
+ }[];
219
+ folders: {
220
+ name: string;
221
+ id: string;
222
+ createdAt: Date;
223
+ updatedAt: Date;
224
+ ownerId: string;
225
+ parentId: string | null;
226
+ color: string;
227
+ markerColor: string | null;
228
+ }[];
229
+ };
230
+ meta: object;
231
+ }>;
232
+ getTree: import("@trpc/server").TRPCQueryProcedure<{
233
+ input: void;
234
+ output: {
235
+ folders: {
236
+ name: string;
237
+ id: string;
238
+ createdAt: Date;
239
+ updatedAt: Date;
240
+ ownerId: string;
241
+ parentId: string | null;
242
+ color: string;
243
+ markerColor: string | null;
244
+ }[];
245
+ workspaces: ({
246
+ uploads: {
247
+ name: string;
248
+ id: string;
249
+ createdAt: Date;
250
+ mimeType: string;
251
+ }[];
252
+ } & {
253
+ id: string;
254
+ createdAt: Date;
255
+ updatedAt: Date;
256
+ title: string;
257
+ description: string | null;
258
+ ownerId: string;
259
+ color: string;
260
+ markerColor: string | null;
261
+ icon: string;
262
+ folderId: string | null;
263
+ fileBeingAnalyzed: boolean;
264
+ analysisProgress: import("@prisma/client/runtime/library").JsonValue | null;
265
+ needsAnalysis: boolean;
266
+ })[];
267
+ };
268
+ meta: object;
269
+ }>;
270
+ create: import("@trpc/server").TRPCMutationProcedure<{
271
+ input: {
272
+ name: string;
273
+ description?: string | undefined;
274
+ parentId?: string | undefined;
275
+ markerColor?: string | null | undefined;
276
+ };
277
+ output: {
278
+ id: string;
279
+ createdAt: Date;
280
+ updatedAt: Date;
281
+ title: string;
282
+ description: string | null;
283
+ ownerId: string;
284
+ color: string;
285
+ markerColor: string | null;
286
+ icon: string;
287
+ folderId: string | null;
288
+ fileBeingAnalyzed: boolean;
289
+ analysisProgress: import("@prisma/client/runtime/library").JsonValue | null;
290
+ needsAnalysis: boolean;
291
+ };
292
+ meta: object;
293
+ }>;
294
+ createFolder: import("@trpc/server").TRPCMutationProcedure<{
295
+ input: {
296
+ name: string;
297
+ color?: string | undefined;
298
+ parentId?: string | undefined;
299
+ };
300
+ output: {
301
+ name: string;
302
+ id: string;
303
+ createdAt: Date;
304
+ updatedAt: Date;
305
+ ownerId: string;
306
+ parentId: string | null;
307
+ color: string;
308
+ markerColor: string | null;
309
+ };
310
+ meta: object;
311
+ }>;
312
+ updateFolder: import("@trpc/server").TRPCMutationProcedure<{
313
+ input: {
314
+ id: string;
315
+ name?: string | undefined;
316
+ markerColor?: string | null | undefined;
317
+ };
318
+ output: {
319
+ name: string;
320
+ id: string;
321
+ createdAt: Date;
322
+ updatedAt: Date;
323
+ ownerId: string;
324
+ parentId: string | null;
325
+ color: string;
326
+ markerColor: string | null;
327
+ };
328
+ meta: object;
329
+ }>;
330
+ deleteFolder: import("@trpc/server").TRPCMutationProcedure<{
331
+ input: {
332
+ id: string;
333
+ };
334
+ output: {
335
+ name: string;
336
+ id: string;
337
+ createdAt: Date;
338
+ updatedAt: Date;
339
+ ownerId: string;
340
+ parentId: string | null;
341
+ color: string;
342
+ markerColor: string | null;
343
+ };
344
+ meta: object;
345
+ }>;
346
+ get: import("@trpc/server").TRPCQueryProcedure<{
347
+ input: {
348
+ id: string;
349
+ };
350
+ output: {
351
+ folder: {
352
+ name: string;
353
+ id: string;
354
+ createdAt: Date;
355
+ updatedAt: Date;
356
+ ownerId: string;
357
+ parentId: string | null;
358
+ color: string;
359
+ markerColor: string | null;
360
+ } | null;
361
+ artifacts: {
362
+ id: string;
363
+ createdAt: Date;
364
+ updatedAt: Date;
365
+ workspaceId: string;
366
+ type: import("@prisma/client").$Enums.ArtifactType;
367
+ title: string;
368
+ isArchived: boolean;
369
+ difficulty: import("@prisma/client").$Enums.Difficulty | null;
370
+ estimatedTime: string | null;
371
+ createdById: string | null;
372
+ description: string | null;
373
+ generating: boolean;
374
+ generatingMetadata: import("@prisma/client/runtime/library").JsonValue | null;
375
+ worksheetConfig: import("@prisma/client/runtime/library").JsonValue | null;
376
+ imageObjectKey: string | null;
377
+ }[];
378
+ uploads: {
379
+ meta: import("@prisma/client/runtime/library").JsonValue | null;
380
+ name: string;
381
+ id: string;
382
+ createdAt: Date;
383
+ workspaceId: string | null;
384
+ userId: string | null;
385
+ mimeType: string;
386
+ size: number;
387
+ bucket: string | null;
388
+ objectKey: string | null;
389
+ url: string | null;
390
+ checksum: string | null;
391
+ aiTranscription: import("@prisma/client/runtime/library").JsonValue | null;
392
+ }[];
393
+ } & {
394
+ id: string;
395
+ createdAt: Date;
396
+ updatedAt: Date;
397
+ title: string;
398
+ description: string | null;
399
+ ownerId: string;
400
+ color: string;
401
+ markerColor: string | null;
402
+ icon: string;
403
+ folderId: string | null;
404
+ fileBeingAnalyzed: boolean;
405
+ analysisProgress: import("@prisma/client/runtime/library").JsonValue | null;
406
+ needsAnalysis: boolean;
407
+ };
408
+ meta: object;
409
+ }>;
410
+ getStats: import("@trpc/server").TRPCQueryProcedure<{
411
+ input: void;
412
+ output: {
413
+ workspaces: number;
414
+ folders: number;
415
+ lastUpdated: Date | undefined;
416
+ spaceUsed: number;
417
+ spaceTotal: number;
418
+ };
419
+ meta: object;
420
+ }>;
421
+ getStudyAnalytics: import("@trpc/server").TRPCQueryProcedure<{
422
+ input: void;
423
+ output: {
424
+ streak: number;
425
+ totalStudyDays: number;
426
+ weeklyActivity: boolean[];
427
+ flashcards: {
428
+ total: number;
429
+ mastered: number;
430
+ dueForReview: number;
431
+ };
432
+ worksheets: {
433
+ completed: number;
434
+ correct: number;
435
+ accuracy: number;
436
+ };
437
+ };
438
+ meta: object;
439
+ }>;
440
+ update: import("@trpc/server").TRPCMutationProcedure<{
441
+ input: {
442
+ id: string;
443
+ name?: string | undefined;
444
+ description?: string | undefined;
445
+ markerColor?: string | null | undefined;
446
+ icon?: string | undefined;
447
+ };
448
+ output: {
449
+ id: string;
450
+ createdAt: Date;
451
+ updatedAt: Date;
452
+ title: string;
453
+ description: string | null;
454
+ ownerId: string;
455
+ color: string;
456
+ markerColor: string | null;
457
+ icon: string;
458
+ folderId: string | null;
459
+ fileBeingAnalyzed: boolean;
460
+ analysisProgress: import("@prisma/client/runtime/library").JsonValue | null;
461
+ needsAnalysis: boolean;
462
+ };
463
+ meta: object;
464
+ }>;
465
+ delete: import("@trpc/server").TRPCMutationProcedure<{
466
+ input: {
467
+ id: string;
468
+ };
469
+ output: boolean;
470
+ meta: object;
471
+ }>;
472
+ getFolderInformation: import("@trpc/server").TRPCQueryProcedure<{
473
+ input: {
474
+ id: string;
475
+ };
476
+ output: {
477
+ folder: {
478
+ name: string;
479
+ id: string;
480
+ createdAt: Date;
481
+ updatedAt: Date;
482
+ ownerId: string;
483
+ parentId: string | null;
484
+ color: string;
485
+ markerColor: string | null;
486
+ };
487
+ parents: {
488
+ name: string;
489
+ id: string;
490
+ createdAt: Date;
491
+ updatedAt: Date;
492
+ ownerId: string;
493
+ parentId: string | null;
494
+ color: string;
495
+ markerColor: string | null;
496
+ }[];
497
+ };
498
+ meta: object;
499
+ }>;
500
+ getSharedWith: import("@trpc/server").TRPCQueryProcedure<{
501
+ input: {
502
+ id: string;
503
+ };
504
+ output: {
505
+ shared: {
506
+ id: string;
507
+ createdAt: Date;
508
+ updatedAt: Date;
509
+ title: string;
510
+ description: string | null;
511
+ ownerId: string;
512
+ color: string;
513
+ markerColor: string | null;
514
+ icon: string;
515
+ folderId: string | null;
516
+ fileBeingAnalyzed: boolean;
517
+ analysisProgress: import("@prisma/client/runtime/library").JsonValue | null;
518
+ needsAnalysis: boolean;
519
+ }[];
520
+ invitations: ({
521
+ workspace: {
522
+ id: string;
523
+ createdAt: Date;
524
+ updatedAt: Date;
525
+ title: string;
526
+ description: string | null;
527
+ ownerId: string;
528
+ color: string;
529
+ markerColor: string | null;
530
+ icon: string;
531
+ folderId: string | null;
532
+ fileBeingAnalyzed: boolean;
533
+ analysisProgress: import("@prisma/client/runtime/library").JsonValue | null;
534
+ needsAnalysis: boolean;
535
+ };
536
+ } & {
537
+ id: string;
538
+ email: string;
539
+ createdAt: Date;
540
+ updatedAt: Date;
541
+ workspaceId: string;
542
+ role: string;
543
+ token: string;
544
+ invitedById: string;
545
+ acceptedAt: Date | null;
546
+ expiresAt: Date;
547
+ })[];
548
+ };
549
+ meta: object;
550
+ }>;
551
+ uploadFiles: import("@trpc/server").TRPCMutationProcedure<{
552
+ input: {
553
+ id: string;
554
+ files: {
555
+ filename: string;
556
+ contentType: string;
557
+ size: number;
558
+ }[];
559
+ };
560
+ output: {
561
+ fileId: string;
562
+ uploadUrl: string;
563
+ }[];
564
+ meta: object;
565
+ }>;
566
+ deleteFiles: import("@trpc/server").TRPCMutationProcedure<{
567
+ input: {
568
+ fileId: string[];
569
+ id: string;
570
+ };
571
+ output: boolean;
572
+ meta: object;
573
+ }>;
574
+ getFileUploadUrl: import("@trpc/server").TRPCQueryProcedure<{
575
+ input: {
576
+ workspaceId: string;
577
+ filename: string;
578
+ contentType: string;
579
+ size: number;
580
+ };
581
+ output: {
582
+ fileId: string;
583
+ uploadUrl: string;
584
+ };
585
+ meta: object;
586
+ }>;
587
+ uploadAndAnalyzeMedia: import("@trpc/server").TRPCMutationProcedure<{
588
+ input: {
589
+ workspaceId: string;
590
+ files: {
591
+ id: string;
592
+ }[];
593
+ generateStudyGuide?: boolean | undefined;
594
+ generateFlashcards?: boolean | undefined;
595
+ generateWorksheet?: boolean | undefined;
596
+ };
597
+ output: {
598
+ filename: string;
599
+ artifacts: {
600
+ studyGuide: any | null;
601
+ flashcards: any | null;
602
+ worksheet: any | null;
603
+ };
604
+ };
605
+ meta: object;
606
+ }>;
607
+ search: import("@trpc/server").TRPCQueryProcedure<{
608
+ input: {
609
+ query: string;
610
+ color?: string | undefined;
611
+ limit?: number | undefined;
612
+ };
613
+ output: any[];
614
+ meta: object;
615
+ }>;
616
+ members: import("@trpc/server").TRPCBuiltRouter<{
617
+ ctx: import("../context.js").Context;
618
+ meta: object;
619
+ errorShape: {
620
+ data: {
621
+ zodError: string | null;
622
+ code: import("@trpc/server").TRPC_ERROR_CODE_KEY;
623
+ httpStatus: number;
624
+ path?: string;
625
+ stack?: string;
626
+ };
627
+ message: string;
628
+ code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
629
+ };
630
+ transformer: true;
631
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
632
+ getMembers: import("@trpc/server").TRPCQueryProcedure<{
633
+ input: {
634
+ workspaceId: string;
635
+ };
636
+ output: ({
637
+ id: string;
638
+ name: string;
639
+ email: string;
640
+ role: "admin" | "member";
641
+ joinedAt: Date;
642
+ } | {
643
+ id: string;
644
+ name: string;
645
+ email: string;
646
+ role: "owner";
647
+ joinedAt: Date;
648
+ })[];
649
+ meta: object;
650
+ }>;
651
+ getCurrentUserRole: import("@trpc/server").TRPCQueryProcedure<{
652
+ input: {
653
+ workspaceId: string;
654
+ };
655
+ output: "admin" | "member" | "owner";
656
+ meta: object;
657
+ }>;
658
+ inviteMember: import("@trpc/server").TRPCMutationProcedure<{
659
+ input: {
660
+ workspaceId: string;
661
+ email: string;
662
+ role?: "admin" | "member" | undefined;
663
+ };
664
+ output: {
665
+ invitationId: string;
666
+ token: string;
667
+ email: string;
668
+ role: string;
669
+ expiresAt: Date;
670
+ workspaceTitle: string;
671
+ invitedByName: string | null;
672
+ };
673
+ meta: object;
674
+ }>;
675
+ getInvitations: import("@trpc/server").TRPCQueryProcedure<{
676
+ input: {
677
+ workspaceId: string;
678
+ };
679
+ output: {
680
+ id: string;
681
+ email: string;
682
+ createdAt: Date;
683
+ updatedAt: Date;
684
+ workspaceId: string;
685
+ role: string;
686
+ token: string;
687
+ invitedById: string;
688
+ acceptedAt: Date | null;
689
+ expiresAt: Date;
690
+ }[];
691
+ meta: object;
692
+ }>;
693
+ acceptInvite: import("@trpc/server").TRPCMutationProcedure<{
694
+ input: {
695
+ token: string;
696
+ };
697
+ output: {
698
+ message?: string | undefined;
699
+ workspaceId: string;
700
+ workspaceTitle: string;
701
+ role: string;
702
+ ownerName: string | null;
703
+ };
704
+ meta: object;
705
+ }>;
706
+ changeMemberRole: import("@trpc/server").TRPCMutationProcedure<{
707
+ input: {
708
+ workspaceId: string;
709
+ memberId: string;
710
+ role: "admin" | "member";
711
+ };
712
+ output: {
713
+ memberId: string;
714
+ role: "admin" | "member";
715
+ memberName: string | null;
716
+ message: string;
717
+ };
718
+ meta: object;
719
+ }>;
720
+ removeMember: import("@trpc/server").TRPCMutationProcedure<{
721
+ input: {
722
+ workspaceId: string;
723
+ memberId: string;
724
+ };
725
+ output: {
726
+ memberId: string;
727
+ message: string;
728
+ };
729
+ meta: object;
730
+ }>;
731
+ getPendingInvitations: import("@trpc/server").TRPCQueryProcedure<{
732
+ input: {
733
+ workspaceId: string;
734
+ };
735
+ output: {
736
+ id: string;
737
+ email: string;
738
+ role: string;
739
+ token: string;
740
+ expiresAt: Date;
741
+ createdAt: Date;
742
+ invitedByName: string | null;
743
+ }[];
744
+ meta: object;
745
+ }>;
746
+ cancelInvitation: import("@trpc/server").TRPCMutationProcedure<{
747
+ input: {
748
+ invitationId: string;
749
+ };
750
+ output: {
751
+ invitationId: string;
752
+ message: string;
753
+ };
754
+ meta: object;
755
+ }>;
756
+ resendInvitation: import("@trpc/server").TRPCMutationProcedure<{
757
+ input: {
758
+ invitationId: string;
759
+ };
760
+ output: {
761
+ invitationId: string;
762
+ message: string;
763
+ };
764
+ meta: object;
765
+ }>;
766
+ getAllInvitationsDebug: import("@trpc/server").TRPCQueryProcedure<{
767
+ input: {
768
+ workspaceId: string;
769
+ };
770
+ output: {
771
+ id: string;
772
+ email: string;
773
+ createdAt: Date;
774
+ updatedAt: Date;
775
+ workspaceId: string;
776
+ role: string;
777
+ token: string;
778
+ invitedById: string;
779
+ acceptedAt: Date | null;
780
+ expiresAt: Date;
781
+ }[];
782
+ meta: object;
783
+ }>;
784
+ }>>;
785
+ }>>;
786
+ flashcards: import("@trpc/server").TRPCBuiltRouter<{
787
+ ctx: import("../context.js").Context;
788
+ meta: object;
789
+ errorShape: {
790
+ data: {
791
+ zodError: string | null;
792
+ code: import("@trpc/server").TRPC_ERROR_CODE_KEY;
793
+ httpStatus: number;
794
+ path?: string;
795
+ stack?: string;
796
+ };
797
+ message: string;
798
+ code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
799
+ };
800
+ transformer: true;
801
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
802
+ listSets: import("@trpc/server").TRPCQueryProcedure<{
803
+ input: {
804
+ workspaceId: string;
805
+ };
806
+ output: ({
807
+ versions: {
808
+ id: string;
809
+ createdAt: Date;
810
+ createdById: string | null;
811
+ artifactId: string;
812
+ content: string;
813
+ data: import("@prisma/client/runtime/library").JsonValue | null;
814
+ version: number;
815
+ }[];
816
+ } & {
817
+ id: string;
818
+ createdAt: Date;
819
+ updatedAt: Date;
820
+ workspaceId: string;
821
+ type: import("@prisma/client").$Enums.ArtifactType;
822
+ title: string;
823
+ isArchived: boolean;
824
+ difficulty: import("@prisma/client").$Enums.Difficulty | null;
825
+ estimatedTime: string | null;
826
+ createdById: string | null;
827
+ description: string | null;
828
+ generating: boolean;
829
+ generatingMetadata: import("@prisma/client/runtime/library").JsonValue | null;
830
+ worksheetConfig: import("@prisma/client/runtime/library").JsonValue | null;
831
+ imageObjectKey: string | null;
832
+ })[];
833
+ meta: object;
834
+ }>;
835
+ listCards: import("@trpc/server").TRPCQueryProcedure<{
836
+ input: {
837
+ workspaceId: string;
838
+ };
839
+ output: ({
840
+ progress: {
841
+ id: string;
842
+ createdAt: Date;
843
+ updatedAt: Date;
844
+ userId: string;
845
+ flashcardId: string;
846
+ timesStudied: number;
847
+ timesCorrect: number;
848
+ timesIncorrect: number;
849
+ timesIncorrectConsecutive: number;
850
+ easeFactor: number;
851
+ interval: number;
852
+ repetitions: number;
853
+ masteryLevel: number;
854
+ lastStudiedAt: Date | null;
855
+ nextReviewAt: Date | null;
856
+ }[];
857
+ } & {
858
+ id: string;
859
+ createdAt: Date;
860
+ artifactId: string;
861
+ order: number;
862
+ front: string;
863
+ back: string;
864
+ tags: string[];
865
+ acceptedAnswers: string[];
866
+ })[];
867
+ meta: object;
868
+ }>;
869
+ isGenerating: import("@trpc/server").TRPCQueryProcedure<{
870
+ input: {
871
+ workspaceId: string;
872
+ };
873
+ output: boolean | undefined;
874
+ meta: object;
875
+ }>;
876
+ createCard: import("@trpc/server").TRPCMutationProcedure<{
877
+ input: {
878
+ workspaceId: string;
879
+ front: string;
880
+ back: string;
881
+ acceptedAnswers?: string[] | undefined;
882
+ tags?: string[] | undefined;
883
+ order?: number | undefined;
884
+ };
885
+ output: {
886
+ id: string;
887
+ createdAt: Date;
888
+ artifactId: string;
889
+ order: number;
890
+ front: string;
891
+ back: string;
892
+ tags: string[];
893
+ acceptedAnswers: string[];
894
+ };
895
+ meta: object;
896
+ }>;
897
+ updateCard: import("@trpc/server").TRPCMutationProcedure<{
898
+ input: {
899
+ cardId: string;
900
+ front?: string | undefined;
901
+ back?: string | undefined;
902
+ acceptedAnswers?: string[] | undefined;
903
+ tags?: string[] | undefined;
904
+ order?: number | undefined;
905
+ };
906
+ output: {
907
+ id: string;
908
+ createdAt: Date;
909
+ artifactId: string;
910
+ order: number;
911
+ front: string;
912
+ back: string;
913
+ tags: string[];
914
+ acceptedAnswers: string[];
915
+ };
916
+ meta: object;
917
+ }>;
918
+ gradeTypedAnswer: import("@trpc/server").TRPCMutationProcedure<{
919
+ input: {
920
+ flashcardId: string;
921
+ userAnswer: string;
922
+ };
923
+ output: {
924
+ isCorrect: boolean;
925
+ confidence: number;
926
+ reason: string;
927
+ matchedAnswer: string | null;
928
+ };
929
+ meta: object;
930
+ }>;
931
+ deleteCard: import("@trpc/server").TRPCMutationProcedure<{
932
+ input: {
933
+ cardId: string;
934
+ };
935
+ output: boolean;
936
+ meta: object;
937
+ }>;
938
+ deleteSet: import("@trpc/server").TRPCMutationProcedure<{
939
+ input: {
940
+ setId: string;
941
+ };
942
+ output: boolean;
943
+ meta: object;
944
+ }>;
945
+ generateFromPrompt: import("@trpc/server").TRPCMutationProcedure<{
946
+ input: {
947
+ workspaceId: string;
948
+ prompt: string;
949
+ numCards?: number | undefined;
950
+ difficulty?: "easy" | "medium" | "hard" | undefined;
951
+ title?: string | undefined;
952
+ tags?: string[] | undefined;
953
+ };
954
+ output: {
955
+ artifact: {
956
+ id: string;
957
+ createdAt: Date;
958
+ updatedAt: Date;
959
+ workspaceId: string;
960
+ type: import("@prisma/client").$Enums.ArtifactType;
961
+ title: string;
962
+ isArchived: boolean;
963
+ difficulty: import("@prisma/client").$Enums.Difficulty | null;
964
+ estimatedTime: string | null;
965
+ createdById: string | null;
966
+ description: string | null;
967
+ generating: boolean;
968
+ generatingMetadata: import("@prisma/client/runtime/library").JsonValue | null;
969
+ worksheetConfig: import("@prisma/client/runtime/library").JsonValue | null;
970
+ imageObjectKey: string | null;
971
+ };
972
+ createdCards: number;
973
+ };
974
+ meta: object;
975
+ }>;
976
+ recordStudyAttempt: import("@trpc/server").TRPCMutationProcedure<{
977
+ input: {
978
+ flashcardId: string;
979
+ isCorrect: boolean;
980
+ confidence?: "easy" | "medium" | "hard" | undefined;
981
+ timeSpentMs?: number | undefined;
982
+ };
983
+ output: any;
984
+ meta: object;
985
+ }>;
986
+ getSetProgress: import("@trpc/server").TRPCQueryProcedure<{
987
+ input: {
988
+ artifactId: string;
989
+ };
990
+ output: {
991
+ flashcardId: any;
992
+ front: any;
993
+ back: any;
994
+ progress: {
995
+ id: string;
996
+ createdAt: Date;
997
+ updatedAt: Date;
998
+ userId: string;
999
+ flashcardId: string;
1000
+ timesStudied: number;
1001
+ timesCorrect: number;
1002
+ timesIncorrect: number;
1003
+ timesIncorrectConsecutive: number;
1004
+ easeFactor: number;
1005
+ interval: number;
1006
+ repetitions: number;
1007
+ masteryLevel: number;
1008
+ lastStudiedAt: Date | null;
1009
+ nextReviewAt: Date | null;
1010
+ } | null;
1011
+ }[];
1012
+ meta: object;
1013
+ }>;
1014
+ getDueFlashcards: import("@trpc/server").TRPCQueryProcedure<{
1015
+ input: {
1016
+ workspaceId: string;
1017
+ };
1018
+ output: (({
1019
+ artifact: {
1020
+ id: string;
1021
+ createdAt: Date;
1022
+ updatedAt: Date;
1023
+ workspaceId: string;
1024
+ type: import("@prisma/client").$Enums.ArtifactType;
1025
+ title: string;
1026
+ isArchived: boolean;
1027
+ difficulty: import("@prisma/client").$Enums.Difficulty | null;
1028
+ estimatedTime: string | null;
1029
+ createdById: string | null;
1030
+ description: string | null;
1031
+ generating: boolean;
1032
+ generatingMetadata: import("@prisma/client/runtime/library").JsonValue | null;
1033
+ worksheetConfig: import("@prisma/client/runtime/library").JsonValue | null;
1034
+ imageObjectKey: string | null;
1035
+ };
1036
+ } & {
1037
+ id: string;
1038
+ createdAt: Date;
1039
+ artifactId: string;
1040
+ order: number;
1041
+ front: string;
1042
+ back: string;
1043
+ tags: string[];
1044
+ acceptedAnswers: string[];
1045
+ }) | {
1046
+ artifact: {
1047
+ id: string;
1048
+ createdAt: Date;
1049
+ updatedAt: Date;
1050
+ workspaceId: string;
1051
+ type: import("@prisma/client").$Enums.ArtifactType;
1052
+ title: string;
1053
+ isArchived: boolean;
1054
+ difficulty: import("@prisma/client").$Enums.Difficulty | null;
1055
+ estimatedTime: string | null;
1056
+ createdById: string | null;
1057
+ description: string | null;
1058
+ generating: boolean;
1059
+ generatingMetadata: import("@prisma/client/runtime/library").JsonValue | null;
1060
+ worksheetConfig: import("@prisma/client/runtime/library").JsonValue | null;
1061
+ imageObjectKey: string | null;
1062
+ };
1063
+ id: string;
1064
+ createdAt: Date;
1065
+ artifactId: string;
1066
+ order: number;
1067
+ front: string;
1068
+ back: string;
1069
+ tags: string[];
1070
+ acceptedAnswers: string[];
1071
+ })[];
1072
+ meta: object;
1073
+ }>;
1074
+ getSetStatistics: import("@trpc/server").TRPCQueryProcedure<{
1075
+ input: {
1076
+ artifactId: string;
1077
+ };
1078
+ output: {
1079
+ totalCards: number;
1080
+ studiedCards: number;
1081
+ unstudiedCards: number;
1082
+ masteredCards: number;
1083
+ dueForReview: number;
1084
+ averageMastery: number;
1085
+ successRate: number;
1086
+ totalAttempts: number;
1087
+ totalCorrect: number;
1088
+ };
1089
+ meta: object;
1090
+ }>;
1091
+ resetProgress: import("@trpc/server").TRPCMutationProcedure<{
1092
+ input: {
1093
+ flashcardId: string;
1094
+ };
1095
+ output: import("@prisma/client").Prisma.BatchPayload;
1096
+ meta: object;
1097
+ }>;
1098
+ recordStudySession: import("@trpc/server").TRPCMutationProcedure<{
1099
+ input: {
1100
+ attempts: {
1101
+ flashcardId: string;
1102
+ isCorrect: boolean;
1103
+ confidence?: "easy" | "medium" | "hard" | undefined;
1104
+ timeSpentMs?: number | undefined;
1105
+ }[];
1106
+ };
1107
+ output: any[];
1108
+ meta: object;
1109
+ }>;
1110
+ }>>;
1111
+ worksheets: import("@trpc/server").TRPCBuiltRouter<{
1112
+ ctx: import("../context.js").Context;
1113
+ meta: object;
1114
+ errorShape: {
1115
+ data: {
1116
+ zodError: string | null;
1117
+ code: import("@trpc/server").TRPC_ERROR_CODE_KEY;
1118
+ httpStatus: number;
1119
+ path?: string;
1120
+ stack?: string;
1121
+ };
1122
+ message: string;
1123
+ code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
1124
+ };
1125
+ transformer: true;
1126
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
1127
+ list: import("@trpc/server").TRPCQueryProcedure<{
1128
+ input: {
1129
+ workspaceId: string;
1130
+ };
1131
+ output: ({
1132
+ versions: {
1133
+ id: string;
1134
+ createdAt: Date;
1135
+ createdById: string | null;
1136
+ artifactId: string;
1137
+ content: string;
1138
+ data: import("@prisma/client/runtime/library").JsonValue | null;
1139
+ version: number;
1140
+ }[];
1141
+ questions: {
1142
+ meta: import("@prisma/client/runtime/library").JsonValue | null;
1143
+ id: string;
1144
+ createdAt: Date;
1145
+ type: import("@prisma/client").$Enums.QuestionType;
1146
+ difficulty: import("@prisma/client").$Enums.Difficulty;
1147
+ artifactId: string;
1148
+ prompt: string;
1149
+ answer: string | null;
1150
+ order: number;
1151
+ }[];
1152
+ } & {
1153
+ id: string;
1154
+ createdAt: Date;
1155
+ updatedAt: Date;
1156
+ workspaceId: string;
1157
+ type: import("@prisma/client").$Enums.ArtifactType;
1158
+ title: string;
1159
+ isArchived: boolean;
1160
+ difficulty: import("@prisma/client").$Enums.Difficulty | null;
1161
+ estimatedTime: string | null;
1162
+ createdById: string | null;
1163
+ description: string | null;
1164
+ generating: boolean;
1165
+ generatingMetadata: import("@prisma/client/runtime/library").JsonValue | null;
1166
+ worksheetConfig: import("@prisma/client/runtime/library").JsonValue | null;
1167
+ imageObjectKey: string | null;
1168
+ })[];
1169
+ meta: object;
1170
+ }>;
1171
+ listPresets: import("@trpc/server").TRPCQueryProcedure<{
1172
+ input: {
1173
+ workspaceId: string;
1174
+ };
1175
+ output: {
1176
+ name: string;
1177
+ id: string;
1178
+ createdAt: Date;
1179
+ updatedAt: Date;
1180
+ workspaceId: string | null;
1181
+ userId: string | null;
1182
+ isSystem: boolean;
1183
+ config: import("@prisma/client/runtime/library").JsonValue;
1184
+ }[];
1185
+ meta: object;
1186
+ }>;
1187
+ createPreset: import("@trpc/server").TRPCMutationProcedure<{
1188
+ input: {
1189
+ name: string;
1190
+ config: Record<string, unknown>;
1191
+ workspaceId?: string | undefined;
1192
+ };
1193
+ output: {
1194
+ name: string;
1195
+ id: string;
1196
+ createdAt: Date;
1197
+ updatedAt: Date;
1198
+ workspaceId: string | null;
1199
+ userId: string | null;
1200
+ isSystem: boolean;
1201
+ config: import("@prisma/client/runtime/library").JsonValue;
1202
+ };
1203
+ meta: object;
1204
+ }>;
1205
+ updatePreset: import("@trpc/server").TRPCMutationProcedure<{
1206
+ input: {
1207
+ id: string;
1208
+ name?: string | undefined;
1209
+ config?: Record<string, unknown> | undefined;
1210
+ };
1211
+ output: {
1212
+ name: string;
1213
+ id: string;
1214
+ createdAt: Date;
1215
+ updatedAt: Date;
1216
+ workspaceId: string | null;
1217
+ userId: string | null;
1218
+ isSystem: boolean;
1219
+ config: import("@prisma/client/runtime/library").JsonValue;
1220
+ };
1221
+ meta: object;
1222
+ }>;
1223
+ deletePreset: import("@trpc/server").TRPCMutationProcedure<{
1224
+ input: {
1225
+ id: string;
1226
+ };
1227
+ output: boolean;
1228
+ meta: object;
1229
+ }>;
1230
+ create: import("@trpc/server").TRPCMutationProcedure<{
1231
+ input: {
1232
+ workspaceId: string;
1233
+ title: string;
1234
+ description?: string | undefined;
1235
+ difficulty?: "EASY" | "MEDIUM" | "HARD" | undefined;
1236
+ estimatedTime?: string | undefined;
1237
+ problems?: {
1238
+ question: string;
1239
+ answer: string;
1240
+ type?: "MULTIPLE_CHOICE" | "TEXT" | "NUMERIC" | "TRUE_FALSE" | "MATCHING" | "FILL_IN_THE_BLANK" | undefined;
1241
+ options?: string[] | undefined;
1242
+ }[] | undefined;
1243
+ };
1244
+ output: {
1245
+ questions: {
1246
+ meta: import("@prisma/client/runtime/library").JsonValue | null;
1247
+ id: string;
1248
+ createdAt: Date;
1249
+ type: import("@prisma/client").$Enums.QuestionType;
1250
+ difficulty: import("@prisma/client").$Enums.Difficulty;
1251
+ artifactId: string;
1252
+ prompt: string;
1253
+ answer: string | null;
1254
+ order: number;
1255
+ }[];
1256
+ } & {
1257
+ id: string;
1258
+ createdAt: Date;
1259
+ updatedAt: Date;
1260
+ workspaceId: string;
1261
+ type: import("@prisma/client").$Enums.ArtifactType;
1262
+ title: string;
1263
+ isArchived: boolean;
1264
+ difficulty: import("@prisma/client").$Enums.Difficulty | null;
1265
+ estimatedTime: string | null;
1266
+ createdById: string | null;
1267
+ description: string | null;
1268
+ generating: boolean;
1269
+ generatingMetadata: import("@prisma/client/runtime/library").JsonValue | null;
1270
+ worksheetConfig: import("@prisma/client/runtime/library").JsonValue | null;
1271
+ imageObjectKey: string | null;
1272
+ };
1273
+ meta: object;
1274
+ }>;
1275
+ get: import("@trpc/server").TRPCQueryProcedure<{
1276
+ input: {
1277
+ worksheetId: string;
1278
+ };
1279
+ output: {
1280
+ questions: {
1281
+ meta: import("@prisma/client/runtime/library").JsonValue | null;
1282
+ id: string;
1283
+ createdAt: Date;
1284
+ type: import("@prisma/client").$Enums.QuestionType;
1285
+ difficulty: import("@prisma/client").$Enums.Difficulty;
1286
+ artifactId: string;
1287
+ prompt: string;
1288
+ answer: string | null;
1289
+ order: number;
1290
+ }[];
1291
+ } & {
1292
+ id: string;
1293
+ createdAt: Date;
1294
+ updatedAt: Date;
1295
+ workspaceId: string;
1296
+ type: import("@prisma/client").$Enums.ArtifactType;
1297
+ title: string;
1298
+ isArchived: boolean;
1299
+ difficulty: import("@prisma/client").$Enums.Difficulty | null;
1300
+ estimatedTime: string | null;
1301
+ createdById: string | null;
1302
+ description: string | null;
1303
+ generating: boolean;
1304
+ generatingMetadata: import("@prisma/client/runtime/library").JsonValue | null;
1305
+ worksheetConfig: import("@prisma/client/runtime/library").JsonValue | null;
1306
+ imageObjectKey: string | null;
1307
+ };
1308
+ meta: object;
1309
+ }>;
1310
+ createWorksheetQuestion: import("@trpc/server").TRPCMutationProcedure<{
1311
+ input: {
1312
+ worksheetId: string;
1313
+ prompt: string;
1314
+ answer?: string | undefined;
1315
+ type?: "MULTIPLE_CHOICE" | "TEXT" | "NUMERIC" | "TRUE_FALSE" | "MATCHING" | "FILL_IN_THE_BLANK" | undefined;
1316
+ difficulty?: "EASY" | "MEDIUM" | "HARD" | undefined;
1317
+ order?: number | undefined;
1318
+ meta?: Record<string, unknown> | undefined;
1319
+ };
1320
+ output: {
1321
+ meta: import("@prisma/client/runtime/library").JsonValue | null;
1322
+ id: string;
1323
+ createdAt: Date;
1324
+ type: import("@prisma/client").$Enums.QuestionType;
1325
+ difficulty: import("@prisma/client").$Enums.Difficulty;
1326
+ artifactId: string;
1327
+ prompt: string;
1328
+ answer: string | null;
1329
+ order: number;
1330
+ };
1331
+ meta: object;
1332
+ }>;
1333
+ updateWorksheetQuestion: import("@trpc/server").TRPCMutationProcedure<{
1334
+ input: {
1335
+ worksheetQuestionId: string;
1336
+ prompt?: string | undefined;
1337
+ answer?: string | undefined;
1338
+ type?: "MULTIPLE_CHOICE" | "TEXT" | "NUMERIC" | "TRUE_FALSE" | "MATCHING" | "FILL_IN_THE_BLANK" | undefined;
1339
+ difficulty?: "EASY" | "MEDIUM" | "HARD" | undefined;
1340
+ order?: number | undefined;
1341
+ meta?: Record<string, unknown> | undefined;
1342
+ };
1343
+ output: {
1344
+ meta: import("@prisma/client/runtime/library").JsonValue | null;
1345
+ id: string;
1346
+ createdAt: Date;
1347
+ type: import("@prisma/client").$Enums.QuestionType;
1348
+ difficulty: import("@prisma/client").$Enums.Difficulty;
1349
+ artifactId: string;
1350
+ prompt: string;
1351
+ answer: string | null;
1352
+ order: number;
1353
+ };
1354
+ meta: object;
1355
+ }>;
1356
+ deleteWorksheetQuestion: import("@trpc/server").TRPCMutationProcedure<{
1357
+ input: {
1358
+ worksheetQuestionId: string;
1359
+ };
1360
+ output: boolean;
1361
+ meta: object;
1362
+ }>;
1363
+ updateProblemStatus: import("@trpc/server").TRPCMutationProcedure<{
1364
+ input: {
1365
+ problemId: string;
1366
+ completed: boolean;
1367
+ answer?: string | undefined;
1368
+ correct?: boolean | undefined;
1369
+ };
1370
+ output: {
1371
+ meta: import("@prisma/client/runtime/library").JsonValue | null;
1372
+ id: string;
1373
+ createdAt: Date;
1374
+ updatedAt: Date;
1375
+ userId: string;
1376
+ worksheetQuestionId: string;
1377
+ userAnswer: string | null;
1378
+ completedAt: Date | null;
1379
+ attempts: number;
1380
+ timeSpentSec: number | null;
1381
+ correct: boolean | null;
1382
+ modified: boolean;
1383
+ };
1384
+ meta: object;
1385
+ }>;
1386
+ getProgress: import("@trpc/server").TRPCQueryProcedure<{
1387
+ input: {
1388
+ worksheetId: string;
1389
+ };
1390
+ output: {
1391
+ meta: import("@prisma/client/runtime/library").JsonValue | null;
1392
+ id: string;
1393
+ createdAt: Date;
1394
+ updatedAt: Date;
1395
+ userId: string;
1396
+ worksheetQuestionId: string;
1397
+ userAnswer: string | null;
1398
+ completedAt: Date | null;
1399
+ attempts: number;
1400
+ timeSpentSec: number | null;
1401
+ correct: boolean | null;
1402
+ modified: boolean;
1403
+ }[];
1404
+ meta: object;
1405
+ }>;
1406
+ update: import("@trpc/server").TRPCMutationProcedure<{
1407
+ input: {
1408
+ id: string;
1409
+ title?: string | undefined;
1410
+ description?: string | undefined;
1411
+ difficulty?: "EASY" | "MEDIUM" | "HARD" | undefined;
1412
+ estimatedTime?: string | undefined;
1413
+ problems?: {
1414
+ question: string;
1415
+ answer: string;
1416
+ id?: string | undefined;
1417
+ type?: "MULTIPLE_CHOICE" | "TEXT" | "NUMERIC" | "TRUE_FALSE" | "MATCHING" | "FILL_IN_THE_BLANK" | undefined;
1418
+ options?: string[] | undefined;
1419
+ }[] | undefined;
1420
+ };
1421
+ output: {
1422
+ questions: {
1423
+ meta: import("@prisma/client/runtime/library").JsonValue | null;
1424
+ id: string;
1425
+ createdAt: Date;
1426
+ type: import("@prisma/client").$Enums.QuestionType;
1427
+ difficulty: import("@prisma/client").$Enums.Difficulty;
1428
+ artifactId: string;
1429
+ prompt: string;
1430
+ answer: string | null;
1431
+ order: number;
1432
+ }[];
1433
+ } & {
1434
+ id: string;
1435
+ createdAt: Date;
1436
+ updatedAt: Date;
1437
+ workspaceId: string;
1438
+ type: import("@prisma/client").$Enums.ArtifactType;
1439
+ title: string;
1440
+ isArchived: boolean;
1441
+ difficulty: import("@prisma/client").$Enums.Difficulty | null;
1442
+ estimatedTime: string | null;
1443
+ createdById: string | null;
1444
+ description: string | null;
1445
+ generating: boolean;
1446
+ generatingMetadata: import("@prisma/client/runtime/library").JsonValue | null;
1447
+ worksheetConfig: import("@prisma/client/runtime/library").JsonValue | null;
1448
+ imageObjectKey: string | null;
1449
+ };
1450
+ meta: object;
1451
+ }>;
1452
+ delete: import("@trpc/server").TRPCMutationProcedure<{
1453
+ input: {
1454
+ id: string;
1455
+ };
1456
+ output: boolean;
1457
+ meta: object;
1458
+ }>;
1459
+ generateFromPrompt: import("@trpc/server").TRPCMutationProcedure<{
1460
+ input: {
1461
+ workspaceId: string;
1462
+ prompt: string;
1463
+ numQuestions?: number | undefined;
1464
+ difficulty?: "easy" | "medium" | "hard" | undefined;
1465
+ mode?: "practice" | "quiz" | undefined;
1466
+ presetId?: string | undefined;
1467
+ configOverride?: {
1468
+ mode?: "practice" | "quiz" | undefined;
1469
+ numQuestions?: number | undefined;
1470
+ difficulty?: "easy" | "medium" | "hard" | undefined;
1471
+ questionTypes?: ("MULTIPLE_CHOICE" | "TEXT" | "NUMERIC" | "TRUE_FALSE" | "MATCHING" | "FILL_IN_THE_BLANK")[] | undefined;
1472
+ mcqRatio?: number | undefined;
1473
+ } | undefined;
1474
+ title?: string | undefined;
1475
+ estimatedTime?: string | undefined;
1476
+ };
1477
+ output: {
1478
+ artifact: {
1479
+ id: string;
1480
+ createdAt: Date;
1481
+ updatedAt: Date;
1482
+ workspaceId: string;
1483
+ type: import("@prisma/client").$Enums.ArtifactType;
1484
+ title: string;
1485
+ isArchived: boolean;
1486
+ difficulty: import("@prisma/client").$Enums.Difficulty | null;
1487
+ estimatedTime: string | null;
1488
+ createdById: string | null;
1489
+ description: string | null;
1490
+ generating: boolean;
1491
+ generatingMetadata: import("@prisma/client/runtime/library").JsonValue | null;
1492
+ worksheetConfig: import("@prisma/client/runtime/library").JsonValue | null;
1493
+ imageObjectKey: string | null;
1494
+ };
1495
+ };
1496
+ meta: object;
1497
+ }>;
1498
+ checkAnswer: import("@trpc/server").TRPCMutationProcedure<{
1499
+ input: {
1500
+ worksheetId: string;
1501
+ questionId: string;
1502
+ answer: string;
1503
+ };
1504
+ output: {
1505
+ isCorrect: boolean;
1506
+ userMarkScheme: import("../types/index.js").UserMarkScheme | null;
1507
+ progress: {
1508
+ meta: import("@prisma/client/runtime/library").JsonValue | null;
1509
+ id: string;
1510
+ createdAt: Date;
1511
+ updatedAt: Date;
1512
+ userId: string;
1513
+ worksheetQuestionId: string;
1514
+ userAnswer: string | null;
1515
+ completedAt: Date | null;
1516
+ attempts: number;
1517
+ timeSpentSec: number | null;
1518
+ correct: boolean | null;
1519
+ modified: boolean;
1520
+ };
1521
+ };
1522
+ meta: object;
1523
+ }>;
1524
+ }>>;
1525
+ studyguide: import("@trpc/server").TRPCBuiltRouter<{
1526
+ ctx: import("../context.js").Context;
1527
+ meta: object;
1528
+ errorShape: {
1529
+ data: {
1530
+ zodError: string | null;
1531
+ code: import("@trpc/server").TRPC_ERROR_CODE_KEY;
1532
+ httpStatus: number;
1533
+ path?: string;
1534
+ stack?: string;
1535
+ };
1536
+ message: string;
1537
+ code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
1538
+ };
1539
+ transformer: true;
1540
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
1541
+ get: import("@trpc/server").TRPCQueryProcedure<{
1542
+ input: {
1543
+ workspaceId: string;
1544
+ };
1545
+ output: {
1546
+ artifactId: string;
1547
+ title: string;
1548
+ latestVersion: {
1549
+ id: string;
1550
+ createdAt: Date;
1551
+ createdById: string | null;
1552
+ artifactId: string;
1553
+ content: string;
1554
+ data: import("@prisma/client/runtime/library").JsonValue | null;
1555
+ version: number;
1556
+ };
1557
+ };
1558
+ meta: object;
1559
+ }>;
1560
+ }>>;
1561
+ podcast: import("@trpc/server").TRPCBuiltRouter<{
1562
+ ctx: import("../context.js").Context;
1563
+ meta: object;
1564
+ errorShape: {
1565
+ data: {
1566
+ zodError: string | null;
1567
+ code: import("@trpc/server").TRPC_ERROR_CODE_KEY;
1568
+ httpStatus: number;
1569
+ path?: string;
1570
+ stack?: string;
1571
+ };
1572
+ message: string;
1573
+ code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
1574
+ };
1575
+ transformer: true;
1576
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
1577
+ listEpisodes: import("@trpc/server").TRPCQueryProcedure<{
1578
+ input: {
1579
+ workspaceId: string;
1580
+ };
1581
+ output: {
1582
+ id: string;
1583
+ title: string;
1584
+ description: string | null;
1585
+ metadata: {
1586
+ title: string;
1587
+ totalDuration: number;
1588
+ speakers: {
1589
+ id: string;
1590
+ role: "host" | "guest" | "expert";
1591
+ name?: string | undefined;
1592
+ }[];
1593
+ summary: {
1594
+ executiveSummary: string;
1595
+ learningObjectives: string[];
1596
+ keyConcepts: string[];
1597
+ followUpActions: string[];
1598
+ targetAudience: string;
1599
+ prerequisites: string[];
1600
+ tags: string[];
1601
+ };
1602
+ generatedAt: string;
1603
+ description?: string | undefined;
1604
+ } | null;
1605
+ imageUrl: string | null;
1606
+ segments: ({
1607
+ id: string;
1608
+ title: string;
1609
+ audioUrl: string;
1610
+ objectKey: string;
1611
+ startTime: number;
1612
+ duration: number;
1613
+ order: number;
1614
+ } | {
1615
+ id: string;
1616
+ title: string;
1617
+ audioUrl: null;
1618
+ objectKey: string | null;
1619
+ startTime: number;
1620
+ duration: number;
1621
+ order: number;
1622
+ })[];
1623
+ createdAt: Date;
1624
+ updatedAt: Date;
1625
+ workspaceId: string;
1626
+ generating: boolean;
1627
+ generatingMetadata: import("@prisma/client/runtime/library").JsonValue;
1628
+ type: import("@prisma/client").$Enums.ArtifactType;
1629
+ createdById: string | null;
1630
+ isArchived: boolean;
1631
+ }[];
1632
+ meta: object;
1633
+ }>;
1634
+ getEpisode: import("@trpc/server").TRPCQueryProcedure<{
1635
+ input: {
1636
+ episodeId: string;
1637
+ };
1638
+ output: {
1639
+ id: string;
1640
+ title: string;
1641
+ description: string | undefined;
1642
+ metadata: {
1643
+ title: string;
1644
+ totalDuration: number;
1645
+ speakers: {
1646
+ id: string;
1647
+ role: "host" | "guest" | "expert";
1648
+ name?: string | undefined;
1649
+ }[];
1650
+ summary: {
1651
+ executiveSummary: string;
1652
+ learningObjectives: string[];
1653
+ keyConcepts: string[];
1654
+ followUpActions: string[];
1655
+ targetAudience: string;
1656
+ prerequisites: string[];
1657
+ tags: string[];
1658
+ };
1659
+ generatedAt: string;
1660
+ description?: string | undefined;
1661
+ };
1662
+ imageUrl: string | null;
1663
+ segments: ({
1664
+ id: string;
1665
+ title: string;
1666
+ content: string;
1667
+ audioUrl: string;
1668
+ objectKey: string;
1669
+ startTime: number;
1670
+ duration: number;
1671
+ keyPoints: string[];
1672
+ order: number;
1673
+ } | {
1674
+ id: string;
1675
+ title: string;
1676
+ content: string;
1677
+ audioUrl: null;
1678
+ objectKey: string | null;
1679
+ startTime: number;
1680
+ duration: number;
1681
+ keyPoints: string[];
1682
+ order: number;
1683
+ })[];
1684
+ content: string;
1685
+ createdAt: Date;
1686
+ updatedAt: Date;
1687
+ };
1688
+ meta: object;
1689
+ }>;
1690
+ generateEpisode: import("@trpc/server").TRPCMutationProcedure<{
1691
+ input: {
1692
+ workspaceId: string;
1693
+ podcastData: {
1694
+ title: string;
1695
+ userPrompt: string;
1696
+ description?: string | undefined;
1697
+ speakers?: {
1698
+ id: string;
1699
+ role: "host" | "guest" | "expert";
1700
+ name?: string | undefined;
1701
+ }[] | undefined;
1702
+ speed?: number | undefined;
1703
+ generateIntro?: boolean | undefined;
1704
+ generateOutro?: boolean | undefined;
1705
+ segmentByTopics?: boolean | undefined;
1706
+ };
1707
+ };
1708
+ output: {
1709
+ id: string;
1710
+ title: any;
1711
+ description: string | undefined;
1712
+ metadata: {
1713
+ title: any;
1714
+ description: string | undefined;
1715
+ totalDuration: number;
1716
+ summary: any;
1717
+ speakers: {
1718
+ id: string;
1719
+ role: "host" | "guest" | "expert";
1720
+ name?: string | undefined;
1721
+ }[];
1722
+ generatedAt: string;
1723
+ };
1724
+ content: string;
1725
+ };
1726
+ meta: object;
1727
+ }>;
1728
+ deleteSegment: import("@trpc/server").TRPCMutationProcedure<{
1729
+ input: {
1730
+ segmentId: string;
1731
+ };
1732
+ output: {
1733
+ meta: import("@prisma/client/runtime/library").JsonValue | null;
1734
+ id: string;
1735
+ createdAt: Date;
1736
+ updatedAt: Date;
1737
+ title: string;
1738
+ generating: boolean;
1739
+ generatingMetadata: import("@prisma/client/runtime/library").JsonValue | null;
1740
+ artifactId: string;
1741
+ content: string;
1742
+ objectKey: string | null;
1743
+ duration: number;
1744
+ order: number;
1745
+ startTime: number;
1746
+ keyPoints: string[];
1747
+ audioUrl: string | null;
1748
+ };
1749
+ meta: object;
1750
+ }>;
1751
+ getEpisodeSchema: import("@trpc/server").TRPCQueryProcedure<{
1752
+ input: {
1753
+ episodeId: string;
1754
+ };
1755
+ output: {
1756
+ segments: {
1757
+ id: string;
1758
+ title: string;
1759
+ startTime: number;
1760
+ duration: number;
1761
+ keyPoints: string[];
1762
+ order: number;
1763
+ }[];
1764
+ summary: {
1765
+ executiveSummary: string;
1766
+ learningObjectives: string[];
1767
+ keyConcepts: string[];
1768
+ followUpActions: string[];
1769
+ targetAudience: string;
1770
+ prerequisites: string[];
1771
+ tags: string[];
1772
+ };
1773
+ metadata: {
1774
+ title: string;
1775
+ description: string | undefined;
1776
+ totalDuration: number;
1777
+ speakers: {
1778
+ id: string;
1779
+ role: "host" | "guest" | "expert";
1780
+ name?: string | undefined;
1781
+ }[];
1782
+ };
1783
+ };
1784
+ meta: object;
1785
+ }>;
1786
+ updateEpisode: import("@trpc/server").TRPCMutationProcedure<{
1787
+ input: {
1788
+ episodeId: string;
1789
+ title?: string | undefined;
1790
+ description?: string | undefined;
1791
+ };
1792
+ output: {
1793
+ id: string;
1794
+ createdAt: Date;
1795
+ updatedAt: Date;
1796
+ workspaceId: string;
1797
+ type: import("@prisma/client").$Enums.ArtifactType;
1798
+ title: string;
1799
+ isArchived: boolean;
1800
+ difficulty: import("@prisma/client").$Enums.Difficulty | null;
1801
+ estimatedTime: string | null;
1802
+ createdById: string | null;
1803
+ description: string | null;
1804
+ generating: boolean;
1805
+ generatingMetadata: import("@prisma/client/runtime/library").JsonValue | null;
1806
+ worksheetConfig: import("@prisma/client/runtime/library").JsonValue | null;
1807
+ imageObjectKey: string | null;
1808
+ };
1809
+ meta: object;
1810
+ }>;
1811
+ deleteEpisode: import("@trpc/server").TRPCMutationProcedure<{
1812
+ input: {
1813
+ episodeId: string;
1814
+ };
1815
+ output: boolean;
1816
+ meta: object;
1817
+ }>;
1818
+ getSegment: import("@trpc/server").TRPCQueryProcedure<{
1819
+ input: {
1820
+ segmentId: string;
1821
+ };
1822
+ output: {
1823
+ id: string;
1824
+ title: string;
1825
+ content: string;
1826
+ startTime: number;
1827
+ duration: number;
1828
+ order: number;
1829
+ keyPoints: string[];
1830
+ audioUrl: string | null;
1831
+ objectKey: string | null;
1832
+ meta: import("@prisma/client/runtime/library").JsonValue;
1833
+ createdAt: Date;
1834
+ updatedAt: Date;
1835
+ };
1836
+ meta: object;
1837
+ }>;
1838
+ getAvailableVoices: import("@trpc/server").TRPCQueryProcedure<{
1839
+ input: void;
1840
+ output: {
1841
+ id: string;
1842
+ name: string;
1843
+ description: string;
1844
+ }[];
1845
+ meta: object;
1846
+ }>;
1847
+ }>>;
1848
+ chat: import("@trpc/server").TRPCBuiltRouter<{
1849
+ ctx: import("../context.js").Context;
1850
+ meta: object;
1851
+ errorShape: {
1852
+ data: {
1853
+ zodError: string | null;
1854
+ code: import("@trpc/server").TRPC_ERROR_CODE_KEY;
1855
+ httpStatus: number;
1856
+ path?: string;
1857
+ stack?: string;
1858
+ };
1859
+ message: string;
1860
+ code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
1861
+ };
1862
+ transformer: true;
1863
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
1864
+ getChannels: import("@trpc/server").TRPCQueryProcedure<{
1865
+ input: {
1866
+ workspaceId: string;
1867
+ };
1868
+ output: {
1869
+ name: string;
1870
+ id: string;
1871
+ createdAt: Date;
1872
+ workspaceId: string;
1873
+ }[];
1874
+ meta: object;
1875
+ }>;
1876
+ getChannel: import("@trpc/server").TRPCQueryProcedure<{
1877
+ input: {
1878
+ workspaceId?: string | undefined;
1879
+ channelId?: string | undefined;
1880
+ };
1881
+ output: {
1882
+ chats: ({
1883
+ user: {
1884
+ name: string | null;
1885
+ id: string;
1886
+ } | null;
1887
+ } & {
1888
+ id: string;
1889
+ createdAt: Date;
1890
+ updatedAt: Date;
1891
+ channelId: string;
1892
+ userId: string | null;
1893
+ message: string;
1894
+ })[];
1895
+ } & {
1896
+ name: string;
1897
+ id: string;
1898
+ createdAt: Date;
1899
+ workspaceId: string;
1900
+ };
1901
+ meta: object;
1902
+ }>;
1903
+ removeChannel: import("@trpc/server").TRPCMutationProcedure<{
1904
+ input: {
1905
+ workspaceId: string;
1906
+ channelId: string;
1907
+ };
1908
+ output: {
1909
+ success: boolean;
1910
+ };
1911
+ meta: object;
1912
+ }>;
1913
+ editChannel: import("@trpc/server").TRPCMutationProcedure<{
1914
+ input: {
1915
+ workspaceId: string;
1916
+ channelId: string;
1917
+ name: string;
1918
+ };
1919
+ output: {
1920
+ chats: ({
1921
+ user: {
1922
+ name: string | null;
1923
+ id: string;
1924
+ } | null;
1925
+ } & {
1926
+ id: string;
1927
+ createdAt: Date;
1928
+ updatedAt: Date;
1929
+ channelId: string;
1930
+ userId: string | null;
1931
+ message: string;
1932
+ })[];
1933
+ } & {
1934
+ name: string;
1935
+ id: string;
1936
+ createdAt: Date;
1937
+ workspaceId: string;
1938
+ };
1939
+ meta: object;
1940
+ }>;
1941
+ createChannel: import("@trpc/server").TRPCMutationProcedure<{
1942
+ input: {
1943
+ workspaceId: string;
1944
+ name: string;
1945
+ };
1946
+ output: {
1947
+ chats: ({
1948
+ user: {
1949
+ name: string | null;
1950
+ id: string;
1951
+ } | null;
1952
+ } & {
1953
+ id: string;
1954
+ createdAt: Date;
1955
+ updatedAt: Date;
1956
+ channelId: string;
1957
+ userId: string | null;
1958
+ message: string;
1959
+ })[];
1960
+ } & {
1961
+ name: string;
1962
+ id: string;
1963
+ createdAt: Date;
1964
+ workspaceId: string;
1965
+ };
1966
+ meta: object;
1967
+ }>;
1968
+ postMessage: import("@trpc/server").TRPCMutationProcedure<{
1969
+ input: {
1970
+ channelId: string;
1971
+ message: string;
1972
+ };
1973
+ output: {
1974
+ user: {
1975
+ name: string | null;
1976
+ id: string;
1977
+ } | null;
1978
+ } & {
1979
+ id: string;
1980
+ createdAt: Date;
1981
+ updatedAt: Date;
1982
+ channelId: string;
1983
+ userId: string | null;
1984
+ message: string;
1985
+ };
1986
+ meta: object;
1987
+ }>;
1988
+ editMessage: import("@trpc/server").TRPCMutationProcedure<{
1989
+ input: {
1990
+ chatId: string;
1991
+ message: string;
1992
+ };
1993
+ output: {
1994
+ user: {
1995
+ name: string | null;
1996
+ id: string;
1997
+ } | null;
1998
+ } & {
1999
+ id: string;
2000
+ createdAt: Date;
2001
+ updatedAt: Date;
2002
+ channelId: string;
2003
+ userId: string | null;
2004
+ message: string;
2005
+ };
2006
+ meta: object;
2007
+ }>;
2008
+ deleteMessage: import("@trpc/server").TRPCMutationProcedure<{
2009
+ input: {
2010
+ chatId: string;
2011
+ };
2012
+ output: {
2013
+ success: boolean;
2014
+ };
2015
+ meta: object;
2016
+ }>;
2017
+ }>>;
2018
+ annotations: import("@trpc/server").TRPCBuiltRouter<{
2019
+ ctx: import("../context.js").Context;
2020
+ meta: object;
2021
+ errorShape: {
2022
+ data: {
2023
+ zodError: string | null;
2024
+ code: import("@trpc/server").TRPC_ERROR_CODE_KEY;
2025
+ httpStatus: number;
2026
+ path?: string;
2027
+ stack?: string;
2028
+ };
2029
+ message: string;
2030
+ code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
2031
+ };
2032
+ transformer: true;
2033
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
2034
+ listHighlights: import("@trpc/server").TRPCQueryProcedure<{
2035
+ input: {
2036
+ artifactVersionId: string;
2037
+ };
2038
+ output: ({
2039
+ user: {
2040
+ name: string | null;
2041
+ id: string;
2042
+ profilePicture: {
2043
+ meta: import("@prisma/client/runtime/library").JsonValue | null;
2044
+ name: string;
2045
+ id: string;
2046
+ createdAt: Date;
2047
+ workspaceId: string | null;
2048
+ userId: string | null;
2049
+ mimeType: string;
2050
+ size: number;
2051
+ bucket: string | null;
2052
+ objectKey: string | null;
2053
+ url: string | null;
2054
+ checksum: string | null;
2055
+ aiTranscription: import("@prisma/client/runtime/library").JsonValue | null;
2056
+ } | null;
2057
+ };
2058
+ comments: ({
2059
+ user: {
2060
+ name: string | null;
2061
+ id: string;
2062
+ profilePicture: {
2063
+ meta: import("@prisma/client/runtime/library").JsonValue | null;
2064
+ name: string;
2065
+ id: string;
2066
+ createdAt: Date;
2067
+ workspaceId: string | null;
2068
+ userId: string | null;
2069
+ mimeType: string;
2070
+ size: number;
2071
+ bucket: string | null;
2072
+ objectKey: string | null;
2073
+ url: string | null;
2074
+ checksum: string | null;
2075
+ aiTranscription: import("@prisma/client/runtime/library").JsonValue | null;
2076
+ } | null;
2077
+ };
2078
+ } & {
2079
+ id: string;
2080
+ createdAt: Date;
2081
+ updatedAt: Date;
2082
+ content: string;
2083
+ userId: string;
2084
+ highlightId: string;
2085
+ })[];
2086
+ } & {
2087
+ id: string;
2088
+ createdAt: Date;
2089
+ updatedAt: Date;
2090
+ userId: string;
2091
+ color: string;
2092
+ artifactVersionId: string;
2093
+ startOffset: number;
2094
+ endOffset: number;
2095
+ selectedText: string;
2096
+ })[];
2097
+ meta: object;
2098
+ }>;
2099
+ createHighlight: import("@trpc/server").TRPCMutationProcedure<{
2100
+ input: {
2101
+ artifactVersionId: string;
2102
+ startOffset: number;
2103
+ endOffset: number;
2104
+ selectedText: string;
2105
+ color?: string | undefined;
2106
+ };
2107
+ output: {
2108
+ user: {
2109
+ name: string | null;
2110
+ id: string;
2111
+ profilePicture: {
2112
+ meta: import("@prisma/client/runtime/library").JsonValue | null;
2113
+ name: string;
2114
+ id: string;
2115
+ createdAt: Date;
2116
+ workspaceId: string | null;
2117
+ userId: string | null;
2118
+ mimeType: string;
2119
+ size: number;
2120
+ bucket: string | null;
2121
+ objectKey: string | null;
2122
+ url: string | null;
2123
+ checksum: string | null;
2124
+ aiTranscription: import("@prisma/client/runtime/library").JsonValue | null;
2125
+ } | null;
2126
+ };
2127
+ comments: {
2128
+ id: string;
2129
+ createdAt: Date;
2130
+ updatedAt: Date;
2131
+ content: string;
2132
+ userId: string;
2133
+ highlightId: string;
2134
+ }[];
2135
+ } & {
2136
+ id: string;
2137
+ createdAt: Date;
2138
+ updatedAt: Date;
2139
+ userId: string;
2140
+ color: string;
2141
+ artifactVersionId: string;
2142
+ startOffset: number;
2143
+ endOffset: number;
2144
+ selectedText: string;
2145
+ };
2146
+ meta: object;
2147
+ }>;
2148
+ deleteHighlight: import("@trpc/server").TRPCMutationProcedure<{
2149
+ input: {
2150
+ highlightId: string;
2151
+ };
2152
+ output: {
2153
+ success: boolean;
2154
+ };
2155
+ meta: object;
2156
+ }>;
2157
+ addComment: import("@trpc/server").TRPCMutationProcedure<{
2158
+ input: {
2159
+ highlightId: string;
2160
+ content: string;
2161
+ };
2162
+ output: {
2163
+ user: {
2164
+ name: string | null;
2165
+ id: string;
2166
+ profilePicture: {
2167
+ meta: import("@prisma/client/runtime/library").JsonValue | null;
2168
+ name: string;
2169
+ id: string;
2170
+ createdAt: Date;
2171
+ workspaceId: string | null;
2172
+ userId: string | null;
2173
+ mimeType: string;
2174
+ size: number;
2175
+ bucket: string | null;
2176
+ objectKey: string | null;
2177
+ url: string | null;
2178
+ checksum: string | null;
2179
+ aiTranscription: import("@prisma/client/runtime/library").JsonValue | null;
2180
+ } | null;
2181
+ };
2182
+ } & {
2183
+ id: string;
2184
+ createdAt: Date;
2185
+ updatedAt: Date;
2186
+ content: string;
2187
+ userId: string;
2188
+ highlightId: string;
2189
+ };
2190
+ meta: object;
2191
+ }>;
2192
+ updateComment: import("@trpc/server").TRPCMutationProcedure<{
2193
+ input: {
2194
+ commentId: string;
2195
+ content: string;
2196
+ };
2197
+ output: {
2198
+ user: {
2199
+ name: string | null;
2200
+ id: string;
2201
+ profilePicture: {
2202
+ meta: import("@prisma/client/runtime/library").JsonValue | null;
2203
+ name: string;
2204
+ id: string;
2205
+ createdAt: Date;
2206
+ workspaceId: string | null;
2207
+ userId: string | null;
2208
+ mimeType: string;
2209
+ size: number;
2210
+ bucket: string | null;
2211
+ objectKey: string | null;
2212
+ url: string | null;
2213
+ checksum: string | null;
2214
+ aiTranscription: import("@prisma/client/runtime/library").JsonValue | null;
2215
+ } | null;
2216
+ };
2217
+ } & {
2218
+ id: string;
2219
+ createdAt: Date;
2220
+ updatedAt: Date;
2221
+ content: string;
2222
+ userId: string;
2223
+ highlightId: string;
2224
+ };
2225
+ meta: object;
2226
+ }>;
2227
+ deleteComment: import("@trpc/server").TRPCMutationProcedure<{
2228
+ input: {
2229
+ commentId: string;
2230
+ };
2231
+ output: {
2232
+ success: boolean;
2233
+ };
2234
+ meta: object;
2235
+ }>;
2236
+ }>>;
2237
+ admin: import("@trpc/server").TRPCBuiltRouter<{
2238
+ ctx: import("../context.js").Context;
2239
+ meta: object;
2240
+ errorShape: {
2241
+ data: {
2242
+ zodError: string | null;
2243
+ code: import("@trpc/server").TRPC_ERROR_CODE_KEY;
2244
+ httpStatus: number;
2245
+ path?: string;
2246
+ stack?: string;
2247
+ };
2248
+ message: string;
2249
+ code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
2250
+ };
2251
+ transformer: true;
2252
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
2253
+ getSystemStats: import("@trpc/server").TRPCQueryProcedure<{
2254
+ input: void;
2255
+ output: {
2256
+ totalUsers: number;
2257
+ totalWorkspaces: number;
2258
+ totalSubscriptions: number;
2259
+ revenue: number;
2260
+ subscriptionRevenue: number;
2261
+ topupRevenue: number;
2262
+ };
2263
+ meta: object;
2264
+ }>;
2265
+ listUsers: import("@trpc/server").TRPCQueryProcedure<{
2266
+ input: {
2267
+ page?: number | undefined;
2268
+ pageSize?: number | undefined;
2269
+ search?: string | undefined;
2270
+ emailVerified?: "all" | "yes" | "no" | undefined;
2271
+ joinedFrom?: unknown;
2272
+ joinedTo?: unknown;
2273
+ };
2274
+ output: {
2275
+ users: any[];
2276
+ page: number;
2277
+ pageSize: number;
2278
+ totalCount: number;
2279
+ totalPages: number;
2280
+ };
2281
+ meta: object;
2282
+ }>;
2283
+ listInvoices: import("@trpc/server").TRPCQueryProcedure<{
2284
+ input: {
2285
+ page?: number | undefined;
2286
+ pageSize?: number | undefined;
2287
+ search?: string | undefined;
2288
+ status?: string | undefined;
2289
+ type?: "SUBSCRIPTION" | "TOPUP" | undefined;
2290
+ userId?: string | undefined;
2291
+ from?: unknown;
2292
+ to?: unknown;
2293
+ };
2294
+ output: {
2295
+ items: any;
2296
+ page: number;
2297
+ pageSize: number;
2298
+ totalCount: any;
2299
+ totalPages: number;
2300
+ };
2301
+ meta: object;
2302
+ }>;
2303
+ listWorkspaces: import("@trpc/server").TRPCQueryProcedure<{
2304
+ input: {
2305
+ limit?: number | undefined;
2306
+ cursor?: string | null | undefined;
2307
+ };
2308
+ output: {
2309
+ workspaces: ({
2310
+ owner: {
2311
+ name: string | null;
2312
+ email: string | null;
2313
+ };
2314
+ } & {
2315
+ id: string;
2316
+ createdAt: Date;
2317
+ updatedAt: Date;
2318
+ title: string;
2319
+ description: string | null;
2320
+ ownerId: string;
2321
+ color: string;
2322
+ markerColor: string | null;
2323
+ icon: string;
2324
+ folderId: string | null;
2325
+ fileBeingAnalyzed: boolean;
2326
+ analysisProgress: import("@prisma/client/runtime/library").JsonValue | null;
2327
+ needsAnalysis: boolean;
2328
+ })[];
2329
+ nextCursor: string | undefined;
2330
+ };
2331
+ meta: object;
2332
+ }>;
2333
+ updateUserRole: import("@trpc/server").TRPCMutationProcedure<{
2334
+ input: {
2335
+ userId: string;
2336
+ roleName: string;
2337
+ };
2338
+ output: {
2339
+ name: string | null;
2340
+ id: string;
2341
+ email: string | null;
2342
+ emailVerified: Date | null;
2343
+ passwordHash: string | null;
2344
+ createdAt: Date;
2345
+ updatedAt: Date;
2346
+ fileAssetId: string | null;
2347
+ roleId: string | null;
2348
+ deletedAt: Date | null;
2349
+ stripe_customer_id: string | null;
2350
+ };
2351
+ meta: object;
2352
+ }>;
2353
+ listPlans: import("@trpc/server").TRPCQueryProcedure<{
2354
+ input: void;
2355
+ output: ({
2356
+ limit: {
2357
+ id: string;
2358
+ createdAt: Date;
2359
+ updatedAt: Date;
2360
+ planId: string;
2361
+ maxStorageBytes: bigint;
2362
+ maxWorksheets: number;
2363
+ maxFlashcards: number;
2364
+ maxPodcasts: number;
2365
+ maxStudyGuides: number;
2366
+ } | null;
2367
+ } & {
2368
+ name: string;
2369
+ id: string;
2370
+ createdAt: Date;
2371
+ type: string;
2372
+ description: string | null;
2373
+ interval: string | null;
2374
+ active: boolean;
2375
+ price: number;
2376
+ stripePriceId: string;
2377
+ })[];
2378
+ meta: object;
2379
+ }>;
2380
+ upsertPlan: import("@trpc/server").TRPCMutationProcedure<{
2381
+ input: {
2382
+ name: string;
2383
+ type: string;
2384
+ price: number;
2385
+ interval: string | null;
2386
+ limits: {
2387
+ maxStorageBytes: number;
2388
+ maxWorksheets: number;
2389
+ maxFlashcards: number;
2390
+ maxPodcasts?: number | undefined;
2391
+ maxStudyGuides?: number | undefined;
2392
+ };
2393
+ id?: string | undefined;
2394
+ description?: string | undefined;
2395
+ stripePriceId?: string | undefined;
2396
+ active?: boolean | undefined;
2397
+ };
2398
+ output: {
2399
+ name: string;
2400
+ id: string;
2401
+ createdAt: Date;
2402
+ type: string;
2403
+ description: string | null;
2404
+ interval: string | null;
2405
+ active: boolean;
2406
+ price: number;
2407
+ stripePriceId: string;
2408
+ };
2409
+ meta: object;
2410
+ }>;
2411
+ deletePlan: import("@trpc/server").TRPCMutationProcedure<{
2412
+ input: {
2413
+ id: string;
2414
+ };
2415
+ output: {
2416
+ success: boolean;
2417
+ message: string;
2418
+ };
2419
+ meta: object;
2420
+ }>;
2421
+ getUserInvoices: import("@trpc/server").TRPCQueryProcedure<{
2422
+ input: {
2423
+ userId: string;
2424
+ limit?: number | undefined;
2425
+ };
2426
+ output: any;
2427
+ meta: object;
2428
+ }>;
2429
+ getUserDetailedInfo: import("@trpc/server").TRPCQueryProcedure<{
2430
+ input: {
2431
+ userId: string;
2432
+ };
2433
+ output: {
2434
+ totalSpent: number;
2435
+ purchasedCredits: {
2436
+ type: import("@prisma/client").$Enums.ArtifactType;
2437
+ amount: number;
2438
+ }[];
2439
+ profilePicture: string | null;
2440
+ role: {
2441
+ name: string;
2442
+ id: string;
2443
+ } | null;
2444
+ _count: {
2445
+ artifacts: number;
2446
+ workspaces: number;
2447
+ };
2448
+ subscriptions: ({
2449
+ plan: {
2450
+ name: string;
2451
+ id: string;
2452
+ createdAt: Date;
2453
+ type: string;
2454
+ description: string | null;
2455
+ interval: string | null;
2456
+ active: boolean;
2457
+ price: number;
2458
+ stripePriceId: string;
2459
+ };
2460
+ } & {
2461
+ id: string;
2462
+ createdAt: Date;
2463
+ userId: string;
2464
+ planId: string;
2465
+ stripeSubscriptionId: string;
2466
+ stripeCustomerId: string | null;
2467
+ status: string;
2468
+ currentPeriodStart: Date;
2469
+ currentPeriodEnd: Date;
2470
+ cancelAt: Date | null;
2471
+ canceledAt: Date | null;
2472
+ })[];
2473
+ name: string | null;
2474
+ id: string;
2475
+ email: string | null;
2476
+ emailVerified: Date | null;
2477
+ passwordHash: string | null;
2478
+ createdAt: Date;
2479
+ updatedAt: Date;
2480
+ fileAssetId: string | null;
2481
+ roleId: string | null;
2482
+ deletedAt: Date | null;
2483
+ stripe_customer_id: string | null;
2484
+ };
2485
+ meta: object;
2486
+ }>;
2487
+ debugInvoices: import("@trpc/server").TRPCQueryProcedure<{
2488
+ input: void;
2489
+ output: {
2490
+ count: any;
2491
+ all: any;
2492
+ };
2493
+ meta: object;
2494
+ }>;
2495
+ listResourcePrices: import("@trpc/server").TRPCQueryProcedure<{
2496
+ input: void;
2497
+ output: {
2498
+ id: string;
2499
+ updatedAt: Date;
2500
+ resourceType: import("@prisma/client").$Enums.ArtifactType;
2501
+ priceCents: number;
2502
+ }[];
2503
+ meta: object;
2504
+ }>;
2505
+ upsertResourcePrice: import("@trpc/server").TRPCMutationProcedure<{
2506
+ input: {
2507
+ resourceType: "STUDY_GUIDE" | "FLASHCARD_SET" | "WORKSHEET" | "MEETING_SUMMARY" | "PODCAST_EPISODE" | "STORAGE";
2508
+ priceCents: number;
2509
+ };
2510
+ output: {
2511
+ id: string;
2512
+ updatedAt: Date;
2513
+ resourceType: import("@prisma/client").$Enums.ArtifactType;
2514
+ priceCents: number;
2515
+ };
2516
+ meta: object;
2517
+ }>;
2518
+ listRecentInvoices: import("@trpc/server").TRPCQueryProcedure<{
2519
+ input: {
2520
+ limit?: number | undefined;
2521
+ };
2522
+ output: any;
2523
+ meta: object;
2524
+ }>;
2525
+ activityList: import("@trpc/server").TRPCQueryProcedure<{
2526
+ input: {
2527
+ from?: unknown;
2528
+ to?: unknown;
2529
+ actorUserId?: string | undefined;
2530
+ workspaceId?: string | undefined;
2531
+ category?: "AUTH" | "WORKSPACE" | "BILLING" | "ADMIN" | "CONTENT" | "SYSTEM" | undefined;
2532
+ status?: "SUCCESS" | "FAILURE" | undefined;
2533
+ search?: string | undefined;
2534
+ page?: number | undefined;
2535
+ limit?: number | undefined;
2536
+ };
2537
+ output: {
2538
+ items: {
2539
+ id: string;
2540
+ createdAt: Date;
2541
+ action: string;
2542
+ description: string;
2543
+ category: import("@prisma/client").$Enums.ActivityLogCategory;
2544
+ trpcPath: string | null;
2545
+ status: import("@prisma/client").$Enums.ActivityLogStatus;
2546
+ durationMs: number;
2547
+ errorCode: string | null;
2548
+ ipAddress: string | null;
2549
+ actor: {
2550
+ name: string | null;
2551
+ id: string;
2552
+ email: string | null;
2553
+ } | null;
2554
+ workspace: {
2555
+ id: string;
2556
+ title: string;
2557
+ } | null;
2558
+ metadata: import("@prisma/client/runtime/library").JsonValue;
2559
+ }[];
2560
+ page: number;
2561
+ pageSize: number;
2562
+ totalCount: number;
2563
+ totalPages: number;
2564
+ };
2565
+ meta: object;
2566
+ }>;
2567
+ activityExportCsv: import("@trpc/server").TRPCQueryProcedure<{
2568
+ input: {
2569
+ from?: unknown;
2570
+ to?: unknown;
2571
+ actorUserId?: string | undefined;
2572
+ workspaceId?: string | undefined;
2573
+ category?: "AUTH" | "WORKSPACE" | "BILLING" | "ADMIN" | "CONTENT" | "SYSTEM" | undefined;
2574
+ status?: "SUCCESS" | "FAILURE" | undefined;
2575
+ search?: string | undefined;
2576
+ maxRows?: number | undefined;
2577
+ };
2578
+ output: {
2579
+ csv: string;
2580
+ count: number;
2581
+ };
2582
+ meta: object;
2583
+ }>;
2584
+ activityPurgeRetention: import("@trpc/server").TRPCMutationProcedure<{
2585
+ input: void;
2586
+ output: {
2587
+ deleted: number;
2588
+ retentionDays: number;
2589
+ cutoff: Date;
2590
+ };
2591
+ meta: object;
2592
+ }>;
2593
+ }>>;
2594
+ payment: import("@trpc/server").TRPCBuiltRouter<{
2595
+ ctx: import("../context.js").Context;
2596
+ meta: object;
2597
+ errorShape: {
2598
+ data: {
2599
+ zodError: string | null;
2600
+ code: import("@trpc/server").TRPC_ERROR_CODE_KEY;
2601
+ httpStatus: number;
2602
+ path?: string;
2603
+ stack?: string;
2604
+ };
2605
+ message: string;
2606
+ code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
2607
+ };
2608
+ transformer: true;
2609
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
2610
+ getPlans: import("@trpc/server").TRPCQueryProcedure<{
2611
+ input: void;
2612
+ output: any[];
2613
+ meta: object;
2614
+ }>;
2615
+ createCheckoutSession: import("@trpc/server").TRPCMutationProcedure<{
2616
+ input: {
2617
+ planId: string;
2618
+ };
2619
+ output: {
2620
+ url: string | null;
2621
+ };
2622
+ meta: object;
2623
+ }>;
2624
+ confirmCheckoutSuccess: import("@trpc/server").TRPCMutationProcedure<{
2625
+ input: {
2626
+ sessionId: string;
2627
+ };
2628
+ output: {
2629
+ confirmed: boolean;
2630
+ reason: string;
2631
+ kind?: undefined;
2632
+ } | {
2633
+ confirmed: boolean;
2634
+ kind: "payment";
2635
+ reason?: undefined;
2636
+ } | {
2637
+ confirmed: boolean;
2638
+ kind: "subscription";
2639
+ reason?: undefined;
2640
+ };
2641
+ meta: object;
2642
+ }>;
2643
+ createResourcePurchaseSession: import("@trpc/server").TRPCMutationProcedure<{
2644
+ input: {
2645
+ resourceType: "STUDY_GUIDE" | "FLASHCARD_SET" | "WORKSHEET" | "MEETING_SUMMARY" | "PODCAST_EPISODE" | "STORAGE";
2646
+ quantity?: number | undefined;
2647
+ };
2648
+ output: {
2649
+ url: string | null;
2650
+ };
2651
+ meta: object;
2652
+ }>;
2653
+ getUsageOverview: import("@trpc/server").TRPCQueryProcedure<{
2654
+ input: void;
2655
+ output: {
2656
+ usage: import("../lib/usage_service.js").UserUsage;
2657
+ limits: {
2658
+ id: string;
2659
+ planId: string;
2660
+ maxStorageBytes: bigint;
2661
+ maxWorksheets: number;
2662
+ maxFlashcards: number;
2663
+ maxPodcasts: number;
2664
+ maxStudyGuides: number;
2665
+ createdAt: Date;
2666
+ updatedAt: Date;
2667
+ isFallbackPlan: boolean;
2668
+ };
2669
+ hasActivePlan: boolean;
2670
+ };
2671
+ meta: object;
2672
+ }>;
2673
+ getResourcePrices: import("@trpc/server").TRPCQueryProcedure<{
2674
+ input: void;
2675
+ output: {
2676
+ id: string;
2677
+ updatedAt: Date;
2678
+ resourceType: import("@prisma/client").$Enums.ArtifactType;
2679
+ priceCents: number;
2680
+ }[];
2681
+ meta: object;
2682
+ }>;
2683
+ }>>;
2684
+ copilot: import("@trpc/server").TRPCBuiltRouter<{
2685
+ ctx: import("../context.js").Context;
2686
+ meta: object;
2687
+ errorShape: {
2688
+ data: {
2689
+ zodError: string | null;
2690
+ code: import("@trpc/server").TRPC_ERROR_CODE_KEY;
2691
+ httpStatus: number;
2692
+ path?: string;
2693
+ stack?: string;
2694
+ };
2695
+ message: string;
2696
+ code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
2697
+ };
2698
+ transformer: true;
2699
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
2700
+ listConversations: import("@trpc/server").TRPCQueryProcedure<{
2701
+ input: {
2702
+ workspaceId: string;
2703
+ };
2704
+ output: {
2705
+ id: string;
2706
+ title: string;
2707
+ updatedAt: Date;
2708
+ preview: string;
2709
+ }[];
2710
+ meta: object;
2711
+ }>;
2712
+ getConversation: import("@trpc/server").TRPCQueryProcedure<{
2713
+ input: {
2714
+ workspaceId: string;
2715
+ conversationId: string;
2716
+ };
2717
+ output: {
2718
+ id: string;
2719
+ title: string;
2720
+ messages: {
2721
+ id: string;
2722
+ role: string;
2723
+ content: string;
2724
+ createdAt: Date;
2725
+ }[];
2726
+ };
2727
+ meta: object;
2728
+ }>;
2729
+ createConversation: import("@trpc/server").TRPCMutationProcedure<{
2730
+ input: {
2731
+ workspaceId: string;
2732
+ title?: string | undefined;
2733
+ };
2734
+ output: {
2735
+ id: string;
2736
+ title: string;
2737
+ updatedAt: Date;
2738
+ };
2739
+ meta: object;
2740
+ }>;
2741
+ deleteConversation: import("@trpc/server").TRPCMutationProcedure<{
2742
+ input: {
2743
+ workspaceId: string;
2744
+ conversationId: string;
2745
+ };
2746
+ output: {
2747
+ success: boolean;
2748
+ };
2749
+ meta: object;
2750
+ }>;
2751
+ ask: import("@trpc/server").TRPCMutationProcedure<{
2752
+ input: {
2753
+ context: {
2754
+ workspaceId: string;
2755
+ artifactId: string;
2756
+ artifactType: "flashcards" | "worksheet" | "study-guide" | "notes";
2757
+ documentContent: string;
2758
+ selectedText?: string | undefined;
2759
+ viewportText?: string | undefined;
2760
+ cursorPosition?: {
2761
+ start: number;
2762
+ end: number;
2763
+ } | undefined;
2764
+ metadata?: {
2765
+ flashcardId?: string | undefined;
2766
+ questionId?: string | undefined;
2767
+ documentId?: string | undefined;
2768
+ } | undefined;
2769
+ };
2770
+ message: string;
2771
+ conversationId?: string | undefined;
2772
+ };
2773
+ output: {
2774
+ answer: string;
2775
+ highlights: {
2776
+ start: number;
2777
+ end: number;
2778
+ label?: string | undefined;
2779
+ }[];
2780
+ };
2781
+ meta: object;
2782
+ }>;
2783
+ explainSelection: import("@trpc/server").TRPCMutationProcedure<{
2784
+ input: {
2785
+ context: {
2786
+ workspaceId: string;
2787
+ artifactId: string;
2788
+ artifactType: "flashcards" | "worksheet" | "study-guide" | "notes";
2789
+ documentContent: string;
2790
+ selectedText?: string | undefined;
2791
+ viewportText?: string | undefined;
2792
+ cursorPosition?: {
2793
+ start: number;
2794
+ end: number;
2795
+ } | undefined;
2796
+ metadata?: {
2797
+ flashcardId?: string | undefined;
2798
+ questionId?: string | undefined;
2799
+ documentId?: string | undefined;
2800
+ } | undefined;
2801
+ };
2802
+ message?: string | undefined;
2803
+ conversationId?: string | undefined;
2804
+ };
2805
+ output: {
2806
+ answer: string;
2807
+ };
2808
+ meta: object;
2809
+ }>;
2810
+ suggestHighlights: import("@trpc/server").TRPCMutationProcedure<{
2811
+ input: {
2812
+ context: {
2813
+ workspaceId: string;
2814
+ artifactId: string;
2815
+ artifactType: "flashcards" | "worksheet" | "study-guide" | "notes";
2816
+ documentContent: string;
2817
+ selectedText?: string | undefined;
2818
+ viewportText?: string | undefined;
2819
+ cursorPosition?: {
2820
+ start: number;
2821
+ end: number;
2822
+ } | undefined;
2823
+ metadata?: {
2824
+ flashcardId?: string | undefined;
2825
+ questionId?: string | undefined;
2826
+ documentId?: string | undefined;
2827
+ } | undefined;
2828
+ };
2829
+ message?: string | undefined;
2830
+ conversationId?: string | undefined;
2831
+ };
2832
+ output: {
2833
+ answer: string;
2834
+ highlights: {
2835
+ start: number;
2836
+ end: number;
2837
+ label?: string | undefined;
2838
+ }[];
2839
+ };
2840
+ meta: object;
2841
+ }>;
2842
+ generateFlashcards: import("@trpc/server").TRPCMutationProcedure<{
2843
+ input: {
2844
+ context: {
2845
+ workspaceId: string;
2846
+ artifactId: string;
2847
+ artifactType: "flashcards" | "worksheet" | "study-guide" | "notes";
2848
+ documentContent: string;
2849
+ selectedText?: string | undefined;
2850
+ viewportText?: string | undefined;
2851
+ cursorPosition?: {
2852
+ start: number;
2853
+ end: number;
2854
+ } | undefined;
2855
+ metadata?: {
2856
+ flashcardId?: string | undefined;
2857
+ questionId?: string | undefined;
2858
+ documentId?: string | undefined;
2859
+ } | undefined;
2860
+ };
2861
+ message?: string | undefined;
2862
+ numCards?: number | undefined;
2863
+ conversationId?: string | undefined;
2864
+ };
2865
+ output: {
2866
+ answer: string;
2867
+ artifactId: string;
2868
+ flashcards: {
2869
+ id: string;
2870
+ createdAt: Date;
2871
+ artifactId: string;
2872
+ order: number;
2873
+ front: string;
2874
+ back: string;
2875
+ tags: string[];
2876
+ acceptedAnswers: string[];
2877
+ }[];
2878
+ };
2879
+ meta: object;
2880
+ }>;
2881
+ }>>;
2882
+ notifications: import("@trpc/server").TRPCBuiltRouter<{
2883
+ ctx: import("../context.js").Context;
2884
+ meta: object;
2885
+ errorShape: {
2886
+ data: {
2887
+ zodError: string | null;
2888
+ code: import("@trpc/server").TRPC_ERROR_CODE_KEY;
2889
+ httpStatus: number;
2890
+ path?: string;
2891
+ stack?: string;
2892
+ };
2893
+ message: string;
2894
+ code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
2895
+ };
2896
+ transformer: true;
2897
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
2898
+ list: import("@trpc/server").TRPCQueryProcedure<{
2899
+ input: {
2900
+ cursor?: string | undefined;
2901
+ limit?: number | undefined;
2902
+ unreadOnly?: boolean | undefined;
2903
+ types?: string[] | undefined;
2904
+ };
2905
+ output: {
2906
+ items: ({
2907
+ workspace: {
2908
+ id: string;
2909
+ title: string;
2910
+ } | null;
2911
+ actor: {
2912
+ name: string | null;
2913
+ id: string;
2914
+ email: string | null;
2915
+ } | null;
2916
+ } & {
2917
+ id: string;
2918
+ createdAt: Date;
2919
+ updatedAt: Date;
2920
+ workspaceId: string | null;
2921
+ type: string;
2922
+ title: string;
2923
+ content: string | null;
2924
+ userId: string;
2925
+ actorUserId: string | null;
2926
+ body: string;
2927
+ actionUrl: string | null;
2928
+ metadata: import("@prisma/client/runtime/library").JsonValue | null;
2929
+ priority: import("@prisma/client").$Enums.NotificationPriority;
2930
+ sourceId: string | null;
2931
+ read: boolean;
2932
+ readAt: Date | null;
2933
+ deliveredAt: Date | null;
2934
+ })[];
2935
+ nextCursor: string | undefined;
2936
+ };
2937
+ meta: object;
2938
+ }>;
2939
+ unreadCount: import("@trpc/server").TRPCQueryProcedure<{
2940
+ input: void;
2941
+ output: {
2942
+ count: number;
2943
+ };
2944
+ meta: object;
2945
+ }>;
2946
+ markRead: import("@trpc/server").TRPCMutationProcedure<{
2947
+ input: {
2948
+ id: string;
2949
+ };
2950
+ output: {
2951
+ success: boolean;
2952
+ };
2953
+ meta: object;
2954
+ }>;
2955
+ markManyRead: import("@trpc/server").TRPCMutationProcedure<{
2956
+ input: {
2957
+ ids: string[];
2958
+ };
2959
+ output: {
2960
+ success: boolean;
2961
+ };
2962
+ meta: object;
2963
+ }>;
2964
+ markAllRead: import("@trpc/server").TRPCMutationProcedure<{
2965
+ input: void;
2966
+ output: {
2967
+ success: boolean;
2968
+ };
2969
+ meta: object;
2970
+ }>;
2971
+ delete: import("@trpc/server").TRPCMutationProcedure<{
2972
+ input: {
2973
+ id: string;
2974
+ };
2975
+ output: {
2976
+ success: boolean;
2977
+ };
2978
+ meta: object;
2979
+ }>;
2980
+ }>>;
2981
+ member: import("@trpc/server").TRPCBuiltRouter<{
2982
+ ctx: import("../context.js").Context;
2983
+ meta: object;
2984
+ errorShape: {
2985
+ data: {
2986
+ zodError: string | null;
2987
+ code: import("@trpc/server").TRPC_ERROR_CODE_KEY;
2988
+ httpStatus: number;
2989
+ path?: string;
2990
+ stack?: string;
2991
+ };
2992
+ message: string;
2993
+ code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
2994
+ };
2995
+ transformer: true;
2996
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
2997
+ acceptInvite: import("@trpc/server").TRPCMutationProcedure<{
2998
+ input: {
2999
+ token: string;
3000
+ };
3001
+ output: {
3002
+ message?: string | undefined;
3003
+ workspaceId: string;
3004
+ workspaceTitle: string;
3005
+ role: string;
3006
+ ownerName: string | null;
3007
+ };
3008
+ meta: object;
3009
+ }>;
3010
+ }>>;
3011
+ }>>;