@hed-hog/lms 0.0.364 → 0.0.366

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 (290) hide show
  1. package/dist/bitcode-wallet/bitcode-wallet.service.d.ts +1 -0
  2. package/dist/bitcode-wallet/bitcode-wallet.service.d.ts.map +1 -1
  3. package/dist/bitcode-wallet/bitcode-wallet.service.js +22 -3
  4. package/dist/bitcode-wallet/bitcode-wallet.service.js.map +1 -1
  5. package/dist/class-group/class-group.controller.d.ts +1 -0
  6. package/dist/class-group/class-group.controller.d.ts.map +1 -1
  7. package/dist/class-group/class-group.service.d.ts +1 -0
  8. package/dist/class-group/class-group.service.d.ts.map +1 -1
  9. package/dist/course/course-export-scorm12-worker.service.d.ts +21 -0
  10. package/dist/course/course-export-scorm12-worker.service.d.ts.map +1 -0
  11. package/dist/course/course-export-scorm12-worker.service.js +109 -0
  12. package/dist/course/course-export-scorm12-worker.service.js.map +1 -0
  13. package/dist/course/course-export-scorm12.service.d.ts +42 -0
  14. package/dist/course/course-export-scorm12.service.d.ts.map +1 -0
  15. package/dist/course/course-export-scorm12.service.js +628 -0
  16. package/dist/course/course-export-scorm12.service.js.map +1 -0
  17. package/dist/course/course-export.service.d.ts +84 -0
  18. package/dist/course/course-export.service.d.ts.map +1 -0
  19. package/dist/course/course-export.service.js +237 -0
  20. package/dist/course/course-export.service.js.map +1 -0
  21. package/dist/course/course-structure.controller.d.ts +20 -10
  22. package/dist/course/course-structure.controller.d.ts.map +1 -1
  23. package/dist/course/course-structure.controller.js +20 -4
  24. package/dist/course/course-structure.controller.js.map +1 -1
  25. package/dist/course/course-structure.service.d.ts +12 -4
  26. package/dist/course/course-structure.service.d.ts.map +1 -1
  27. package/dist/course/course-structure.service.js +98 -23
  28. package/dist/course/course-structure.service.js.map +1 -1
  29. package/dist/course/course-video-agent-pipeline.service.d.ts +70 -0
  30. package/dist/course/course-video-agent-pipeline.service.d.ts.map +1 -0
  31. package/dist/course/course-video-agent-pipeline.service.js +398 -0
  32. package/dist/course/course-video-agent-pipeline.service.js.map +1 -0
  33. package/dist/course/course-video-hls.service.d.ts +71 -0
  34. package/dist/course/course-video-hls.service.d.ts.map +1 -0
  35. package/dist/course/course-video-hls.service.js +784 -0
  36. package/dist/course/course-video-hls.service.js.map +1 -0
  37. package/dist/course/course.controller.d.ts +47 -13
  38. package/dist/course/course.controller.d.ts.map +1 -1
  39. package/dist/course/course.controller.js +40 -26
  40. package/dist/course/course.controller.js.map +1 -1
  41. package/dist/course/course.mcp-tools.js +1 -1
  42. package/dist/course/course.mcp-tools.js.map +1 -1
  43. package/dist/course/course.module.d.ts.map +1 -1
  44. package/dist/course/course.module.js +16 -0
  45. package/dist/course/course.module.js.map +1 -1
  46. package/dist/course/course.service.d.ts +8 -9
  47. package/dist/course/course.service.d.ts.map +1 -1
  48. package/dist/course/course.service.js +93 -50
  49. package/dist/course/course.service.js.map +1 -1
  50. package/dist/course/dto/cleanup-course-storage.dto.d.ts +1 -1
  51. package/dist/course/dto/cleanup-course-storage.dto.d.ts.map +1 -1
  52. package/dist/course/dto/cleanup-course-storage.dto.js +1 -0
  53. package/dist/course/dto/cleanup-course-storage.dto.js.map +1 -1
  54. package/dist/course/dto/cleanup-upload-history.dto.d.ts +1 -1
  55. package/dist/course/dto/cleanup-upload-history.dto.d.ts.map +1 -1
  56. package/dist/course/dto/cleanup-upload-history.dto.js +1 -1
  57. package/dist/course/dto/cleanup-upload-history.dto.js.map +1 -1
  58. package/dist/course/dto/create-course-bulk-job.dto.d.ts +2 -1
  59. package/dist/course/dto/create-course-bulk-job.dto.d.ts.map +1 -1
  60. package/dist/course/dto/create-course-bulk-job.dto.js +6 -1
  61. package/dist/course/dto/create-course-bulk-job.dto.js.map +1 -1
  62. package/dist/course/dto/create-course-export.dto.d.ts +14 -0
  63. package/dist/course/dto/create-course-export.dto.d.ts.map +1 -0
  64. package/dist/course/dto/create-course-export.dto.js +71 -0
  65. package/dist/course/dto/create-course-export.dto.js.map +1 -0
  66. package/dist/course/dto/create-course-structure-lesson.dto.d.ts +2 -2
  67. package/dist/course/dto/create-course-structure-lesson.dto.d.ts.map +1 -1
  68. package/dist/course/dto/create-course-structure-lesson.dto.js +3 -2
  69. package/dist/course/dto/create-course-structure-lesson.dto.js.map +1 -1
  70. package/dist/course/ffmpeg.util.d.ts +10 -0
  71. package/dist/course/ffmpeg.util.d.ts.map +1 -0
  72. package/dist/course/ffmpeg.util.js +79 -0
  73. package/dist/course/ffmpeg.util.js.map +1 -0
  74. package/dist/course/lms-bulk-upload-automation.service.d.ts +18 -1
  75. package/dist/course/lms-bulk-upload-automation.service.d.ts.map +1 -1
  76. package/dist/course/lms-bulk-upload-automation.service.js +106 -8
  77. package/dist/course/lms-bulk-upload-automation.service.js.map +1 -1
  78. package/dist/course/lms-bulk-upload-infra.service.d.ts +1 -0
  79. package/dist/course/lms-bulk-upload-infra.service.d.ts.map +1 -1
  80. package/dist/course/lms-bulk-upload-infra.service.js +32 -8
  81. package/dist/course/lms-bulk-upload-infra.service.js.map +1 -1
  82. package/dist/course/lms-bulk-upload.controller.d.ts +30 -3
  83. package/dist/course/lms-bulk-upload.controller.d.ts.map +1 -1
  84. package/dist/course/lms-bulk-upload.controller.js +43 -2
  85. package/dist/course/lms-bulk-upload.controller.js.map +1 -1
  86. package/dist/course/lms-bulk-upload.service.d.ts +11 -0
  87. package/dist/course/lms-bulk-upload.service.d.ts.map +1 -1
  88. package/dist/course/lms-bulk-upload.service.js +59 -6
  89. package/dist/course/lms-bulk-upload.service.js.map +1 -1
  90. package/dist/course/lms-setting.controller.d.ts +2 -1
  91. package/dist/course/lms-setting.controller.d.ts.map +1 -1
  92. package/dist/course/lms-setting.controller.js +4 -2
  93. package/dist/course/lms-setting.controller.js.map +1 -1
  94. package/dist/course/scorm12-schemas.d.ts +4 -0
  95. package/dist/course/scorm12-schemas.d.ts.map +1 -0
  96. package/dist/course/scorm12-schemas.js +9 -0
  97. package/dist/course/scorm12-schemas.js.map +1 -0
  98. package/dist/enterprise/training/training-admin.controller.d.ts +2 -0
  99. package/dist/enterprise/training/training-admin.controller.d.ts.map +1 -1
  100. package/dist/enterprise/training/training-admin.service.d.ts +2 -0
  101. package/dist/enterprise/training/training-admin.service.d.ts.map +1 -1
  102. package/dist/enterprise/training/training-student.service.d.ts +51 -0
  103. package/dist/enterprise/training/training-student.service.d.ts.map +1 -1
  104. package/dist/enterprise/training/training-student.service.js +217 -4
  105. package/dist/enterprise/training/training-student.service.js.map +1 -1
  106. package/dist/evaluation/evaluation.service.d.ts +18 -0
  107. package/dist/evaluation/evaluation.service.d.ts.map +1 -1
  108. package/dist/evaluation/evaluation.service.js +125 -0
  109. package/dist/evaluation/evaluation.service.js.map +1 -1
  110. package/dist/exam/dto/create-standalone-question.dto.d.ts +12 -0
  111. package/dist/exam/dto/create-standalone-question.dto.d.ts.map +1 -0
  112. package/dist/exam/dto/create-standalone-question.dto.js +70 -0
  113. package/dist/exam/dto/create-standalone-question.dto.js.map +1 -0
  114. package/dist/exam/exam.module.d.ts.map +1 -1
  115. package/dist/exam/exam.module.js +2 -1
  116. package/dist/exam/exam.module.js.map +1 -1
  117. package/dist/exam/exam.service.d.ts +21 -0
  118. package/dist/exam/exam.service.d.ts.map +1 -1
  119. package/dist/exam/exam.service.js +80 -0
  120. package/dist/exam/exam.service.js.map +1 -1
  121. package/dist/exam/question.controller.d.ts +27 -0
  122. package/dist/exam/question.controller.d.ts.map +1 -0
  123. package/dist/exam/question.controller.js +53 -0
  124. package/dist/exam/question.controller.js.map +1 -0
  125. package/dist/lesson-xp-map/lesson-xp-ai-calculation.service.d.ts +4 -0
  126. package/dist/lesson-xp-map/lesson-xp-ai-calculation.service.d.ts.map +1 -1
  127. package/dist/lesson-xp-map/lesson-xp-ai-calculation.service.js +161 -25
  128. package/dist/lesson-xp-map/lesson-xp-ai-calculation.service.js.map +1 -1
  129. package/dist/libraries/lms/tsconfig.tsbuildinfo +1 -1
  130. package/dist/lms-commerce-access.subscriber.d.ts +11 -0
  131. package/dist/lms-commerce-access.subscriber.d.ts.map +1 -0
  132. package/dist/lms-commerce-access.subscriber.js +74 -0
  133. package/dist/lms-commerce-access.subscriber.js.map +1 -0
  134. package/dist/lms.module.d.ts.map +1 -1
  135. package/dist/lms.module.js +16 -5
  136. package/dist/lms.module.js.map +1 -1
  137. package/dist/platforma/dto/heartbeat.dto.d.ts +9 -0
  138. package/dist/platforma/dto/heartbeat.dto.d.ts.map +1 -0
  139. package/dist/platforma/dto/heartbeat.dto.js +50 -0
  140. package/dist/platforma/dto/heartbeat.dto.js.map +1 -0
  141. package/dist/platforma/handlers/emit-certificate.handler.d.ts +27 -0
  142. package/dist/platforma/handlers/emit-certificate.handler.d.ts.map +1 -0
  143. package/dist/platforma/handlers/emit-certificate.handler.js +117 -0
  144. package/dist/platforma/handlers/emit-certificate.handler.js.map +1 -0
  145. package/dist/platforma/handlers/lesson-heartbeat.handler.d.ts +31 -0
  146. package/dist/platforma/handlers/lesson-heartbeat.handler.d.ts.map +1 -0
  147. package/dist/platforma/handlers/lesson-heartbeat.handler.js +281 -0
  148. package/dist/platforma/handlers/lesson-heartbeat.handler.js.map +1 -0
  149. package/dist/platforma/platforma-heartbeat.service.d.ts +10 -0
  150. package/dist/platforma/platforma-heartbeat.service.d.ts.map +1 -0
  151. package/dist/platforma/platforma-heartbeat.service.js +50 -0
  152. package/dist/platforma/platforma-heartbeat.service.js.map +1 -0
  153. package/dist/platforma/platforma-performance.service.d.ts +121 -0
  154. package/dist/platforma/platforma-performance.service.d.ts.map +1 -0
  155. package/dist/platforma/platforma-performance.service.js +500 -0
  156. package/dist/platforma/platforma-performance.service.js.map +1 -0
  157. package/dist/platforma/platforma-search.service.d.ts +21 -0
  158. package/dist/platforma/platforma-search.service.d.ts.map +1 -0
  159. package/dist/platforma/platforma-search.service.js +64 -0
  160. package/dist/platforma/platforma-search.service.js.map +1 -0
  161. package/dist/platforma/platforma-video.service.d.ts +39 -0
  162. package/dist/platforma/platforma-video.service.d.ts.map +1 -0
  163. package/dist/platforma/platforma-video.service.js +301 -0
  164. package/dist/platforma/platforma-video.service.js.map +1 -0
  165. package/dist/platforma/platforma.controller.d.ts +209 -1
  166. package/dist/platforma/platforma.controller.d.ts.map +1 -1
  167. package/dist/platforma/platforma.controller.js +208 -2
  168. package/dist/platforma/platforma.controller.js.map +1 -1
  169. package/dist/realtime/lms-realtime.controller.d.ts +2 -0
  170. package/dist/realtime/lms-realtime.controller.d.ts.map +1 -1
  171. package/dist/realtime/lms-realtime.controller.js +31 -0
  172. package/dist/realtime/lms-realtime.controller.js.map +1 -1
  173. package/dist/realtime/lms-realtime.service.d.ts +1 -1
  174. package/dist/realtime/lms-realtime.service.d.ts.map +1 -1
  175. package/dist/realtime/lms-realtime.service.js.map +1 -1
  176. package/dist/student-xp/dto/grant-skill-card-xp.dto.d.ts +5 -0
  177. package/dist/student-xp/dto/grant-skill-card-xp.dto.d.ts.map +1 -0
  178. package/dist/student-xp/dto/grant-skill-card-xp.dto.js +26 -0
  179. package/dist/student-xp/dto/grant-skill-card-xp.dto.js.map +1 -0
  180. package/dist/student-xp/student-xp.controller.d.ts +15 -0
  181. package/dist/student-xp/student-xp.controller.d.ts.map +1 -1
  182. package/dist/student-xp/student-xp.controller.js +24 -0
  183. package/dist/student-xp/student-xp.controller.js.map +1 -1
  184. package/dist/student-xp/student-xp.service.d.ts +16 -0
  185. package/dist/student-xp/student-xp.service.d.ts.map +1 -1
  186. package/dist/student-xp/student-xp.service.js +51 -1
  187. package/dist/student-xp/student-xp.service.js.map +1 -1
  188. package/hedhog/data/evaluation_topic.yaml +17 -0
  189. package/hedhog/data/menu.yaml +0 -17
  190. package/hedhog/data/queue_definition.yaml +48 -0
  191. package/hedhog/data/route.yaml +94 -124
  192. package/hedhog/data/setting_group.yaml +19 -19
  193. package/hedhog/frontend/app/bulk-upload-sessions/page.tsx.ejs +337 -41
  194. package/hedhog/frontend/app/certificates/models/page.tsx.ejs +182 -29
  195. package/hedhog/frontend/app/classes/_components/classes-calendar-view.tsx.ejs +277 -0
  196. package/hedhog/frontend/app/classes/page.tsx.ejs +127 -20
  197. package/hedhog/frontend/app/courses/[id]/page.tsx.ejs +69 -4
  198. package/hedhog/frontend/app/courses/[id]/structure/_components/course-export-sheet.tsx.ejs +420 -0
  199. package/hedhog/frontend/app/courses/[id]/structure/_components/course-exports-tab.tsx.ejs +308 -0
  200. package/hedhog/frontend/app/courses/[id]/structure/_components/course-overview-tab.tsx.ejs +158 -45
  201. package/hedhog/frontend/app/courses/[id]/structure/_components/course-xp-overview-tab.tsx.ejs +13 -13
  202. package/hedhog/frontend/app/courses/[id]/structure/_components/detail-lesson-xp-tab.tsx.ejs +11 -23
  203. package/hedhog/frontend/app/courses/[id]/structure/_components/detail-lesson.tsx.ejs +51 -63
  204. package/hedhog/frontend/app/courses/[id]/structure/_components/detail-panel.tsx.ejs +8 -3
  205. package/hedhog/frontend/app/courses/[id]/structure/_components/detail-session.tsx.ejs +31 -8
  206. package/hedhog/frontend/app/courses/[id]/structure/_components/drag-overlay.tsx.ejs +16 -9
  207. package/hedhog/frontend/app/courses/[id]/structure/_components/editor-course.tsx.ejs +201 -401
  208. package/hedhog/frontend/app/courses/[id]/structure/_components/editor-lesson.tsx.ejs +378 -690
  209. package/hedhog/frontend/app/courses/[id]/structure/_components/mock-data.ts.ejs +1 -2
  210. package/hedhog/frontend/app/courses/[id]/structure/_components/tree-row-lesson.tsx.ejs +3 -9
  211. package/hedhog/frontend/app/courses/[id]/structure/_components/types.ts.ejs +1 -1
  212. package/hedhog/frontend/app/courses/[id]/structure/_components/xp-premium-pills.tsx.ejs +1 -8
  213. package/hedhog/frontend/app/courses/[id]/structure/_data/adapters/course-structure.adapter.ts.ejs +6 -10
  214. package/hedhog/frontend/app/courses/[id]/structure/_data/services/course-structure.service.ts.ejs +49 -0
  215. package/hedhog/frontend/app/courses/[id]/structure/_data/types/api-course.types.ts.ejs +4 -3
  216. package/hedhog/frontend/app/courses/[id]/structure/_data/use-course-content-overview.ts.ejs +2 -1
  217. package/hedhog/frontend/app/courses/[id]/structure/_data/use-course-exports.ts.ejs +106 -0
  218. package/hedhog/frontend/app/courses/[id]/structure/_data/use-course-structure-mutations.ts.ejs +28 -1
  219. package/hedhog/frontend/app/courses/[id]/structure/_data/use-lms-settings-query.ts.ejs +0 -2
  220. package/hedhog/frontend/app/courses/page.tsx.ejs +85 -9
  221. package/hedhog/frontend/app/enterprise/[id]/page.tsx.ejs +6 -0
  222. package/hedhog/frontend/app/enterprise/_components/enterprise-classes-calendar-tab.tsx.ejs +264 -0
  223. package/hedhog/frontend/app/enterprise/page.tsx.ejs +104 -47
  224. package/hedhog/frontend/app/exams/page.tsx.ejs +38 -4
  225. package/hedhog/frontend/app/instructors/page.tsx.ejs +87 -46
  226. package/hedhog/frontend/app/paths/page.tsx.ejs +38 -4
  227. package/hedhog/frontend/app/training/page.tsx.ejs +38 -4
  228. package/hedhog/frontend/messages/en.json +44 -28
  229. package/hedhog/frontend/messages/pt.json +47 -29
  230. package/hedhog/table/course_enrollment.yaml +3 -0
  231. package/hedhog/table/course_export.yaml +62 -0
  232. package/hedhog/table/lesson_view_event.yaml +66 -0
  233. package/package.json +14 -9
  234. package/src/bitcode-wallet/bitcode-wallet.service.ts +43 -4
  235. package/src/course/course-export-scorm12-worker.service.ts +124 -0
  236. package/src/course/course-export-scorm12.service.ts +668 -0
  237. package/src/course/course-export.service.ts +280 -0
  238. package/src/course/course-structure.controller.ts +16 -2
  239. package/src/course/course-structure.service.ts +100 -7
  240. package/src/course/course-video-agent-pipeline.service.ts +471 -0
  241. package/src/course/course-video-hls.service.ts +966 -0
  242. package/src/course/course.controller.ts +33 -19
  243. package/src/course/course.mcp-tools.ts +1 -1
  244. package/src/course/course.module.ts +16 -0
  245. package/src/course/course.service.ts +119 -61
  246. package/src/course/dto/cleanup-course-storage.dto.ts +1 -0
  247. package/src/course/dto/cleanup-upload-history.dto.ts +1 -1
  248. package/src/course/dto/create-course-bulk-job.dto.ts +7 -3
  249. package/src/course/dto/create-course-export.dto.ts +56 -0
  250. package/src/course/dto/create-course-structure-lesson.dto.ts +4 -3
  251. package/src/course/ffmpeg.util.ts +65 -0
  252. package/src/course/lms-bulk-upload-automation.service.ts +156 -6
  253. package/src/course/lms-bulk-upload-infra.service.ts +39 -6
  254. package/src/course/lms-bulk-upload.controller.ts +32 -2
  255. package/src/course/lms-bulk-upload.service.ts +70 -7
  256. package/src/course/lms-setting.controller.ts +4 -2
  257. package/src/course/scorm12-schemas.ts +9 -0
  258. package/src/enterprise/training/training-student.service.ts +221 -2
  259. package/src/evaluation/evaluation.service.ts +123 -0
  260. package/src/exam/dto/create-standalone-question.dto.ts +66 -0
  261. package/src/exam/exam.module.ts +2 -1
  262. package/src/exam/exam.service.ts +86 -0
  263. package/src/exam/question.controller.ts +28 -0
  264. package/src/lesson-xp-map/lesson-xp-ai-calculation.service.ts +205 -31
  265. package/src/lms-commerce-access.subscriber.ts +88 -0
  266. package/src/lms.module.ts +16 -5
  267. package/src/platforma/dto/heartbeat.dto.ts +30 -0
  268. package/src/platforma/handlers/emit-certificate.handler.ts +117 -0
  269. package/src/platforma/handlers/lesson-heartbeat.handler.ts +343 -0
  270. package/src/platforma/platforma-heartbeat.service.ts +33 -0
  271. package/src/platforma/platforma-performance.service.ts +606 -0
  272. package/src/platforma/platforma-search.service.ts +48 -0
  273. package/src/platforma/platforma-video.service.ts +346 -0
  274. package/src/platforma/platforma.controller.ts +137 -1
  275. package/src/platforma/platforma.service.ts +268 -268
  276. package/src/realtime/lms-realtime.controller.ts +27 -1
  277. package/src/realtime/lms-realtime.service.ts +2 -1
  278. package/src/student-xp/dto/grant-skill-card-xp.dto.ts +10 -0
  279. package/src/student-xp/student-xp.controller.ts +18 -2
  280. package/src/student-xp/student-xp.service.ts +84 -2
  281. package/hedhog/data/video_resolution_profile.yaml +0 -7
  282. package/hedhog/frontend/app/video-resolution-profiles/page.tsx.ejs +0 -607
  283. package/hedhog/table/course_video_resolution_profile.yaml +0 -22
  284. package/hedhog/table/video_resolution_profile.yaml +0 -18
  285. package/src/video-resolution-profile/dto/create-video-resolution-profile.dto.ts +0 -16
  286. package/src/video-resolution-profile/dto/update-video-resolution-profile.dto.ts +0 -16
  287. package/src/video-resolution-profile/video-resolution-profile.controller.ts +0 -62
  288. package/src/video-resolution-profile/video-resolution-profile.mcp-tools.ts +0 -128
  289. package/src/video-resolution-profile/video-resolution-profile.module.ts +0 -13
  290. package/src/video-resolution-profile/video-resolution-profile.service.ts +0 -117
