@hed-hog/lms 0.0.366 → 0.0.370

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 (169) hide show
  1. package/dist/certificate/certificate.controller.d.ts +1 -1
  2. package/dist/certificate/certificate.controller.d.ts.map +1 -1
  3. package/dist/certificate/certificate.controller.js +4 -2
  4. package/dist/certificate/certificate.controller.js.map +1 -1
  5. package/dist/certificate/certificate.service.d.ts +50 -0
  6. package/dist/certificate/certificate.service.d.ts.map +1 -1
  7. package/dist/certificate/certificate.service.js +73 -0
  8. package/dist/certificate/certificate.service.js.map +1 -1
  9. package/dist/course/course-ai-usage.service.d.ts +58 -0
  10. package/dist/course/course-ai-usage.service.d.ts.map +1 -0
  11. package/dist/course/course-ai-usage.service.js +176 -0
  12. package/dist/course/course-ai-usage.service.js.map +1 -0
  13. package/dist/course/course-audio-transcription.service.d.ts +65 -1
  14. package/dist/course/course-audio-transcription.service.d.ts.map +1 -1
  15. package/dist/course/course-audio-transcription.service.js +381 -29
  16. package/dist/course/course-audio-transcription.service.js.map +1 -1
  17. package/dist/course/course-export-scorm12.service.d.ts +3 -0
  18. package/dist/course/course-export-scorm12.service.d.ts.map +1 -1
  19. package/dist/course/course-export-scorm12.service.js +141 -6
  20. package/dist/course/course-export-scorm12.service.js.map +1 -1
  21. package/dist/course/course-export.service.d.ts.map +1 -1
  22. package/dist/course/course-export.service.js +2 -1
  23. package/dist/course/course-export.service.js.map +1 -1
  24. package/dist/course/course-lesson.controller.d.ts +25 -3
  25. package/dist/course/course-lesson.controller.d.ts.map +1 -1
  26. package/dist/course/course-lesson.controller.js +71 -8
  27. package/dist/course/course-lesson.controller.js.map +1 -1
  28. package/dist/course/course-structure.controller.d.ts +26 -5
  29. package/dist/course/course-structure.controller.d.ts.map +1 -1
  30. package/dist/course/course-structure.controller.js +31 -1
  31. package/dist/course/course-structure.controller.js.map +1 -1
  32. package/dist/course/course-structure.service.d.ts +37 -5
  33. package/dist/course/course-structure.service.d.ts.map +1 -1
  34. package/dist/course/course-structure.service.js +165 -20
  35. package/dist/course/course-structure.service.js.map +1 -1
  36. package/dist/course/course-transcription-translation.service.d.ts +31 -0
  37. package/dist/course/course-transcription-translation.service.d.ts.map +1 -0
  38. package/dist/course/course-transcription-translation.service.js +227 -0
  39. package/dist/course/course-transcription-translation.service.js.map +1 -0
  40. package/dist/course/course-video-agent-pipeline.service.js +7 -7
  41. package/dist/course/course-video-agent-pipeline.service.js.map +1 -1
  42. package/dist/course/course.module.d.ts.map +1 -1
  43. package/dist/course/course.module.js +4 -0
  44. package/dist/course/course.module.js.map +1 -1
  45. package/dist/course/dto/create-course-bulk-job.dto.d.ts +2 -1
  46. package/dist/course/dto/create-course-bulk-job.dto.d.ts.map +1 -1
  47. package/dist/course/dto/create-course-bulk-job.dto.js +6 -1
  48. package/dist/course/dto/create-course-bulk-job.dto.js.map +1 -1
  49. package/dist/course/dto/create-course-export.dto.d.ts +1 -0
  50. package/dist/course/dto/create-course-export.dto.d.ts.map +1 -1
  51. package/dist/course/dto/create-course-export.dto.js +6 -0
  52. package/dist/course/dto/create-course-export.dto.js.map +1 -1
  53. package/dist/course/lms-bulk-upload-automation.service.d.ts.map +1 -1
  54. package/dist/course/lms-bulk-upload-automation.service.js +26 -13
  55. package/dist/course/lms-bulk-upload-automation.service.js.map +1 -1
  56. package/dist/course/lms-bulk-upload.controller.d.ts +3 -0
  57. package/dist/course/lms-bulk-upload.controller.d.ts.map +1 -1
  58. package/dist/course/lms-bulk-upload.service.d.ts +3 -0
  59. package/dist/course/lms-bulk-upload.service.d.ts.map +1 -1
  60. package/dist/course/lms-bulk-upload.service.js +48 -29
  61. package/dist/course/lms-bulk-upload.service.js.map +1 -1
  62. package/dist/course/subtitle.util.d.ts +46 -0
  63. package/dist/course/subtitle.util.d.ts.map +1 -0
  64. package/dist/course/subtitle.util.js +206 -0
  65. package/dist/course/subtitle.util.js.map +1 -0
  66. package/dist/enterprise/training/training-student.service.d.ts +27 -0
  67. package/dist/enterprise/training/training-student.service.d.ts.map +1 -1
  68. package/dist/enterprise/training/training-student.service.js +197 -10
  69. package/dist/enterprise/training/training-student.service.js.map +1 -1
  70. package/dist/lesson-xp-map/lesson-xp-ai-calculation.service.d.ts +3 -1
  71. package/dist/lesson-xp-map/lesson-xp-ai-calculation.service.d.ts.map +1 -1
  72. package/dist/lesson-xp-map/lesson-xp-ai-calculation.service.js +19 -5
  73. package/dist/lesson-xp-map/lesson-xp-ai-calculation.service.js.map +1 -1
  74. package/dist/lesson-xp-map/lesson-xp-map.module.d.ts.map +1 -1
  75. package/dist/lesson-xp-map/lesson-xp-map.module.js +2 -1
  76. package/dist/lesson-xp-map/lesson-xp-map.module.js.map +1 -1
  77. package/dist/libraries/lms/tsconfig.tsbuildinfo +1 -1
  78. package/dist/lms.module.d.ts.map +1 -1
  79. package/dist/lms.module.js +4 -0
  80. package/dist/lms.module.js.map +1 -1
  81. package/dist/platforma/platforma-performance.service.js +121 -121
  82. package/dist/platforma/platforma-video.service.d.ts +8 -0
  83. package/dist/platforma/platforma-video.service.d.ts.map +1 -1
  84. package/dist/platforma/platforma-video.service.js +45 -2
  85. package/dist/platforma/platforma-video.service.js.map +1 -1
  86. package/dist/platforma/platforma.controller.d.ts +99 -1
  87. package/dist/platforma/platforma.controller.d.ts.map +1 -1
  88. package/dist/platforma/platforma.controller.js +111 -2
  89. package/dist/platforma/platforma.controller.js.map +1 -1
  90. package/dist/training/dto/create-training.dto.d.ts +9 -0
  91. package/dist/training/dto/create-training.dto.d.ts.map +1 -1
  92. package/dist/training/dto/create-training.dto.js +45 -1
  93. package/dist/training/dto/create-training.dto.js.map +1 -1
  94. package/dist/training/training.controller.d.ts +144 -0
  95. package/dist/training/training.controller.d.ts.map +1 -1
  96. package/dist/training/training.service.d.ts +149 -0
  97. package/dist/training/training.service.d.ts.map +1 -1
  98. package/dist/training/training.service.js +332 -167
  99. package/dist/training/training.service.js.map +1 -1
  100. package/hedhog/data/image_type.yaml +10 -0
  101. package/hedhog/data/route.yaml +251 -0
  102. package/hedhog/data/setting_group.yaml +97 -0
  103. package/hedhog/frontend/app/bulk-upload-sessions/page.tsx.ejs +139 -27
  104. package/hedhog/frontend/app/courses/[id]/_components/CourseFlagsCard.tsx.ejs +69 -57
  105. package/hedhog/frontend/app/courses/[id]/_components/CourseIssuedCertificatesCard.tsx.ejs +168 -0
  106. package/hedhog/frontend/app/courses/[id]/structure/_components/course-ai-costs-tab.tsx.ejs +191 -0
  107. package/hedhog/frontend/app/courses/[id]/structure/_components/course-export-sheet.tsx.ejs +81 -1
  108. package/hedhog/frontend/app/courses/[id]/structure/_components/course-exports-tab.tsx.ejs +12 -0
  109. package/hedhog/frontend/app/courses/[id]/structure/_components/detail-course.tsx.ejs +69 -1
  110. package/hedhog/frontend/app/courses/[id]/structure/_components/detail-lesson.tsx.ejs +267 -19
  111. package/hedhog/frontend/app/courses/[id]/structure/_components/editor-bulk.tsx.ejs +114 -86
  112. package/hedhog/frontend/app/courses/[id]/structure/_components/editor-course.tsx.ejs +239 -31
  113. package/hedhog/frontend/app/courses/[id]/structure/_components/editor-lesson.tsx.ejs +344 -59
  114. package/hedhog/frontend/app/courses/[id]/structure/_components/lesson-video-preview.tsx.ejs +200 -0
  115. package/hedhog/frontend/app/courses/[id]/structure/_components/tree-row-lesson.tsx.ejs +1 -0
  116. package/hedhog/frontend/app/courses/[id]/structure/_components/types.ts.ejs +3 -0
  117. package/hedhog/frontend/app/courses/[id]/structure/_data/adapters/course-structure.adapter.ts.ejs +19 -7
  118. package/hedhog/frontend/app/courses/[id]/structure/_data/types/api-course.types.ts.ejs +4 -0
  119. package/hedhog/frontend/app/courses/[id]/structure/_data/use-course-ai-costs.ts.ejs +40 -0
  120. package/hedhog/frontend/app/courses/[id]/structure/_data/use-course-exports.ts.ejs +25 -0
  121. package/hedhog/frontend/app/courses/[id]/structure/_data/use-course-structure-mutations.ts.ejs +148 -0
  122. package/hedhog/frontend/app/courses/[id]/structure/_data/use-transcription-segments.ts.ejs +157 -8
  123. package/hedhog/frontend/app/courses/_components/CourseRowActions.tsx.ejs +1 -22
  124. package/hedhog/frontend/app/courses/page.tsx.ejs +26 -4
  125. package/hedhog/frontend/app/paths/page.tsx.ejs +612 -164
  126. package/hedhog/frontend/messages/en.json +23 -12
  127. package/hedhog/frontend/messages/pt.json +23 -12
  128. package/hedhog/query/triggers.sql +33 -0
  129. package/hedhog/table/course_ai_usage.yaml +46 -0
  130. package/hedhog/table/course_lesson.yaml +3 -0
  131. package/hedhog/table/course_lesson_answer.yaml +37 -0
  132. package/hedhog/table/course_lesson_transcription_segment.yaml +8 -0
  133. package/hedhog/table/learning_path.yaml +6 -0
  134. package/hedhog/table/learning_path_module.yaml +22 -0
  135. package/hedhog/table/learning_path_step.yaml +9 -6
  136. package/hedhog/table/lesson_view_event.yaml +66 -66
  137. package/package.json +9 -9
  138. package/src/certificate/certificate.controller.ts +2 -0
  139. package/src/certificate/certificate.service.ts +99 -0
  140. package/src/course/course-ai-usage.service.ts +221 -0
  141. package/src/course/course-audio-transcription.service.ts +471 -43
  142. package/src/course/course-export-scorm12.service.ts +149 -5
  143. package/src/course/course-export.service.ts +1 -0
  144. package/src/course/course-lesson.controller.ts +59 -6
  145. package/src/course/course-structure.controller.ts +16 -0
  146. package/src/course/course-structure.service.ts +184 -10
  147. package/src/course/course-transcription-translation.service.ts +293 -0
  148. package/src/course/course-video-agent-pipeline.service.ts +471 -471
  149. package/src/course/course.module.ts +4 -0
  150. package/src/course/dto/create-course-bulk-job.dto.ts +7 -3
  151. package/src/course/dto/create-course-export.dto.ts +6 -0
  152. package/src/course/ffmpeg.util.ts +65 -65
  153. package/src/course/lms-bulk-upload-automation.service.ts +29 -7
  154. package/src/course/lms-bulk-upload.service.ts +20 -1
  155. package/src/course/subtitle.util.ts +220 -0
  156. package/src/enterprise/training/training-student.service.ts +224 -4
  157. package/src/lesson-xp-map/lesson-xp-ai-calculation.service.ts +14 -0
  158. package/src/lesson-xp-map/lesson-xp-map.module.ts +2 -1
  159. package/src/lms.module.ts +4 -0
  160. package/src/platforma/dto/heartbeat.dto.ts +30 -30
  161. package/src/platforma/handlers/emit-certificate.handler.ts +117 -117
  162. package/src/platforma/handlers/lesson-heartbeat.handler.ts +343 -343
  163. package/src/platforma/platforma-heartbeat.service.ts +33 -33
  164. package/src/platforma/platforma-performance.service.ts +606 -606
  165. package/src/platforma/platforma-search.service.ts +48 -48
  166. package/src/platforma/platforma-video.service.ts +59 -3
  167. package/src/platforma/platforma.controller.ts +88 -0
  168. package/src/training/dto/create-training.dto.ts +36 -0
  169. package/src/training/training.service.ts +360 -163
