@academy-sdk/sdk 0.1.1 → 0.2.1

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 (239) hide show
  1. package/dist/academy-sdk-sdk-v1.0.0.zip +0 -0
  2. package/dist/bundle.js +70 -0
  3. package/dist/manifest.json +5 -0
  4. package/dist/styles.css +3307 -0
  5. package/package.json +41 -46
  6. package/src/components/atoms/Avatar.tsx +38 -0
  7. package/src/components/atoms/Badge.tsx +32 -0
  8. package/src/components/atoms/Button.tsx +48 -0
  9. package/src/components/atoms/Card.tsx +33 -0
  10. package/src/components/atoms/Input.tsx +39 -0
  11. package/src/components/atoms/ProgressBar.tsx +52 -0
  12. package/src/components/atoms/Tabs.tsx +47 -0
  13. package/{dist/components/atoms/index.d.ts → src/components/atoms/index.ts} +0 -1
  14. package/{dist/components/index.d.ts → src/components/index.ts} +7 -1
  15. package/src/components/molecules/CourseCard.tsx +215 -0
  16. package/src/components/molecules/EmptyState.tsx +23 -0
  17. package/src/components/molecules/LoadingSpinner.tsx +27 -0
  18. package/src/components/molecules/PageHeader.tsx +22 -0
  19. package/src/components/molecules/Pagination.tsx +82 -0
  20. package/src/components/molecules/SearchInput.tsx +35 -0
  21. package/{dist/components/molecules/index.d.ts → src/components/molecules/index.ts} +0 -1
  22. package/src/components/organisms/CourseSidebar.tsx +276 -0
  23. package/src/components/organisms/LearnerNavbar.tsx +129 -0
  24. package/src/components/organisms/LearnerSidebar.tsx +148 -0
  25. package/src/components/organisms/LessonBookmarks.tsx +128 -0
  26. package/src/components/organisms/LessonNotes.tsx +153 -0
  27. package/{dist/components/organisms/index.d.ts → src/components/organisms/index.ts} +0 -1
  28. package/src/components/pages/BundleDetailPage.tsx +388 -0
  29. package/src/components/pages/CatalogBundlesPage.tsx +96 -0
  30. package/src/components/pages/CatalogCoursesPage.tsx +299 -0
  31. package/src/components/pages/CourseDetailPage.tsx +582 -0
  32. package/src/components/pages/CoursePlayerPage.tsx +481 -0
  33. package/src/components/pages/CreatorProfilePage.tsx +161 -0
  34. package/src/components/pages/LearnerSettingsPage.tsx +58 -0
  35. package/src/components/pages/ManualReviewDetailPage.tsx +254 -0
  36. package/src/components/pages/ManualReviewPage.tsx +228 -0
  37. package/src/components/pages/MessagesPage.tsx +285 -0
  38. package/src/components/pages/MyLearningPage.tsx +239 -0
  39. package/src/components/pages/PaymentCancelPage.tsx +74 -0
  40. package/src/components/pages/PaymentSuccessPage.tsx +73 -0
  41. package/{dist/components/pages/index.d.ts → src/components/pages/index.ts} +0 -1
  42. package/src/components/utils.ts +6 -0
  43. package/src/contracts/components.contract.ts +89 -0
  44. package/{dist/contracts/index.d.ts → src/contracts/index.ts} +0 -1
  45. package/src/contracts/layout.contract.ts +36 -0
  46. package/src/contracts/pages.contract.ts +275 -0
  47. package/src/contracts/template.contract.ts +100 -0
  48. package/src/default-template.tsx +52 -0
  49. package/{dist/hooks/index.d.ts → src/hooks/index.ts} +15 -1
  50. package/src/hooks/sdk-context.tsx +152 -0
  51. package/src/hooks/useAiCoach.ts +27 -0
  52. package/src/hooks/useBookmarks.ts +35 -0
  53. package/{dist/hooks/useCourseSearch.d.ts → src/hooks/useCourseSearch.ts} +8 -5
  54. package/{dist/hooks/useDebounce.d.ts → src/hooks/useDebounce.ts} +8 -2
  55. package/{dist/hooks/useMyBundles.d.ts → src/hooks/useMyBundles.ts} +8 -6
  56. package/{dist/hooks/useMyCourses.d.ts → src/hooks/useMyCourses.ts} +8 -6
  57. package/src/hooks/useNotes.ts +35 -0
  58. package/src/hooks/useNotifications.ts +16 -0
  59. package/{dist/hooks/useTheme.d.ts → src/hooks/useTheme.ts} +8 -5
  60. package/src/hooks/useToast.ts +17 -0
  61. package/{dist/hooks/useUser.d.ts → src/hooks/useUser.ts} +13 -9
  62. package/src/index.ts +33 -0
  63. package/src/layouts/DefaultLayout.tsx +58 -0
  64. package/src/manifest.json +5 -0
  65. package/src/styles.css +43 -0
  66. package/src/types/ai-coach.ts +25 -0
  67. package/src/types/bookmarks.ts +20 -0
  68. package/src/types/bundle.ts +119 -0
  69. package/src/types/common.ts +24 -0
  70. package/src/types/course.ts +135 -0
  71. package/src/types/enrollment.ts +35 -0
  72. package/{dist/types/index.d.ts → src/types/index.ts} +0 -1
  73. package/src/types/lesson.ts +106 -0
  74. package/src/types/manual-review.ts +116 -0
  75. package/src/types/messaging.ts +109 -0
  76. package/src/types/notification.ts +30 -0
  77. package/src/types/payment.ts +40 -0
  78. package/src/types/progress.ts +19 -0
  79. package/src/types/rating.ts +20 -0
  80. package/src/types/search.ts +31 -0
  81. package/src/types/user.ts +16 -0
  82. package/src/utils/formatters.ts +74 -0
  83. package/src/utils/index.ts +8 -0
  84. package/dist/components/atoms/Avatar.d.ts +0 -9
  85. package/dist/components/atoms/Avatar.d.ts.map +0 -1
  86. package/dist/components/atoms/Badge.d.ts +0 -10
  87. package/dist/components/atoms/Badge.d.ts.map +0 -1
  88. package/dist/components/atoms/Button.d.ts +0 -11
  89. package/dist/components/atoms/Button.d.ts.map +0 -1
  90. package/dist/components/atoms/Card.d.ts +0 -11
  91. package/dist/components/atoms/Card.d.ts.map +0 -1
  92. package/dist/components/atoms/Input.d.ts +0 -7
  93. package/dist/components/atoms/Input.d.ts.map +0 -1
  94. package/dist/components/atoms/ProgressBar.d.ts +0 -11
  95. package/dist/components/atoms/ProgressBar.d.ts.map +0 -1
  96. package/dist/components/atoms/Tabs.d.ts +0 -16
  97. package/dist/components/atoms/Tabs.d.ts.map +0 -1
  98. package/dist/components/atoms/index.cjs +0 -318
  99. package/dist/components/atoms/index.d.ts.map +0 -1
  100. package/dist/components/atoms/index.js +0 -288
  101. package/dist/components/index.cjs +0 -1275
  102. package/dist/components/index.d.ts.map +0 -1
  103. package/dist/components/index.js +0 -1245
  104. package/dist/components/molecules/CourseCard.d.ts +0 -25
  105. package/dist/components/molecules/CourseCard.d.ts.map +0 -1
  106. package/dist/components/molecules/EmptyState.d.ts +0 -10
  107. package/dist/components/molecules/EmptyState.d.ts.map +0 -1
  108. package/dist/components/molecules/LoadingSpinner.d.ts +0 -7
  109. package/dist/components/molecules/LoadingSpinner.d.ts.map +0 -1
  110. package/dist/components/molecules/PageHeader.d.ts +0 -8
  111. package/dist/components/molecules/PageHeader.d.ts.map +0 -1
  112. package/dist/components/molecules/Pagination.d.ts +0 -13
  113. package/dist/components/molecules/Pagination.d.ts.map +0 -1
  114. package/dist/components/molecules/SearchInput.d.ts +0 -8
  115. package/dist/components/molecules/SearchInput.d.ts.map +0 -1
  116. package/dist/components/molecules/index.cjs +0 -334
  117. package/dist/components/molecules/index.d.ts.map +0 -1
  118. package/dist/components/molecules/index.js +0 -311
  119. package/dist/components/organisms/CourseSidebar.d.ts +0 -37
  120. package/dist/components/organisms/CourseSidebar.d.ts.map +0 -1
  121. package/dist/components/organisms/LearnerNavbar.d.ts +0 -8
  122. package/dist/components/organisms/LearnerNavbar.d.ts.map +0 -1
  123. package/dist/components/organisms/LearnerSidebar.d.ts +0 -16
  124. package/dist/components/organisms/LearnerSidebar.d.ts.map +0 -1
  125. package/dist/components/organisms/LessonBookmarks.d.ts +0 -8
  126. package/dist/components/organisms/LessonBookmarks.d.ts.map +0 -1
  127. package/dist/components/organisms/LessonNotes.d.ts +0 -8
  128. package/dist/components/organisms/LessonNotes.d.ts.map +0 -1
  129. package/dist/components/organisms/index.cjs +0 -855
  130. package/dist/components/organisms/index.d.ts.map +0 -1
  131. package/dist/components/organisms/index.js +0 -825
  132. package/dist/components/pages/BundleDetailPage.d.ts +0 -3
  133. package/dist/components/pages/BundleDetailPage.d.ts.map +0 -1
  134. package/dist/components/pages/CatalogBundlesPage.d.ts +0 -3
  135. package/dist/components/pages/CatalogBundlesPage.d.ts.map +0 -1
  136. package/dist/components/pages/CatalogCoursesPage.d.ts +0 -3
  137. package/dist/components/pages/CatalogCoursesPage.d.ts.map +0 -1
  138. package/dist/components/pages/CourseDetailPage.d.ts +0 -3
  139. package/dist/components/pages/CourseDetailPage.d.ts.map +0 -1
  140. package/dist/components/pages/CoursePlayerPage.d.ts +0 -8
  141. package/dist/components/pages/CoursePlayerPage.d.ts.map +0 -1
  142. package/dist/components/pages/CreatorProfilePage.d.ts +0 -3
  143. package/dist/components/pages/CreatorProfilePage.d.ts.map +0 -1
  144. package/dist/components/pages/LearnerSettingsPage.d.ts +0 -3
  145. package/dist/components/pages/LearnerSettingsPage.d.ts.map +0 -1
  146. package/dist/components/pages/ManualReviewDetailPage.d.ts +0 -3
  147. package/dist/components/pages/ManualReviewDetailPage.d.ts.map +0 -1
  148. package/dist/components/pages/ManualReviewPage.d.ts +0 -3
  149. package/dist/components/pages/ManualReviewPage.d.ts.map +0 -1
  150. package/dist/components/pages/MessagesPage.d.ts +0 -3
  151. package/dist/components/pages/MessagesPage.d.ts.map +0 -1
  152. package/dist/components/pages/MyLearningPage.d.ts +0 -3
  153. package/dist/components/pages/MyLearningPage.d.ts.map +0 -1
  154. package/dist/components/pages/PaymentCancelPage.d.ts +0 -3
  155. package/dist/components/pages/PaymentCancelPage.d.ts.map +0 -1
  156. package/dist/components/pages/PaymentSuccessPage.d.ts +0 -3
  157. package/dist/components/pages/PaymentSuccessPage.d.ts.map +0 -1
  158. package/dist/components/pages/index.cjs +0 -3306
  159. package/dist/components/pages/index.d.ts.map +0 -1
  160. package/dist/components/pages/index.js +0 -3315
  161. package/dist/components/utils.d.ts +0 -3
  162. package/dist/components/utils.d.ts.map +0 -1
  163. package/dist/contracts/components.contract.d.ts +0 -87
  164. package/dist/contracts/components.contract.d.ts.map +0 -1
  165. package/dist/contracts/index.cjs +0 -52
  166. package/dist/contracts/index.d.ts.map +0 -1
  167. package/dist/contracts/index.js +0 -29
  168. package/dist/contracts/layout.contract.d.ts +0 -35
  169. package/dist/contracts/layout.contract.d.ts.map +0 -1
  170. package/dist/contracts/pages.contract.d.ts +0 -192
  171. package/dist/contracts/pages.contract.d.ts.map +0 -1
  172. package/dist/contracts/template.contract.d.ts +0 -49
  173. package/dist/contracts/template.contract.d.ts.map +0 -1
  174. package/dist/hooks/index.cjs +0 -165
  175. package/dist/hooks/index.d.ts.map +0 -1
  176. package/dist/hooks/index.js +0 -142
  177. package/dist/hooks/sdk-context.d.ts +0 -125
  178. package/dist/hooks/sdk-context.d.ts.map +0 -1
  179. package/dist/hooks/useAiCoach.d.ts +0 -32
  180. package/dist/hooks/useAiCoach.d.ts.map +0 -1
  181. package/dist/hooks/useBookmarks.d.ts +0 -31
  182. package/dist/hooks/useBookmarks.d.ts.map +0 -1
  183. package/dist/hooks/useCourseSearch.d.ts.map +0 -1
  184. package/dist/hooks/useDebounce.d.ts.map +0 -1
  185. package/dist/hooks/useMyBundles.d.ts.map +0 -1
  186. package/dist/hooks/useMyCourses.d.ts.map +0 -1
  187. package/dist/hooks/useNotes.d.ts +0 -31
  188. package/dist/hooks/useNotes.d.ts.map +0 -1
  189. package/dist/hooks/useNotifications.d.ts +0 -19
  190. package/dist/hooks/useNotifications.d.ts.map +0 -1
  191. package/dist/hooks/useTheme.d.ts.map +0 -1
  192. package/dist/hooks/useToast.d.ts +0 -17
  193. package/dist/hooks/useToast.d.ts.map +0 -1
  194. package/dist/hooks/useUser.d.ts.map +0 -1
  195. package/dist/index.cjs +0 -630
  196. package/dist/index.d.ts +0 -17
  197. package/dist/index.d.ts.map +0 -1
  198. package/dist/index.js +0 -600
  199. package/dist/layouts/DefaultLayout.d.ts +0 -9
  200. package/dist/layouts/DefaultLayout.d.ts.map +0 -1
  201. package/dist/types/ai-coach.d.ts +0 -22
  202. package/dist/types/ai-coach.d.ts.map +0 -1
  203. package/dist/types/bookmarks.d.ts +0 -19
  204. package/dist/types/bookmarks.d.ts.map +0 -1
  205. package/dist/types/bundle.d.ts +0 -114
  206. package/dist/types/bundle.d.ts.map +0 -1
  207. package/dist/types/common.d.ts +0 -23
  208. package/dist/types/common.d.ts.map +0 -1
  209. package/dist/types/course.d.ts +0 -127
  210. package/dist/types/course.d.ts.map +0 -1
  211. package/dist/types/enrollment.d.ts +0 -34
  212. package/dist/types/enrollment.d.ts.map +0 -1
  213. package/dist/types/index.cjs +0 -18
  214. package/dist/types/index.d.ts.map +0 -1
  215. package/dist/types/index.js +0 -0
  216. package/dist/types/lesson.d.ts +0 -105
  217. package/dist/types/lesson.d.ts.map +0 -1
  218. package/dist/types/manual-review.d.ts +0 -123
  219. package/dist/types/manual-review.d.ts.map +0 -1
  220. package/dist/types/messaging.d.ts +0 -101
  221. package/dist/types/messaging.d.ts.map +0 -1
  222. package/dist/types/notification.d.ts +0 -28
  223. package/dist/types/notification.d.ts.map +0 -1
  224. package/dist/types/payment.d.ts +0 -38
  225. package/dist/types/payment.d.ts.map +0 -1
  226. package/dist/types/progress.d.ts +0 -18
  227. package/dist/types/progress.d.ts.map +0 -1
  228. package/dist/types/rating.d.ts +0 -20
  229. package/dist/types/rating.d.ts.map +0 -1
  230. package/dist/types/search.d.ts +0 -28
  231. package/dist/types/search.d.ts.map +0 -1
  232. package/dist/types/user.d.ts +0 -15
  233. package/dist/types/user.d.ts.map +0 -1
  234. package/dist/utils/formatters.d.ts +0 -25
  235. package/dist/utils/formatters.d.ts.map +0 -1
  236. package/dist/utils/index.cjs +0 -80
  237. package/dist/utils/index.d.ts +0 -2
  238. package/dist/utils/index.d.ts.map +0 -1
  239. package/dist/utils/index.js +0 -57
