feat: Add i18n support, new content block types, course export, and lesson interaction tracking.

This commit is contained in:
2026-01-17 02:19:39 -03:00
parent b166387a48
commit 05faa20993
50 changed files with 3368 additions and 388 deletions
+14 -1
View File
@@ -44,7 +44,7 @@ export interface QuizQuestion {
export interface Block {
id: string;
type: 'description' | 'media' | 'quiz' | 'fill-in-the-blanks' | 'matching' | 'ordering' | 'short-answer';
type: 'description' | 'media' | 'quiz' | 'fill-in-the-blanks' | 'matching' | 'ordering' | 'short-answer' | 'document';
title?: string;
content?: string;
url?: string;
@@ -277,6 +277,19 @@ export const cmsApi = {
getAuditLogs: (): Promise<AuditLog[]> => apiFetch('/audit-logs'),
getCourseAnalytics: (id: string): Promise<CourseAnalytics> => apiFetch(`/courses/${id}/analytics`),
getAdvancedAnalytics: (id: string): Promise<AdvancedAnalytics> => apiFetch(`/courses/${id}/analytics/advanced`),
getLessonHeatmap: (lessonId: string): Promise<{ second: number, count: number }[]> => apiFetch(`/lessons/${lessonId}/heatmap`),
exportCourse: (id: string): Promise<Record<string, unknown>> => apiFetch(`/courses/${id}/export`),
importCourse: (data: Record<string, unknown>): Promise<Course> => apiFetch(`/courses/import`, {
method: 'POST',
body: JSON.stringify(data)
}),
async generateCourse(prompt: string, targetOrgId?: string): Promise<Course> {
return apiFetch(`/courses/generate`, {
method: 'POST',
body: JSON.stringify({ prompt, target_organization_id: targetOrgId })
});
},
// Users
getAllUsers: (): Promise<User[]> => apiFetch('/users'),
+37
View File
@@ -0,0 +1,37 @@
{
"common": {
"save": "Save",
"cancel": "Cancel",
"delete": "Delete",
"edit": "Edit",
"create": "Create",
"loading": "Loading...",
"search": "Search",
"back": "Back",
"next": "Next",
"publish": "Publish",
"preview": "Preview"
},
"nav": {
"courses": "Courses",
"globalControl": "Global Control",
"webhooks": "Webhooks",
"profile": "Profile",
"signOut": "Sign Out"
},
"dashboard": {
"title": "Studio Dashboard",
"newCourse": "New Course",
"aiBuilder": "AI Builder",
"noCourses": "No courses available."
},
"editor": {
"outline": "Outline",
"settings": "Settings",
"newModule": "New Module",
"newLesson": "New Lesson",
"addBlock": "Add Content Block",
"publishToOrg": "Publish to Organization",
"reading": "Reading"
}
}
+37
View File
@@ -0,0 +1,37 @@
{
"common": {
"save": "Guardar",
"cancel": "Cancelar",
"delete": "Eliminar",
"edit": "Editar",
"create": "Crear",
"loading": "Cargando...",
"search": "Buscar",
"back": "Volver",
"next": "Siguiente",
"publish": "Publicar",
"preview": "Previsualizar"
},
"nav": {
"courses": "Cursos",
"globalControl": "Control Global",
"webhooks": "Webhooks",
"profile": "Perfil",
"signOut": "Cerrar Sesión"
},
"dashboard": {
"title": "Panel de Control",
"newCourse": "Nuevo Curso",
"aiBuilder": "Constructor AI",
"noCourses": "No hay cursos disponibles."
},
"editor": {
"outline": "Estructura",
"settings": "Configuración",
"newModule": "Nuevo Módulo",
"newLesson": "Nueva Lección",
"addBlock": "Añadir Bloque de Contenido",
"publishToOrg": "Publicar en Organización",
"reading": "Lectura"
}
}
+37
View File
@@ -0,0 +1,37 @@
{
"common": {
"save": "Salvar",
"cancel": "Cancelar",
"delete": "Excluir",
"edit": "Editar",
"create": "Criar",
"loading": "Carregando...",
"search": "Buscar",
"back": "Voltar",
"next": "Próximo",
"publish": "Publicar",
"preview": "Visualizar"
},
"nav": {
"courses": "Cursos",
"globalControl": "Controle Global",
"webhooks": "Webhooks",
"profile": "Perfil",
"signOut": "Sair"
},
"dashboard": {
"title": "Painel do Studio",
"newCourse": "Novo Curso",
"aiBuilder": "Construtor IA",
"noCourses": "Nenhum curso disponível."
},
"editor": {
"outline": "Estrutura",
"settings": "Configurações",
"newModule": "Novo Módulo",
"newLesson": "Nova Lição",
"addBlock": "Adicionar Bloco de Conteúdo",
"publishToOrg": "Publicar na Organização",
"reading": "Leitura"
}
}