@@ -0,0 +1,301 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ var __param = (this && this.__param) || function (paramIndex, decorator) {
12
+ return function (target, key) { decorator(target, key, paramIndex); }
13
+ };
14
+ var PlatformaVideoService_1;
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.PlatformaVideoService = void 0;
17
+ const core_1 = require("@hed-hog/core");
18
+ const api_prisma_1 = require("@hed-hog/api-prisma");
19
+ const common_1 = require("@nestjs/common");
20
+ const jwt_1 = require("@nestjs/jwt");
21
+ let PlatformaVideoService = PlatformaVideoService_1 = class PlatformaVideoService {
22
+ constructor(prisma, fileService, jwtService) {
23
+ this.prisma = prisma;
24
+ this.fileService = fileService;
25
+ this.jwtService = jwtService;
26
+ this.logger = new common_1.Logger(PlatformaVideoService_1.name);
27
+ }
28
+ async getVideoOptions(lessonId) {
29
+ const lesson = await this.prisma.course_lesson.findFirst({
30
+ where: { id: lessonId, published: true },
31
+ select: {
32
+ id: true,
33
+ course_lesson_file: {
34
+ where: { file_id: { not: null } },
35
+ select: { id: true, title: true, type: true, file: { select: { id: true } } },
36
+ },
37
+ },
38
+ });
39
+ if (!lesson)
40
+ throw new common_1.NotFoundException('Lesson not found');
41
+ // HLS takes priority over legacy MP4 profiles
42
+ const hlsFile = lesson.course_lesson_file.find((f) => { var _a; return f.type === 'video_hls' && ((_a = f.file) === null || _a === void 0 ? void 0 : _a.id); });
43
+ if (hlsFile) {
44
+ return [{ type: 'video_hls', label: 'HLS', fileId: hlsFile.file.id }];
45
+ }
46
+ const videoFiles = lesson.course_lesson_file.filter((f) => { var _a; return f.type === 'video_original' || ((_a = f.type) === null || _a === void 0 ? void 0 : _a.startsWith('video_profile:')); });
47
+ if (videoFiles.length === 0)
48
+ return [];
49
+ return videoFiles
50
+ .filter((f) => { var _a; return (_a = f.file) === null || _a === void 0 ? void 0 : _a.id; })
51
+ .map((f) => {
52
+ var _a;
53
+ const profileMatch = (_a = f.type) === null || _a === void 0 ? void 0 : _a.match(/^video_profile:(\d+)$/);
54
+ const profileId = profileMatch ? Number(profileMatch[1]) : null;
55
+ const label = f.type === 'video_original'
56
+ ? 'Original'
57
+ : profileId !== null
58
+ ? f.title || `Perfil ${profileId}`
59
+ : f.title || f.type || 'Vídeo';
60
+ return { type: f.type, label, fileId: f.file.id };
61
+ });
62
+ }
63
+ async generateVideoToken(lessonId, quality) {
64
+ var _a;
65
+ const options = await this.getVideoOptions(lessonId);
66
+ if (options.length === 0)
67
+ throw new common_1.NotFoundException('No video available for this lesson');
68
+ const selected = quality
69
+ ? ((_a = options.find((o) => o.type === quality)) !== null && _a !== void 0 ? _a : options[0])
70
+ : options[0];
71
+ const token = this.jwtService.sign({ fileId: selected.fileId, lessonId }, { secret: process.env.JWT_SECRET, expiresIn: '4h' });
72
+ return { token, label: selected.label, type: selected.type, expiresIn: 14400 };
73
+ }
74
+ async streamVideo(token, req, res) {
75
+ let fileId;
76
+ try {
77
+ const payload = this.jwtService.verify(token, {
78
+ secret: process.env.JWT_SECRET,
79
+ });
80
+ fileId = payload.fileId;
81
+ }
82
+ catch (_a) {
83
+ throw new common_1.UnauthorizedException('Invalid or expired video token');
84
+ }
85
+ const rangeHeader = req.headers['range'];
86
+ let start;
87
+ let end;
88
+ if (rangeHeader) {
89
+ const match = rangeHeader.match(/bytes=(\d+)-(\d*)/);
90
+ if (match) {
91
+ start = parseInt(match[1], 10);
92
+ end = match[2] ? parseInt(match[2], 10) : undefined;
93
+ }
94
+ }
95
+ const result = await this.fileService.openReadStreamWithRange(fileId, start, end);
96
+ if (!result)
97
+ throw new common_1.NotFoundException('Video file not found');
98
+ const { stream, totalSize, start: resolvedStart, end: resolvedEnd, contentLength, mimetype } = result;
99
+ const headers = {
100
+ 'Content-Type': mimetype,
101
+ 'Content-Disposition': 'inline',
102
+ 'Accept-Ranges': 'bytes',
103
+ 'Cache-Control': 'no-store',
104
+ };
105
+ if (start !== undefined) {
106
+ headers['Content-Range'] = `bytes ${resolvedStart}-${resolvedEnd !== null && resolvedEnd !== void 0 ? resolvedEnd : totalSize - 1}/${totalSize || '*'}`;
107
+ headers['Content-Length'] = contentLength;
108
+ res.writeHead(206, headers);
109
+ }
110
+ else {
111
+ if (totalSize > 0)
112
+ headers['Content-Length'] = totalSize;
113
+ res.writeHead(200, headers);
114
+ }
115
+ stream.pipe(res);
116
+ }
117
+ // ---------------------------------------------------------------------------
118
+ // HLS endpoints
119
+ // ---------------------------------------------------------------------------
120
+ async generateHlsToken(lessonId) {
121
+ const lesson = await this.prisma.course_lesson.findFirst({
122
+ where: { id: lessonId, published: true },
123
+ select: {
124
+ id: true,
125
+ course_lesson_file: {
126
+ where: { type: 'video_hls', file_id: { not: null } },
127
+ select: { id: true },
128
+ },
129
+ },
130
+ });
131
+ if (!lesson)
132
+ throw new common_1.NotFoundException('Lesson not found');
133
+ if (lesson.course_lesson_file.length === 0)
134
+ throw new common_1.NotFoundException('No HLS stream available for this lesson');
135
+ const token = this.jwtService.sign({ lessonId }, { secret: process.env.JWT_SECRET, expiresIn: '4h' });
136
+ return { token, expiresIn: 14400 };
137
+ }
138
+ verifyHlsToken(token) {
139
+ try {
140
+ return this.jwtService.verify(token, {
141
+ secret: process.env.JWT_SECRET,
142
+ });
143
+ }
144
+ catch (_a) {
145
+ throw new common_1.UnauthorizedException('Invalid or expired HLS token');
146
+ }
147
+ }
148
+ async serveHlsMasterManifest(token, req, res) {
149
+ const { lessonId } = this.verifyHlsToken(token);
150
+ const manifestFile = await this.prisma.file.findFirst({
151
+ where: {
152
+ location: `lms/lessons/hls/${lessonId}`,
153
+ filename: 'master.m3u8',
154
+ },
155
+ select: { id: true },
156
+ });
157
+ if (!manifestFile)
158
+ throw new common_1.NotFoundException('HLS master manifest not found');
159
+ const { stream } = await this.fileService.openReadStreamById(manifestFile.id);
160
+ const chunks = [];
161
+ await new Promise((resolve, reject) => {
162
+ stream.on('data', (chunk) => chunks.push(chunk));
163
+ stream.on('end', resolve);
164
+ stream.on('error', reject);
165
+ });
166
+ const baseUrl = `${req.protocol}://${req.get('host')}`;
167
+ const content = Buffer.concat(chunks).toString('utf8');
168
+ // Rewrite relative variant playlist paths to absolute authenticated URLs
169
+ const rewritten = content.replace(/^(stream_\d+\/playlist\.m3u8)$/gm, (_, variantPath) => `${baseUrl}/lms/platforma/hls/${token}/${variantPath}`);
170
+ res.set({
171
+ 'Content-Type': 'application/x-mpegURL',
172
+ 'Cache-Control': 'no-store',
173
+ 'Access-Control-Allow-Origin': '*',
174
+ });
175
+ res.send(rewritten);
176
+ }
177
+ async serveHlsVariantPlaylist(token, variant, req, res) {
178
+ const { lessonId } = this.verifyHlsToken(token);
179
+ const playlistFile = await this.prisma.file.findFirst({
180
+ where: {
181
+ location: `lms/lessons/hls/${lessonId}/${variant}`,
182
+ filename: 'playlist.m3u8',
183
+ },
184
+ select: { id: true },
185
+ });
186
+ if (!playlistFile)
187
+ throw new common_1.NotFoundException('HLS variant playlist not found');
188
+ const { stream } = await this.fileService.openReadStreamById(playlistFile.id);
189
+ const chunks = [];
190
+ await new Promise((resolve, reject) => {
191
+ stream.on('data', (chunk) => chunks.push(chunk));
192
+ stream.on('end', resolve);
193
+ stream.on('error', reject);
194
+ });
195
+ const baseUrl = `${req.protocol}://${req.get('host')}`;
196
+ const content = Buffer.concat(chunks).toString('utf8');
197
+ // Rewrite relative segment paths to absolute authenticated URLs
198
+ const rewritten = content.replace(/^(seg\d+\.ts)$/gm, (_, segName) => `${baseUrl}/lms/platforma/hls/${token}/${variant}/${segName}`);
199
+ res.set({
200
+ 'Content-Type': 'application/x-mpegURL',
201
+ 'Cache-Control': 'no-store',
202
+ 'Access-Control-Allow-Origin': '*',
203
+ });
204
+ res.send(rewritten);
205
+ }
206
+ async serveHlsSegment(token, variant, segment, res) {
207
+ const { lessonId } = this.verifyHlsToken(token);
208
+ if (!/^seg\d+\.ts$/.test(segment)) {
209
+ throw new common_1.NotFoundException('Invalid segment name');
210
+ }
211
+ const segmentFile = await this.prisma.file.findFirst({
212
+ where: {
213
+ location: `lms/lessons/hls/${lessonId}/${variant}`,
214
+ filename: segment,
215
+ },
216
+ select: { id: true },
217
+ });
218
+ if (!segmentFile)
219
+ throw new common_1.NotFoundException('HLS segment not found');
220
+ const { stream } = await this.fileService.openReadStreamById(segmentFile.id);
221
+ res.set({
222
+ 'Content-Type': 'video/MP2T',
223
+ 'Cache-Control': 'public, max-age=31536000, immutable',
224
+ 'Access-Control-Allow-Origin': '*',
225
+ });
226
+ stream.pipe(res);
227
+ }
228
+ // ---------------------------------------------------------------------------
229
+ // Subtitle (VTT) endpoints
230
+ // ---------------------------------------------------------------------------
231
+ async generateSubtitlesToken(lessonId) {
232
+ const lesson = await this.prisma.course_lesson.findFirst({
233
+ where: { id: lessonId, published: true },
234
+ select: { id: true },
235
+ });
236
+ if (!lesson)
237
+ throw new common_1.NotFoundException('Lesson not found');
238
+ const count = await this.prisma.course_lesson_transcription_segment.count({
239
+ where: { course_lesson_id: lessonId },
240
+ });
241
+ if (count === 0)
242
+ throw new common_1.NotFoundException('No subtitles available for this lesson');
243
+ const token = this.jwtService.sign({ lessonId, type: 'subtitles' }, { secret: process.env.JWT_SECRET, expiresIn: '4h' });
244
+ return { token, expiresIn: 14400 };
245
+ }
246
+ async serveSubtitles(token, res) {
247
+ let lessonId;
248
+ try {
249
+ const payload = this.jwtService.verify(token, {
250
+ secret: process.env.JWT_SECRET,
251
+ });
252
+ if (payload.type !== 'subtitles')
253
+ throw new Error('Wrong token type');
254
+ lessonId = payload.lessonId;
255
+ }
256
+ catch (_a) {
257
+ throw new common_1.UnauthorizedException('Invalid or expired subtitles token');
258
+ }
259
+ const segments = await this.prisma.course_lesson_transcription_segment.findMany({
260
+ where: { course_lesson_id: lessonId },
261
+ orderBy: { start_seconds: 'asc' },
262
+ select: { start_seconds: true, end_seconds: true, text: true },
263
+ });
264
+ const vtt = this.buildVtt(segments);
265
+ res.set({
266
+ 'Content-Type': 'text/vtt; charset=utf-8',
267
+ 'Cache-Control': 'no-store',
268
+ 'Access-Control-Allow-Origin': '*',
269
+ });
270
+ res.send(vtt);
271
+ }
272
+ secondsToVttTime(seconds) {
273
+ const s = Number(seconds);
274
+ const h = Math.floor(s / 3600);
275
+ const m = Math.floor((s % 3600) / 60);
276
+ const sec = Math.floor(s % 60);
277
+ const ms = Math.round((s % 1) * 1000);
278
+ return `${String(h).padStart(2, '0')}:${String(m).padStart(2, '0')}:${String(sec).padStart(2, '0')}.${String(ms).padStart(3, '0')}`;
279
+ }
280
+ buildVtt(segments) {
281
+ if (segments.length === 0)
282
+ return 'WEBVTT\n';
283
+ const cues = segments.map((seg, i) => {
284
+ const start = this.secondsToVttTime(seg.start_seconds);
285
+ const end = this.secondsToVttTime(seg.end_seconds);
286
+ return `${i + 1}\n${start} --> ${end}\n${seg.text}`;
287
+ });
288
+ return `WEBVTT\n\n${cues.join('\n\n')}\n`;
289
+ }
290
+ };
291
+ exports.PlatformaVideoService = PlatformaVideoService;
292
+ exports.PlatformaVideoService = PlatformaVideoService = PlatformaVideoService_1 = __decorate([
293
+ (0, common_1.Injectable)(),
294
+ __param(0, (0, common_1.Inject)((0, common_1.forwardRef)(() => api_prisma_1.PrismaService))),
295
+ __param(1, (0, common_1.Inject)((0, common_1.forwardRef)(() => core_1.FileService))),
296
+ __param(2, (0, common_1.Inject)((0, common_1.forwardRef)(() => jwt_1.JwtService))),
297
+ __metadata("design:paramtypes", [api_prisma_1.PrismaService,
298
+ core_1.FileService,
299
+ jwt_1.JwtService])
300
+ ], PlatformaVideoService);
301
+ //# sourceMappingURL=platforma-video.service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"platforma-video.service.js","sourceRoot":"","sources":["../../src/platforma/platforma-video.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wCAA4C;AAC5C,oDAAoD;AACpD,2CAOwB;AACxB,qCAAyC;AAIlC,IAAM,qBAAqB,6BAA3B,MAAM,qBAAqB;IAEhC,YAEE,MAAsC,EAEtC,WAAyC,EAEzC,UAAuC;QAJtB,WAAM,GAAN,MAAM,CAAe;QAErB,gBAAW,GAAX,WAAW,CAAa;QAExB,eAAU,GAAV,UAAU,CAAY;QAPxB,WAAM,GAAG,IAAI,eAAM,CAAC,uBAAqB,CAAC,IAAI,CAAC,CAAC;IAQ9D,CAAC;IAEJ,KAAK,CAAC,eAAe,CAAC,QAAgB;QACpC,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,SAAS,CAAC;YACvD,KAAK,EAAE,EAAE,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,IAAI,EAAE;YACxC,MAAM,EAAE;gBACN,EAAE,EAAE,IAAI;gBACR,kBAAkB,EAAE;oBAClB,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE;oBAC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M,KAAK,CAAC;YAAE,OAAO,UAAU,CAAC;QAC7C,MAAM,IAAI,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC,EAAE,EAAE;YACnC,MAAM,KAAK,GAAG,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;YACvD,MAAM,GAAG,GAAG,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;YACnD,OAAO,GAAG,CAAC,GAAG,CAAC,KAAK,KAAK,QAAQ,GAAG,KAAK,GAAG,CAAC,IAAI,EAAE,CAAC;QACtD,CAAC,CAAC,CAAC;QACH,OAAO,aAAa,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC;IAC5C,CAAC;CACF,CAAA;AA3UY,sDAAqB;gCAArB,qBAAqB;IADjC,IAAA,mBAAU,GAAE;IAIR,WAAA,IAAA,eAAM,EAAC,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,0BAAa,CAAC,CAAC,CAAA;IAEvC,WAAA,IAAA,eAAM,EAAC,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,kBAAW,CAAC,CAAC,CAAA;IAErC,WAAA,IAAA,eAAM,EAAC,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,gBAAU,CAAC,CAAC,CAAA;qCAHZ,0BAAa;QAER,kBAAW;QAEZ,gBAAU;GAR9B,qBAAqB,CA2UjC"}
@@ -2,15 +2,26 @@ import { NotificationService } from '@hed-hog/core';
2
2
  import type { Request, Response } from 'express';