@@ -0,0 +1,119 @@
1
+ export interface BundleSettings {
2
+ pricingType: 'FREE' | 'ONE_TIME' | 'SUBSCRIPTION' | 'INSTALLMENT';
3
+ price?: number;
4
+ currency?: string;
5
+ accessDurationDays?: number;
6
+ allowCourseSkipping?: boolean;
7
+ requireSequentialCompletion?: boolean;
8
+ enableBundleCertificate?: boolean;
9
+ trialEnabled?: boolean;
10
+ trialPrice?: number;
11
+ trialDurationDays?: number;
12
+ }
13
+
14
+ export interface Bundle {
15
+ id: string;
16
+ tenantId?: string;
17
+ title: string;
18
+ slug?: string;
19
+ description?: string;
20
+ status: 'DRAFT' | 'PUBLISHED' | 'UNPUBLISHED' | 'ARCHIVED';
21
+ settings?: BundleSettings;
22
+ courses?: BundleCourse[];
23
+ includedCourses?: BundleCourse[];
24
+ createdAt: string;
25
+ updatedAt: string;
26
+ }
27
+
28
+ export interface BundleCourse {
29
+ courseId: string;
30
+ orderIndex: number;
31
+ dripType?: 'STUDENT_ENROLLMENT_DATE' | 'STUDENT_START_DATE' | 'SPECIFIC_DATE';
32
+ dripStartDate?: string;
33
+ course?: {
34
+ id: string;
35
+ title: string;
36
+ slug?: string;
37
+ thumbnail?: string;
38
+ summary?: string;
39
+ status?: string;
40
+ sections?: Array<{
41
+ id: string;
42
+ title: string;
43
+ description?: string;
44
+ activities?: Array<{
45
+ id: string;
46
+ title: string;
47
+ description?: string;
48
+ estimatedDuration?: string;
49
+ }>;
50
+ }>;
51
+ };
52
+ }
53
+
54
+ export interface LearnerBundleCourse {
55
+ id: string;
56
+ title: string;
57
+ slug: string;
58
+ summary?: string;
59
+ thumbnail?: string;
60
+ orderIndex: number;
61
+ status: string;
62
+ totalActivities: number;
63
+ isEnrolled: boolean;
64
+ enrollmentId?: string;
65
+ enrollmentSource?: string;
66
+ isAccessible: boolean;
67
+ isAvailable: boolean;
68
+ availableAt?: string;
69
+ dripType?: 'STUDENT_ENROLLMENT_DATE' | 'STUDENT_START_DATE' | 'SPECIFIC_DATE';
70
+ isCompleted?: boolean;
71
+ completedAt?: string;
72
+ progressPercentage?: number;
73
+ completedActivities?: number;
74
+ }
75
+
76
+ export interface LearnerBundleCreator {
77
+ id: string;
78
+ name: string;
79
+ email: string;
80
+ }
81
+
82
+ export interface LearnerBundle {
83
+ id: string;
84
+ title: string;
85
+ slug: string;
86
+ description?: string;
87
+ courses: LearnerBundleCourse[];
88
+ totalCourses: number;
89
+ totalActivities: number;
90
+ price?: number | null;
91
+ currency: string;
92
+ pricingType: 'FREE' | 'ONE_TIME' | 'SUBSCRIPTION' | 'INSTALLMENT';
93
+ creator: LearnerBundleCreator;
94
+ isEnrolled: boolean;
95
+ createdAt: string;
96
+ updatedAt: string;
97
+ allowCourseSkipping: boolean;
98
+ requireSequentialCompletion: boolean;
99
+ enableBundleCertificate: boolean;
100
+ enableDiscussions: boolean;
101
+ bundleProgressPercentage: number;
102
+ allCoursesCompleted?: boolean;
103
+ certificateUrl?: string;
104
+ trialEnabled?: boolean;
105
+ trialPrice?: number;
106
+ trialDurationDays?: number;
107
+ }
108
+
109
+ export interface BundleListResponse {
110
+ data: Bundle[];
111
+ meta: {
112
+ page: number;
113
+ limit: number;
114
+ total: number;
115
+ totalPages: number;
116
+ hasNextPage: boolean;
117
+ hasPreviousPage: boolean;
118
+ };
119
+ }
@@ -0,0 +1,24 @@
1
+ export interface PaginationMeta {
2
+ page: number;
3
+ limit: number;
4
+ total: number;
5
+ totalPages: number;
6
+ hasNextPage: boolean;
7
+ hasPreviousPage: boolean;
8
+ }
9
+
10
+ export interface PaginatedResponse<T> {
11
+ data: T[];
12
+ meta: PaginationMeta;
13
+ }
14
+
15
+ export interface PaginationProps {
16
+ currentPage: number;
17
+ totalPages: number;
18
+ total: number;
19
+ pageSize: number;
20
+ hasNextPage: boolean;
21
+ hasPreviousPage: boolean;
22
+ onPageChange: (page: number) => void;
23
+ maxVisiblePages?: number;
24
+ }
@@ -0,0 +1,135 @@
1
+ export interface Course {
2
+ id: string;
3
+ title: string;
4
+ description?: string;
5
+ summary?: string;
6
+ slug?: string;
7
+ thumbnail?: string;
8
+ instructorId?: string;
9
+ status?: string;
10
+ modules?: Module[];
11
+ sections?: any[];
12
+ studentsEnrolled?: number;
13
+ totalActivities?: number;
14
+ createdAt?: Date;
15
+ updatedAt?: Date;
16
+ timestamp?: string;
17
+ settings?: CourseSettings;
18
+ }
19
+
20
+ export interface CourseSettings {
21
+ dripEnabled?: boolean;
22
+ timezone?: string;
23
+ banner?: string;
24
+ primaryThemeColor?: string;
25
+ secondaryThemeColor?: string;
26
+ communityEnabled?: boolean;
27
+ slackCommunityEnabled?: boolean;
28
+ slackCommunityStatus?: string;
29
+ slackChannelId?: string;
30
+ slackChannelName?: string;
31
+ seoTitle?: string;
32
+ seoDescription?: string;
33
+ seo?: CourseSEOSettings;
34
+ trialEnabled?: boolean;
35
+ trialPrice?: number;
36
+ trialDurationDays?: number;
37
+ }
38
+
39
+ export interface CourseSEOSettings {
40
+ title?: string;
41
+ description?: string;
42
+ isPubliclyDiscoverable?: boolean;
43
+ requirePassword?: boolean;
44
+ coursePassword?: string;
45
+ }
46
+
47
+ export interface Module {
48
+ id: string;
49
+ courseId: string;
50
+ title: string;
51
+ description: string;
52
+ order: number;
53
+ lessons: Lesson[];
54
+ }
55
+
56
+ export interface Lesson {
57
+ id: string;
58
+ moduleId: string;
59
+ title: string;
60
+ description: string;
61
+ videoUrl?: string;
62
+ content: string;
63
+ resources: Resource[];
64
+ homeworkRequired: boolean;
65
+ order: number;
66
+ duration?: number;
67
+ }
68
+
69
+ export interface Resource {
70
+ id: string;
71
+ lessonId: string;
72
+ title: string;
73
+ url: string;
74
+ type: 'pdf' | 'video' | 'link' | 'document';
75
+ }
76
+
77
+ // Course player types
78
+ export interface CoursePlayerLesson {
79
+ id: string;
80
+ title: string;
81
+ videoUrl: string;
82
+ videoProvider?: 'YOUTUBE' | 'VIMEO' | 'LOOM' | 'OTHERS';
83
+ videoResourceId?: string;
84
+ hasTranscript?: boolean;
85
+ duration: string;
86
+ completed: boolean;
87
+ locked?: boolean;
88
+ available?: boolean;
89
+ availableAt?: string;
90
+ availabilityMessage?: string;
91
+ schedulingType?: string;
92
+ remainingDays?: number;
93
+ hasPrerequisite?: boolean;
94
+ downloadable?: boolean;
95
+ lessonIcon?: string;
96
+ description?: string;
97
+ summary?: string;
98
+ learningObjectives?: string[];
99
+ enableDiscussion?: boolean;
100
+ secondaryResources?: Array<{
101
+ id: string;
102
+ title: string;
103
+ type: 'VIDEO' | 'LINK' | 'DOCUMENT';
104
+ metadataJson: {
105
+ url?: string;
106
+ key?: string;
107
+ name?: string;
108
+ size?: number;
109
+ mimeType?: string;
110
+ };
111
+ }>;
112
+ progressData?: {
113
+ progressId?: string;
114
+ completed?: boolean;
115
+ lastAccessed?: string;
116
+ progressSecond?: number;
117
+ completedAt?: string;
118
+ };
119
+ _fullData?: any;
120
+ }
121
+
122
+ export interface CoursePlayerModule {
123
+ id: string;
124
+ title: string;
125
+ lessons: CoursePlayerLesson[];
126
+ }
127
+
128
+ export interface CoursePlayerCourse {
129
+ id: string;
130
+ title: string;
131
+ description: string;
132
+ modules: CoursePlayerModule[];
133
+ summary?: string;
134
+ learningObjectives?: string[];
135
+ }
@@ -0,0 +1,35 @@
1
+ export interface StudentProgress {
2
+ id: string;
3
+ studentId: string;
4
+ courseId: string;
5
+ lessonsCompleted: string[];
6
+ currentLessonId?: string;
7
+ completionPercentage: number;
8
+ lastAccessedAt: Date;
9
+ }
10
+
11
+ export interface CourseEnrollment {
12
+ id: string;
13
+ learnerId: string;
14
+ learnerName: string;
15
+ learnerEmail: string;
16
+ learnerAvatar?: string;
17
+ courseId: string;
18
+ enrollmentDate: string;
19
+ status: 'active' | 'inactive' | 'removed' | 'pending';
20
+ progress: {
21
+ completedLessons: number;
22
+ totalLessons: number;
23
+ percentage: number;
24
+ };
25
+ lastAccessedAt?: string;
26
+ }
27
+
28
+ export interface EnrollmentStatus {
29
+ isEnrolled: boolean;
30
+ enrollmentId?: string;
31
+ enrolledAt?: string;
32
+ lastActivityId?: string;
33
+ progress?: number;
34
+ hasReviewed?: boolean;
35
+ }
@@ -13,4 +13,3 @@ export * from './payment';
13
13
  export * from './common';
