@headless-lms/server 0.1.0 → 0.3.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 (351) hide show
  1. package/README.md +1 -1
  2. package/dist/_virtual/_rolldown/runtime.js +5 -0
  3. package/dist/app/community-mail.d.ts +26 -0
  4. package/dist/app/community-mail.js +96 -0
  5. package/dist/app/community-mail.js.map +1 -0
  6. package/dist/app/container.d.ts +22 -14
  7. package/dist/app/container.js +186 -62
  8. package/dist/app/container.js.map +1 -1
  9. package/dist/app/mcp-endpoints.d.ts +13 -0
  10. package/dist/app/mcp-endpoints.js +25 -0
  11. package/dist/app/mcp-endpoints.js.map +1 -0
  12. package/dist/http/config.d.ts +2 -1
  13. package/dist/http/errors.d.ts +14 -0
  14. package/dist/http/errors.js +147 -0
  15. package/dist/http/errors.js.map +1 -0
  16. package/dist/http/mcp/catalogue.d.ts +37 -0
  17. package/dist/http/mcp/catalogue.js +69 -0
  18. package/dist/http/mcp/catalogue.js.map +1 -0
  19. package/dist/http/mcp/challenge.d.ts +7 -0
  20. package/dist/http/mcp/challenge.js +35 -0
  21. package/dist/http/mcp/challenge.js.map +1 -0
  22. package/dist/http/mcp/input-schema.d.ts +7 -0
  23. package/dist/http/mcp/input-schema.js +28 -0
  24. package/dist/http/mcp/input-schema.js.map +1 -0
  25. package/dist/http/mcp/route.d.ts +8 -0
  26. package/dist/http/mcp/route.js +75 -0
  27. package/dist/http/mcp/route.js.map +1 -0
  28. package/dist/http/mcp/server.d.ts +8 -0
  29. package/dist/http/mcp/server.js +31 -0
  30. package/dist/http/mcp/server.js.map +1 -0
  31. package/dist/http/mcp/test-support.d.ts +55 -0
  32. package/dist/http/mcp/test-support.js +151 -0
  33. package/dist/http/mcp/test-support.js.map +1 -0
  34. package/dist/http/mcp/tool.d.ts +48 -0
  35. package/dist/http/mcp/tool.js +58 -0
  36. package/dist/http/mcp/tool.js.map +1 -0
  37. package/dist/http/mcp/tools/automations.d.ts +6 -0
  38. package/dist/http/mcp/tools/automations.js +120 -0
  39. package/dist/http/mcp/tools/automations.js.map +1 -0
  40. package/dist/http/mcp/tools/catalog.d.ts +6 -0
  41. package/dist/http/mcp/tools/catalog.js +200 -0
  42. package/dist/http/mcp/tools/catalog.js.map +1 -0
  43. package/dist/http/mcp/tools/comments.d.ts +6 -0
  44. package/dist/http/mcp/tools/comments.js +70 -0
  45. package/dist/http/mcp/tools/comments.js.map +1 -0
  46. package/dist/http/mcp/tools/communities.d.ts +6 -0
  47. package/dist/http/mcp/tools/communities.js +175 -0
  48. package/dist/http/mcp/tools/communities.js.map +1 -0
  49. package/dist/http/mcp/tools/community-members.d.ts +6 -0
  50. package/dist/http/mcp/tools/community-members.js +89 -0
  51. package/dist/http/mcp/tools/community-members.js.map +1 -0
  52. package/dist/http/mcp/tools/community-moderation.d.ts +6 -0
  53. package/dist/http/mcp/tools/community-moderation.js +144 -0
  54. package/dist/http/mcp/tools/community-moderation.js.map +1 -0
  55. package/dist/http/mcp/tools/courses.d.ts +6 -0
  56. package/dist/http/mcp/tools/courses.js +121 -0
  57. package/dist/http/mcp/tools/courses.js.map +1 -0
  58. package/dist/http/mcp/tools/index.d.ts +6 -0
  59. package/dist/http/mcp/tools/index.js +23 -0
  60. package/dist/http/mcp/tools/index.js.map +1 -0
  61. package/dist/http/mcp/tools/people.d.ts +6 -0
  62. package/dist/http/mcp/tools/people.js +145 -0
  63. package/dist/http/mcp/tools/people.js.map +1 -0
  64. package/dist/http/plugins/auth.js +13 -5
  65. package/dist/http/plugins/auth.js.map +1 -1
  66. package/dist/http/plugins/error-handler.d.ts +3 -2
  67. package/dist/http/plugins/error-handler.js +52 -57
  68. package/dist/http/plugins/error-handler.js.map +1 -1
  69. package/dist/http/plugins/openapi.js +70 -20
  70. package/dist/http/plugins/openapi.js.map +1 -1
  71. package/dist/http/routes/access.d.ts +7 -0
  72. package/dist/http/routes/access.js +140 -0
  73. package/dist/http/routes/access.js.map +1 -0
  74. package/dist/http/routes/activities.js +97 -20
  75. package/dist/http/routes/activities.js.map +1 -1
  76. package/dist/http/routes/assets.js +60 -51
  77. package/dist/http/routes/assets.js.map +1 -1
  78. package/dist/http/routes/automations.js +64 -20
  79. package/dist/http/routes/automations.js.map +1 -1
  80. package/dist/http/routes/bundles.d.ts +7 -0
  81. package/dist/http/routes/bundles.js +181 -0
  82. package/dist/http/routes/bundles.js.map +1 -0
  83. package/dist/http/routes/communities.d.ts +7 -0
  84. package/dist/http/routes/communities.js +462 -0
  85. package/dist/http/routes/communities.js.map +1 -0
  86. package/dist/http/routes/community-moderation.d.ts +7 -0
  87. package/dist/http/routes/community-moderation.js +425 -0
  88. package/dist/http/routes/community-moderation.js.map +1 -0
  89. package/dist/http/routes/course-analytics.d.ts +7 -0
  90. package/dist/http/routes/course-analytics.js +60 -0
  91. package/dist/http/routes/course-analytics.js.map +1 -0
  92. package/dist/http/routes/courses.js +38 -23
  93. package/dist/http/routes/courses.js.map +1 -1
  94. package/dist/http/routes/dashboard.js +17 -8
  95. package/dist/http/routes/dashboard.js.map +1 -1
  96. package/dist/http/routes/discussion.js +35 -27
  97. package/dist/http/routes/discussion.js.map +1 -1
  98. package/dist/http/routes/downloads.js +58 -40
  99. package/dist/http/routes/downloads.js.map +1 -1
  100. package/dist/http/routes/entitlements.js +16 -7
  101. package/dist/http/routes/entitlements.js.map +1 -1
  102. package/dist/http/routes/integrations.js +38 -41
  103. package/dist/http/routes/integrations.js.map +1 -1
  104. package/dist/http/routes/member/actor.d.ts +14 -0
  105. package/dist/http/routes/member/actor.js +11 -0
  106. package/dist/http/routes/member/actor.js.map +1 -0
  107. package/dist/http/routes/member/assets.d.ts +7 -0
  108. package/dist/http/routes/member/assets.js +79 -0
  109. package/dist/http/routes/member/assets.js.map +1 -0
  110. package/dist/http/routes/member/chats.d.ts +7 -0
  111. package/dist/http/routes/member/chats.js +456 -0
  112. package/dist/http/routes/member/chats.js.map +1 -0
  113. package/dist/http/routes/member/comments.d.ts +7 -0
  114. package/dist/http/routes/member/comments.js +187 -0
  115. package/dist/http/routes/member/comments.js.map +1 -0
  116. package/dist/http/routes/member/community.d.ts +7 -0
  117. package/dist/http/routes/member/community.js +288 -0
  118. package/dist/http/routes/member/community.js.map +1 -0
  119. package/dist/http/routes/member/courses.d.ts +7 -0
  120. package/dist/http/routes/member/courses.js +101 -0
  121. package/dist/http/routes/member/courses.js.map +1 -0
  122. package/dist/http/routes/member/downloads.d.ts +7 -0
  123. package/dist/http/routes/member/downloads.js +56 -0
  124. package/dist/http/routes/member/downloads.js.map +1 -0
  125. package/dist/http/routes/member/files.d.ts +7 -0
  126. package/dist/http/routes/member/files.js +184 -0
  127. package/dist/http/routes/member/files.js.map +1 -0
  128. package/dist/http/routes/member/index.d.ts +7 -0
  129. package/dist/http/routes/member/index.js +31 -0
  130. package/dist/http/routes/member/index.js.map +1 -0
  131. package/dist/http/routes/member/notifications.d.ts +7 -0
  132. package/dist/http/routes/member/notifications.js +101 -0
  133. package/dist/http/routes/member/notifications.js.map +1 -0
  134. package/dist/http/routes/member/org.d.ts +7 -0
  135. package/dist/http/routes/member/org.js +56 -0
  136. package/dist/http/routes/member/org.js.map +1 -0
  137. package/dist/http/routes/member/posts.d.ts +7 -0
  138. package/dist/http/routes/member/posts.js +612 -0
  139. package/dist/http/routes/member/posts.js.map +1 -0
  140. package/dist/http/routes/member/profile.d.ts +7 -0
  141. package/dist/http/routes/member/profile.js +48 -0
  142. package/dist/http/routes/member/profile.js.map +1 -0
  143. package/dist/http/routes/member/progress.d.ts +7 -0
  144. package/dist/http/routes/member/progress.js +60 -0
  145. package/dist/http/routes/member/progress.js.map +1 -0
  146. package/dist/http/routes/organizations.js +49 -24
  147. package/dist/http/routes/organizations.js.map +1 -1
  148. package/dist/http/routes/students.js +43 -37
  149. package/dist/http/routes/students.js.map +1 -1
  150. package/dist/http/routes/webhooks.d.ts +7 -0
  151. package/dist/http/routes/webhooks.js +167 -0
  152. package/dist/http/routes/webhooks.js.map +1 -0
  153. package/dist/http/routes.js +14 -2
  154. package/dist/http/routes.js.map +1 -1
  155. package/dist/http/schemas/access.d.ts +146 -0
  156. package/dist/http/schemas/access.js +36 -0
  157. package/dist/http/schemas/access.js.map +1 -0
  158. package/dist/http/schemas/activities.d.ts +36 -1
  159. package/dist/http/schemas/activities.js +9 -4
  160. package/dist/http/schemas/activities.js.map +1 -1
  161. package/dist/http/schemas/assets.d.ts +76 -73
  162. package/dist/http/schemas/assets.js +23 -13
  163. package/dist/http/schemas/assets.js.map +1 -1
  164. package/dist/http/schemas/automations.d.ts +85 -8
  165. package/dist/http/schemas/automations.js +13 -2
  166. package/dist/http/schemas/automations.js.map +1 -1
  167. package/dist/http/schemas/bundles.d.ts +63 -0
  168. package/dist/http/schemas/bundles.js +23 -0
  169. package/dist/http/schemas/bundles.js.map +1 -0
  170. package/dist/http/schemas/chats.d.ts +386 -0
  171. package/dist/http/schemas/chats.js +58 -0
  172. package/dist/http/schemas/chats.js.map +1 -0
  173. package/dist/http/schemas/community.d.ts +537 -0
  174. package/dist/http/schemas/community.js +129 -0
  175. package/dist/http/schemas/community.js.map +1 -0
  176. package/dist/http/schemas/content.d.ts +22 -13
  177. package/dist/http/schemas/content.js +11 -9
  178. package/dist/http/schemas/content.js.map +1 -1
  179. package/dist/http/schemas/course-analytics.d.ts +29 -0
  180. package/dist/http/schemas/course-analytics.js +21 -0
  181. package/dist/http/schemas/course-analytics.js.map +1 -0
  182. package/dist/http/schemas/dashboard.js.map +1 -1
  183. package/dist/http/schemas/discussion.d.ts +85 -23
  184. package/dist/http/schemas/discussion.js +12 -11
  185. package/dist/http/schemas/discussion.js.map +1 -1
  186. package/dist/http/schemas/downloads.d.ts +13 -5
  187. package/dist/http/schemas/downloads.js +14 -11
  188. package/dist/http/schemas/downloads.js.map +1 -1
  189. package/dist/http/schemas/entitlements.d.ts +14 -6
  190. package/dist/http/schemas/entitlements.js +8 -6
  191. package/dist/http/schemas/entitlements.js.map +1 -1
  192. package/dist/http/schemas/files.d.ts +45 -0
  193. package/dist/http/schemas/files.js +25 -0
  194. package/dist/http/schemas/files.js.map +1 -0
  195. package/dist/http/schemas/index.d.ts +19 -10
  196. package/dist/http/schemas/index.js +19 -10
  197. package/dist/http/schemas/integrations.d.ts +4 -4
  198. package/dist/http/schemas/integrations.js.map +1 -1
  199. package/dist/http/schemas/invites.d.ts +4 -0
  200. package/dist/http/schemas/invites.js +3 -1
  201. package/dist/http/schemas/invites.js.map +1 -1
  202. package/dist/http/schemas/{learn.d.ts → member.d.ts} +42 -19
  203. package/dist/http/schemas/{learn.js → member.js} +17 -13
  204. package/dist/http/schemas/member.js.map +1 -0
  205. package/dist/http/schemas/members.d.ts +39 -6
  206. package/dist/http/schemas/members.js +17 -3
  207. package/dist/http/schemas/members.js.map +1 -1
  208. package/dist/http/schemas/notifications.d.ts +227 -0
  209. package/dist/http/schemas/notifications.js +44 -0
  210. package/dist/http/schemas/notifications.js.map +1 -0
  211. package/dist/http/schemas/organizations.js.map +1 -1
  212. package/dist/http/schemas/posts.d.ts +316 -0
  213. package/dist/http/schemas/posts.js +47 -0
  214. package/dist/http/schemas/posts.js.map +1 -0
  215. package/dist/http/schemas/profile.d.ts +23 -0
  216. package/dist/http/schemas/profile.js +15 -0
  217. package/dist/http/schemas/profile.js.map +1 -0
  218. package/dist/http/schemas/settings.js.map +1 -1
  219. package/dist/http/schemas/shared.d.ts +26 -1
  220. package/dist/http/schemas/shared.js +22 -3
  221. package/dist/http/schemas/shared.js.map +1 -1
  222. package/dist/http/schemas/students.d.ts +32 -10
  223. package/dist/http/schemas/students.js +19 -6
  224. package/dist/http/schemas/students.js.map +1 -1
  225. package/dist/http/scope.d.ts +2 -1
  226. package/dist/http/scope.js +20 -4
  227. package/dist/http/scope.js.map +1 -1
  228. package/dist/http/server.js +10 -3
  229. package/dist/http/server.js.map +1 -1
  230. package/dist/http/web-bridge.d.ts +1 -1
  231. package/dist/http/web-bridge.js +2 -2
  232. package/dist/http/web-bridge.js.map +1 -1
  233. package/dist/http/well-known.d.ts +7 -0
  234. package/dist/http/well-known.js +22 -0
  235. package/dist/http/well-known.js.map +1 -0
  236. package/dist/index.d.ts +3 -2
  237. package/dist/index.js +4 -2
  238. package/dist/index.js.map +1 -1
  239. package/dist/node_modules/.pnpm/@jridgewell_sourcemap-codec@1.5.5/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.js +78 -0
  240. package/dist/node_modules/.pnpm/@jridgewell_sourcemap-codec@1.5.5/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.js.map +1 -0
  241. package/dist/node_modules/.pnpm/@vitest_expect@2.1.9/node_modules/@vitest/expect/dist/index.js +1267 -0
  242. package/dist/node_modules/.pnpm/@vitest_expect@2.1.9/node_modules/@vitest/expect/dist/index.js.map +1 -0
  243. package/dist/node_modules/.pnpm/@vitest_pretty-format@2.1.9/node_modules/@vitest/pretty-format/dist/index.js +814 -0
  244. package/dist/node_modules/.pnpm/@vitest_pretty-format@2.1.9/node_modules/@vitest/pretty-format/dist/index.js.map +1 -0
  245. package/dist/node_modules/.pnpm/@vitest_runner@2.1.9/node_modules/@vitest/runner/dist/chunk-tasks.js +43 -0
  246. package/dist/node_modules/.pnpm/@vitest_runner@2.1.9/node_modules/@vitest/runner/dist/chunk-tasks.js.map +1 -0
  247. package/dist/node_modules/.pnpm/@vitest_runner@2.1.9/node_modules/@vitest/runner/dist/index.js +527 -0
  248. package/dist/node_modules/.pnpm/@vitest_runner@2.1.9/node_modules/@vitest/runner/dist/index.js.map +1 -0
  249. package/dist/node_modules/.pnpm/@vitest_runner@2.1.9/node_modules/@vitest/runner/dist/utils.js +2 -0
  250. package/dist/node_modules/.pnpm/@vitest_snapshot@2.1.9/node_modules/@vitest/snapshot/dist/index.js +1737 -0
  251. package/dist/node_modules/.pnpm/@vitest_snapshot@2.1.9/node_modules/@vitest/snapshot/dist/index.js.map +1 -0
  252. package/dist/node_modules/.pnpm/@vitest_spy@2.1.9/node_modules/@vitest/spy/dist/index.js +137 -0
  253. package/dist/node_modules/.pnpm/@vitest_spy@2.1.9/node_modules/@vitest/spy/dist/index.js.map +1 -0
  254. package/dist/node_modules/.pnpm/@vitest_utils@2.1.9/node_modules/@vitest/utils/dist/chunk-_commonjsHelpers.js +118 -0
  255. package/dist/node_modules/.pnpm/@vitest_utils@2.1.9/node_modules/@vitest/utils/dist/chunk-_commonjsHelpers.js.map +1 -0
  256. package/dist/node_modules/.pnpm/@vitest_utils@2.1.9/node_modules/@vitest/utils/dist/diff.js +1222 -0
  257. package/dist/node_modules/.pnpm/@vitest_utils@2.1.9/node_modules/@vitest/utils/dist/diff.js.map +1 -0
  258. package/dist/node_modules/.pnpm/@vitest_utils@2.1.9/node_modules/@vitest/utils/dist/error.js +91 -0
  259. package/dist/node_modules/.pnpm/@vitest_utils@2.1.9/node_modules/@vitest/utils/dist/error.js.map +1 -0
  260. package/dist/node_modules/.pnpm/@vitest_utils@2.1.9/node_modules/@vitest/utils/dist/helpers.js +113 -0
  261. package/dist/node_modules/.pnpm/@vitest_utils@2.1.9/node_modules/@vitest/utils/dist/helpers.js.map +1 -0
  262. package/dist/node_modules/.pnpm/@vitest_utils@2.1.9/node_modules/@vitest/utils/dist/index.js +449 -0
  263. package/dist/node_modules/.pnpm/@vitest_utils@2.1.9/node_modules/@vitest/utils/dist/index.js.map +1 -0
  264. package/dist/node_modules/.pnpm/@vitest_utils@2.1.9/node_modules/@vitest/utils/dist/source-map.js +163 -0
  265. package/dist/node_modules/.pnpm/@vitest_utils@2.1.9/node_modules/@vitest/utils/dist/source-map.js.map +1 -0
  266. package/dist/node_modules/.pnpm/chai@5.3.3/node_modules/chai/index.js +3187 -0
  267. package/dist/node_modules/.pnpm/chai@5.3.3/node_modules/chai/index.js.map +1 -0
  268. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/arguments.js +11 -0
  269. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/arguments.js.map +1 -0
  270. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/array.js +16 -0
  271. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/array.js.map +1 -0
  272. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/bigint.js +11 -0
  273. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/bigint.js.map +1 -0
  274. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/class.js +15 -0
  275. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/class.js.map +1 -0
  276. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/date.js +13 -0
  277. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/date.js.map +1 -0
  278. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/error.js +34 -0
  279. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/error.js.map +1 -0
  280. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/function.js +12 -0
  281. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/function.js.map +1 -0
  282. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/helpers.js +122 -0
  283. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/helpers.js.map +1 -0
  284. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/html.js +39 -0
  285. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/html.js.map +1 -0
  286. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/index.js +99 -0
  287. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/index.js.map +1 -0
  288. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/map.js +25 -0
  289. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/map.js.map +1 -0
  290. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/number.js +14 -0
  291. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/number.js.map +1 -0
  292. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/object.js +21 -0
  293. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/object.js.map +1 -0
  294. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/promise.js +6 -0
  295. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/promise.js.map +1 -0
  296. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/regexp.js +12 -0
  297. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/regexp.js.map +1 -0
  298. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/set.js +18 -0
  299. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/set.js.map +1 -0
  300. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/string.js +24 -0
  301. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/string.js.map +1 -0
  302. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/symbol.js +9 -0
  303. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/symbol.js.map +1 -0
  304. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/typedarray.js +30 -0
  305. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/typedarray.js.map +1 -0
  306. package/dist/node_modules/.pnpm/magic-string@0.30.21/node_modules/magic-string/dist/magic-string.es.js +939 -0
  307. package/dist/node_modules/.pnpm/magic-string@0.30.21/node_modules/magic-string/dist/magic-string.es.js.map +1 -0
  308. package/dist/node_modules/.pnpm/pathe@1.1.2/node_modules/pathe/dist/shared/pathe.ff20891b.js +82 -0
  309. package/dist/node_modules/.pnpm/pathe@1.1.2/node_modules/pathe/dist/shared/pathe.ff20891b.js.map +1 -0
  310. package/dist/node_modules/.pnpm/tinyrainbow@1.2.0/node_modules/tinyrainbow/dist/chunk-BVHSVHOK.js +82 -0
  311. package/dist/node_modules/.pnpm/tinyrainbow@1.2.0/node_modules/tinyrainbow/dist/chunk-BVHSVHOK.js.map +1 -0
  312. package/dist/node_modules/.pnpm/tinyrainbow@1.2.0/node_modules/tinyrainbow/dist/node.js +8 -0
  313. package/dist/node_modules/.pnpm/tinyrainbow@1.2.0/node_modules/tinyrainbow/dist/node.js.map +1 -0
  314. package/dist/node_modules/.pnpm/tinyspy@3.0.2/node_modules/tinyspy/dist/index.js +83 -0
  315. package/dist/node_modules/.pnpm/tinyspy@3.0.2/node_modules/tinyspy/dist/index.js.map +1 -0
  316. package/dist/node_modules/.pnpm/vitest@2.1.9_@types_node@22.20.0_jsdom@25.0.1_lightningcss@1.32.0/node_modules/vitest/dist/chunks/_commonjsHelpers.BFTU3MAI.js +9 -0
  317. package/dist/node_modules/.pnpm/vitest@2.1.9_@types_node@22.20.0_jsdom@25.0.1_lightningcss@1.32.0/node_modules/vitest/dist/chunks/_commonjsHelpers.BFTU3MAI.js.map +1 -0
  318. package/dist/node_modules/.pnpm/vitest@2.1.9_@types_node@22.20.0_jsdom@25.0.1_lightningcss@1.32.0/node_modules/vitest/dist/chunks/date.W2xKR2qe.js +51 -0
  319. package/dist/node_modules/.pnpm/vitest@2.1.9_@types_node@22.20.0_jsdom@25.0.1_lightningcss@1.32.0/node_modules/vitest/dist/chunks/date.W2xKR2qe.js.map +1 -0
  320. package/dist/node_modules/.pnpm/vitest@2.1.9_@types_node@22.20.0_jsdom@25.0.1_lightningcss@1.32.0/node_modules/vitest/dist/chunks/utils.C8RiOc4B.js +48 -0
  321. package/dist/node_modules/.pnpm/vitest@2.1.9_@types_node@22.20.0_jsdom@25.0.1_lightningcss@1.32.0/node_modules/vitest/dist/chunks/utils.C8RiOc4B.js.map +1 -0
  322. package/dist/node_modules/.pnpm/vitest@2.1.9_@types_node@22.20.0_jsdom@25.0.1_lightningcss@1.32.0/node_modules/vitest/dist/chunks/vi.DgezovHB.js +2426 -0
  323. package/dist/node_modules/.pnpm/vitest@2.1.9_@types_node@22.20.0_jsdom@25.0.1_lightningcss@1.32.0/node_modules/vitest/dist/chunks/vi.DgezovHB.js.map +1 -0
  324. package/dist/packages/server/package.js +6 -0
  325. package/dist/packages/server/package.js.map +1 -0
  326. package/package.json +9 -7
  327. package/dist/app/notifications.d.ts +0 -7
  328. package/dist/app/notifications.js +0 -23
  329. package/dist/app/notifications.js.map +0 -1
  330. package/dist/http/routes/learn/assets.d.ts +0 -8
  331. package/dist/http/routes/learn/assets.js +0 -32
  332. package/dist/http/routes/learn/assets.js.map +0 -1
  333. package/dist/http/routes/learn/comments.d.ts +0 -7
  334. package/dist/http/routes/learn/comments.js +0 -175
  335. package/dist/http/routes/learn/comments.js.map +0 -1
  336. package/dist/http/routes/learn/courses.d.ts +0 -7
  337. package/dist/http/routes/learn/courses.js +0 -75
  338. package/dist/http/routes/learn/courses.js.map +0 -1
  339. package/dist/http/routes/learn/downloads.d.ts +0 -7
  340. package/dist/http/routes/learn/downloads.js +0 -76
  341. package/dist/http/routes/learn/downloads.js.map +0 -1
  342. package/dist/http/routes/learn/index.d.ts +0 -7
  343. package/dist/http/routes/learn/index.js +0 -19
  344. package/dist/http/routes/learn/index.js.map +0 -1
  345. package/dist/http/routes/learn/org.d.ts +0 -7
  346. package/dist/http/routes/learn/org.js +0 -50
  347. package/dist/http/routes/learn/org.js.map +0 -1
  348. package/dist/http/routes/learn/progress.d.ts +0 -7
  349. package/dist/http/routes/learn/progress.js +0 -63
  350. package/dist/http/routes/learn/progress.js.map +0 -1
  351. package/dist/http/schemas/learn.js.map +0 -1