@@ -418,10 +418,17 @@
418
418
  "xp": "XP",
419
419
  "media": "Media",
420
420
  "resources": "Resources",
421
- "extra": "Extra",
421
+ "extra": "Certificate",
422
422
  "publish": "Publish",
423
423
  "videoProfiles": "Resolutions"
424
424
  },
425
+ "issuedCertificates": {
426
+ "title": "Issued certificates",
427
+ "description": "Certificates already issued to students of this course.",
428
+ "empty": "No certificates issued for this course yet.",
429
+ "issuedAt": "Issued on",
430
+ "openPdf": "Open PDF"
431
+ },
425
432
  "structureTab": {
426
433
  "summary": {
427
434
  "title": "Content summary",
@@ -595,7 +602,8 @@
595
602
  "session": "At least one session created",
596
603
  "lesson": "At least one lesson created",
597
604
  "publishedLessons": "At least one lesson published",
598
- "certificate": "Certificate template defined (when enabled)"
605
+ "certificate": "Certificate template defined (when enabled)",
606
+ "listed": "Course listed in catalog"
599
607
  }
600
608
  }
601
609
  },
@@ -702,7 +710,9 @@
702
710
  "published": "Published",
703
711
  "active": "Active",
704
712
  "draft": "Draft",
705
- "archived": "Archived"
713
+ "archived": "Archived",
714
+ "listed": "Listed",
715
+ "unlisted": "Unlisted"
706
716
  },
