{"openapi":"3.0.0","paths":{"/debug-sentry":{"get":{"operationId":"RootController_getError","parameters":[],"responses":{"200":{"description":""}}}},"/":{"get":{"operationId":"RootController_index","parameters":[],"responses":{"200":{"description":""}}}},"/health":{"get":{"operationId":"HealthController_check","parameters":[],"responses":{"200":{"description":""}}}},"/users/me":{"get":{"operationId":"UsersController_getMe","summary":"Get the current user with stats","parameters":[{"name":"timezone","required":false,"in":"query","description":"IANA timezone (e.g. America/New_York). Used to determine the user's local date.","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserDetailDto"}}}}},"tags":["users"],"security":[{"bearer":[]}]},"patch":{"operationId":"UsersController_updateMe","summary":"Update the current user's profile","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponseDto"}}}}},"tags":["users"],"security":[{"bearer":[]}]}},"/users":{"put":{"operationId":"UsersController_upsert","summary":"Create or update a user by email","parameters":[{"name":"authorization","required":true,"in":"header","schema":{"type":"string"}}],"responses":{"200":{"description":"User already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponseDto"}}}},"201":{"description":"User created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponseDto"}}}}},"tags":["users"],"security":[{"bearer":[]}]}},"/paths":{"post":{"operationId":"PathsController_create","summary":"Create a path","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePathDto"}}}},"responses":{"201":{"description":"Path created"}},"tags":["paths"],"security":[{"bearer":[]}]},"get":{"operationId":"PathsController_findAll","summary":"List all paths","parameters":[],"responses":{"200":{"description":"List of paths","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PathViewDto"}}}}}},"tags":["paths"],"security":[{"bearer":[]}]}},"/paths/{id}":{"get":{"operationId":"PathsController_findOne","summary":"Get a path by ID","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Path found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PathDetailDto"}}}},"404":{"description":"Path not found"}},"tags":["paths"],"security":[{"bearer":[]}]},"patch":{"operationId":"PathsController_update","summary":"Update a path","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePathDto"}}}},"responses":{"200":{"description":"Path updated"},"404":{"description":"Path not found"}},"tags":["paths"],"security":[{"bearer":[]}]},"delete":{"operationId":"PathsController_remove","summary":"Delete a path","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"204":{"description":"Path deleted"},"404":{"description":"Path not found"}},"tags":["paths"],"security":[{"bearer":[]}]}},"/topics":{"post":{"operationId":"TopicsController_create","summary":"Create a topic","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTopicDto"}}}},"responses":{"201":{"description":"Topic created"}},"tags":["topics"],"security":[{"bearer":[]}]},"get":{"operationId":"TopicsController_findAll","summary":"List all topics","parameters":[],"responses":{"200":{"description":"List of topics","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TopicViewDto"}}}}}},"tags":["topics"],"security":[{"bearer":[]}]}},"/topics/{id}":{"get":{"operationId":"TopicsController_findOne","summary":"Get a topic by ID","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Topic found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TopicDetailDto"}}}},"404":{"description":"Topic not found"}},"tags":["topics"],"security":[{"bearer":[]}]},"patch":{"operationId":"TopicsController_update","summary":"Update a topic","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTopicDto"}}}},"responses":{"200":{"description":"Topic updated"},"404":{"description":"Topic not found"}},"tags":["topics"],"security":[{"bearer":[]}]},"delete":{"operationId":"TopicsController_remove","summary":"Delete a topic","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"204":{"description":"Topic deleted"},"404":{"description":"Topic not found"}},"tags":["topics"],"security":[{"bearer":[]}]}},"/lessons":{"post":{"operationId":"LessonsController_create","summary":"Create a lesson","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateLessonDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LessonDetailDto"}}}}},"tags":["lessons"],"security":[{"bearer":[]}]}},"/lessons/{id}":{"get":{"operationId":"LessonsController_findOne","summary":"Get a lesson by ID","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LessonDetailDto"}}}},"404":{"description":"Lesson not found"}},"tags":["lessons"],"security":[{"bearer":[]}]},"patch":{"operationId":"LessonsController_update","summary":"Update a lesson","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateLessonDto"}}}},"responses":{"200":{"description":"Lesson updated"},"404":{"description":"Lesson not found"}},"tags":["lessons"],"security":[{"bearer":[]}]},"delete":{"operationId":"LessonsController_remove","summary":"Delete a lesson","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"204":{"description":"Lesson deleted"},"404":{"description":"Lesson not found"}},"tags":["lessons"],"security":[{"bearer":[]}]}},"/lessons/{id}/comprehension-questions":{"get":{"operationId":"LessonsController_getComprehensionQuestions","summary":"Get comprehension questions for a lesson","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ComprehensionQuestionDto"}}}}},"404":{"description":"Lesson not found"}},"tags":["lessons"],"security":[{"bearer":[]}]},"post":{"operationId":"LessonsController_createComprehensionQuestions","summary":"Create comprehension questions for a lesson","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateComprehensionQuestionsDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ComprehensionQuestionDto"}}}}}},"tags":["lessons"],"security":[{"bearer":[]}]}},"/lessons/{id}/recall-questions":{"get":{"operationId":"LessonsController_getRecallQuestions","summary":"Get recall questions for a lesson","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RecallQuestionDto"}}}}},"404":{"description":"Lesson not found"}},"tags":["lessons"],"security":[{"bearer":[]}]},"post":{"operationId":"LessonsController_createRecallQuestions","summary":"Create recall questions for a lesson","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRecallQuestionsDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RecallQuestionDto"}}}}}},"tags":["lessons"],"security":[{"bearer":[]}]}},"/lessons/{lessonId}/comprehension-questions/{questionId}/attempts":{"post":{"operationId":"LessonsController_createComprehensionQuestionAttempt","summary":"Submit an attempt for a comprehension question","parameters":[{"name":"lessonId","required":true,"in":"path","schema":{"type":"string"}},{"name":"questionId","required":true,"in":"path","schema":{"type":"string"}},{"name":"user-agent","required":true,"in":"header","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateComprehensionQuestionAttemptDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComprehensionQuestionAttempt"}}}},"400":{"description":"Answer does not belong to the question"},"404":{"description":"Lesson or question not found"}},"tags":["lessons"],"security":[{"bearer":[]}]}},"/lessons/{id}/status":{"patch":{"operationId":"LessonsController_updateStatus","summary":"Update lesson reading progress for the current user","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"user-agent","required":true,"in":"header","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateLessonStatusDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LessonStatusDto"}}}},"404":{"description":"Lesson not found"}},"tags":["lessons"],"security":[{"bearer":[]}]}},"/lessons/{id}/complete":{"post":{"operationId":"LessonsController_completeLesson","summary":"Mark lesson as complete for the current user — schedules recall cards","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"timezone","required":false,"in":"query","description":"IANA timezone (e.g. America/New_York). Used to determine the user's local date.","schema":{"type":"string"}},{"name":"user-agent","required":true,"in":"header","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LessonCompleteResponseDto"}}}},"404":{"description":"Lesson not found"}},"tags":["lessons"],"security":[{"bearer":[]}]}},"/recall/due":{"get":{"operationId":"RecallController_getDueCards","summary":"Get recall cards due today","parameters":[{"name":"timezone","required":false,"in":"query","description":"IANA timezone (e.g. America/New_York). Used to determine the user's local date.","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DueRecallCardDto"}}}}}},"tags":["recall"],"security":[{"bearer":[]}]}},"/recall/review":{"post":{"operationId":"RecallController_submitReview","parameters":[{"name":"timezone","required":false,"in":"query","description":"IANA timezone (e.g. America/New_York). Used to determine the user's local date.","schema":{"type":"string"}},{"name":"user-agent","required":true,"in":"header","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitRecallReviewDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecallReviewResultDto"}}}}},"tags":["recall"],"security":[{"bearer":[]}]}},"/schedule/today":{"get":{"operationId":"DailyScheduleController_getTodaySchedule","summary":"Get today's scheduled lessons (one per active enrollment)","parameters":[{"name":"timezone","required":false,"in":"query","description":"IANA timezone (e.g. America/New_York). Used to determine the user's local date.","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DailyScheduleViewDto"}}}}}},"tags":["schedule"],"security":[{"bearer":[]}]}},"/enrollments":{"post":{"operationId":"EnrollmentsController_create","summary":"Enroll current user in a path or topic","parameters":[{"name":"user-agent","required":true,"in":"header","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateEnrollmentDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserEnrollment"}}}}},"tags":["enrollments"],"security":[{"bearer":[]}]}},"/enrollments/me":{"get":{"operationId":"EnrollmentsController_getMyEnrollments","summary":"List current user's active enrollments","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/EnrollmentResponseDto"}}}}}},"tags":["enrollments"],"security":[{"bearer":[]}]}},"/enrollments/{id}":{"delete":{"operationId":"EnrollmentsController_remove","summary":"Unenroll (soft-delete) an enrollment by ID","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"user-agent","required":true,"in":"header","schema":{"type":"string"}},{"name":"timezone","required":false,"in":"query","description":"IANA timezone (e.g. America/New_York). Used to determine the user's local date.","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserEnrollment"}}}}},"tags":["enrollments"],"security":[{"bearer":[]}]}},"/discover":{"get":{"operationId":"DiscoverController_discover","summary":"Get discovery items for home page: 1 new, 1 trending, 1 popular topic or path","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiscoverResponseDto"}}}}},"tags":["discover"],"security":[{"bearer":[]}]}},"/content-generation/outline":{"post":{"operationId":"ContentGenerationController_generateOutline","summary":"Generate a content outline (titles only — fast, cheap to retry)","description":"Phase 1 of content generation. Returns a tree of path/topic/lesson titles and descriptions. The outline can be edited before proceeding to Phase 2.","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateOutlineDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateOutlineResponseDto"}}}}},"tags":["content-generation"],"security":[{"bearer":[]}]}},"/content-generation/suggestions":{"post":{"operationId":"ContentGenerationController_suggestPaths","summary":"Suggest new learning path ideas for a field","description":"Returns path name suggestions based on the given field, existing paths in the database, and current industry trends.","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuggestPathsDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuggestPathsResponseDto"}}}}},"tags":["content-generation"],"security":[{"bearer":[]}]}},"/content-generation/content":{"post":{"operationId":"ContentGenerationController_generateContent","summary":"Generate full lesson content from an approved outline","description":"Phase 2 of content generation. Takes an outline (from /content-generation/outline, possibly edited) and generates full content for every lesson in parallel. Returns a preview — nothing is saved until the admin confirms.","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateContentDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateContentResponseDto"}}}}},"tags":["content-generation"],"security":[{"bearer":[]}]}},"/tracking/events":{"post":{"operationId":"TrackingController_trackEvents","summary":"Track a batch of user events from the client","parameters":[{"name":"user-agent","required":true,"in":"header","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchTrackEventsDto"}}}},"responses":{"202":{"description":"Events accepted"}},"tags":["tracking"],"security":[{"bearer":[]}]}},"/metrics":{"get":{"operationId":"PrometheusController_index","parameters":[],"responses":{"200":{"description":""}}}}},"info":{"title":"Kursio API","description":"Kursio REST API documentation","version":"0.1.0","contact":{}},"tags":[],"servers":[],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http"}},"schemas":{"DailyActivityDto":{"type":"object","properties":{"day":{"type":"string","example":"Mon"},"fullDate":{"type":"string","example":"2026-03-15"},"active":{"type":"boolean"}},"required":["day","fullDate","active"]},"StreakDto":{"type":"object","properties":{"current":{"type":"number"},"best":{"type":"number"},"weeklyActivity":{"type":"array","items":{"$ref":"#/components/schemas/DailyActivityDto"}}},"required":["current","best","weeklyActivity"]},"TodayActivityDto":{"type":"object","properties":{"lessonsFinished":{"type":"number"},"recallFinished":{"type":"number"}},"required":["lessonsFinished","recallFinished"]},"UserDetailDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"avatarUrl":{"type":"string","nullable":true},"role":{"type":"string","enum":["user","admin"]},"domain":{"type":"string","nullable":true},"experience":{"type":"string","nullable":true},"onboardingCompleted":{"type":"boolean"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"lessonsCompleted":{"type":"number"},"topicsCompleted":{"type":"number"},"cardsRecalled":{"type":"number"},"cardsMastered":{"type":"number"},"streak":{"$ref":"#/components/schemas/StreakDto"},"todayActivity":{"$ref":"#/components/schemas/TodayActivityDto"}},"required":["id","name","email","avatarUrl","role","domain","experience","onboardingCompleted","createdAt","updatedAt","lessonsCompleted","topicsCompleted","cardsRecalled","cardsMastered","streak","todayActivity"]},"UpdateUserDto":{"type":"object","properties":{"domain":{"type":"string"},"experience":{"type":"string"},"onboardingCompleted":{"type":"boolean"}}},"UserResponseDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"avatarUrl":{"type":"string","nullable":true},"role":{"type":"string","enum":["user","admin"]},"domain":{"type":"string","nullable":true},"experience":{"type":"string","nullable":true},"onboardingCompleted":{"type":"boolean"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["id","name","email","avatarUrl","role","domain","experience","onboardingCompleted","createdAt","updatedAt"]},"CreatePathDto":{"type":"object","properties":{"title":{"type":"string"},"description":{"type":"string"},"emoji":{"type":"string"}},"required":["title","description","emoji"]},"PathViewDto":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"emoji":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"topicCount":{"type":"number"},"lessonCount":{"type":"number"},"totalEstimatedReadTimeInMinutes":{"type":"number"},"totalRecallQuestionsCount":{"type":"number"},"enrollmentStatus":{"type":"string","enum":["not_enrolled","active","completed"]}},"required":["id","title","description","emoji","createdAt","updatedAt","topicCount","lessonCount","totalEstimatedReadTimeInMinutes","totalRecallQuestionsCount","enrollmentStatus"]},"LessonSummaryDto":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"lessonIndex":{"type":"number"},"estimatedReadTimeInMinutes":{"type":"number"},"isCompleted":{"type":"boolean"}},"required":["id","title","lessonIndex","estimatedReadTimeInMinutes","isCompleted"]},"TopicWithLessonsDto":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"emoji":{"type":"string"},"topicIndex":{"type":"number"},"lessons":{"type":"array","items":{"$ref":"#/components/schemas/LessonSummaryDto"}}},"required":["id","title","description","emoji","topicIndex","lessons"]},"PathDetailDto":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"emoji":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"topicCount":{"type":"number"},"lessonCount":{"type":"number"},"totalEstimatedReadTimeInMinutes":{"type":"number"},"totalRecallQuestionsCount":{"type":"number"},"enrollmentStatus":{"type":"string","enum":["not_enrolled","active","completed"]},"topics":{"type":"array","items":{"$ref":"#/components/schemas/TopicWithLessonsDto"}}},"required":["id","title","description","emoji","createdAt","updatedAt","topicCount","lessonCount","totalEstimatedReadTimeInMinutes","totalRecallQuestionsCount","enrollmentStatus","topics"]},"UpdatePathDto":{"type":"object","properties":{"title":{"type":"string"},"description":{"type":"string"},"emoji":{"type":"string"}}},"CreateTopicDto":{"type":"object","properties":{"title":{"type":"string"},"description":{"type":"string"},"emoji":{"type":"string"},"pathId":{"type":"string"},"topicIndex":{"type":"number"}},"required":["title","description","emoji"]},"TopicViewDto":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"emoji":{"type":"string"},"topicIndex":{"type":"number","nullable":true},"pathId":{"type":"string","nullable":true},"pathTitle":{"type":"string","nullable":true},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"lessonCount":{"type":"number"},"totalEstimatedReadTimeInMinutes":{"type":"number"},"totalRecallQuestionsCount":{"type":"number"},"enrollmentStatus":{"type":"string","enum":["not_enrolled","active","completed"]}},"required":["id","title","description","emoji","topicIndex","pathId","pathTitle","createdAt","updatedAt","lessonCount","totalEstimatedReadTimeInMinutes","totalRecallQuestionsCount","enrollmentStatus"]},"TopicDetailDto":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"emoji":{"type":"string"},"topicIndex":{"type":"number","nullable":true},"pathId":{"type":"string","nullable":true},"pathTitle":{"type":"string","nullable":true},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"lessonCount":{"type":"number"},"totalEstimatedReadTimeInMinutes":{"type":"number"},"totalRecallQuestionsCount":{"type":"number"},"enrollmentStatus":{"type":"string","enum":["not_enrolled","active","completed"]},"lessons":{"type":"array","items":{"$ref":"#/components/schemas/LessonSummaryDto"}}},"required":["id","title","description","emoji","topicIndex","pathId","pathTitle","createdAt","updatedAt","lessonCount","totalEstimatedReadTimeInMinutes","totalRecallQuestionsCount","enrollmentStatus","lessons"]},"UpdateTopicDto":{"type":"object","properties":{"title":{"type":"string"},"description":{"type":"string"},"emoji":{"type":"string"},"pathId":{"type":"string"},"topicIndex":{"type":"number"}}},"LessonContentBlockDto":{"type":"object","properties":{"type":{"type":"string","enum":["paragraph","heading","code","image","callout","video"]},"content":{"type":"string"}},"required":["type","content"]},"CreateLessonDto":{"type":"object","properties":{"topicId":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"content":{"type":"array","items":{"$ref":"#/components/schemas/LessonContentBlockDto"}},"lessonIndex":{"type":"number"},"estimatedReadTimeInMinutes":{"type":"number"}},"required":["topicId","title","description","content","lessonIndex","estimatedReadTimeInMinutes"]},"LessonDetailDto":{"type":"object","properties":{"id":{"type":"string"},"topicId":{"type":"string"},"topicName":{"type":"string"},"pathId":{"type":"string","nullable":true},"pathName":{"type":"string","nullable":true},"title":{"type":"string"},"description":{"type":"string"},"content":{"type":"array","items":{"$ref":"#/components/schemas/LessonContentBlockDto"}},"lessonIndex":{"type":"number"},"estimatedReadTimeInMinutes":{"type":"number"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"totalLessonsInContext":{"type":"number"},"totalRecallQuestions":{"type":"number"}},"required":["id","topicId","topicName","pathId","pathName","title","description","content","lessonIndex","estimatedReadTimeInMinutes","createdAt","updatedAt","totalLessonsInContext","totalRecallQuestions"]},"ComprehensionQuestionAnswerDto":{"type":"object","properties":{"id":{"type":"string"},"answer":{"type":"string"},"isCorrect":{"type":"boolean"}},"required":["id","answer","isCorrect"]},"ComprehensionQuestionDto":{"type":"object","properties":{"id":{"type":"string"},"question":{"type":"string"},"answerExplanation":{"type":"string"},"answers":{"type":"array","items":{"$ref":"#/components/schemas/ComprehensionQuestionAnswerDto"}}},"required":["id","question","answerExplanation","answers"]},"CreateComprehensionQuestionAnswerDto":{"type":"object","properties":{"answer":{"type":"string"},"isCorrect":{"type":"boolean"}},"required":["answer","isCorrect"]},"CreateComprehensionQuestionDto":{"type":"object","properties":{"question":{"type":"string"},"answerExplanation":{"type":"string"},"answers":{"type":"array","items":{"$ref":"#/components/schemas/CreateComprehensionQuestionAnswerDto"}}},"required":["question","answerExplanation","answers"]},"CreateComprehensionQuestionsDto":{"type":"object","properties":{"questions":{"type":"array","items":{"$ref":"#/components/schemas/CreateComprehensionQuestionDto"}}},"required":["questions"]},"RecallQuestionDto":{"type":"object","properties":{"id":{"type":"string"},"lessonId":{"type":"string"},"question":{"type":"string"},"answer":{"type":"string"},"insight":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["id","lessonId","question","answer","insight","createdAt","updatedAt"]},"CreateRecallQuestionDto":{"type":"object","properties":{"question":{"type":"string"},"answer":{"type":"string"},"insight":{"type":"string"}},"required":["question","answer","insight"]},"CreateRecallQuestionsDto":{"type":"object","properties":{"questions":{"type":"array","items":{"$ref":"#/components/schemas/CreateRecallQuestionDto"}}},"required":["questions"]},"CreateComprehensionQuestionAttemptDto":{"type":"object","properties":{"comprehensionQuestionAnswerId":{"type":"string","description":"The answer the user selected"}},"required":["comprehensionQuestionAnswerId"]},"ComprehensionQuestionAttempt":{"type":"object","properties":{}},"UpdateLessonStatusDto":{"type":"object","properties":{"readProgressPct":{"type":"number","description":"Reading progress percentage (0–100)"},"status":{"type":"string","enum":["inProgress","questions"]},"currentQuestionIndex":{"type":"number","description":"Index of the current comprehension question (0-based)"}}},"LessonStatusDto":{"type":"object","properties":{"status":{"type":"string","enum":["inProgress","questions","complete"]},"readProgressPct":{"type":"number"},"completedAt":{"format":"date-time","type":"string","nullable":true},"currentQuestionIndex":{"type":"number","nullable":true}},"required":["status","readProgressPct","completedAt","currentQuestionIndex"]},"UserActivityDto":{"type":"object","properties":{"isFirstLessonCompleteTrigger":{"type":"boolean"}},"required":["isFirstLessonCompleteTrigger"]},"LessonCompleteResponseDto":{"type":"object","properties":{"status":{"type":"string","enum":["inProgress","questions","complete"]},"readProgressPct":{"type":"number"},"completedAt":{"format":"date-time","type":"string","nullable":true},"currentQuestionIndex":{"type":"number","nullable":true},"activityResult":{"$ref":"#/components/schemas/UserActivityDto"}},"required":["status","readProgressPct","completedAt","currentQuestionIndex","activityResult"]},"UpdateLessonDto":{"type":"object","properties":{"topicId":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"content":{"type":"array","items":{"$ref":"#/components/schemas/LessonContentBlockDto"}},"lessonIndex":{"type":"number"},"estimatedReadTimeInMinutes":{"type":"number"}}},"DueRecallCardDto":{"type":"object","properties":{"userRecallCardId":{"type":"string"},"userId":{"type":"string"},"recallQuestionId":{"type":"string"},"question":{"type":"string"},"answer":{"type":"string"},"insight":{"type":"string"},"topicId":{"type":"string"},"topicName":{"type":"string"},"topicEmoji":{"type":"string"}},"required":["userRecallCardId","userId","recallQuestionId","question","answer","insight","topicId","topicName","topicEmoji"]},"SubmitRecallReviewDto":{"type":"object","properties":{"userRecallCardId":{"type":"string"},"rating":{"type":"string","enum":["bad","almost","good"]}},"required":["userRecallCardId","rating"]},"RecallReviewResultDto":{"type":"object","properties":{"newInterval":{"type":"number","description":"Days until this card is due for review again"},"activityResult":{"$ref":"#/components/schemas/UserActivityDto"}},"required":["newInterval","activityResult"]},"DailyScheduleViewDto":{"type":"object","properties":{"enrollmentId":{"type":"string"},"subjectType":{"type":"string","enum":["path","topic"]},"subjectId":{"type":"string"},"subjectTitle":{"type":"string"},"subjectEmoji":{"type":"string"},"contextTitle":{"type":"string","nullable":true},"scheduleStatus":{"type":"string","enum":["pending","completed"]},"lessonId":{"type":"string"},"lessonTitle":{"type":"string"},"estimatedReadTimeInMinutes":{"type":"number"},"completionStatus":{"type":"string","enum":["notStarted","inProgress","questions","complete"]},"readProgressPct":{"type":"number"},"currentQuestionIndex":{"type":"number","nullable":true},"totalSubjectLessons":{"type":"number"},"totalSubjectLessonsCompleted":{"type":"number"}},"required":["enrollmentId","subjectType","subjectId","subjectTitle","subjectEmoji","contextTitle","scheduleStatus","lessonId","lessonTitle","estimatedReadTimeInMinutes","completionStatus","readProgressPct","currentQuestionIndex","totalSubjectLessons","totalSubjectLessonsCompleted"]},"CreateEnrollmentDto":{"type":"object","properties":{"topicId":{"type":"string","description":"Topic ID to enroll in"},"pathId":{"type":"string","description":"Path ID to enroll in"}}},"UserEnrollment":{"type":"object","properties":{}},"EnrollmentResponseDto":{"type":"object","properties":{"id":{"type":"string"},"subjectType":{"type":"string","enum":["path","topic"]},"subjectId":{"type":"string"},"subjectTitle":{"type":"string"},"subjectEmoji":{"type":"string"},"contextTitle":{"type":"string","nullable":true,"description":"Parent path title for topic enrollments; null for path enrollments"},"status":{"type":"string","enum":["active","completed"]},"totalLessons":{"type":"number"},"lessonsCompleted":{"type":"number"},"enrolledAt":{"format":"date-time","type":"string"}},"required":["id","subjectType","subjectId","subjectTitle","subjectEmoji","contextTitle","status","totalLessons","lessonsCompleted","enrolledAt"]},"DiscoverItemDto":{"type":"object","properties":{"type":{"type":"string","enum":["topic","path"]},"id":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"emoji":{"type":"string"},"enrollmentCount":{"type":"number"},"createdAt":{"format":"date-time","type":"string"}},"required":["type","id","title","description","emoji","enrollmentCount","createdAt"]},"DiscoverResponseDto":{"type":"object","properties":{"new":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/DiscoverItemDto"}]},"trending":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/DiscoverItemDto"}]},"popular":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/DiscoverItemDto"}]}}},"GenerationHintsDto":{"type":"object","properties":{"topicCount":{"type":"number","description":"Override auto topic count (min 3)"},"lessonsPerTopic":{"type":"number","description":"Override auto lessons per topic (min 3)"},"topicTitles":{"description":"Seed specific topic titles","type":"array","items":{"type":"string"}}}},"GenerateOutlineDto":{"type":"object","properties":{"prompt":{"type":"string","description":"Plain-English instruction (e.g. \"A 3-topic path on SQL fundamentals\")"},"type":{"type":"string","enum":["path","topic"],"description":"\"path\" generates a full path; \"topic\" adds to an existing path"},"pathId":{"type":"string","description":"Required when type = topic — provides path context"},"hints":{"$ref":"#/components/schemas/GenerationHintsDto"}},"required":["prompt","type"]},"LessonOutlineDto":{"type":"object","properties":{"title":{"type":"string"},"description":{"type":"string"}},"required":["title","description"]},"TopicOutlineDto":{"type":"object","properties":{"title":{"type":"string"},"description":{"type":"string"},"emoji":{"type":"string"},"lessons":{"type":"array","items":{"$ref":"#/components/schemas/LessonOutlineDto"}}},"required":["title","description","emoji","lessons"]},"OutlineDto":{"type":"object","properties":{"title":{"type":"string"},"description":{"type":"string"},"emoji":{"type":"string"},"topics":{"type":"array","items":{"$ref":"#/components/schemas/TopicOutlineDto"}}},"required":["title","description","emoji","topics"]},"GenerateOutlineResponseDto":{"type":"object","properties":{"outline":{"$ref":"#/components/schemas/OutlineDto"}},"required":["outline"]},"SuggestPathsDto":{"type":"object","properties":{"field":{"type":"string","description":"The field / domain to suggest paths for (e.g. \"Software Engineering\")","example":"Software Engineering"}},"required":["field"]},"PathSuggestionDto":{"type":"object","properties":{"title":{"type":"string","description":"Suggested path title","example":"Distributed Systems Fundamentals"},"description":{"type":"string","description":"One-line description of the path","example":"Learn the core principles behind building reliable, scalable distributed systems"},"emoji":{"type":"string","description":"Suggested emoji for the path","example":"🌐"}},"required":["title","description","emoji"]},"SuggestPathsResponseDto":{"type":"object","properties":{"suggestions":{"description":"List of suggested learning paths","type":"array","items":{"$ref":"#/components/schemas/PathSuggestionDto"}}},"required":["suggestions"]},"GenerateContentDto":{"type":"object","properties":{"type":{"type":"string","enum":["path","topic"]},"pathId":{"type":"string","description":"Required when type = topic"},"outline":{"$ref":"#/components/schemas/OutlineDto"}},"required":["type","outline"]},"GeneratedLessonDto":{"type":"object","properties":{"title":{"type":"string"},"description":{"type":"string"},"estimatedReadTimeInMinutes":{"type":"number"},"content":{"type":"array","items":{"$ref":"#/components/schemas/LessonContentBlockDto"}},"comprehensionQuestions":{"type":"array","items":{"$ref":"#/components/schemas/CreateComprehensionQuestionDto"}},"recallQuestions":{"type":"array","items":{"$ref":"#/components/schemas/CreateRecallQuestionDto"}}},"required":["title","description","estimatedReadTimeInMinutes","content","comprehensionQuestions","recallQuestions"]},"GeneratedTopicDto":{"type":"object","properties":{"title":{"type":"string"},"description":{"type":"string"},"emoji":{"type":"string"},"lessons":{"type":"array","items":{"$ref":"#/components/schemas/GeneratedLessonDto"}}},"required":["title","description","emoji","lessons"]},"GeneratedPathDto":{"type":"object","properties":{"title":{"type":"string"},"description":{"type":"string"},"emoji":{"type":"string"},"topics":{"type":"array","items":{"$ref":"#/components/schemas/GeneratedTopicDto"}}},"required":["title","description","emoji","topics"]},"GenerateContentResponseDto":{"type":"object","properties":{"type":{"type":"string","enum":["path","topic"]},"data":{"$ref":"#/components/schemas/GeneratedPathDto"}},"required":["type","data"]},"TrackEventDto":{"type":"object","properties":{"eventName":{"type":"string","example":"page_viewed"},"properties":{"type":"object","example":{"path":"/dashboard"}},"sessionId":{"type":"string","format":"uuid"},"occurredAt":{"type":"string","example":"2026-04-06T10:00:00.000Z","description":"ISO 8601 timestamp of when the event occurred on the client"}},"required":["eventName"]},"BatchTrackEventsDto":{"type":"object","properties":{"events":{"type":"array","items":{"$ref":"#/components/schemas/TrackEventDto"}}},"required":["events"]}}}}