@academy-sdk/sdk 0.1.1 → 0.2.0
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.
- package/dist/bundle.js +70 -0
- package/dist/manifest.json +5 -0
- package/dist/styles.css +3307 -0
- package/package.json +40 -46
- package/src/components/atoms/Avatar.tsx +38 -0
- package/src/components/atoms/Badge.tsx +32 -0
- package/src/components/atoms/Button.tsx +48 -0
- package/src/components/atoms/Card.tsx +33 -0
- package/src/components/atoms/Input.tsx +39 -0
- package/src/components/atoms/ProgressBar.tsx +52 -0
- package/src/components/atoms/Tabs.tsx +47 -0
- package/{dist/components/atoms/index.d.ts → src/components/atoms/index.ts} +0 -1
- package/{dist/components/index.d.ts → src/components/index.ts} +7 -1
- package/src/components/molecules/CourseCard.tsx +215 -0
- package/src/components/molecules/EmptyState.tsx +23 -0
- package/src/components/molecules/LoadingSpinner.tsx +27 -0
- package/src/components/molecules/PageHeader.tsx +22 -0
- package/src/components/molecules/Pagination.tsx +82 -0
- package/src/components/molecules/SearchInput.tsx +35 -0
- package/{dist/components/molecules/index.d.ts → src/components/molecules/index.ts} +0 -1
- package/src/components/organisms/CourseSidebar.tsx +276 -0
- package/src/components/organisms/LearnerNavbar.tsx +129 -0
- package/src/components/organisms/LearnerSidebar.tsx +148 -0
- package/src/components/organisms/LessonBookmarks.tsx +128 -0
- package/src/components/organisms/LessonNotes.tsx +153 -0
- package/{dist/components/organisms/index.d.ts → src/components/organisms/index.ts} +0 -1
- package/src/components/pages/BundleDetailPage.tsx +388 -0
- package/src/components/pages/CatalogBundlesPage.tsx +96 -0
- package/src/components/pages/CatalogCoursesPage.tsx +299 -0
- package/src/components/pages/CourseDetailPage.tsx +582 -0
- package/src/components/pages/CoursePlayerPage.tsx +481 -0
- package/src/components/pages/CreatorProfilePage.tsx +161 -0
- package/src/components/pages/LearnerSettingsPage.tsx +58 -0
- package/src/components/pages/ManualReviewDetailPage.tsx +254 -0
- package/src/components/pages/ManualReviewPage.tsx +228 -0
- package/src/components/pages/MessagesPage.tsx +285 -0
- package/src/components/pages/MyLearningPage.tsx +239 -0
- package/src/components/pages/PaymentCancelPage.tsx +74 -0
- package/src/components/pages/PaymentSuccessPage.tsx +73 -0
- package/{dist/components/pages/index.d.ts → src/components/pages/index.ts} +0 -1
- package/src/components/utils.ts +6 -0
- package/src/contracts/components.contract.ts +89 -0
- package/{dist/contracts/index.d.ts → src/contracts/index.ts} +0 -1
- package/src/contracts/layout.contract.ts +36 -0
- package/src/contracts/pages.contract.ts +275 -0
- package/src/contracts/template.contract.ts +100 -0
- package/src/default-template.tsx +52 -0
- package/{dist/hooks/index.d.ts → src/hooks/index.ts} +15 -1
- package/src/hooks/sdk-context.tsx +152 -0
- package/src/hooks/useAiCoach.ts +27 -0
- package/src/hooks/useBookmarks.ts +35 -0
- package/{dist/hooks/useCourseSearch.d.ts → src/hooks/useCourseSearch.ts} +8 -5
- package/{dist/hooks/useDebounce.d.ts → src/hooks/useDebounce.ts} +8 -2
- package/{dist/hooks/useMyBundles.d.ts → src/hooks/useMyBundles.ts} +8 -6
- package/{dist/hooks/useMyCourses.d.ts → src/hooks/useMyCourses.ts} +8 -6
- package/src/hooks/useNotes.ts +35 -0
- package/src/hooks/useNotifications.ts +16 -0
- package/{dist/hooks/useTheme.d.ts → src/hooks/useTheme.ts} +8 -5
- package/src/hooks/useToast.ts +17 -0
- package/{dist/hooks/useUser.d.ts → src/hooks/useUser.ts} +13 -9
- package/src/index.ts +33 -0
- package/src/layouts/DefaultLayout.tsx +58 -0
- package/src/manifest.json +5 -0
- package/src/styles.css +43 -0
- package/src/types/ai-coach.ts +25 -0
- package/src/types/bookmarks.ts +20 -0
- package/src/types/bundle.ts +119 -0
- package/src/types/common.ts +24 -0
- package/src/types/course.ts +135 -0
- package/src/types/enrollment.ts +35 -0
- package/{dist/types/index.d.ts → src/types/index.ts} +0 -1
- package/src/types/lesson.ts +106 -0
- package/src/types/manual-review.ts +116 -0
- package/src/types/messaging.ts +109 -0
- package/src/types/notification.ts +30 -0
- package/src/types/payment.ts +40 -0
- package/src/types/progress.ts +19 -0
- package/src/types/rating.ts +20 -0
- package/src/types/search.ts +31 -0
- package/src/types/user.ts +16 -0
- package/src/utils/formatters.ts +74 -0
- package/src/utils/index.ts +8 -0
- package/dist/components/atoms/Avatar.d.ts +0 -9
- package/dist/components/atoms/Avatar.d.ts.map +0 -1
- package/dist/components/atoms/Badge.d.ts +0 -10
- package/dist/components/atoms/Badge.d.ts.map +0 -1
- package/dist/components/atoms/Button.d.ts +0 -11
- package/dist/components/atoms/Button.d.ts.map +0 -1
- package/dist/components/atoms/Card.d.ts +0 -11
- package/dist/components/atoms/Card.d.ts.map +0 -1
- package/dist/components/atoms/Input.d.ts +0 -7
- package/dist/components/atoms/Input.d.ts.map +0 -1
- package/dist/components/atoms/ProgressBar.d.ts +0 -11
- package/dist/components/atoms/ProgressBar.d.ts.map +0 -1
- package/dist/components/atoms/Tabs.d.ts +0 -16
- package/dist/components/atoms/Tabs.d.ts.map +0 -1
- package/dist/components/atoms/index.cjs +0 -318
- package/dist/components/atoms/index.d.ts.map +0 -1
- package/dist/components/atoms/index.js +0 -288
- package/dist/components/index.cjs +0 -1275
- package/dist/components/index.d.ts.map +0 -1
- package/dist/components/index.js +0 -1245
- package/dist/components/molecules/CourseCard.d.ts +0 -25
- package/dist/components/molecules/CourseCard.d.ts.map +0 -1
- package/dist/components/molecules/EmptyState.d.ts +0 -10
- package/dist/components/molecules/EmptyState.d.ts.map +0 -1
- package/dist/components/molecules/LoadingSpinner.d.ts +0 -7
- package/dist/components/molecules/LoadingSpinner.d.ts.map +0 -1
- package/dist/components/molecules/PageHeader.d.ts +0 -8
- package/dist/components/molecules/PageHeader.d.ts.map +0 -1
- package/dist/components/molecules/Pagination.d.ts +0 -13
- package/dist/components/molecules/Pagination.d.ts.map +0 -1
- package/dist/components/molecules/SearchInput.d.ts +0 -8
- package/dist/components/molecules/SearchInput.d.ts.map +0 -1
- package/dist/components/molecules/index.cjs +0 -334
- package/dist/components/molecules/index.d.ts.map +0 -1
- package/dist/components/molecules/index.js +0 -311
- package/dist/components/organisms/CourseSidebar.d.ts +0 -37
- package/dist/components/organisms/CourseSidebar.d.ts.map +0 -1
- package/dist/components/organisms/LearnerNavbar.d.ts +0 -8
- package/dist/components/organisms/LearnerNavbar.d.ts.map +0 -1
- package/dist/components/organisms/LearnerSidebar.d.ts +0 -16
- package/dist/components/organisms/LearnerSidebar.d.ts.map +0 -1
- package/dist/components/organisms/LessonBookmarks.d.ts +0 -8
- package/dist/components/organisms/LessonBookmarks.d.ts.map +0 -1
- package/dist/components/organisms/LessonNotes.d.ts +0 -8
- package/dist/components/organisms/LessonNotes.d.ts.map +0 -1
- package/dist/components/organisms/index.cjs +0 -855
- package/dist/components/organisms/index.d.ts.map +0 -1
- package/dist/components/organisms/index.js +0 -825
- package/dist/components/pages/BundleDetailPage.d.ts +0 -3
- package/dist/components/pages/BundleDetailPage.d.ts.map +0 -1
- package/dist/components/pages/CatalogBundlesPage.d.ts +0 -3
- package/dist/components/pages/CatalogBundlesPage.d.ts.map +0 -1
- package/dist/components/pages/CatalogCoursesPage.d.ts +0 -3
- package/dist/components/pages/CatalogCoursesPage.d.ts.map +0 -1
- package/dist/components/pages/CourseDetailPage.d.ts +0 -3
- package/dist/components/pages/CourseDetailPage.d.ts.map +0 -1
- package/dist/components/pages/CoursePlayerPage.d.ts +0 -8
- package/dist/components/pages/CoursePlayerPage.d.ts.map +0 -1
- package/dist/components/pages/CreatorProfilePage.d.ts +0 -3
- package/dist/components/pages/CreatorProfilePage.d.ts.map +0 -1
- package/dist/components/pages/LearnerSettingsPage.d.ts +0 -3
- package/dist/components/pages/LearnerSettingsPage.d.ts.map +0 -1
- package/dist/components/pages/ManualReviewDetailPage.d.ts +0 -3
- package/dist/components/pages/ManualReviewDetailPage.d.ts.map +0 -1
- package/dist/components/pages/ManualReviewPage.d.ts +0 -3
- package/dist/components/pages/ManualReviewPage.d.ts.map +0 -1
- package/dist/components/pages/MessagesPage.d.ts +0 -3
- package/dist/components/pages/MessagesPage.d.ts.map +0 -1
- package/dist/components/pages/MyLearningPage.d.ts +0 -3
- package/dist/components/pages/MyLearningPage.d.ts.map +0 -1
- package/dist/components/pages/PaymentCancelPage.d.ts +0 -3
- package/dist/components/pages/PaymentCancelPage.d.ts.map +0 -1
- package/dist/components/pages/PaymentSuccessPage.d.ts +0 -3
- package/dist/components/pages/PaymentSuccessPage.d.ts.map +0 -1
- package/dist/components/pages/index.cjs +0 -3306
- package/dist/components/pages/index.d.ts.map +0 -1
- package/dist/components/pages/index.js +0 -3315
- package/dist/components/utils.d.ts +0 -3
- package/dist/components/utils.d.ts.map +0 -1
- package/dist/contracts/components.contract.d.ts +0 -87
- package/dist/contracts/components.contract.d.ts.map +0 -1
- package/dist/contracts/index.cjs +0 -52
- package/dist/contracts/index.d.ts.map +0 -1
- package/dist/contracts/index.js +0 -29
- package/dist/contracts/layout.contract.d.ts +0 -35
- package/dist/contracts/layout.contract.d.ts.map +0 -1
- package/dist/contracts/pages.contract.d.ts +0 -192
- package/dist/contracts/pages.contract.d.ts.map +0 -1
- package/dist/contracts/template.contract.d.ts +0 -49
- package/dist/contracts/template.contract.d.ts.map +0 -1
- package/dist/hooks/index.cjs +0 -165
- package/dist/hooks/index.d.ts.map +0 -1
- package/dist/hooks/index.js +0 -142
- package/dist/hooks/sdk-context.d.ts +0 -125
- package/dist/hooks/sdk-context.d.ts.map +0 -1
- package/dist/hooks/useAiCoach.d.ts +0 -32
- package/dist/hooks/useAiCoach.d.ts.map +0 -1
- package/dist/hooks/useBookmarks.d.ts +0 -31
- package/dist/hooks/useBookmarks.d.ts.map +0 -1
- package/dist/hooks/useCourseSearch.d.ts.map +0 -1
- package/dist/hooks/useDebounce.d.ts.map +0 -1
- package/dist/hooks/useMyBundles.d.ts.map +0 -1
- package/dist/hooks/useMyCourses.d.ts.map +0 -1
- package/dist/hooks/useNotes.d.ts +0 -31
- package/dist/hooks/useNotes.d.ts.map +0 -1
- package/dist/hooks/useNotifications.d.ts +0 -19
- package/dist/hooks/useNotifications.d.ts.map +0 -1
- package/dist/hooks/useTheme.d.ts.map +0 -1
- package/dist/hooks/useToast.d.ts +0 -17
- package/dist/hooks/useToast.d.ts.map +0 -1
- package/dist/hooks/useUser.d.ts.map +0 -1
- package/dist/index.cjs +0 -630
- package/dist/index.d.ts +0 -17
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -600
- package/dist/layouts/DefaultLayout.d.ts +0 -9
- package/dist/layouts/DefaultLayout.d.ts.map +0 -1
- package/dist/types/ai-coach.d.ts +0 -22
- package/dist/types/ai-coach.d.ts.map +0 -1
- package/dist/types/bookmarks.d.ts +0 -19
- package/dist/types/bookmarks.d.ts.map +0 -1
- package/dist/types/bundle.d.ts +0 -114
- package/dist/types/bundle.d.ts.map +0 -1
- package/dist/types/common.d.ts +0 -23
- package/dist/types/common.d.ts.map +0 -1
- package/dist/types/course.d.ts +0 -127
- package/dist/types/course.d.ts.map +0 -1
- package/dist/types/enrollment.d.ts +0 -34
- package/dist/types/enrollment.d.ts.map +0 -1
- package/dist/types/index.cjs +0 -18
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/index.js +0 -0
- package/dist/types/lesson.d.ts +0 -105
- package/dist/types/lesson.d.ts.map +0 -1
- package/dist/types/manual-review.d.ts +0 -123
- package/dist/types/manual-review.d.ts.map +0 -1
- package/dist/types/messaging.d.ts +0 -101
- package/dist/types/messaging.d.ts.map +0 -1
- package/dist/types/notification.d.ts +0 -28
- package/dist/types/notification.d.ts.map +0 -1
- package/dist/types/payment.d.ts +0 -38
- package/dist/types/payment.d.ts.map +0 -1
- package/dist/types/progress.d.ts +0 -18
- package/dist/types/progress.d.ts.map +0 -1
- package/dist/types/rating.d.ts +0 -20
- package/dist/types/rating.d.ts.map +0 -1
- package/dist/types/search.d.ts +0 -28
- package/dist/types/search.d.ts.map +0 -1
- package/dist/types/user.d.ts +0 -15
- package/dist/types/user.d.ts.map +0 -1
- package/dist/utils/formatters.d.ts +0 -25
- package/dist/utils/formatters.d.ts.map +0 -1
- package/dist/utils/index.cjs +0 -80
- package/dist/utils/index.d.ts +0 -2
- package/dist/utils/index.d.ts.map +0 -1
- 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
|
+
}
|
|
@@ -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
|
+
}
|