14
14
  export * from './bookmarks';
15
15
  export * from './progress';
16
- //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,106 @@
1
+ export interface LessonContent {
2
+ id: string;
3
+ title: string;
4
+ description: string;
5
+ videoUrl?: string;
6
+ videoDuration?: number;
7
+ resources: LessonResource[];
8
+ moduleId: string;
9
+ courseId: string;
10
+ order: number;
11
+ createdAt?: string;
12
+ updatedAt?: string;
13
+ }
14
+
15
+ export interface LessonResource {
16
+ id: string;
17
+ lessonId: string;
18
+ title: string;
19
+ url: string;
20
+ type: 'pdf' | 'video' | 'link' | 'document';
21
+ size?: number;
22
+ createdAt?: string;
23
+ }
24
+
25
+ export interface TranscriptItem {
26
+ timestamp: string;
27
+ text: string;
28
+ startTime: number;
29
+ endTime?: number;
30
+ }
31
+
32
+ export interface LessonTranscript {
33
+ lessonId: string;
34
+ language: string;
35
+ items: TranscriptItem[];
36
+ totalDuration?: number;
37
+ }
38
+
39
+ export interface TranscriptSearchResult {
40
+ lessonId: string;
41
+ matches: TranscriptItem[];
42
+ totalMatches: number;
43
+ }
44
+
45
+ export interface LessonProgress {
46
+ currentTime: number;
47
+ duration: number;
48
+ completed: boolean;
49
+ }
50
+
51
+ export interface LessonNote {
52
+ id: string;
53
+ activityId: string;
54
+ text: string;
55
+ timestamp?: number;
56
+ formattedTimestamp?: string;
57
+ createdAt: string;
58
+ updatedAt: string;
59
+ }
60
+
61
+ export interface FAQItem {
62
+ id: string;
63
+ question: string;
64
+ answer: string;
65
+ }
66
+
67
+ export interface CreateNotePayload {
68
+ activityId: string;
69
+ text: string;
70
+ timestamp?: number;
71
+ }
72
+
73
+ export interface UpdateNotePayload {
74
+ text: string;
75
+ timestamp?: number;
76
+ }
77
+
78
+ export interface LessonResources {
79
+ externalLinks: string[];
80
+ description: string;
81
+ customTabs: Array<{ id: string; label: string }>;
82
+ uploadedFiles?: Array<{
83
+ id: string;
84
+ key: string;
85
+ name: string;
86
+ size: number;
87
+ type: string;
88
+ url?: string;
89
+ customTitle?: string;
90
+ customDescription?: string;
91
+ }>;
92
+ }
93
+
94
+ export interface LessonData {
95
+ title: string;
96
+ videoLinks: Array<{ id: string; url: string; title?: string }>;
97
+ description: string;
98
+ settings: Record<string, string | boolean | number> & { faqs?: FAQItem[] };
99
+ resources?: LessonResources;
100
+ resourceIds?: {
101
+ videoResourceIds?: string[];
102
+ linkResourceIds?: string[];
103
+ fileResourceIds?: string[];
104
+ };
105
+ settingsId?: string;
106
+ }
@@ -0,0 +1,116 @@
1
+ export type LearnerManualReviewStatus = 'IN_REVIEW' | 'REQUEST_CHANGE' | 'GRADED';
2
+
3
+ export type QuestionType = 'SINGLE_CHOICE' | 'MULTIPLE_SELECT' | 'TRUE_FALSE' | 'TEXT' | 'ESSAY';
4
+
5
+ export interface LearnerManualReviewAssignment {
6
+ id: string;
7
+ title: string;
8
+ courseId: string;
9
+ courseName: string;
10
+ totalQuestions: number;
11
+ totalPoints: number;
12
+ passingScore: number;
13
+ isManualReview: boolean;
14
+ }
15
+
16
+ export interface LearnerManualReviewAnswer {
17
+ questionId: string;
18
+ questionText: string;
19
+ questionType: QuestionType;
20
+ questionPoints: number;
21
+ selectedOptionId?: string | null;
22
+ selectedOptionText?: string | null;
23
+ selectedOptionIds?: string[];
24
+ selectedOptions?: Array<{ id: string; text: string }>;
25
+ answerText?: string | null;
26
+ isCorrect?: boolean;
27
+ pointsAwarded?: number;
28
+ }
29
+
30
+ export interface LearnerManualReviewSubmission {
31
+ id: string;
32
+ assignment: LearnerManualReviewAssignment;
33
+ status: LearnerManualReviewStatus;
34
+ score: number;
35
+ passed: boolean | null;
36
+ totalQuestions: number;
37
+ correctAnswers: number;
38
+ wrongAnswers: number;
39
+ totalPoints: number;
40
+ pointsAwarded: number;
41
+ submittedAt: string;
42
+ startedAt: string;
43
+ timeTakenMinutes: number;
44
+ answers: LearnerManualReviewAnswer[];
45
+ createdAt: string;
46
+ updatedAt: string;
47
+ }
48
+
49
+ export interface LearnerManualReviewSummary {
50
+ totalSubmissions: number;
51
+ gradedSubmissions: number;
52
+ inReviewSubmissions: number;
53
+ requestChangeSubmissions: number;
54
+ averageScore: number;
55
+ highestScore: number;
56
+ lowestScore: number;
57
+ passRate: number;
58
+ averageTimeTaken: number;
59
+ }
60
+
61
+ export interface LearnerManualReviewPagination {
62
+ currentPage: number;
63
+ itemsPerPage: number;
64
+ totalItems: number;
65
+ totalPages: number;
66
+ hasNextPage: boolean;
67
+ hasPreviousPage: boolean;
68
+ }
69
+
70
+ export interface LearnerManualReviewResultsResponse {
71
+ data: LearnerManualReviewSubmission[];
72
+ summary: LearnerManualReviewSummary;
73
+ pagination: LearnerManualReviewPagination;
74
+ }
75
+
76
+ export interface LearnerManualReviewFilters {
77
+ courseId?: string;
78
+ activityId?: string;
79
+ status?: LearnerManualReviewStatus;
80
+ minScore?: number;
81
+ maxScore?: number;
82
+ passed?: boolean;
83
+ submittedFrom?: string;
84
+ submittedTo?: string;
85
+ search?: string;
86
+ sortBy?: 'submittedAt' | 'score' | 'status' | 'createdAt';
87
+ page?: number;
88
+ limit?: number;
89
+ }
90
+
91
+ export interface LearnerManualReviewDetailResponse {
92
+ context: {
93
+ learner: { id: string; name: string; email: string };
94
+ assignment: { id: string; title: string; totalPoints: number; totalQuestions: number };
95
+ course: { id: string; name: string };
96
+ enrollmentId: string;
97
+ submittedAt: string;
98
+ status: LearnerManualReviewStatus;
99
+ revisionNumber: number;
100
+ };
101
+ answers: LearnerManualReviewAnswer[];
102
+ latestReview?: {
103
+ score: number;
104
+ feedbackQuestionIds: string[];
105
+ additionalFeedback?: string;
106
+ reviewedAt: string;
107
+ };
108
+ revisionHistory: Array<{
109
+ id: string;
110
+ revisionNumber: number;
111
+ status: string;
112
+ submittedAt: string;
113
+ score: number;
114
+ isCurrent: boolean;
115
+ }>;
116
+ }
@@ -0,0 +1,109 @@
1
+ export interface MessageParticipant {
2
+ id: string;
3
+ name: string;
4
+ email: string;
5
+ avatar?: string;
6
+ role: 'CREATOR' | 'STUDENT';
7
+ }
8
+
9
+ export interface Message {
10
+ id: string;
11
+ conversationId: string;
12
+ senderId: string;
13
+ senderName: string;
14
+ senderRole: 'CREATOR' | 'STUDENT';
15
+ content: string;
16
+ timestamp: string;
17
+ isRead: boolean;
18
+ isDeletedForMe: boolean;
19
+ courseContext?: {
20
+ courseId: string;
21
+ courseName: string;
22
+ };
23
+ }
24
+
25
+ export interface Conversation {
26
+ id: string;
27
+ participant: MessageParticipant;
28
+ lastMessage: {
29
+ content: string;
30
+ timestamp: string;
31
+ senderId: string;
32
+ };
33
+ unreadCount: number;
34
+ isArchived: boolean;
35
+ courseContext?: {
36
+ courseId: string;
37
+ courseName: string;
38
+ moduleName?: string;
39
+ };
40
+ }
41
+
42
+ export interface ConversationMessageItem {
43
+ id: string;
44
+ senderRole: string;
45
+ content: string;
46
+ isRead: boolean;
47
+ timestamp: string;
48
+ context_label?: string;
49
+ }
50
+
51
+ export interface StudentConversationItem {
52
+ conversationId: string;
53
+ creatorName: string;
54
+ creatorEmail: string;
55
+ creatorId: string;
56
+ courseId: string;
57
+ courseTitle: string;
58
+ lastMessageAt: string;
59
+ unreadCount: number;
60
+ msgs?: ConversationMessageItem[];
61
+ }
62
+
63
+ export interface StudentConversationsResponse {
64
+ data: StudentConversationItem[];
65
+ meta: {
66
+ page: number;
67
+ limit: number;
68
+ total: number;
69
+ totalPages: number;
70
+ hasNextPage: boolean;
71
+ hasPreviousPage: boolean;
72
+ };
73
+ }
74
+
75
+ export interface SendCourseMessagePayload {
76
+ content: string;
77
+ conversationId?: string;
78
+ }
79
+
80
+ export interface SendCourseMessageResponse {
81
+ conversation: {
82
+ id: string;
83
+ studentId: string;
84
+ creatorId: string;
85
+ courseId: string;
86
+ lastMessageId: string;
87
+ lastMessageAt: string;
88
+ };
89
+ message: {
90
+ id: string;
91
+ conversationId: string;
92
+ senderId: string;
93
+ senderRole: 'CREATOR' | 'STUDENT';
94
+ content: string;
95
+ createdAt: string;
96
+ isRead: boolean;
97
+ };
98
+ }
99
+
100
+ export interface UnmessagedCourse {
101
+ id: string;
102
+ title: string;
103
+ creatorId: string;
104
+ }
105
+
106
+ export interface UnmessagedCoursesResponse {
107
+ data: UnmessagedCourse[];
108
+ total: number;
109
+ }
@@ -0,0 +1,30 @@
1
+ export type NotificationType = 'NEW_MESSAGE';
2
+ export type NotificationSenderRole = 'STUDENT' | 'CREATOR';
3
+
4
+ export interface NotificationSender {
5
+ id: string;
6
+ name: string;
7
+ userRole: NotificationSenderRole;
8
+ }
9
+
10
+ export interface MessageNotification {
11
+ id: string;
12
+ type: NotificationType;
13
+ conversationId: string;
14
+ messageId: string;
15
+ senderId?: string;
16
+ contextLabel: string;
17
+ messageContent?: string;
18
+ readAt?: string | null;
19
+ createdAt: string;
20
+ sender?: NotificationSender;
21
+ }
22
+
23
+ export interface NotificationListMeta {
24
+ page: number;
25
+ limit: number;
26
+ total: number;
27
+ totalPages: number;
28
+ hasNextPage: boolean;
29
+ hasPreviousPage: boolean;
30
+ }