707
717
  "table": {
708
718
  "headers": {
@@ -934,14 +944,19 @@
934
944
  "bulkEditor": {
935
945
  "title": "Bulk edit",
936
946
  "clearSelection": "Clear selection",
947
+ "apply": "Apply",
948
+ "more": "more",
937
949
  "productionStatus": "Production status",
938
950
  "keepCurrent": "Keep current",
939
- "visibilityTitle": "Visibility",
951
+ "publishTitle": "Publication",
952
+ "publish": {
953
+ "on": "Publish",
954
+ "off": "Unpublish"
955
+ },
940
956
  "moveToSession": "Move to session",
941
957
  "selectSession": "Select session…",
942
- "apiNotice": "Bulk changes are not integrated with the API yet. Click save to preview.",
943
958
  "toast": {
944
- "preview": "Bulk edit: {changes} (mock)",
959
+ "moving": "{count} lessons being moved…",
945
960
  "none": "No change selected"
946
961
  },
947
962
  "types": {
@@ -956,11 +971,6 @@
956
971
  "editada": "Edited",
957
972
  "finalizada": "Finalized",
958
973
  "publicada": "Published"
959
- },
960
- "visibility": {
961
- "publico": "Public",
962
- "privado": "Private",
963
- "restrito": "Restricted"
964
974
  }
965
975
  },
966
976
  "multiSelectBar": {
@@ -1176,7 +1186,7 @@
1176
1186
  "update": "Update",
1177
1187
  "save": "Save lesson",
1178
1188
  "tabData": "Data",
1179
- "tabVideos": "Videos",
1189
+ "tabVideos": "Video",
1180
1190
  "tabAudios": "Audios",
1181
1191
  "tabTranscription": "Transcription",
1182
1192
  "tabResources": "Resources",
@@ -2091,6 +2101,7 @@
2091
2101
  "selectAtLeastOneItem": "Select at least one item for the training.",
2092
2102
  "selectAtLeastOneCourse": "Select at least one course for the training.",
2093
2103
  "selectCoursesFromSelectedArea": "Select only courses from the selected area.",
2104
+ "modulesTitleRequired": "All modules must have a title.",
2094
2105
  "openingFormacao": "Opening \"{nome}\"...",
2095
2106
  "openingDetails": "Opening training..."
2096
2107
  }
@@ -427,10 +427,17 @@
427
427
  "xp": "XP",
428
428
  "media": "Mídia",
429
429
  "resources": "Recursos",
430
- "extra": "Extra",
430
+ "extra": "Certificado",
431
431
  "publish": "Publicação",
432
432
  "videoProfiles": "Resoluções"
433
433
  },
434
+ "issuedCertificates": {
435
+ "title": "Certificados emitidos",
436
+ "description": "Certificados já emitidos para os alunos deste curso.",
437
+ "empty": "Nenhum certificado emitido para este curso ainda.",
438
+ "issuedAt": "Emitido em",
439
+ "openPdf": "Abrir PDF"
440
+ },
434
441
  "structureTab": {
435
442
  "summary": {
436
443
  "title": "Resumo do conteúdo",
@@ -604,7 +611,8 @@
604
611
  "session": "Pelo menos uma sessão criada",
605
612
  "lesson": "Pelo menos uma aula criada",
606
613
  "publishedLessons": "Pelo menos uma aula publicada",
607
- "certificate": "Modelo de certificado definido (quando habilitado)"
614
+ "certificate": "Modelo de certificado definido (quando habilitado)",
615
+ "listed": "Curso listado no catálogo"
608
616
  }
609
617
  }
610
618
  },
