@contractspec/module.learning-journey 1.44.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.
Files changed (85) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +200 -0
  3. package/dist/contracts/index.d.ts +5 -0
  4. package/dist/contracts/index.js +6 -0
  5. package/dist/contracts/models.d.ts +451 -0
  6. package/dist/contracts/models.d.ts.map +1 -0
  7. package/dist/contracts/models.js +388 -0
  8. package/dist/contracts/models.js.map +1 -0
  9. package/dist/contracts/onboarding.d.ts +666 -0
  10. package/dist/contracts/onboarding.d.ts.map +1 -0
  11. package/dist/contracts/onboarding.js +402 -0
  12. package/dist/contracts/onboarding.js.map +1 -0
  13. package/dist/contracts/operations.d.ts +280 -0
  14. package/dist/contracts/operations.d.ts.map +1 -0
  15. package/dist/contracts/operations.js +151 -0
  16. package/dist/contracts/operations.js.map +1 -0
  17. package/dist/contracts/shared.d.ts +5 -0
  18. package/dist/contracts/shared.d.ts.map +1 -0
  19. package/dist/contracts/shared.js +6 -0
  20. package/dist/contracts/shared.js.map +1 -0
  21. package/dist/docs/index.d.ts +1 -0
  22. package/dist/docs/index.js +1 -0
  23. package/dist/docs/learning-journey.docblock.d.ts +1 -0
  24. package/dist/docs/learning-journey.docblock.js +136 -0
  25. package/dist/docs/learning-journey.docblock.js.map +1 -0
  26. package/dist/engines/index.d.ts +4 -0
  27. package/dist/engines/index.js +5 -0
  28. package/dist/engines/srs.d.ts +111 -0
  29. package/dist/engines/srs.d.ts.map +1 -0
  30. package/dist/engines/srs.js +219 -0
  31. package/dist/engines/srs.js.map +1 -0
  32. package/dist/engines/streak.d.ts +100 -0
  33. package/dist/engines/streak.d.ts.map +1 -0
  34. package/dist/engines/streak.js +194 -0
  35. package/dist/engines/streak.js.map +1 -0
  36. package/dist/engines/xp.d.ts +97 -0
  37. package/dist/engines/xp.d.ts.map +1 -0
  38. package/dist/engines/xp.js +213 -0
  39. package/dist/engines/xp.js.map +1 -0
  40. package/dist/entities/ai.d.ts +232 -0
  41. package/dist/entities/ai.d.ts.map +1 -0
  42. package/dist/entities/ai.js +376 -0
  43. package/dist/entities/ai.js.map +1 -0
  44. package/dist/entities/course.d.ts +184 -0
  45. package/dist/entities/course.d.ts.map +1 -0
  46. package/dist/entities/course.js +316 -0
  47. package/dist/entities/course.js.map +1 -0
  48. package/dist/entities/flashcard.d.ts +170 -0
  49. package/dist/entities/flashcard.d.ts.map +1 -0
  50. package/dist/entities/flashcard.js +249 -0
  51. package/dist/entities/flashcard.js.map +1 -0
  52. package/dist/entities/gamification.d.ts +238 -0
  53. package/dist/entities/gamification.d.ts.map +1 -0
  54. package/dist/entities/gamification.js +392 -0
  55. package/dist/entities/gamification.js.map +1 -0
  56. package/dist/entities/index.d.ts +629 -0
  57. package/dist/entities/index.d.ts.map +1 -0
  58. package/dist/entities/index.js +45 -0
  59. package/dist/entities/index.js.map +1 -0
  60. package/dist/entities/learner.d.ts +224 -0
  61. package/dist/entities/learner.d.ts.map +1 -0
  62. package/dist/entities/learner.js +365 -0
  63. package/dist/entities/learner.js.map +1 -0
  64. package/dist/entities/onboarding.d.ts +190 -0
  65. package/dist/entities/onboarding.d.ts.map +1 -0
  66. package/dist/entities/onboarding.js +307 -0
  67. package/dist/entities/onboarding.js.map +1 -0
  68. package/dist/entities/quiz.d.ts +220 -0
  69. package/dist/entities/quiz.d.ts.map +1 -0
  70. package/dist/entities/quiz.js +370 -0
  71. package/dist/entities/quiz.js.map +1 -0
  72. package/dist/events.d.ts +796 -0
  73. package/dist/events.d.ts.map +1 -0
  74. package/dist/events.js +690 -0
  75. package/dist/events.js.map +1 -0
  76. package/dist/index.d.ts +20 -0
  77. package/dist/index.js +22 -0
  78. package/dist/learning-journey.feature.d.ts +12 -0
  79. package/dist/learning-journey.feature.d.ts.map +1 -0
  80. package/dist/learning-journey.feature.js +150 -0
  81. package/dist/learning-journey.feature.js.map +1 -0
  82. package/dist/track-spec.d.ts +129 -0
  83. package/dist/track-spec.d.ts.map +1 -0
  84. package/dist/track-spec.js +0 -0
  85. package/package.json +98 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Chaman Ventures, SASU
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,200 @@
1
+ # @contractspec/module.learning-journey
2
+
3
+ Website: https://contractspec.io/
4
+
5
+
6
+ Comprehensive learning journey engine for ContractSpec applications.
7
+
8
+ ## Overview
9
+
10
+ This module provides a complete learning platform engine that supports multiple use cases:
11
+
12
+ - **Product Onboarding**: Event-driven completion tied to product actions
13
+ - **Learning Management System (LMS)**: Courses, modules, lessons, certifications
14
+ - **Flashcards & Spaced Repetition (SRS)**: SM-2 algorithm for optimal retention
15
+ - **Quizzes & Assessments**: Multiple question types, skill tracking
16
+ - **Gamification**: XP, streaks, achievements, leaderboards (Duolingo-style)
17
+ - **AI-Powered Personalization**: Adaptive paths, recommendations, gap detection
18
+
19
+ ## Features
20
+
21
+ ### Core Learning Structure
22
+
23
+ - **Courses**: Structured learning content with prerequisites and difficulty levels
24
+ - **Modules**: Groups of related lessons within a course
25
+ - **Lessons**: Individual learning units (content, video, interactive, quiz)
26
+ - **Progress Tracking**: Track completion, time spent, scores
27
+
28
+ ### Product Onboarding
29
+
30
+ - **Onboarding Tracks**: Product-specific onboarding journeys
31
+ - **Event-Driven Completion**: Steps auto-complete when product events fire
32
+ - **Example**: "Create your first project" completes on `ProjectCreated` event
33
+
34
+ ### Flashcards & Spaced Repetition
35
+
36
+ - **Decks & Cards**: Organize flashcards by topic
37
+ - **SM-2 Algorithm**: Optimized review scheduling
38
+ - **Review Sessions**: Get cards due for review
39
+ - **Retention Metrics**: Track long-term retention
40
+
41
+ ### Quizzes & Assessments
42
+
43
+ - **Question Types**: Multiple choice, true/false, fill-in-blank, matching
44
+ - **Timed Quizzes**: Optional time limits
45
+ - **Skill Assessment**: Map quiz performance to skills
46
+
47
+ ### Gamification
48
+
49
+ - **Experience Points (XP)**: Earn XP for completing activities
50
+ - **Streaks**: Maintain daily learning streaks
51
+ - **Achievements**: Unlock achievements for milestones
52
+ - **Leaderboards**: Compete with others (daily/weekly/monthly)
53
+ - **Lives System**: Optional hearts/lives for quiz attempts
54
+
55
+ ### AI Personalization
56
+
57
+ - **Learner Profiles**: Track learning style, preferences, goals
58
+ - **Skill Maps**: Map proficiency across skills
59
+ - **Adaptive Paths**: Generate personalized learning sequences
60
+ - **Recommendations**: AI-powered content suggestions
61
+ - **Gap Detection**: Identify and address learning gaps
62
+
63
+ ## Entities
64
+
65
+ ### Course Structure
66
+ - `Course`, `Module`, `Lesson`, `LessonContent`
67
+
68
+ ### Learner & Progress
69
+ - `Learner`, `Enrollment`, `LessonProgress`, `ModuleCompletion`, `Certificate`
70
+
71
+ ### Onboarding
72
+ - `OnboardingTrack`, `OnboardingStep`, `OnboardingProgress`
73
+
74
+ ### Flashcards
75
+ - `Deck`, `Card`, `CardReview`, `CardSchedule`
76
+
77
+ ### Quizzes
78
+ - `Quiz`, `Question`, `QuestionOption`, `QuizAttempt`, `SkillAssessment`
79
+
80
+ ### Gamification
81
+ - `Achievement`, `LearnerAchievement`, `Streak`, `DailyGoal`, `LeaderboardEntry`, `Heart`
82
+
83
+ ### AI
84
+ - `LearnerProfile`, `SkillMap`, `LearningPath`, `Recommendation`
85
+
86
+ ## Engines
87
+
88
+ ### Spaced Repetition Engine (SRS)
89
+
90
+ ```typescript
91
+ import { SRSEngine } from '@contractspec/module.learning-journey/engines/srs';
92
+
93
+ const engine = new SRSEngine();
94
+ const nextReview = engine.calculateNextReview({
95
+ rating: 'good', // again, hard, good, easy
96
+ currentInterval: 1,
97
+ easeFactor: 2.5,
98
+ repetitions: 3,
99
+ });
100
+ ```
101
+
102
+ ### XP Engine
103
+
104
+ ```typescript
105
+ import { XPEngine } from '@contractspec/module.learning-journey/engines/xp';
106
+
107
+ const engine = new XPEngine();
108
+ const xp = engine.calculate({
109
+ activity: 'lesson_complete',
110
+ score: 95,
111
+ streakBonus: true,
112
+ });
113
+ ```
114
+
115
+ ### Streak Engine
116
+
117
+ ```typescript
118
+ import { StreakEngine } from '@contractspec/module.learning-journey/engines/streak';
119
+
120
+ const engine = new StreakEngine();
121
+ const streak = engine.update({
122
+ lastActivityAt: new Date('2024-01-14'),
123
+ currentStreak: 5,
124
+ });
125
+ ```
126
+
127
+ ## Usage
128
+
129
+ ```typescript
130
+ import {
131
+ CourseEntity,
132
+ LearnerEntity,
133
+ SRSEngine,
134
+ } from '@contractspec/module.learning-journey';
135
+
136
+ // Enroll learner in course
137
+ await enrollmentService.enroll({
138
+ learnerId: 'learner-123',
139
+ courseId: 'course-456',
140
+ });
141
+
142
+ // Complete a lesson
143
+ await progressService.completeLesson({
144
+ learnerId: 'learner-123',
145
+ lessonId: 'lesson-789',
146
+ score: 95,
147
+ });
148
+
149
+ // Get flashcards due for review
150
+ const cards = await flashcardService.getDueCards({
151
+ learnerId: 'learner-123',
152
+ limit: 20,
153
+ });
154
+
155
+ // Submit flashcard review
156
+ await flashcardService.submitReview({
157
+ learnerId: 'learner-123',
158
+ cardId: 'card-abc',
159
+ rating: 'good',
160
+ });
161
+ ```
162
+
163
+ ## Integration
164
+
165
+ This module integrates with:
166
+
167
+ - `@contractspec/lib.identity-rbac` - Learner identity
168
+ - `@contractspec/lib.files` - Media attachments
169
+ - `@contractspec/lib.jobs` - Scheduled reminders, streak checks
170
+ - `@contractspec/lib.ai-agent` - AI-powered features
171
+ - `@contractspec/module.notifications` - Learning reminders
172
+
173
+ ## Schema Contribution
174
+
175
+ ```typescript
176
+ import { learningJourneySchemaContribution } from '@contractspec/module.learning-journey';
177
+
178
+ export const schemaComposition = {
179
+ modules: [
180
+ learningJourneySchemaContribution,
181
+ // ... other modules
182
+ ],
183
+ };
184
+ ```
185
+
186
+
187
+
188
+
189
+
190
+
191
+
192
+
193
+
194
+
195
+
196
+
197
+
198
+
199
+
200
+
@@ -0,0 +1,5 @@
1
+ import { LEARNING_JOURNEY_OWNERS } from "./shared.js";
2
+ import { AchievementModel, CardModel, CompleteLessonInput, CourseModel, DeckModel, EnrollInCourseInput, EnrollmentModel, GetDueCardsInput, GetDueCardsOutput, GetLearnerDashboardInput, LearnerDashboardModel, LearnerModel, ProgressModel, SubmitCardReviewInput, SuccessOutput } from "./models.js";
3
+ import { CompleteLessonContract, EnrollInCourseContract, GetDueCardsContract, GetLearnerDashboardContract, SubmitCardReviewContract } from "./operations.js";
4
+ import { GetOnboardingProgressContract, ListOnboardingTracksContract, OnboardingProgressModel, OnboardingStepModel, OnboardingStepProgressModel, OnboardingTrackModel, RecordOnboardingEventContract } from "./onboarding.js";
5
+ export { AchievementModel, CardModel, CompleteLessonContract, CompleteLessonInput, CourseModel, DeckModel, EnrollInCourseContract, EnrollInCourseInput, EnrollmentModel, GetDueCardsContract, GetDueCardsInput, GetDueCardsOutput, GetLearnerDashboardContract, GetLearnerDashboardInput, GetOnboardingProgressContract, LEARNING_JOURNEY_OWNERS, LearnerDashboardModel, LearnerModel, ListOnboardingTracksContract, OnboardingProgressModel, OnboardingStepModel, OnboardingStepProgressModel, OnboardingTrackModel, ProgressModel, RecordOnboardingEventContract, SubmitCardReviewContract, SubmitCardReviewInput, SuccessOutput };
@@ -0,0 +1,6 @@
1
+ import { LEARNING_JOURNEY_OWNERS } from "./shared.js";
2
+ import { AchievementModel, CardModel, CompleteLessonInput, CourseModel, DeckModel, EnrollInCourseInput, EnrollmentModel, GetDueCardsInput, GetDueCardsOutput, GetLearnerDashboardInput, LearnerDashboardModel, LearnerModel, ProgressModel, SubmitCardReviewInput, SuccessOutput } from "./models.js";
3
+ import { CompleteLessonContract, EnrollInCourseContract, GetDueCardsContract, GetLearnerDashboardContract, SubmitCardReviewContract } from "./operations.js";
4
+ import { GetOnboardingProgressContract, ListOnboardingTracksContract, OnboardingProgressModel, OnboardingStepModel, OnboardingStepProgressModel, OnboardingTrackModel, RecordOnboardingEventContract } from "./onboarding.js";
5
+
6
+ export { AchievementModel, CardModel, CompleteLessonContract, CompleteLessonInput, CourseModel, DeckModel, EnrollInCourseContract, EnrollInCourseInput, EnrollmentModel, GetDueCardsContract, GetDueCardsInput, GetDueCardsOutput, GetLearnerDashboardContract, GetLearnerDashboardInput, GetOnboardingProgressContract, LEARNING_JOURNEY_OWNERS, LearnerDashboardModel, LearnerModel, ListOnboardingTracksContract, OnboardingProgressModel, OnboardingStepModel, OnboardingStepProgressModel, OnboardingTrackModel, ProgressModel, RecordOnboardingEventContract, SubmitCardReviewContract, SubmitCardReviewInput, SuccessOutput };
@@ -0,0 +1,451 @@
1
+ import * as _contractspec_lib_schema183 from "@contractspec/lib.schema";
2
+
3
+ //#region src/contracts/models.d.ts
4
+ declare const CourseModel: _contractspec_lib_schema183.SchemaModel<{
5
+ id: {
6
+ type: _contractspec_lib_schema183.FieldType<string, string>;
7
+ isOptional: false;
8
+ };
9
+ title: {
10
+ type: _contractspec_lib_schema183.FieldType<string, string>;
11
+ isOptional: false;
12
+ };
13
+ slug: {
14
+ type: _contractspec_lib_schema183.FieldType<string, string>;
15
+ isOptional: false;
16
+ };
17
+ description: {
18
+ type: _contractspec_lib_schema183.FieldType<string, string>;
19
+ isOptional: true;
20
+ };
21
+ difficulty: {
22
+ type: _contractspec_lib_schema183.FieldType<string, string>;
23
+ isOptional: false;
24
+ };
25
+ status: {
26
+ type: _contractspec_lib_schema183.FieldType<string, string>;
27
+ isOptional: false;
28
+ };
29
+ estimatedDuration: {
30
+ type: _contractspec_lib_schema183.FieldType<number, number>;
31
+ isOptional: true;
32
+ };
33
+ thumbnailUrl: {
34
+ type: _contractspec_lib_schema183.FieldType<string, string>;
35
+ isOptional: true;
36
+ };
37
+ createdAt: {
38
+ type: _contractspec_lib_schema183.FieldType<Date, string>;
39
+ isOptional: false;
40
+ };
41
+ }>;
42
+ declare const LearnerModel: _contractspec_lib_schema183.SchemaModel<{
43
+ id: {
44
+ type: _contractspec_lib_schema183.FieldType<string, string>;
45
+ isOptional: false;
46
+ };
47
+ userId: {
48
+ type: _contractspec_lib_schema183.FieldType<string, string>;
49
+ isOptional: false;
50
+ };
51
+ displayName: {
52
+ type: _contractspec_lib_schema183.FieldType<string, string>;
53
+ isOptional: true;
54
+ };
55
+ level: {
56
+ type: _contractspec_lib_schema183.FieldType<number, number>;
57
+ isOptional: false;
58
+ };
59
+ totalXp: {
60
+ type: _contractspec_lib_schema183.FieldType<number, number>;
61
+ isOptional: false;
62
+ };
63
+ currentStreak: {
64
+ type: _contractspec_lib_schema183.FieldType<number, number>;
65
+ isOptional: false;
66
+ };
67
+ longestStreak: {
68
+ type: _contractspec_lib_schema183.FieldType<number, number>;
69
+ isOptional: false;
70
+ };
71
+ createdAt: {
72
+ type: _contractspec_lib_schema183.FieldType<Date, string>;
73
+ isOptional: false;
74
+ };
75
+ }>;
76
+ declare const EnrollmentModel: _contractspec_lib_schema183.SchemaModel<{
77
+ id: {
78
+ type: _contractspec_lib_schema183.FieldType<string, string>;
79
+ isOptional: false;
80
+ };
81
+ learnerId: {
82
+ type: _contractspec_lib_schema183.FieldType<string, string>;
83
+ isOptional: false;
84
+ };
85
+ courseId: {
86
+ type: _contractspec_lib_schema183.FieldType<string, string>;
87
+ isOptional: false;
88
+ };
89
+ status: {
90
+ type: _contractspec_lib_schema183.FieldType<string, string>;
91
+ isOptional: false;
92
+ };
93
+ progress: {
94
+ type: _contractspec_lib_schema183.FieldType<number, number>;
95
+ isOptional: false;
96
+ };
97
+ startedAt: {
98
+ type: _contractspec_lib_schema183.FieldType<Date, string>;
99
+ isOptional: true;
100
+ };
101
+ completedAt: {
102
+ type: _contractspec_lib_schema183.FieldType<Date, string>;
103
+ isOptional: true;
104
+ };
105
+ }>;
106
+ declare const ProgressModel: _contractspec_lib_schema183.SchemaModel<{
107
+ id: {
108
+ type: _contractspec_lib_schema183.FieldType<string, string>;
109
+ isOptional: false;
110
+ };
111
+ learnerId: {
112
+ type: _contractspec_lib_schema183.FieldType<string, string>;
113
+ isOptional: false;
114
+ };
115
+ lessonId: {
116
+ type: _contractspec_lib_schema183.FieldType<string, string>;
117
+ isOptional: false;
118
+ };
119
+ status: {
120
+ type: _contractspec_lib_schema183.FieldType<string, string>;
121
+ isOptional: false;
122
+ };
123
+ progress: {
124
+ type: _contractspec_lib_schema183.FieldType<number, number>;
125
+ isOptional: false;
126
+ };
127
+ score: {
128
+ type: _contractspec_lib_schema183.FieldType<number, number>;
129
+ isOptional: true;
130
+ };
131
+ timeSpent: {
132
+ type: _contractspec_lib_schema183.FieldType<number, number>;
133
+ isOptional: false;
134
+ };
135
+ completedAt: {
136
+ type: _contractspec_lib_schema183.FieldType<Date, string>;
137
+ isOptional: true;
138
+ };
139
+ }>;
140
+ declare const DeckModel: _contractspec_lib_schema183.SchemaModel<{
141
+ id: {
142
+ type: _contractspec_lib_schema183.FieldType<string, string>;
143
+ isOptional: false;
144
+ };
145
+ title: {
146
+ type: _contractspec_lib_schema183.FieldType<string, string>;
147
+ isOptional: false;
148
+ };
149
+ description: {
150
+ type: _contractspec_lib_schema183.FieldType<string, string>;
151
+ isOptional: true;
152
+ };
153
+ cardCount: {
154
+ type: _contractspec_lib_schema183.FieldType<number, number>;
155
+ isOptional: false;
156
+ };
157
+ isPublic: {
158
+ type: _contractspec_lib_schema183.FieldType<boolean, boolean>;
159
+ isOptional: false;
160
+ };
161
+ createdAt: {
162
+ type: _contractspec_lib_schema183.FieldType<Date, string>;
163
+ isOptional: false;
164
+ };
165
+ }>;
166
+ declare const CardModel: _contractspec_lib_schema183.SchemaModel<{
167
+ id: {
168
+ type: _contractspec_lib_schema183.FieldType<string, string>;
169
+ isOptional: false;
170
+ };
171
+ deckId: {
172
+ type: _contractspec_lib_schema183.FieldType<string, string>;
173
+ isOptional: false;
174
+ };
175
+ front: {
176
+ type: _contractspec_lib_schema183.FieldType<string, string>;
177
+ isOptional: false;
178
+ };
179
+ back: {
180
+ type: _contractspec_lib_schema183.FieldType<string, string>;
181
+ isOptional: false;
182
+ };
183
+ hints: {
184
+ type: _contractspec_lib_schema183.FieldType<unknown, unknown>;
185
+ isOptional: true;
186
+ };
187
+ isDue: {
188
+ type: _contractspec_lib_schema183.FieldType<boolean, boolean>;
189
+ isOptional: false;
190
+ };
191
+ nextReviewAt: {
192
+ type: _contractspec_lib_schema183.FieldType<Date, string>;
193
+ isOptional: true;
194
+ };
195
+ }>;
196
+ declare const AchievementModel: _contractspec_lib_schema183.SchemaModel<{
197
+ id: {
198
+ type: _contractspec_lib_schema183.FieldType<string, string>;
199
+ isOptional: false;
200
+ };
201
+ key: {
202
+ type: _contractspec_lib_schema183.FieldType<string, string>;
203
+ isOptional: false;
204
+ };
205
+ name: {
206
+ type: _contractspec_lib_schema183.FieldType<string, string>;
207
+ isOptional: false;
208
+ };
209
+ description: {
210
+ type: _contractspec_lib_schema183.FieldType<string, string>;
211
+ isOptional: false;
212
+ };
213
+ icon: {
214
+ type: _contractspec_lib_schema183.FieldType<string, string>;
215
+ isOptional: true;
216
+ };
217
+ xpReward: {
218
+ type: _contractspec_lib_schema183.FieldType<number, number>;
219
+ isOptional: false;
220
+ };
221
+ unlockedAt: {
222
+ type: _contractspec_lib_schema183.FieldType<Date, string>;
223
+ isOptional: true;
224
+ };
225
+ }>;
226
+ declare const EnrollInCourseInput: _contractspec_lib_schema183.SchemaModel<{
227
+ courseId: {
228
+ type: _contractspec_lib_schema183.FieldType<string, string>;
229
+ isOptional: false;
230
+ };
231
+ }>;
232
+ declare const CompleteLessonInput: _contractspec_lib_schema183.SchemaModel<{
233
+ lessonId: {
234
+ type: _contractspec_lib_schema183.FieldType<string, string>;
235
+ isOptional: false;
236
+ };
237
+ score: {
238
+ type: _contractspec_lib_schema183.FieldType<number, number>;
239
+ isOptional: true;
240
+ };
241
+ timeSpent: {
242
+ type: _contractspec_lib_schema183.FieldType<number, number>;
243
+ isOptional: false;
244
+ };
245
+ }>;
246
+ declare const SubmitCardReviewInput: _contractspec_lib_schema183.SchemaModel<{
247
+ cardId: {
248
+ type: _contractspec_lib_schema183.FieldType<string, string>;
249
+ isOptional: false;
250
+ };
251
+ rating: {
252
+ type: _contractspec_lib_schema183.FieldType<string, string>;
253
+ isOptional: false;
254
+ };
255
+ responseTimeMs: {
256
+ type: _contractspec_lib_schema183.FieldType<number, number>;
257
+ isOptional: true;
258
+ };
259
+ }>;
260
+ declare const GetDueCardsInput: _contractspec_lib_schema183.SchemaModel<{
261
+ deckId: {
262
+ type: _contractspec_lib_schema183.FieldType<string, string>;
263
+ isOptional: true;
264
+ };
265
+ limit: {
266
+ type: _contractspec_lib_schema183.FieldType<number, number>;
267
+ isOptional: true;
268
+ };
269
+ }>;
270
+ declare const GetDueCardsOutput: _contractspec_lib_schema183.SchemaModel<{
271
+ cards: {
272
+ type: _contractspec_lib_schema183.SchemaModel<{
273
+ id: {
274
+ type: _contractspec_lib_schema183.FieldType<string, string>;
275
+ isOptional: false;
276
+ };
277
+ deckId: {
278
+ type: _contractspec_lib_schema183.FieldType<string, string>;
279
+ isOptional: false;
280
+ };
281
+ front: {
282
+ type: _contractspec_lib_schema183.FieldType<string, string>;
283
+ isOptional: false;
284
+ };
285
+ back: {
286
+ type: _contractspec_lib_schema183.FieldType<string, string>;
287
+ isOptional: false;
288
+ };
289
+ hints: {
290
+ type: _contractspec_lib_schema183.FieldType<unknown, unknown>;
291
+ isOptional: true;
292
+ };
293
+ isDue: {
294
+ type: _contractspec_lib_schema183.FieldType<boolean, boolean>;
295
+ isOptional: false;
296
+ };
297
+ nextReviewAt: {
298
+ type: _contractspec_lib_schema183.FieldType<Date, string>;
299
+ isOptional: true;
300
+ };
301
+ }>;
302
+ isArray: true;
303
+ isOptional: false;
304
+ };
305
+ total: {
306
+ type: _contractspec_lib_schema183.FieldType<number, number>;
307
+ isOptional: false;
308
+ };
309
+ }>;
310
+ declare const GetLearnerDashboardInput: _contractspec_lib_schema183.SchemaModel<{
311
+ learnerId: {
312
+ type: _contractspec_lib_schema183.FieldType<string, string>;
313
+ isOptional: true;
314
+ };
315
+ }>;
316
+ declare const LearnerDashboardModel: _contractspec_lib_schema183.SchemaModel<{
317
+ learner: {
318
+ type: _contractspec_lib_schema183.SchemaModel<{
319
+ id: {
320
+ type: _contractspec_lib_schema183.FieldType<string, string>;
321
+ isOptional: false;
322
+ };
323
+ userId: {
324
+ type: _contractspec_lib_schema183.FieldType<string, string>;
325
+ isOptional: false;
326
+ };
327
+ displayName: {
328
+ type: _contractspec_lib_schema183.FieldType<string, string>;
329
+ isOptional: true;
330
+ };
331
+ level: {
332
+ type: _contractspec_lib_schema183.FieldType<number, number>;
333
+ isOptional: false;
334
+ };
335
+ totalXp: {
336
+ type: _contractspec_lib_schema183.FieldType<number, number>;
337
+ isOptional: false;
338
+ };
339
+ currentStreak: {
340
+ type: _contractspec_lib_schema183.FieldType<number, number>;
341
+ isOptional: false;
342
+ };
343
+ longestStreak: {
344
+ type: _contractspec_lib_schema183.FieldType<number, number>;
345
+ isOptional: false;
346
+ };
347
+ createdAt: {
348
+ type: _contractspec_lib_schema183.FieldType<Date, string>;
349
+ isOptional: false;
350
+ };
351
+ }>;
352
+ isOptional: false;
353
+ };
354
+ currentStreak: {
355
+ type: _contractspec_lib_schema183.FieldType<number, number>;
356
+ isOptional: false;
357
+ };
358
+ dailyXpGoal: {
359
+ type: _contractspec_lib_schema183.FieldType<number, number>;
360
+ isOptional: false;
361
+ };
362
+ dailyXpProgress: {
363
+ type: _contractspec_lib_schema183.FieldType<number, number>;
364
+ isOptional: false;
365
+ };
366
+ activeEnrollments: {
367
+ type: _contractspec_lib_schema183.SchemaModel<{
368
+ id: {
369
+ type: _contractspec_lib_schema183.FieldType<string, string>;
370
+ isOptional: false;
371
+ };
372
+ learnerId: {
373
+ type: _contractspec_lib_schema183.FieldType<string, string>;
374
+ isOptional: false;
375
+ };
376
+ courseId: {
377
+ type: _contractspec_lib_schema183.FieldType<string, string>;
378
+ isOptional: false;
379
+ };
380
+ status: {
381
+ type: _contractspec_lib_schema183.FieldType<string, string>;
382
+ isOptional: false;
383
+ };
384
+ progress: {
385
+ type: _contractspec_lib_schema183.FieldType<number, number>;
386
+ isOptional: false;
387
+ };
388
+ startedAt: {
389
+ type: _contractspec_lib_schema183.FieldType<Date, string>;
390
+ isOptional: true;
391
+ };
392
+ completedAt: {
393
+ type: _contractspec_lib_schema183.FieldType<Date, string>;
394
+ isOptional: true;
395
+ };
396
+ }>;
397
+ isArray: true;
398
+ isOptional: false;
399
+ };
400
+ recentAchievements: {
401
+ type: _contractspec_lib_schema183.SchemaModel<{
402
+ id: {
403
+ type: _contractspec_lib_schema183.FieldType<string, string>;
404
+ isOptional: false;
405
+ };
406
+ key: {
407
+ type: _contractspec_lib_schema183.FieldType<string, string>;
408
+ isOptional: false;
409
+ };
410
+ name: {
411
+ type: _contractspec_lib_schema183.FieldType<string, string>;
412
+ isOptional: false;
413
+ };
414
+ description: {
415
+ type: _contractspec_lib_schema183.FieldType<string, string>;
416
+ isOptional: false;
417
+ };
418
+ icon: {
419
+ type: _contractspec_lib_schema183.FieldType<string, string>;
420
+ isOptional: true;
421
+ };
422
+ xpReward: {
423
+ type: _contractspec_lib_schema183.FieldType<number, number>;
424
+ isOptional: false;
425
+ };
426
+ unlockedAt: {
427
+ type: _contractspec_lib_schema183.FieldType<Date, string>;
428
+ isOptional: true;
429
+ };
430
+ }>;
431
+ isArray: true;
432
+ isOptional: false;
433
+ };
434
+ dueCardCount: {
435
+ type: _contractspec_lib_schema183.FieldType<number, number>;
436
+ isOptional: false;
437
+ };
438
+ }>;
439
+ declare const SuccessOutput: _contractspec_lib_schema183.SchemaModel<{
440
+ success: {
441
+ type: _contractspec_lib_schema183.FieldType<boolean, boolean>;
442
+ isOptional: false;
443
+ };
444
+ xpEarned: {
445
+ type: _contractspec_lib_schema183.FieldType<number, number>;
446
+ isOptional: true;
447
+ };
448
+ }>;
449
+ //#endregion
450
+ export { AchievementModel, CardModel, CompleteLessonInput, CourseModel, DeckModel, EnrollInCourseInput, EnrollmentModel, GetDueCardsInput, GetDueCardsOutput, GetLearnerDashboardInput, LearnerDashboardModel, LearnerModel, ProgressModel, SubmitCardReviewInput, SuccessOutput };
451
+ //# sourceMappingURL=models.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"models.d.ts","names":[],"sources":["../../src/contracts/models.ts"],"sourcesContent":[],"mappings":";;;cAEa,yCAAW;;UAiBtB,2BAAA,CAAA;IAjBW,UAiBX,EAAA,KAAA;EAAA,CAAA;;;;;;;;;;+CAjBsB,CAAA,MAAA,EAAA,MAAA,CAAA;IAAA,UAAA,EAAA,IAAA;EAmBX,CAAA;EAaX,UAAA,EAAA;;;;;;;;;+CAbuB,CAAA,MAAA,EAAA,MAAA,CAAA;IAAA,UAAA,EAAA,IAAA;EAeZ,CAAA;EAYX,YAAA,EAAA;;;;;;;;;cA3BW,YAee,8BAfH,WAeG,CAAA;EAAA,EAAA,EAAA;IAcf,IAAA,EAhBX,2BAAA,CAAA,SA6BA,CAAA,MAAA,EAAA,MAAA,CAAA;IAAA,UAAA,EAAA,KAAA;;;;;;;;;;EAbwB,KAAA,EAAA;IAeb,IAAA,uCAWX,CAAA,MAAA,EAAA,MAAA,CAAA;IAAA,UAAA,EAAA,KAAA;;;;;;;+CAXoB,CAAA,MAAA,EAAA,MAAA,CAAA;IAAA,UAAA,EAAA,KAAA;EAaT,CAAA;EAYX,aAAA,EAAA;;;;;;;;;AAZoB,cA1CT,eA0CS,8BA1CM,WA0CN,CAAA;EAcT,EAAA,EAAA;IAYX,IAAA,EAxDA,2BAAA,CAAA,SAwDA,CAAA,MAAA,EAAA,MAAA,CAAA;;;;;;;;+CAZ2B,CAAA,MAAA,EAAA,MAAA,CAAA;IAAA,UAAA,EAAA,KAAA;EAchB,CAAA;EAQA,MAAA,EAAA;IAQX,IAAA,uCAAA,CAAA,MAAA,EAAA,MAAA,CAAA;;;;IAR8B,IAAA,uCAAA,CAAA,MAAA,EAAA,MAAA,CAAA;IAUnB,UAAA,EAAA,KAAA;EAQX,CAAA;;;;EARgC,CAAA;EAUrB,WAAA,EAAA;IAOX,IAAA,uCAAA,KAAA,EAAA,MAAA,CAAA;;;CAP2B,CAAA;AAShB,cA7FA,aAoGX,8BApGwB,WAoGxB,CAAA;EAAA,EAAA,EAAA;UAvFA,2BAAA,CAAA;;;;;;;;;;EAgF4B,CAAA;EASjB,MAAA,EAAA;IAQA,IAAA,uCAoBX,CAAA,MAAA,EAAA,MAAA,CAAA;IAAA,UAAA,EAAA,KAAA;;;;;;;;;;;;;;;;;;;cAnHW,uCAAS;;UAWpB,2BAAA,CAAA;;;;;;;;;;;;+CAoFgC,CAAA,MAAA,EAAA,MAAA,CAAA;IAAA,UAAA,EAAA,KAAA;EAsBrB,CAAA;EAOX,QAAA,EAAA;;;EAPwB,CAAA;;;;;;cAxGb,uCAAS;;UAYpB,2BAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAEW,8CAAgB;;UAY3B,2BAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAEW,qBAMX,2BAAA,CAN8B;;UAM9B,2BAAA,CAAA;;;;cAEW,iDAAmB;;UAQ9B,2BAAA,CAAA;;;;;;;;;;;;cAEW,mDAAqB;;UAQhC,2BAAA,CAAA;;;;;;;;;;;;cAEW,8CAAgB;;UAO3B,2BAAA,CAAA;;;;;;;;cAEW,+CAAiB;;;;cAO5B,2BAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAEW,0BAMX,2BAAA,CANmC;;UAMnC,2BAAA,CAAA;;;;cAEW,mDAAqB;;;;cAoBhC,2BAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAEW,2CAAa;;UAOxB,2BAAA,CAAA"}