@@ -0,0 +1,456 @@
1
+ import { PageQuery, refusals } from "../../schemas/shared.js";
2
+ import { Reactions, SetReaction } from "../../schemas/discussion.js";
3
+ import { FlagReason } from "../../schemas/posts.js";
4
+ import { BlockParam, Chat, ChatIdParam, ChatsPage, CommunityParam, EditMessage, MarkRead, MessageFlag, MessageIdParam, MessageView, MessagesPage, MuteChat, OrgUserBody, ResolveMessageFlags, SendMessage, StartDirectChat, StartGroupChat } from "../../schemas/chats.js";
5
+ import "../../schemas/index.js";
6
+ import { actorOf } from "./actor.js";
7
+ import { z } from "zod";
8
+ //#region src/http/routes/member/chats.ts
9
+ async function memberChatRoutes(app, container) {
10
+ const r = app.withTypeProvider();
11
+ const chats = container.chats;
12
+ const tags = ["Chats"];
13
+ r.route({
14
+ method: "GET",
15
+ url: "/api/member/communities/:communityId/chats",
16
+ preHandler: app.requireOrgSession,
17
+ schema: {
18
+ operationId: "listMemberChats",
19
+ tags,
20
+ summary: "List your chats in a community",
21
+ description: "For a member of the community. Every chat you are in, with your unread count and its last message.",
22
+ params: CommunityParam,
23
+ querystring: PageQuery,
24
+ response: {
25
+ 200: ChatsPage,
26
+ ...refusals(403, 404)
27
+ }
28
+ },
29
+ handler: async (req) => {
30
+ const actor = await actorOf(container, req.orgId, req.userId);
31
+ return chats.listChats(req.orgId, actor, req.params.communityId, req.query);
32
+ }
33
+ });
34
+ r.route({
35
+ method: "POST",
36
+ url: "/api/member/chats/direct",
37
+ preHandler: app.requireOrgSession,
38
+ schema: {
39
+ operationId: "startDirectChat",
40
+ tags,
41
+ summary: "Start a direct chat, or return the one that already exists",
42
+ description: "For a member of the community, within its direct-message settings (403 otherwise). With the community set so a first message is a request, a new chat starts `pending` until the other person accepts it. 409 when you message yourself, send attachments without a body, or start a request without a message.",
43
+ body: StartDirectChat,
44
+ response: {
45
+ 200: Chat,
46
+ ...refusals(403, 404, 409)
47
+ }
48
+ },
49
+ handler: async (req) => {
50
+ const actor = await actorOf(container, req.orgId, req.userId);
51
+ return chats.startDirect(req.orgId, actor, req.body);
52
+ }
53
+ });
54
+ r.route({
55
+ method: "POST",
56
+ url: "/api/member/chats/group",
57
+ preHandler: app.requireOrgSession,
58
+ schema: {
59
+ operationId: "startGroupChat",
60
+ tags,
61
+ summary: "Start a group chat",
62
+ description: "For a member of the community while group chats are on (403 otherwise). Everyone named must hold the community and be someone you may message. 409 when fewer than two others are named or the group would exceed the community's group size.",
63
+ body: StartGroupChat,
64
+ response: {
65
+ 201: Chat,
66
+ ...refusals(403, 404, 409)
67
+ }
68
+ },
69
+ handler: async (req, reply) => {
70
+ const actor = await actorOf(container, req.orgId, req.userId);
71
+ const chat = await chats.startGroup(req.orgId, actor, req.body);
72
+ return reply.code(201).send(chat);
73
+ }
74
+ });
75
+ r.route({
76
+ method: "POST",
77
+ url: "/api/member/chats/:chatId/participants",
78
+ preHandler: app.requireOrgSession,
79
+ schema: {
80
+ operationId: "addChatParticipant",
81
+ tags,
82
+ summary: "Add a person to a group chat you are in",
83
+ description: "For a participant of a group chat. 409 when the chat is direct, the person is already in it, or it is full.",
84
+ params: ChatIdParam,
85
+ body: OrgUserBody,
86
+ response: {
87
+ 200: Chat,
88
+ ...refusals(403, 404, 409)
89
+ }
90
+ },
91
+ handler: async (req) => {
92
+ const actor = await actorOf(container, req.orgId, req.userId);
93
+ return chats.addParticipant(req.orgId, actor, req.params.chatId, req.body.orgUserId);
94
+ }
95
+ });
96
+ r.route({
97
+ method: "POST",
98
+ url: "/api/member/chats/:chatId/leave",
99
+ preHandler: app.requireOrgSession,
100
+ schema: {
101
+ operationId: "leaveChat",
102
+ tags,
103
+ summary: "Leave a chat",
104
+ description: "For a participant. The chat stays for the others.",
105
+ params: ChatIdParam,
106
+ response: {
107
+ 200: Chat,
108
+ ...refusals(403, 404)
109
+ }
110
+ },
111
+ handler: async (req) => {
112
+ const actor = await actorOf(container, req.orgId, req.userId);
113
+ return chats.leave(req.orgId, actor, req.params.chatId);
114
+ }
115
+ });
116
+ r.route({
117
+ method: "POST",
118
+ url: "/api/member/chats/:chatId/acceptance",
119
+ preHandler: app.requireOrgSession,
120
+ schema: {
121
+ operationId: "acceptChat",
122
+ tags,
123
+ summary: "Accept a message request",
124
+ description: "For the person the request was sent to. The chat opens for both sides. 409 when the chat is not a pending request.",
125
+ params: ChatIdParam,
126
+ response: {
127
+ 200: Chat,
128
+ ...refusals(403, 404, 409)
129
+ }
130
+ },
131
+ handler: async (req) => {
132
+ const actor = await actorOf(container, req.orgId, req.userId);
133
+ return chats.accept(req.orgId, actor, req.params.chatId);
134
+ }
135
+ });
136
+ r.route({
137
+ method: "GET",
138
+ url: "/api/member/chats/:chatId/messages",
139
+ preHandler: app.requireOrgSession,
140
+ schema: {
141
+ operationId: "listChatMessages",
142
+ tags,
143
+ summary: "Read the messages in a chat, newest first",
144
+ description: "For a participant of the chat.",
145
+ params: ChatIdParam,
146
+ querystring: PageQuery,
147
+ response: {
148
+ 200: MessagesPage,
149
+ ...refusals(403, 404)
150
+ }
151
+ },
152
+ handler: async (req) => {
153
+ const actor = await actorOf(container, req.orgId, req.userId);
154
+ return chats.messages(req.orgId, actor, req.params.chatId, req.query);
155
+ }
156
+ });
157
+ r.route({
158
+ method: "POST",
159
+ url: "/api/member/chats/:chatId/messages",
160
+ preHandler: app.requireOrgSession,
161
+ schema: {
162
+ operationId: "sendChatMessage",
163
+ tags,
164
+ summary: "Send a message",
165
+ description: "For a participant while the chat is open and not locked, and nobody in it has blocked the other (403 otherwise). A request's sender cannot send more until it is accepted.",
166
+ params: ChatIdParam,
167
+ body: SendMessage,
168
+ response: {
169
+ 201: MessageView,
170
+ ...refusals(403, 404)
171
+ }
172
+ },
173
+ handler: async (req, reply) => {
174
+ const actor = await actorOf(container, req.orgId, req.userId);
175
+ const message = await chats.send(req.orgId, actor, req.params.chatId, req.body);
176
+ return reply.code(201).send(message);
177
+ }
178
+ });
179
+ r.route({
180
+ method: "PATCH",
181
+ url: "/api/member/messages/:messageId",
182
+ preHandler: app.requireOrgSession,
183
+ schema: {
184
+ operationId: "editChatMessage",
185
+ tags,
186
+ summary: "Edit your own message",
187
+ description: "Sender only, while the chat is open and not locked. 409 when the message is deleted.",
188
+ params: MessageIdParam,
189
+ body: EditMessage,
190
+ response: {
191
+ 200: MessageView,
192
+ ...refusals(403, 404, 409)
193
+ }
194
+ },
195
+ handler: async (req) => {
196
+ const actor = await actorOf(container, req.orgId, req.userId);
197
+ return chats.editMessage(req.orgId, actor, req.params.messageId, req.body.body);
198
+ }
199
+ });
200
+ r.route({
201
+ method: "DELETE",
202
+ url: "/api/member/messages/:messageId",
203
+ preHandler: app.requireOrgSession,
204
+ schema: {
205
+ operationId: "deleteChatMessage",
206
+ tags,
207
+ summary: "Delete your message, or one in a community you moderate",
208
+ description: "For the sender, or a moderator of the community. The message stays in the history, marked deleted. 409 when it is already deleted.",
209
+ params: MessageIdParam,
210
+ response: {
211
+ 200: MessageView,
212
+ ...refusals(403, 404, 409)
213
+ }
214
+ },
215
+ handler: async (req) => {
216
+ const actor = await actorOf(container, req.orgId, req.userId);
217
+ return chats.deleteMessage(req.orgId, actor, req.params.messageId);
218
+ }
219
+ });
220
+ r.route({
221
+ method: "PUT",
222
+ url: "/api/member/messages/:messageId/reaction",
223
+ preHandler: app.requireOrgSession,
224
+ schema: {
225
+ operationId: "setMessageReaction",
226
+ tags,
227
+ summary: "Set your reaction on a message",
228
+ description: "For a participant of the chat. Replaces any reaction you already had and returns the new counts.",
229
+ params: MessageIdParam,
230
+ body: SetReaction,
231
+ response: {
232
+ 200: Reactions,
233
+ ...refusals(403, 404)
234
+ }
235
+ },
236
+ handler: async (req) => {
237
+ const actor = await actorOf(container, req.orgId, req.userId);
238
+ return chats.setReaction(req.orgId, actor, req.params.messageId, req.body.emoji);
239
+ }
240
+ });
241
+ r.route({
242
+ method: "DELETE",
243
+ url: "/api/member/messages/:messageId/reaction",
244
+ preHandler: app.requireOrgSession,
245
+ schema: {
246
+ operationId: "clearMessageReaction",
247
+ tags,
248
+ summary: "Withdraw your reaction from a message",
249
+ description: "For a participant of the chat. Returns the new counts.",
250
+ params: MessageIdParam,
251
+ response: {
252
+ 200: Reactions,
253
+ ...refusals(403, 404)
254
+ }
255
+ },
256
+ handler: async (req) => {
257
+ const actor = await actorOf(container, req.orgId, req.userId);
258
+ return chats.setReaction(req.orgId, actor, req.params.messageId, null);
259
+ }
260
+ });
261
+ r.route({
262
+ method: "POST",
263
+ url: "/api/member/messages/:messageId/flags",
264
+ preHandler: app.requireOrgSession,
265
+ schema: {
266
+ operationId: "flagMessage",
267
+ tags,
268
+ summary: "Flag a message for the moderators",
269
+ description: "For a participant of the chat. Flagging it again while your flag is open returns that flag.",
270
+ params: MessageIdParam,
271
+ body: FlagReason,
272
+ response: {
273
+ 201: MessageFlag,
274
+ ...refusals(403, 404)
275
+ }
276
+ },
277
+ handler: async (req, reply) => {
278
+ const actor = await actorOf(container, req.orgId, req.userId);
279
+ const flag = await chats.flagMessage(req.orgId, actor, req.params.messageId, req.body.reason);
280
+ return reply.code(201).send(flag);
281
+ }
282
+ });
283
+ r.route({
284
+ method: "POST",
285
+ url: "/api/member/messages/:messageId/flags/resolution",
286
+ preHandler: app.requireOrgSession,
287
+ schema: {
288
+ operationId: "resolveMessageFlags",
289
+ tags,
290
+ summary: "Dismiss the open flags on a message in a community you moderate",
291
+ description: "For a moderator who is a member of the community. Closes every open flag and leaves the message up.",
292
+ params: MessageIdParam,
293
+ body: ResolveMessageFlags,
294
+ response: {
295
+ 204: z.void(),
296
+ ...refusals(403, 404)
297
+ }
298
+ },
299
+ handler: async (req, reply) => {
300
+ const actor = await actorOf(container, req.orgId, req.userId);
301
+ await chats.resolveMessageFlags(req.orgId, actor, req.params.messageId, req.body.resolution);
302
+ return reply.code(204).send();
303
+ }
304
+ });
305
+ r.route({
306
+ method: "POST",
307
+ url: "/api/member/chats/:chatId/read",
308
+ preHandler: app.requireOrgSession,
309
+ schema: {
310
+ operationId: "markChatRead",
311
+ tags,
312
+ summary: "Mark a chat read up to a message",
313
+ description: "For a participant. The message must be in the chat (404 otherwise).",
314
+ params: ChatIdParam,
315
+ body: MarkRead,
316
+ response: {
317
+ 204: z.void(),
318
+ ...refusals(403, 404)
319
+ }
320
+ },
321
+ handler: async (req, reply) => {
322
+ const actor = await actorOf(container, req.orgId, req.userId);
323
+ await chats.markRead(req.orgId, actor, req.params.chatId, req.body.messageId);
324
+ return reply.code(204).send();
325
+ }
326
+ });
327
+ r.route({
328
+ method: "POST",
329
+ url: "/api/member/chats/:chatId/mute",
330
+ preHandler: app.requireOrgSession,
331
+ schema: {
332
+ operationId: "muteChat",
333
+ tags,
334
+ summary: "Mute a chat until a time, or until unmuted",
335
+ description: "For a participant. Without `until` the chat stays muted until you unmute it.",
336
+ params: ChatIdParam,
337
+ body: MuteChat,
338
+ response: {
339
+ 204: z.void(),
340
+ ...refusals(403, 404)
341
+ }
342
+ },
343
+ handler: async (req, reply) => {
344
+ const actor = await actorOf(container, req.orgId, req.userId);
345
+ await chats.mute(req.orgId, actor, req.params.chatId, req.body.until);
346
+ return reply.code(204).send();
347
+ }
348
+ });
349
+ r.route({
350
+ method: "POST",
351
+ url: "/api/member/chats/:chatId/unmute",
352
+ preHandler: app.requireOrgSession,
353
+ schema: {
354
+ operationId: "unmuteChat",
355
+ tags,
356
+ summary: "Unmute a chat",
357
+ description: "For a participant.",
358
+ params: ChatIdParam,
359
+ response: {
360
+ 204: z.void(),
361
+ ...refusals(403, 404)
362
+ }
363
+ },
364
+ handler: async (req, reply) => {
365
+ const actor = await actorOf(container, req.orgId, req.userId);
366
+ await chats.unmute(req.orgId, actor, req.params.chatId);
367
+ return reply.code(204).send();
368
+ }
369
+ });
370
+ r.route({
371
+ method: "POST",
372
+ url: "/api/member/chats/:chatId/lock",
373
+ preHandler: app.requireOrgSession,
374
+ schema: {
375
+ operationId: "lockChat",
376
+ tags,
377
+ summary: "Lock a chat in a community you moderate",
378
+ description: "For a moderator who is a member of the community. Nobody can send or edit messages until it is unlocked; its open message flags are resolved as `locked`. Locking a locked chat returns it unchanged.",
379
+ params: ChatIdParam,
380
+ response: {
381
+ 200: Chat,
382
+ ...refusals(403, 404)
383
+ }
384
+ },
385
+ handler: async (req) => {
386
+ const actor = await actorOf(container, req.orgId, req.userId);
387
+ return chats.lock(req.orgId, actor, req.params.chatId);
388
+ }
389
+ });
390
+ r.route({
391
+ method: "POST",
392
+ url: "/api/member/chats/:chatId/unlock",
393
+ preHandler: app.requireOrgSession,
394
+ schema: {
395
+ operationId: "unlockChat",
396
+ tags,
397
+ summary: "Unlock a chat in a community you moderate",
398
+ description: "For a moderator who is a member of the community. Unlocking an unlocked chat returns it unchanged.",
399
+ params: ChatIdParam,
400
+ response: {
401
+ 200: Chat,
402
+ ...refusals(403, 404)
403
+ }
404
+ },
405
+ handler: async (req) => {
406
+ const actor = await actorOf(container, req.orgId, req.userId);
407
+ return chats.unlock(req.orgId, actor, req.params.chatId);
408
+ }
409
+ });
410
+ r.route({
411
+ method: "PUT",
412
+ url: "/api/member/communities/:communityId/blocks/:orgUserId",
413
+ preHandler: app.requireOrgSession,
414
+ schema: {
415
+ operationId: "blockMember",
416
+ tags,
417
+ summary: "Block a person in a community",
418
+ description: "For a member of the community. Neither of you can message the other there; a direct chat between you closes. Blocking twice is harmless. 409 when you block yourself.",
419
+ params: BlockParam,
420
+ response: {
421
+ 204: z.void(),
422
+ ...refusals(403, 404, 409)
423
+ }
424
+ },
425
+ handler: async (req, reply) => {
426
+ const actor = await actorOf(container, req.orgId, req.userId);
427
+ await chats.block(req.orgId, actor, req.params.communityId, req.params.orgUserId);
428
+ return reply.code(204).send();
429
+ }
430
+ });
431
+ r.route({
432
+ method: "DELETE",
433
+ url: "/api/member/communities/:communityId/blocks/:orgUserId",
434
+ preHandler: app.requireOrgSession,
435
+ schema: {
436
+ operationId: "unblockMember",
437
+ tags,
438
+ summary: "Unblock a person in a community",
439
+ description: "For a member of the community. A direct chat closed by the block reopens unless a moderator locked it. 409 when you unblock yourself.",
440
+ params: BlockParam,
441
+ response: {
442
+ 204: z.void(),
443
+ ...refusals(403, 404, 409)
444
+ }
445
+ },
446
+ handler: async (req, reply) => {
447
+ const actor = await actorOf(container, req.orgId, req.userId);
448
+ await chats.unblock(req.orgId, actor, req.params.communityId, req.params.orgUserId);
449
+ return reply.code(204).send();
450
+ }
451
+ });
452
+ }
453
+ //#endregion
454
+ export { memberChatRoutes };
455
+
456
+ //# sourceMappingURL=chats.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chats.js","names":[],"sources":["../../../../src/http/routes/member/chats.ts"],"sourcesContent":["import type { FastifyInstance } from 'fastify';\nimport type { ZodTypeProvider } from 'fastify-type-provider-zod';\nimport { z } from 'zod';\nimport type { Container } from '../../../app/container.js';\nimport { actorOf } from './actor.js';\nimport {\n BlockParam,\n Chat,\n ChatIdParam,\n ChatsPage,\n CommunityParam,\n EditMessage,\n FlagReason,\n PageQuery,\n MarkRead,\n MessageFlag,\n MessageIdParam,\n MessagesPage,\n MessageView,\n MuteChat,\n OrgUserBody,\n Reactions,\n ResolveMessageFlags,\n SendMessage,\n SetReaction,\n StartDirectChat,\n StartGroupChat,\n refusals,\n} from '../../schemas/index.js';\n\nexport async function memberChatRoutes(app: FastifyInstance, container: Container): Promise<void> {\n const r = app.withTypeProvider<ZodTypeProvider>();\n const chats = container.chats;\n const tags = ['Chats'];\n\n r.route({\n method: 'GET',\n url: '/api/member/communities/:communityId/chats',\n preHandler: app.requireOrgSession,\n schema: {\n operationId: 'listMemberChats',\n tags,\n summary: 'List your chats in a community',\n description:\n 'For a member of the community. Every chat you are in, with your unread count and its last message.',\n params: CommunityParam,\n querystring: PageQuery,\n response: { 200: ChatsPage, ...refusals(403, 404) },\n },\n handler: async (req) => {\n const actor = await actorOf(container, req.orgId, req.userId);\n return chats.listChats(req.orgId, actor, req.params.communityId, req.query);\n },\n });\n\n r.route({\n method: 'POST',\n url: '/api/member/chats/direct',\n preHandler: app.requireOrgSession,\n schema: {\n operationId: 'startDirectChat',\n tags,\n summary: 'Start a direct chat, or return the one that already exists',\n description:\n 'For a member of the community, within its direct-message settings (403 otherwise). With the community set so a first message is a request, a new chat starts `pending` until the other person accepts it. 409 when you message yourself, send attachments without a body, or start a request without a message.',\n body: StartDirectChat,\n response: { 200: Chat, ...refusals(403, 404, 409) },\n },\n handler: async (req) => {\n const actor = await actorOf(container, req.orgId, req.userId);\n return chats.startDirect(req.orgId, actor, req.body);\n },\n });\n\n r.route({\n method: 'POST',\n url: '/api/member/chats/group',\n preHandler: app.requireOrgSession,\n schema: {\n operationId: 'startGroupChat',\n tags,\n summary: 'Start a group chat',\n description:\n \"For a member of the community while group chats are on (403 otherwise). Everyone named must hold the community and be someone you may message. 409 when fewer than two others are named or the group would exceed the community's group size.\",\n body: StartGroupChat,\n response: { 201: Chat, ...refusals(403, 404, 409) },\n },\n handler: async (req, reply) => {\n const actor = await actorOf(container, req.orgId, req.userId);\n const chat = await chats.startGroup(req.orgId, actor, req.body);\n return reply.code(201).send(chat);\n },\n });\n\n r.route({\n method: 'POST',\n url: '/api/member/chats/:chatId/participants',\n preHandler: app.requireOrgSession,\n schema: {\n operationId: 'addChatParticipant',\n tags,\n summary: 'Add a person to a group chat you are in',\n description:\n 'For a participant of a group chat. 409 when the chat is direct, the person is already in it, or it is full.',\n params: ChatIdParam,\n body: OrgUserBody,\n response: { 200: Chat, ...refusals(403, 404, 409) },\n },\n handler: async (req) => {\n const actor = await actorOf(container, req.orgId, req.userId);\n return chats.addParticipant(req.orgId, actor, req.params.chatId, req.body.orgUserId);\n },\n });\n\n r.route({\n method: 'POST',\n url: '/api/member/chats/:chatId/leave',\n preHandler: app.requireOrgSession,\n schema: {\n operationId: 'leaveChat',\n tags,\n summary: 'Leave a chat',\n description: 'For a participant. The chat stays for the others.',\n params: ChatIdParam,\n response: { 200: Chat, ...refusals(403, 404) },\n },\n handler: async (req) => {\n const actor = await actorOf(container, req.orgId, req.userId);\n return chats.leave(req.orgId, actor, req.params.chatId);\n },\n });\n\n r.route({\n method: 'POST',\n url: '/api/member/chats/:chatId/acceptance',\n preHandler: app.requireOrgSession,\n schema: {\n operationId: 'acceptChat',\n tags,\n summary: 'Accept a message request',\n description:\n 'For the person the request was sent to. The chat opens for both sides. 409 when the chat is not a pending request.',\n params: ChatIdParam,\n response: { 200: Chat, ...refusals(403, 404, 409) },\n },\n handler: async (req) => {\n const actor = await actorOf(container, req.orgId, req.userId);\n return chats.accept(req.orgId, actor, req.params.chatId);\n },\n });\n\n r.route({\n method: 'GET',\n url: '/api/member/chats/:chatId/messages',\n preHandler: app.requireOrgSession,\n schema: {\n operationId: 'listChatMessages',\n tags,\n summary: 'Read the messages in a chat, newest first',\n description: 'For a participant of the chat.',\n params: ChatIdParam,\n querystring: PageQuery,\n response: { 200: MessagesPage, ...refusals(403, 404) },\n },\n handler: async (req) => {\n const actor = await actorOf(container, req.orgId, req.userId);\n return chats.messages(req.orgId, actor, req.params.chatId, req.query);\n },\n });\n\n r.route({\n method: 'POST',\n url: '/api/member/chats/:chatId/messages',\n preHandler: app.requireOrgSession,\n schema: {\n operationId: 'sendChatMessage',\n tags,\n summary: 'Send a message',\n description:\n \"For a participant while the chat is open and not locked, and nobody in it has blocked the other (403 otherwise). A request's sender cannot send more until it is accepted.\",\n params: ChatIdParam,\n body: SendMessage,\n response: { 201: MessageView, ...refusals(403, 404) },\n },\n handler: async (req, reply) => {\n const actor = await actorOf(container, req.orgId, req.userId);\n const message = await chats.send(req.orgId, actor, req.params.chatId, req.body);\n return reply.code(201).send(message);\n },\n });\n\n r.route({\n method: 'PATCH',\n url: '/api/member/messages/:messageId',\n preHandler: app.requireOrgSession,\n schema: {\n operationId: 'editChatMessage',\n tags,\n summary: 'Edit your own message',\n description:\n 'Sender only, while the chat is open and not locked. 409 when the message is deleted.',\n params: MessageIdParam,\n body: EditMessage,\n response: { 200: MessageView, ...refusals(403, 404, 409) },\n },\n handler: async (req) => {\n const actor = await actorOf(container, req.orgId, req.userId);\n return chats.editMessage(req.orgId, actor, req.params.messageId, req.body.body);\n },\n });\n\n r.route({\n method: 'DELETE',\n url: '/api/member/messages/:messageId',\n preHandler: app.requireOrgSession,\n schema: {\n operationId: 'deleteChatMessage',\n tags,\n summary: 'Delete your message, or one in a community you moderate',\n description:\n 'For the sender, or a moderator of the community. The message stays in the history, marked deleted. 409 when it is already deleted.',\n params: MessageIdParam,\n response: { 200: MessageView, ...refusals(403, 404, 409) },\n },\n handler: async (req) => {\n const actor = await actorOf(container, req.orgId, req.userId);\n return chats.deleteMessage(req.orgId, actor, req.params.messageId);\n },\n });\n\n r.route({\n method: 'PUT',\n url: '/api/member/messages/:messageId/reaction',\n preHandler: app.requireOrgSession,\n schema: {\n operationId: 'setMessageReaction',\n tags,\n summary: 'Set your reaction on a message',\n description:\n 'For a participant of the chat. Replaces any reaction you already had and returns the new counts.',\n params: MessageIdParam,\n body: SetReaction,\n response: { 200: Reactions, ...refusals(403, 404) },\n },\n handler: async (req) => {\n const actor = await actorOf(container, req.orgId, req.userId);\n return chats.setReaction(req.orgId, actor, req.params.messageId, req.body.emoji);\n },\n });\n\n r.route({\n method: 'DELETE',\n url: '/api/member/messages/:messageId/reaction',\n preHandler: app.requireOrgSession,\n schema: {\n operationId: 'clearMessageReaction',\n tags,\n summary: 'Withdraw your reaction from a message',\n description: 'For a participant of the chat. Returns the new counts.',\n params: MessageIdParam,\n response: { 200: Reactions, ...refusals(403, 404) },\n },\n handler: async (req) => {\n const actor = await actorOf(container, req.orgId, req.userId);\n return chats.setReaction(req.orgId, actor, req.params.messageId, null);\n },\n });\n\n r.route({\n method: 'POST',\n url: '/api/member/messages/:messageId/flags',\n preHandler: app.requireOrgSession,\n schema: {\n operationId: 'flagMessage',\n tags,\n summary: 'Flag a message for the moderators',\n description:\n 'For a participant of the chat. Flagging it again while your flag is open returns that flag.',\n params: MessageIdParam,\n body: FlagReason,\n response: { 201: MessageFlag, ...refusals(403, 404) },\n },\n handler: async (req, reply) => {\n const actor = await actorOf(container, req.orgId, req.userId);\n const flag = await chats.flagMessage(req.orgId, actor, req.params.messageId, req.body.reason);\n return reply.code(201).send(flag);\n },\n });\n\n r.route({\n method: 'POST',\n url: '/api/member/messages/:messageId/flags/resolution',\n preHandler: app.requireOrgSession,\n schema: {\n operationId: 'resolveMessageFlags',\n tags,\n summary: 'Dismiss the open flags on a message in a community you moderate',\n description:\n 'For a moderator who is a member of the community. Closes every open flag and leaves the message up.',\n params: MessageIdParam,\n body: ResolveMessageFlags,\n response: { 204: z.void(), ...refusals(403, 404) },\n },\n handler: async (req, reply) => {\n const actor = await actorOf(container, req.orgId, req.userId);\n await chats.resolveMessageFlags(req.orgId, actor, req.params.messageId, req.body.resolution);\n return reply.code(204).send();\n },\n });\n\n r.route({\n method: 'POST',\n url: '/api/member/chats/:chatId/read',\n preHandler: app.requireOrgSession,\n schema: {\n operationId: 'markChatRead',\n tags,\n summary: 'Mark a chat read up to a message',\n description: 'For a participant. The message must be in the chat (404 otherwise).',\n params: ChatIdParam,\n body: MarkRead,\n response: { 204: z.void(), ...refusals(403, 404) },\n },\n handler: async (req, reply) => {\n const actor = await actorOf(container, req.orgId, req.userId);\n await chats.markRead(req.orgId, actor, req.params.chatId, req.body.messageId);\n return reply.code(204).send();\n },\n });\n\n r.route({\n method: 'POST',\n url: '/api/member/chats/:chatId/mute',\n preHandler: app.requireOrgSession,\n schema: {\n operationId: 'muteChat',\n tags,\n summary: 'Mute a chat until a time, or until unmuted',\n description: 'For a participant. Without `until` the chat stays muted until you unmute it.',\n params: ChatIdParam,\n body: MuteChat,\n response: { 204: z.void(), ...refusals(403, 404) },\n },\n handler: async (req, reply) => {\n const actor = await actorOf(container, req.orgId, req.userId);\n await chats.mute(req.orgId, actor, req.params.chatId, req.body.until);\n return reply.code(204).send();\n },\n });\n\n r.route({\n method: 'POST',\n url: '/api/member/chats/:chatId/unmute',\n preHandler: app.requireOrgSession,\n schema: {\n operationId: 'unmuteChat',\n tags,\n summary: 'Unmute a chat',\n description: 'For a participant.',\n params: ChatIdParam,\n response: { 204: z.void(), ...refusals(403, 404) },\n },\n handler: async (req, reply) => {\n const actor = await actorOf(container, req.orgId, req.userId);\n await chats.unmute(req.orgId, actor, req.params.chatId);\n return reply.code(204).send();\n },\n });\n\n r.route({\n method: 'POST',\n url: '/api/member/chats/:chatId/lock',\n preHandler: app.requireOrgSession,\n schema: {\n operationId: 'lockChat',\n tags,\n summary: 'Lock a chat in a community you moderate',\n description:\n 'For a moderator who is a member of the community. Nobody can send or edit messages until it is unlocked; its open message flags are resolved as `locked`. Locking a locked chat returns it unchanged.',\n params: ChatIdParam,\n response: { 200: Chat, ...refusals(403, 404) },\n },\n handler: async (req) => {\n const actor = await actorOf(container, req.orgId, req.userId);\n return chats.lock(req.orgId, actor, req.params.chatId);\n },\n });\n\n r.route({\n method: 'POST',\n url: '/api/member/chats/:chatId/unlock',\n preHandler: app.requireOrgSession,\n schema: {\n operationId: 'unlockChat',\n tags,\n summary: 'Unlock a chat in a community you moderate',\n description:\n 'For a moderator who is a member of the community. Unlocking an unlocked chat returns it unchanged.',\n params: ChatIdParam,\n response: { 200: Chat, ...refusals(403, 404) },\n },\n handler: async (req) => {\n const actor = await actorOf(container, req.orgId, req.userId);\n return chats.unlock(req.orgId, actor, req.params.chatId);\n },\n });\n\n r.route({\n method: 'PUT',\n url: '/api/member/communities/:communityId/blocks/:orgUserId',\n preHandler: app.requireOrgSession,\n schema: {\n operationId: 'blockMember',\n tags,\n summary: 'Block a person in a community',\n description:\n 'For a member of the community. Neither of you can message the other there; a direct chat between you closes. Blocking twice is harmless. 409 when you block yourself.',\n params: BlockParam,\n response: { 204: z.void(), ...refusals(403, 404, 409) },\n },\n handler: async (req, reply) => {\n const actor = await actorOf(container, req.orgId, req.userId);\n await chats.block(req.orgId, actor, req.params.communityId, req.params.orgUserId);\n return reply.code(204).send();\n },\n });\n\n r.route({\n method: 'DELETE',\n url: '/api/member/communities/:communityId/blocks/:orgUserId',\n preHandler: app.requireOrgSession,\n schema: {\n operationId: 'unblockMember',\n tags,\n summary: 'Unblock a person in a community',\n description:\n 'For a member of the community. A direct chat closed by the block reopens unless a moderator locked it. 409 when you unblock yourself.',\n params: BlockParam,\n response: { 204: z.void(), ...refusals(403, 404, 409) },\n },\n handler: async (req, reply) => {\n const actor = await actorOf(container, req.orgId, req.userId);\n await chats.unblock(req.orgId, actor, req.params.communityId, req.params.orgUserId);\n return reply.code(204).send();\n },\n });\n}\n"],"mappings":";;;;;;;;AA8BA,eAAsB,iBAAiB,KAAsB,WAAqC;CAChG,MAAM,IAAI,IAAI,iBAAkC;CAChD,MAAM,QAAQ,UAAU;CACxB,MAAM,OAAO,CAAC,OAAO;CAErB,EAAE,MAAM;EACN,QAAQ;EACR,KAAK;EACL,YAAY,IAAI;EAChB,QAAQ;GACN,aAAa;GACb;GACA,SAAS;GACT,aACE;GACF,QAAQ;GACR,aAAa;GACb,UAAU;IAAE,KAAK;IAAW,GAAG,SAAS,KAAK,GAAG;GAAE;EACpD;EACA,SAAS,OAAO,QAAQ;GACtB,MAAM,QAAQ,MAAM,QAAQ,WAAW,IAAI,OAAO,IAAI,MAAM;GAC5D,OAAO,MAAM,UAAU,IAAI,OAAO,OAAO,IAAI,OAAO,aAAa,IAAI,KAAK;EAC5E;CACF,CAAC;CAED,EAAE,MAAM;EACN,QAAQ;EACR,KAAK;EACL,YAAY,IAAI;EAChB,QAAQ;GACN,aAAa;GACb;GACA,SAAS;GACT,aACE;GACF,MAAM;GACN,UAAU;IAAE,KAAK;IAAM,GAAG,SAAS,KAAK,KAAK,GAAG;GAAE;EACpD;EACA,SAAS,OAAO,QAAQ;GACtB,MAAM,QAAQ,MAAM,QAAQ,WAAW,IAAI,OAAO,IAAI,MAAM;GAC5D,OAAO,MAAM,YAAY,IAAI,OAAO,OAAO,IAAI,IAAI;EACrD;CACF,CAAC;CAED,EAAE,MAAM;EACN,QAAQ;EACR,KAAK;EACL,YAAY,IAAI;EAChB,QAAQ;GACN,aAAa;GACb;GACA,SAAS;GACT,aACE;GACF,MAAM;GACN,UAAU;IAAE,KAAK;IAAM,GAAG,SAAS,KAAK,KAAK,GAAG;GAAE;EACpD;EACA,SAAS,OAAO,KAAK,UAAU;GAC7B,MAAM,QAAQ,MAAM,QAAQ,WAAW,IAAI,OAAO,IAA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#region src/http/routes/member/comments.d.ts
4
+ declare function memberCommentsRoutes(app: FastifyInstance, container: Container): Promise<void>;
5
+ //#endregion
6
+ export { memberCommentsRoutes };
7
+ //# sourceMappingURL=comments.d.ts.map