@@ -711,7 +719,9 @@
711
719
  "published": "Publicado",
712
720
  "active": "Ativo",
713
721
  "draft": "Rascunho",
714
- "archived": "Arquivado"
722
+ "archived": "Arquivado",
723
+ "listed": "Listado",
724
+ "unlisted": "Não listado"
715
725
  },
716
726
  "table": {
717
727
  "headers": {
@@ -943,14 +953,19 @@
943
953
  "bulkEditor": {
944
954
  "title": "Edição em massa",
945
955
  "clearSelection": "Limpar seleção",
956
+ "apply": "Aplicar",
957
+ "more": "mais",
946
958
  "productionStatus": "Status de produção",
947
959
  "keepCurrent": "Manter atual",
948
- "visibilityTitle": "Visibilidade",
960
+ "publishTitle": "Publicação",
961
+ "publish": {
962
+ "on": "Publicar",
963
+ "off": "Despublicar"
964
+ },
949
965
  "moveToSession": "Mover para sessão",
950
966
  "selectSession": "Selecionar sessão…",
951
- "apiNotice": "As alterações em massa ainda não estão integradas com a API. Clique em salvar para ver a pré-visualização.",
952
967
  "toast": {
953
- "preview": "Edição em massa: {changes} (mock)",
968
+ "moving": "{count} aulas sendo movidas…",
954
969
  "none": "Nenhuma alteração selecionada"
955
970
  },
956
971
  "types": {
@@ -965,11 +980,6 @@
965
980
  "editada": "Editada",
966
981
  "finalizada": "Finalizada",
967
982
  "publicada": "Publicada"
968
- },
969
- "visibility": {
970
- "publico": "Público",
971
- "privado": "Privado",
972
- "restrito": "Restrito"
973
983
  }
974
984
  },
975
985
  "multiSelectBar": {
@@ -1185,7 +1195,7 @@
1185
1195
  "update": "Atualizar",
1186
1196
  "save": "Salvar aula",
1187
1197
  "tabData": "Dados",
1188
- "tabVideos": "Vídeos",
1198
+ "tabVideos": "Vídeo",
1189
1199
  "tabAudios": "Áudios",
1190
1200
  "tabTranscription": "Transcrição",
1191
1201
  "tabResources": "Recursos",
@@ -2115,6 +2125,7 @@
2115
2125
  "selectAtLeastOneItem": "Selecione pelo menos um item para a formação.",
2116
2126
  "selectAtLeastOneCourse": "Selecione pelo menos um curso para a formação.",
2117
2127
  "selectCoursesFromSelectedArea": "Selecione apenas cursos da área escolhida.",
2128
+ "modulesTitleRequired": "Todos os módulos precisam de um título.",
2118
2129
  "openingFormacao": "Abrindo \"{nome}\"...",
2119
2130
  "openingDetails": "Abrindo formação..."
2120
2131
  }
@@ -51,3 +51,36 @@ AFTER INSERT OR UPDATE OR DELETE
51
51
  ON bitcode_wallet_transaction
52
52
  FOR EACH ROW
53
53
  EXECUTE FUNCTION sync_bitcode_wallet_balance();
54
+
55
+ -- Keeps course_lesson.has_transcription in sync so the course tree can show
56
+ -- the transcription indicator without loading each lesson's segments.
57
+ CREATE OR REPLACE FUNCTION fn_course_lesson_sync_has_transcription()
58
+ RETURNS TRIGGER
59
+ LANGUAGE plpgsql
60
+ AS $$
61
+ BEGIN
62
+ IF TG_OP = 'INSERT' THEN
63
+ UPDATE course_lesson
64
+ SET has_transcription = true
65
+ WHERE id = NEW.course_lesson_id
66
+ AND has_transcription = false;
67
+ ELSIF TG_OP = 'DELETE' THEN
68
+ UPDATE course_lesson
69
+ SET has_transcription = EXISTS (
70
+ SELECT 1 FROM course_lesson_transcription_segment
71
+ WHERE course_lesson_id = OLD.course_lesson_id
72
+ )
73
+ WHERE id = OLD.course_lesson_id;
74
+ END IF;
75
+ RETURN NULL;
76
+ END;
77
+ $$;
78
+
79
+ DROP TRIGGER IF EXISTS trg_course_lesson_segment_has_transcription
80
+ ON course_lesson_transcription_segment;
81
+
82
+ CREATE TRIGGER trg_course_lesson_segment_has_transcription
83
+ AFTER INSERT OR DELETE
84
+ ON course_lesson_transcription_segment
85
+ FOR EACH ROW
86
+ EXECUTE FUNCTION fn_course_lesson_sync_has_transcription();
@@ -0,0 +1,46 @@
1
+ columns:
2
+ - type: pk
3
+ - name: course_id
4
+ type: fk
5
+ references:
6
+ table: course
7
+ column: id
8
+ onDelete: CASCADE
9
+ - name: course_lesson_id
10
+ type: fk
11
+ isNullable: true
12
+ references:
13
+ table: course_lesson
14
+ column: id
15
+ onDelete: SET NULL
16
+ - name: job_type
17
+ type: enum
18
+ values: [transcription, translation, xp_calculation]
19
+ - name: provider
20
+ type: varchar
21
+ length: 50
22
+ - name: model
23
+ type: varchar
24
+ length: 100
25
+ - name: input_tokens
26
+ type: int
27
+ isNullable: true
28
+ - name: output_tokens
29
+ type: int
30
+ isNullable: true
31
+ - name: audio_seconds
32
+ type: decimal
33
+ precision: 12
34
+ scale: 3
35
+ isNullable: true
36
+ - name: cost_usd
37
+ type: decimal
38
+ precision: 12
39
+ scale: 6
40
+ default: 0
41
+ - type: created_at
42
+
43
+ indices:
44
+ - columns: [course_id]
45
+ - columns: [course_id, job_type]
46
+ - columns: [course_lesson_id]
@@ -29,6 +29,9 @@ columns:
29
29
  - name: published
30
30
  type: boolean
31
31
  default: false
32
+ - name: has_transcription
33
+ type: boolean
34
+ default: false
32
35
  - type: created_at
33
36
  - type: updated_at
34
37
 
@@ -0,0 +1,37 @@
1
+ columns:
2
+ - type: pk
3
+ - name: user_id
4
+ type: int
5
+ - name: course_lesson_id
6
+ type: fk
7
+ references:
8
+ table: course_lesson
9
+ column: id
10
+ onDelete: CASCADE
11
+ - name: question_id
12
+ type: fk
13
+ references:
14
+ table: question
15
+ column: id
16
+ onDelete: CASCADE
17
+ - name: exam_option_id
18
+ type: fk
19
+ isNullable: true
20
+ references:
21
+ table: exam_option
22
+ column: id
23
+ onDelete: SET NULL
24
+ - name: answer_text
25
+ type: text
26
+ isNullable: true
27
+ - name: is_correct
28
+ type: boolean
29
+ isNullable: true
30
+ - type: created_at
31
+ - type: updated_at
32
+
33
+ indices:
34
+ - columns: [user_id, course_lesson_id, question_id]
35
+ isUnique: true
36
+ - columns: [course_lesson_id]
37
+ - columns: [question_id]
@@ -6,6 +6,13 @@ columns:
6
6
  table: course_lesson
7
7
  column: id
8
8
  onDelete: CASCADE
9
+ - name: locale_id
10
+ type: fk
11
+ isNullable: true
12
+ references:
13
+ table: locale
14
+ column: id
15
+ onDelete: SET NULL
9
16
  - name: start_seconds
10
17
  type: NUMERIC(10,3)
11
18
  default: 0
@@ -19,4 +26,5 @@ columns:
19
26
 
20
27
  indices:
21
28
  - columns: [course_lesson_id]
29
+ - columns: [course_lesson_id, locale_id]
22
30
  - columns: [course_lesson_id, start_seconds]
@@ -44,6 +44,12 @@ columns:
44
44
  type: varchar
45
45
  length: 9
46
46
  isNullable: true
47
+ - name: certificate_template_id
48
+ type: int
49
+ isNullable: true
50
+ references:
51
+ table: certificate_template
52
+ column: id
47
53
  - type: created_at
48
54
  - type: updated_at
49
55
 
@@ -0,0 +1,22 @@
1
+ columns:
2
+ - type: pk
3
+ - name: learning_path_id
4
+ type: fk
5
+ references:
6
+ table: learning_path
7
+ column: id
8
+ onDelete: CASCADE
9
+ - name: title
10
+ type: varchar
11
+ length: 255
12
+ - name: description
13
+ type: text
14
+ isNullable: true
15
+ - type: order
16
+ - type: created_at
17
+ - type: updated_at
18
+
19
+ indices:
20
+ - columns: [learning_path_id]
21
+ - columns: [learning_path_id, order]
22
+ isUnique: true
@@ -6,6 +6,12 @@ columns:
6
6
  table: learning_path
7
7
  column: id
8
8
  onDelete: CASCADE
9
+ - name: learning_path_module_id
10
+ type: fk
11
+ references:
12
+ table: learning_path_module
13
+ column: id
14
+ onDelete: CASCADE
9
15
  - name: step_type
10
16
  type: enum
11
17
  values: [course, exam]
@@ -31,13 +37,10 @@ columns:
31
37
  - type: updated_at
32
38
 
33
39
  indices:
34
- - columns: [learning_path_id, order]
35
- isUnique: true
36
- - columns: [learning_path_id, course_id]
37
- isUnique: true
38
- - columns: [learning_path_id, exam_id]
39
- isUnique: true
40
40
  - columns: [learning_path_id]
41
+ - columns: [learning_path_module_id]
42
+ - columns: [learning_path_module_id, order]
43
+ isUnique: true
41
44
  - columns: [step_type]
42
45
  - columns: [course_id]
43
46
  - columns: [exam_id]
@@ -1,66 +1,66 @@
1
- columns:
2
- - type: pk
3
- - name: user_id
4
- type: int
5
- isNullable: true
6
- - name: course_lesson_id
7
- type: fk
8
- isNullable: true
9
- references:
10
- table: course_lesson
11
- column: id
12
- onDelete: SET NULL
13
- - name: course_enrollment_id
14
- type: fk
15
- isNullable: true
16
- references:
17
- table: course_enrollment
18
- column: id
19
- onDelete: SET NULL
20
- - name: session_id
21
- type: varchar
22
- length: 36
23
- isNullable: true
24
- - name: video_position_seconds
25
- type: int
26
- default: 0
27
- - name: ip
28
- type: varchar
29
- length: 45
30
- isNullable: true
31
- - name: country
32
- type: varchar
33
- length: 2
34
- isNullable: true
35
- - name: city
36
- type: varchar
37
- length: 100
38
- isNullable: true
39
- - name: browser
40
- type: varchar
41
- length: 50
42
- isNullable: true
43
- - name: os
44
- type: varchar
45
- length: 50
46
- isNullable: true
47
- - name: device_type
48
- type: varchar
49
- length: 20
50
- isNullable: true
51
- - name: screen_width
52
- type: int
53
- isNullable: true
54
- - name: screen_height
55
- type: int
56
- isNullable: true
57
- - name: is_touch
58
- type: boolean
59
- default: false
60
- - type: created_at
61
-
62
- indices:
63
- - columns: [user_id, created_at]
64
- - columns: [course_lesson_id, created_at]
65
- - columns: [created_at]
66
- - columns: [course_enrollment_id]
1
+ columns:
2
+ - type: pk
3
+ - name: user_id
4
+ type: int
5
+ isNullable: true
6
+ - name: course_lesson_id
7
+ type: fk
8
+ isNullable: true
9
+ references:
10
+ table: course_lesson
11
+ column: id
12
+ onDelete: SET NULL
13
+ - name: course_enrollment_id
14
+ type: fk
15
+ isNullable: true
16
+ references:
17
+ table: course_enrollment
18
+ column: id
19
+ onDelete: SET NULL
20
+ - name: session_id
21
+ type: varchar
22
+ length: 36
23
+ isNullable: true
24
+ - name: video_position_seconds
25
+ type: int
26
+ default: 0
27
+ - name: ip
28
+ type: varchar
29
+ length: 45
30
+ isNullable: true
31
+ - name: country
32
+ type: varchar
33
+ length: 2
34
+ isNullable: true
35
+ - name: city
36
+ type: varchar
37
+ length: 100
38
+ isNullable: true
39
+ - name: browser
40
+ type: varchar
41
+ length: 50
42
+ isNullable: true
43
+ - name: os
44
+ type: varchar
45
+ length: 50
46
+ isNullable: true
47
+ - name: device_type
48
+ type: varchar
49
+ length: 20
50
+ isNullable: true
51
+ - name: screen_width
52
+ type: int
53
+ isNullable: true
54
+ - name: screen_height
55
+ type: int
56
+ isNullable: true
57
+ - name: is_touch
58
+ type: boolean
59
+ default: false
60
+ - type: created_at
61
+
62
+ indices:
63
+ - columns: [user_id, created_at]
64
+ - columns: [course_lesson_id, created_at]
65
+ - columns: [created_at]
66
+ - columns: [course_enrollment_id]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hed-hog/lms",
3
- "version": "0.0.366",
3
+ "version": "0.0.370",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "dependencies": {
@@ -16,15 +16,15 @@
16
16
  "@hed-hog/api-prisma": "0.0.6",
17
17
  "@hed-hog/api-locale": "0.0.14",
18
18
  "@hed-hog/api-pagination": "0.0.7",
19
- "@hed-hog/api": "0.0.8",
20
- "@hed-hog/category": "0.0.366",
21
19
  "@hed-hog/api-types": "0.0.1",
22
- "@hed-hog/crm": "0.0.366",
23
- "@hed-hog/finance": "0.0.366",
24
- "@hed-hog/core": "0.0.366",
25
- "@hed-hog/queue": "0.0.366",
26
- "@hed-hog/commerce": "0.0.366",
27
- "@hed-hog/agent": "0.0.366"
20
+ "@hed-hog/api": "0.0.8",
21
+ "@hed-hog/category": "0.0.370",
22
+ "@hed-hog/crm": "0.0.370",
23
+ "@hed-hog/commerce": "0.0.370",
24
+ "@hed-hog/finance": "0.0.370",
25
+ "@hed-hog/core": "0.0.370",
26
+ "@hed-hog/queue": "0.0.370",
27
+ "@hed-hog/agent": "0.0.370"
28
28
  },
29
29
  "exports": {
30
30
  ".": {
@@ -78,12 +78,14 @@ export class LmsCertificateController {
78
78
  @Query('pageSize') pageSize?: string,
79
79
  @Query('search') search?: string,
80
80
  @Query('type') type?: string,
81
+ @Query('courseId') courseId?: string,
81
82
  ) {
82
83
  return this.certificateService.listIssued({
83
84
  page: page ? Number(page) : 1,
84
85
  pageSize: pageSize ? Number(pageSize) : 12,
85
86
  search,
86
87
  type,
88
+ courseId: courseId ? Number(courseId) : undefined,
87
89
  });
88
90
  }
89
91