Course.ts 878 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. import { BaseResponse } from '../ApiResponses';
  2. export type Lesson = {
  3. id: string;
  4. title: string;
  5. slug: string;
  6. day: number;
  7. language: string; // language code
  8. content: string;
  9. updatedAt: string;
  10. createdAt: string;
  11. isFirst: boolean;
  12. isLast: boolean;
  13. course: Course;
  14. isCompleted: boolean;
  15. };
  16. export type CourseAuthor = {
  17. id: string;
  18. name: string;
  19. biography: string;
  20. };
  21. export type Course = {
  22. id: string;
  23. title: string;
  24. slug: string;
  25. author: CourseAuthor;
  26. language: string; // language code
  27. description: string;
  28. metaDescription?: string;
  29. image: string;
  30. thumbnail: string;
  31. tags: string[];
  32. dailyMinutes: number;
  33. lessons?: Lesson[];
  34. isUserEnrolled?: boolean;
  35. isCompleted?: boolean;
  36. userHasFeedback?: boolean;
  37. continueFromLesson?: string;
  38. };
  39. export interface CoursesResponse extends BaseResponse {
  40. data: Course[];
  41. }