3
3
  import { BitcodeWalletService } from '../bitcode-wallet/bitcode-wallet.service';
4
4
  import { CreateCurrentBitcodeWalletTransactionDto } from '../bitcode-wallet/dto/create-current-bitcode-wallet-transaction.dto';
5
+ import { EvaluationService } from '../evaluation/evaluation.service';
5
6
  import { TrainingStudentService } from '../enterprise/training/training-student.service';
7
+ import { HeartbeatDto } from './dto/heartbeat.dto';
6
8
  import { UpdatePlatformaProfileDto } from './dto/update-profile.dto';
9
+ import { PlatformaHeartbeatService } from './platforma-heartbeat.service';
10
+ import { PlatformaPerformanceService } from './platforma-performance.service';
7
11
  import { PlatformaService } from './platforma.service';
12
+ import { PlatformaSearchService } from './platforma-search.service';
13
+ import { PlatformaVideoService } from './platforma-video.service';
8
14
  export declare class PlataformaController {
9
15
  private readonly trainingStudentService;
10
16
  private readonly notificationService;
11
17
  private readonly platforma;
12
18
  private readonly bitcodeWalletService;
13
- constructor(trainingStudentService: TrainingStudentService, notificationService: NotificationService, platforma: PlatformaService, bitcodeWalletService: BitcodeWalletService);
19
+ private readonly platformaVideoService;
20
+ private readonly evaluationService;
21
+ private readonly heartbeatService;
22
+ private readonly performanceService;
23
+ private readonly searchService;
24
+ constructor(trainingStudentService: TrainingStudentService, notificationService: NotificationService, platforma: PlatformaService, bitcodeWalletService: BitcodeWalletService, platformaVideoService: PlatformaVideoService, evaluationService: EvaluationService, heartbeatService: PlatformaHeartbeatService, performanceService: PlatformaPerformanceService, searchService: PlatformaSearchService);
14
25
  getHome(userId: number): Promise<{
15
26
  user: {
16
27
  id: number;
@@ -221,6 +232,7 @@ export declare class PlataformaController {
221
232
  level: import("@prisma/client").$Enums.course_level_de6adae713_enum;
222
233
  lessons: number;
223
234
  image: string;
235
+ logoImage: string;
224
236
  categoryKey: string;
225
237
  categoryLabel: string;
226
238
  enrollmentCount: number;
@@ -235,6 +247,102 @@ export declare class PlataformaController {
235
247
  pageSize: number;
236
248
  lastPage: number;
237
249
  }>;
250
+ getCourseBySlug(slug: string, userId?: number): Promise<{
251
+ id: number;
252
+ slug: string;
253
+ title: string;
254
+ description: string;
255
+ durationHours: number;
256
+ level: import("@prisma/client").$Enums.course_level_de6adae713_enum;
257
+ image: string;
258
+ logoImage: string;
259
+ primaryColor: string;
260
+ categoryKey: string;
261
+ categoryLabel: string;
262
+ completedLessonIds: number[];
263
+ progressPercent: number;
264
+ modules: {
265
+ id: number;
266
+ title: string;
267
+ lessonCount: number;
268
+ durationHours: number;
269
+ lessons: {
270
+ id: number;
271
+ title: string;
272
+ type: import("@prisma/client").$Enums.course_lesson_type_c6739e3633_enum;
273
+ durationSeconds: number;
274
+ hasResources: boolean;
275
+ }[];
276
+ }[];
277
+ instructor: {
278
+ name: string;
279
+ avatar: string;
280
+ };
281
+ }>;
282
+ search(q?: string, types?: string, pageSize?: string): Promise<{
283
+ courses: any;
284
+ tracks: any;
285
+ exams: any;
286
+ classrooms: any;
287
+ instructors: any;
288
+ }>;
289
+ getLessonDetail(lessonId: number): Promise<{
290
+ id: number;
291
+ title: string;
292
+ description: string;
293
+ type: import("@prisma/client").$Enums.course_lesson_type_c6739e3633_enum;
294
+ content: string;
295
+ durationSeconds: number;
296
+ videos: {
297
+ type: string;
298
+ label: string;
299
+ fileId: number;
300
+ }[];
301
+ resources: {
302
+ id: number;
303
+ title: string;
304
+ url: string;
305
+ }[];
306
+ }>;
307
+ getVideoToken(lessonId: number, quality?: string): Promise<{
308
+ token: string;
309
+ label: string;
310
+ type: string;
311
+ expiresIn: number;
312
+ }>;
313
+ getHlsToken(lessonId: number): Promise<{
314
+ token: string;
315
+ expiresIn: number;
316
+ }>;
317
+ streamVideo(token: string, req: Request, res: Response): Promise<void>;
318
+ serveHlsMaster(token: string, req: Request, res: Response): Promise<void>;
319
+ serveHlsVariant(token: string, variant: string, req: Request, res: Response): Promise<void>;
320
+ serveHlsSegment(token: string, variant: string, segment: string, res: Response): Promise<void>;
321
+ getSubtitlesToken(lessonId: number): Promise<{
322
+ token: string;
323
+ expiresIn: number;
324
+ }>;
325
+ getCourseLessonEvaluationTopics(lessonId: number): Promise<{
326
+ id: number;
327
+ name: string;
328
+ description: string;
329
+ order: number;
330
+ }[]>;
331
+ getMyLessonEvaluation(lessonId: number, userId: number): Promise<{
332
+ topicId: number;
333
+ score: number;
334
+ comment: string;
335
+ }[]>;
336
+ submitLessonEvaluation(lessonId: number, userId: number, body: {
337
+ ratings: Array<{
338
+ topicId: number;
339
+ score: number;
340
+ comment?: string;
341
+ }>;
342
+ }): Promise<{
343
+ saved: number;
344
+ }>;
345
+ serveSubtitles(token: string, res: Response): Promise<void>;
238
346
  listNotifications(userId: number, page?: string, pageSize?: string, search?: string, sortField?: string, sortOrder?: 'asc' | 'desc'): Promise<{
239
347
  total: any;
240
348
  lastPage: number;
@@ -350,6 +458,106 @@ export declare class PlataformaController {
350
458
  createdAt: string;
351
459
  updatedAt: string;
352
460
  }>;
461
+ getPerformanceSummary(userId: number, period?: string): Promise<{
462
+ kpis: ({
463
+ id: string;
464
+ title: string;
465
+ value: string;
466
+ subtitle: string;
467
+ change: string;
468
+ icon: "clock";
469
+ color: string;
470
+ sparkline: {
471
+ index: number;
472
+ value: number;
473
+ }[];
474
+ } | {
475
+ id: string;
476
+ title: string;
477
+ value: string;
478
+ subtitle: string;
479
+ change: string;
480
+ icon: "bookOpen";
481
+ color: string;
482
+ sparkline: {
483
+ index: number;
484
+ value: number;
485
+ }[];
486
+ } | {
487
+ id: string;
488
+ title: string;
489
+ value: string;
490
+ subtitle: string;
491
+ change: string;
492
+ icon: "pencil";
493
+ color: string;
494
+ sparkline: {
495
+ index: number;
496
+ value: number;
497
+ }[];
498
+ } | {
499
+ id: string;
500
+ title: string;
501
+ value: string;
502
+ subtitle: string;
503
+ change: string;
504
+ icon: "target";
505
+ color: string;
506
+ sparkline: {
507
+ index: number;
508
+ value: number;
509
+ }[];
510
+ } | {
511
+ id: string;
512
+ title: string;
513
+ value: string;
514
+ subtitle: string;
515
+ change: string;
516
+ icon: "coins";
517
+ color: string;
518
+ sparkline: {
519
+ index: number;
520
+ value: number;
521
+ }[];
522
+ })[];
523
+ studyHours: {
524
+ month: string;
525
+ hours: number;
526
+ }[];
527
+ areaPerformance: {
528
+ area: string;
529
+ score: number;
530
+ }[];
531
+ accuracyDistribution: {
532
+ label: string;
533
+ value: number;
534
+ fill: string;
535
+ }[];
536
+ lessonsByCategory: {
537
+ label: string;
538
+ value: number;
539
+ fill: string;
540
+ }[];
541
+ avgLessonTime: {
542
+ month: string;
543
+ minutes: number;
544
+ }[];
545
+ trailProgress: {
546
+ trail: string;
547
+ progress: number;
548
+ color: string;
549
+ }[];
550
+ ranking: {
551
+ id: string;
552
+ position: number;
553
+ name: string;
554
+ score: string;
555
+ avatar: string | null;
556
+ }[];
557
+ }>;
558
+ heartbeat(userId: number, dto: HeartbeatDto, req: Request): Promise<{
559
+ ok: boolean;
560
+ }>;
353
561
  getProfile(userId: number): Promise<{
354
562
  id: number;
355
563
  name: string;
@@ -1 +1 @@
1
- {"version":3,"file":"platforma.controller.d.ts","sourceRoot":"","sources":["../../src/platforma/platforma.controller.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAEpD,OAAO,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACjD,OAAO,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AAChF,OAAO,EAAE,wCAAwC,EAAE,MAAM,qEAAqE,CAAC;AAC/H,OAAO,EAAE,sBAAsB,EAAE,MAAM,iDAAiD,CAAC;AACzF,OAAO,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAC;AACrE,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAEvD,qBAEa,oBAAoB;IAE7B,OAAO,CAAC,QAAQ,CAAC,sBAAsB;IACvC,OAAO,CAAC,QAAQ,CAAC,mBAAmB;IACpC,OAAO,CAAC,QAAQ,CAAC,SAAS;IAC1B,OAAO,CAAC,QAAQ,CAAC,oBAAoB;gBAHpB,sBAAsB,EAAE,sBAAsB,EAC9C,mBAAmB,EAAE,mBAAmB,EACxC,SAAS,EAAE,gBAAgB,EAC3B,oBAAoB,EAAE,oBAAoB;IAI7D,OAAO,CAAa,MAAM,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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