@contractspec/module.learning-journey 1.57.0 → 1.59.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 (140) hide show
  1. package/dist/browser/contracts/index.js +578 -0
  2. package/dist/browser/contracts/models.js +193 -0
  3. package/dist/browser/contracts/onboarding.js +417 -0
  4. package/dist/browser/contracts/operations.js +326 -0
  5. package/dist/browser/contracts/shared.js +5 -0
  6. package/dist/browser/docs/index.js +124 -0
  7. package/dist/browser/docs/learning-journey.docblock.js +124 -0
  8. package/dist/browser/engines/index.js +526 -0
  9. package/dist/browser/engines/srs.js +198 -0
  10. package/dist/browser/engines/streak.js +159 -0
  11. package/dist/browser/engines/xp.js +171 -0
  12. package/dist/browser/entities/ai.js +343 -0
  13. package/dist/browser/entities/course.js +276 -0
  14. package/dist/browser/entities/flashcard.js +222 -0
  15. package/dist/browser/entities/gamification.js +340 -0
  16. package/dist/browser/entities/index.js +2136 -0
  17. package/dist/browser/entities/learner.js +329 -0
  18. package/dist/browser/entities/onboarding.js +301 -0
  19. package/dist/browser/entities/quiz.js +304 -0
  20. package/dist/browser/events.js +423 -0
  21. package/dist/browser/index.js +3833 -0
  22. package/dist/browser/learning-journey.capability.js +40 -0
  23. package/dist/browser/learning-journey.feature.js +56 -0
  24. package/dist/browser/track-spec.js +0 -0
  25. package/dist/contracts/index.d.ts +5 -5
  26. package/dist/contracts/index.d.ts.map +1 -0
  27. package/dist/contracts/index.js +578 -5
  28. package/dist/contracts/models.d.ts +426 -431
  29. package/dist/contracts/models.d.ts.map +1 -1
  30. package/dist/contracts/models.js +178 -372
  31. package/dist/contracts/onboarding.d.ts +621 -627
  32. package/dist/contracts/onboarding.d.ts.map +1 -1
  33. package/dist/contracts/onboarding.js +404 -388
  34. package/dist/contracts/operations.d.ts +243 -249
  35. package/dist/contracts/operations.d.ts.map +1 -1
  36. package/dist/contracts/operations.js +324 -148
  37. package/dist/contracts/shared.d.ts +1 -4
  38. package/dist/contracts/shared.d.ts.map +1 -1
  39. package/dist/contracts/shared.js +6 -6
  40. package/dist/docs/index.d.ts +2 -1
  41. package/dist/docs/index.d.ts.map +1 -0
  42. package/dist/docs/index.js +125 -1
  43. package/dist/docs/learning-journey.docblock.d.ts +2 -1
  44. package/dist/docs/learning-journey.docblock.d.ts.map +1 -0
  45. package/dist/docs/learning-journey.docblock.js +47 -58
  46. package/dist/engines/index.d.ts +4 -4
  47. package/dist/engines/index.d.ts.map +1 -0
  48. package/dist/engines/index.js +526 -4
  49. package/dist/engines/srs.d.ts +89 -92
  50. package/dist/engines/srs.d.ts.map +1 -1
  51. package/dist/engines/srs.js +197 -217
  52. package/dist/engines/streak.d.ts +84 -87
  53. package/dist/engines/streak.d.ts.map +1 -1
  54. package/dist/engines/streak.js +158 -192
  55. package/dist/engines/xp.d.ts +80 -83
  56. package/dist/engines/xp.d.ts.map +1 -1
  57. package/dist/engines/xp.js +170 -211
  58. package/dist/entities/ai.d.ts +199 -204
  59. package/dist/entities/ai.d.ts.map +1 -1
  60. package/dist/entities/ai.js +336 -368
  61. package/dist/entities/course.d.ts +149 -154
  62. package/dist/entities/course.d.ts.map +1 -1
  63. package/dist/entities/course.js +267 -306
  64. package/dist/entities/flashcard.d.ts +144 -149
  65. package/dist/entities/flashcard.d.ts.map +1 -1
  66. package/dist/entities/flashcard.js +217 -243
  67. package/dist/entities/gamification.d.ts +197 -202
  68. package/dist/entities/gamification.d.ts.map +1 -1
  69. package/dist/entities/gamification.js +331 -382
  70. package/dist/entities/index.d.ts +613 -618
  71. package/dist/entities/index.d.ts.map +1 -1
  72. package/dist/entities/index.js +2135 -43
  73. package/dist/entities/learner.d.ts +191 -196
  74. package/dist/entities/learner.d.ts.map +1 -1
  75. package/dist/entities/learner.js +322 -357
  76. package/dist/entities/onboarding.d.ts +164 -169
  77. package/dist/entities/onboarding.d.ts.map +1 -1
  78. package/dist/entities/onboarding.js +296 -301
  79. package/dist/entities/quiz.d.ts +184 -189
  80. package/dist/entities/quiz.d.ts.map +1 -1
  81. package/dist/entities/quiz.js +296 -361
  82. package/dist/events.d.ts +608 -614
  83. package/dist/events.d.ts.map +1 -1
  84. package/dist/events.js +421 -687
  85. package/dist/index.d.ts +8 -20
  86. package/dist/index.d.ts.map +1 -0
  87. package/dist/index.js +3834 -22
  88. package/dist/learning-journey.capability.d.ts +3 -8
  89. package/dist/learning-journey.capability.d.ts.map +1 -1
  90. package/dist/learning-journey.capability.js +41 -46
  91. package/dist/learning-journey.feature.d.ts +1 -6
  92. package/dist/learning-journey.feature.d.ts.map +1 -1
  93. package/dist/learning-journey.feature.js +55 -155
  94. package/dist/node/contracts/index.js +578 -0
  95. package/dist/node/contracts/models.js +193 -0
  96. package/dist/node/contracts/onboarding.js +417 -0
  97. package/dist/node/contracts/operations.js +326 -0
  98. package/dist/node/contracts/shared.js +5 -0
  99. package/dist/node/docs/index.js +124 -0
  100. package/dist/node/docs/learning-journey.docblock.js +124 -0
  101. package/dist/node/engines/index.js +526 -0
  102. package/dist/node/engines/srs.js +198 -0
  103. package/dist/node/engines/streak.js +159 -0
  104. package/dist/node/engines/xp.js +171 -0
  105. package/dist/node/entities/ai.js +343 -0
  106. package/dist/node/entities/course.js +276 -0
  107. package/dist/node/entities/flashcard.js +222 -0
  108. package/dist/node/entities/gamification.js +340 -0
  109. package/dist/node/entities/index.js +2136 -0
  110. package/dist/node/entities/learner.js +329 -0
  111. package/dist/node/entities/onboarding.js +301 -0
  112. package/dist/node/entities/quiz.js +304 -0
  113. package/dist/node/events.js +423 -0
  114. package/dist/node/index.js +3833 -0
  115. package/dist/node/learning-journey.capability.js +40 -0
  116. package/dist/node/learning-journey.feature.js +56 -0
  117. package/dist/node/track-spec.js +0 -0
  118. package/dist/track-spec.d.ts +115 -118
  119. package/dist/track-spec.d.ts.map +1 -1
  120. package/dist/track-spec.js +1 -0
  121. package/package.json +237 -60
  122. package/dist/contracts/models.js.map +0 -1
  123. package/dist/contracts/onboarding.js.map +0 -1
  124. package/dist/contracts/operations.js.map +0 -1
  125. package/dist/contracts/shared.js.map +0 -1
  126. package/dist/docs/learning-journey.docblock.js.map +0 -1
  127. package/dist/engines/srs.js.map +0 -1
  128. package/dist/engines/streak.js.map +0 -1
  129. package/dist/engines/xp.js.map +0 -1
  130. package/dist/entities/ai.js.map +0 -1
  131. package/dist/entities/course.js.map +0 -1
  132. package/dist/entities/flashcard.js.map +0 -1
  133. package/dist/entities/gamification.js.map +0 -1
  134. package/dist/entities/index.js.map +0 -1
  135. package/dist/entities/learner.js.map +0 -1
  136. package/dist/entities/onboarding.js.map +0 -1
  137. package/dist/entities/quiz.js.map +0 -1
  138. package/dist/events.js.map +0 -1
  139. package/dist/learning-journey.capability.js.map +0 -1
  140. package/dist/learning-journey.feature.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"models.d.ts","names":[],"sources":["../../src/contracts/models.ts"],"mappings":";;;cAEa,WAAA,4BAAW,WAAA;;UAiBtB,yBAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAEW,YAAA,4BAAY,WAAA;;UAavB,yBAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAEW,eAAA,4BAAe,WAAA;;UAY1B,yBAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAEW,aAAA,4BAAa,WAAA;;UAaxB,yBAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAEW,SAAA,4BAAS,WAAA;;UAWpB,yBAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;cAEW,SAAA,4BAAS,WAAA;;UAYpB,yBAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAEW,gBAAA,4BAAgB,WAAA;;UAY3B,yBAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAEW,mBAAA,EAMX,yBAAA,CAN8B,WAAA;;UAM9B,yBAAA,CAAA,SAAA;;;;cAEW,mBAAA,4BAAmB,WAAA;;UAQ9B,yBAAA,CAAA,SAAA;;;;;;;;;;;;cAEW,qBAAA,4BAAqB,WAAA;;UAQhC,yBAAA,CAAA,SAAA;;;;;;;;;;;;cAEW,gBAAA,4BAAgB,WAAA;;UAO3B,yBAAA,CAAA,SAAA;;;;;;;;cAEW,iBAAA,4BAAiB,WAAA;;;;cAO5B,yBAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAEW,wBAAA,EAMX,yBAAA,CANmC,WAAA;;UAMnC,yBAAA,CAAA,SAAA;;;;cAEW,qBAAA,4BAAqB,WAAA;;;;cAoBhC,yBAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAEW,aAAA,4BAAa,WAAA;;UAOxB,yBAAA,CAAA,SAAA"}
1
+ {"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../src/contracts/models.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiBtB,CAAC;AAEH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAavB,CAAC;AAEH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAY1B,CAAC;AAEH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAaxB,CAAC;AAEH,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;EAWpB,CAAC;AAEH,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAYpB,CAAC;AAEH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAY3B,CAAC;AAEH,eAAO,MAAM,mBAAmB;;;;;EAM9B,CAAC;AAEH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;EAQ9B,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;EAQhC,CAAC;AAEH,eAAO,MAAM,gBAAgB;;;;;;;;;EAO3B,CAAC;AAEH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAO5B,CAAC;AAEH,eAAO,MAAM,wBAAwB;;;;;EAMnC,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoBhC,CAAC;AAEH,eAAO,MAAM,aAAa;;;;;;;;;EAOxB,CAAC"}
@@ -1,388 +1,194 @@
1
+ // @bun
2
+ // src/contracts/models.ts
1
3
  import { ScalarTypeEnum, defineSchemaModel } from "@contractspec/lib.schema";
2
-
3
- //#region src/contracts/models.ts
4
- const CourseModel = defineSchemaModel({
5
- name: "Course",
6
- description: "A learning course",
7
- fields: {
8
- id: {
9
- type: ScalarTypeEnum.String_unsecure(),
10
- isOptional: false
11
- },
12
- title: {
13
- type: ScalarTypeEnum.String_unsecure(),
14
- isOptional: false
15
- },
16
- slug: {
17
- type: ScalarTypeEnum.String_unsecure(),
18
- isOptional: false
19
- },
20
- description: {
21
- type: ScalarTypeEnum.String_unsecure(),
22
- isOptional: true
23
- },
24
- difficulty: {
25
- type: ScalarTypeEnum.String_unsecure(),
26
- isOptional: false
27
- },
28
- status: {
29
- type: ScalarTypeEnum.String_unsecure(),
30
- isOptional: false
31
- },
32
- estimatedDuration: {
33
- type: ScalarTypeEnum.Int_unsecure(),
34
- isOptional: true
35
- },
36
- thumbnailUrl: {
37
- type: ScalarTypeEnum.String_unsecure(),
38
- isOptional: true
39
- },
40
- createdAt: {
41
- type: ScalarTypeEnum.DateTime(),
42
- isOptional: false
43
- }
44
- }
4
+ var CourseModel = defineSchemaModel({
5
+ name: "Course",
6
+ description: "A learning course",
7
+ fields: {
8
+ id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
9
+ title: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
10
+ slug: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
11
+ description: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
12
+ difficulty: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
13
+ status: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
14
+ estimatedDuration: {
15
+ type: ScalarTypeEnum.Int_unsecure(),
16
+ isOptional: true
17
+ },
18
+ thumbnailUrl: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
19
+ createdAt: { type: ScalarTypeEnum.DateTime(), isOptional: false }
20
+ }
45
21
  });
46
- const LearnerModel = defineSchemaModel({
47
- name: "Learner",
48
- description: "A learner profile",
49
- fields: {
50
- id: {
51
- type: ScalarTypeEnum.String_unsecure(),
52
- isOptional: false
53
- },
54
- userId: {
55
- type: ScalarTypeEnum.String_unsecure(),
56
- isOptional: false
57
- },
58
- displayName: {
59
- type: ScalarTypeEnum.String_unsecure(),
60
- isOptional: true
61
- },
62
- level: {
63
- type: ScalarTypeEnum.Int_unsecure(),
64
- isOptional: false
65
- },
66
- totalXp: {
67
- type: ScalarTypeEnum.Int_unsecure(),
68
- isOptional: false
69
- },
70
- currentStreak: {
71
- type: ScalarTypeEnum.Int_unsecure(),
72
- isOptional: false
73
- },
74
- longestStreak: {
75
- type: ScalarTypeEnum.Int_unsecure(),
76
- isOptional: false
77
- },
78
- createdAt: {
79
- type: ScalarTypeEnum.DateTime(),
80
- isOptional: false
81
- }
82
- }
22
+ var LearnerModel = defineSchemaModel({
23
+ name: "Learner",
24
+ description: "A learner profile",
25
+ fields: {
26
+ id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
27
+ userId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
28
+ displayName: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
29
+ level: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },
30
+ totalXp: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },
31
+ currentStreak: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },
32
+ longestStreak: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },
33
+ createdAt: { type: ScalarTypeEnum.DateTime(), isOptional: false }
34
+ }
83
35
  });
84
- const EnrollmentModel = defineSchemaModel({
85
- name: "Enrollment",
86
- description: "A course enrollment",
87
- fields: {
88
- id: {
89
- type: ScalarTypeEnum.String_unsecure(),
90
- isOptional: false
91
- },
92
- learnerId: {
93
- type: ScalarTypeEnum.String_unsecure(),
94
- isOptional: false
95
- },
96
- courseId: {
97
- type: ScalarTypeEnum.String_unsecure(),
98
- isOptional: false
99
- },
100
- status: {
101
- type: ScalarTypeEnum.String_unsecure(),
102
- isOptional: false
103
- },
104
- progress: {
105
- type: ScalarTypeEnum.Int_unsecure(),
106
- isOptional: false
107
- },
108
- startedAt: {
109
- type: ScalarTypeEnum.DateTime(),
110
- isOptional: true
111
- },
112
- completedAt: {
113
- type: ScalarTypeEnum.DateTime(),
114
- isOptional: true
115
- }
116
- }
36
+ var EnrollmentModel = defineSchemaModel({
37
+ name: "Enrollment",
38
+ description: "A course enrollment",
39
+ fields: {
40
+ id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
41
+ learnerId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
42
+ courseId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
43
+ status: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
44
+ progress: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },
45
+ startedAt: { type: ScalarTypeEnum.DateTime(), isOptional: true },
46
+ completedAt: { type: ScalarTypeEnum.DateTime(), isOptional: true }
47
+ }
117
48
  });
118
- const ProgressModel = defineSchemaModel({
119
- name: "LessonProgress",
120
- description: "Lesson progress",
121
- fields: {
122
- id: {
123
- type: ScalarTypeEnum.String_unsecure(),
124
- isOptional: false
125
- },
126
- learnerId: {
127
- type: ScalarTypeEnum.String_unsecure(),
128
- isOptional: false
129
- },
130
- lessonId: {
131
- type: ScalarTypeEnum.String_unsecure(),
132
- isOptional: false
133
- },
134
- status: {
135
- type: ScalarTypeEnum.String_unsecure(),
136
- isOptional: false
137
- },
138
- progress: {
139
- type: ScalarTypeEnum.Int_unsecure(),
140
- isOptional: false
141
- },
142
- score: {
143
- type: ScalarTypeEnum.Int_unsecure(),
144
- isOptional: true
145
- },
146
- timeSpent: {
147
- type: ScalarTypeEnum.Int_unsecure(),
148
- isOptional: false
149
- },
150
- completedAt: {
151
- type: ScalarTypeEnum.DateTime(),
152
- isOptional: true
153
- }
154
- }
49
+ var ProgressModel = defineSchemaModel({
50
+ name: "LessonProgress",
51
+ description: "Lesson progress",
52
+ fields: {
53
+ id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
54
+ learnerId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
55
+ lessonId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
56
+ status: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
57
+ progress: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },
58
+ score: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },
59
+ timeSpent: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },
60
+ completedAt: { type: ScalarTypeEnum.DateTime(), isOptional: true }
61
+ }
155
62
  });
156
- const DeckModel = defineSchemaModel({
157
- name: "Deck",
158
- description: "A flashcard deck",
159
- fields: {
160
- id: {
161
- type: ScalarTypeEnum.String_unsecure(),
162
- isOptional: false
163
- },
164
- title: {
165
- type: ScalarTypeEnum.String_unsecure(),
166
- isOptional: false
167
- },
168
- description: {
169
- type: ScalarTypeEnum.String_unsecure(),
170
- isOptional: true
171
- },
172
- cardCount: {
173
- type: ScalarTypeEnum.Int_unsecure(),
174
- isOptional: false
175
- },
176
- isPublic: {
177
- type: ScalarTypeEnum.Boolean(),
178
- isOptional: false
179
- },
180
- createdAt: {
181
- type: ScalarTypeEnum.DateTime(),
182
- isOptional: false
183
- }
184
- }
63
+ var DeckModel = defineSchemaModel({
64
+ name: "Deck",
65
+ description: "A flashcard deck",
66
+ fields: {
67
+ id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
68
+ title: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
69
+ description: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
70
+ cardCount: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },
71
+ isPublic: { type: ScalarTypeEnum.Boolean(), isOptional: false },
72
+ createdAt: { type: ScalarTypeEnum.DateTime(), isOptional: false }
73
+ }
185
74
  });
186
- const CardModel = defineSchemaModel({
187
- name: "Card",
188
- description: "A flashcard",
189
- fields: {
190
- id: {
191
- type: ScalarTypeEnum.String_unsecure(),
192
- isOptional: false
193
- },
194
- deckId: {
195
- type: ScalarTypeEnum.String_unsecure(),
196
- isOptional: false
197
- },
198
- front: {
199
- type: ScalarTypeEnum.String_unsecure(),
200
- isOptional: false
201
- },
202
- back: {
203
- type: ScalarTypeEnum.String_unsecure(),
204
- isOptional: false
205
- },
206
- hints: {
207
- type: ScalarTypeEnum.JSON(),
208
- isOptional: true
209
- },
210
- isDue: {
211
- type: ScalarTypeEnum.Boolean(),
212
- isOptional: false
213
- },
214
- nextReviewAt: {
215
- type: ScalarTypeEnum.DateTime(),
216
- isOptional: true
217
- }
218
- }
75
+ var CardModel = defineSchemaModel({
76
+ name: "Card",
77
+ description: "A flashcard",
78
+ fields: {
79
+ id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
80
+ deckId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
81
+ front: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
82
+ back: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
83
+ hints: { type: ScalarTypeEnum.JSON(), isOptional: true },
84
+ isDue: { type: ScalarTypeEnum.Boolean(), isOptional: false },
85
+ nextReviewAt: { type: ScalarTypeEnum.DateTime(), isOptional: true }
86
+ }
219
87
  });
220
- const AchievementModel = defineSchemaModel({
221
- name: "Achievement",
222
- description: "An achievement",
223
- fields: {
224
- id: {
225
- type: ScalarTypeEnum.String_unsecure(),
226
- isOptional: false
227
- },
228
- key: {
229
- type: ScalarTypeEnum.String_unsecure(),
230
- isOptional: false
231
- },
232
- name: {
233
- type: ScalarTypeEnum.String_unsecure(),
234
- isOptional: false
235
- },
236
- description: {
237
- type: ScalarTypeEnum.String_unsecure(),
238
- isOptional: false
239
- },
240
- icon: {
241
- type: ScalarTypeEnum.String_unsecure(),
242
- isOptional: true
243
- },
244
- xpReward: {
245
- type: ScalarTypeEnum.Int_unsecure(),
246
- isOptional: false
247
- },
248
- unlockedAt: {
249
- type: ScalarTypeEnum.DateTime(),
250
- isOptional: true
251
- }
252
- }
88
+ var AchievementModel = defineSchemaModel({
89
+ name: "Achievement",
90
+ description: "An achievement",
91
+ fields: {
92
+ id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
93
+ key: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
94
+ name: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
95
+ description: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
96
+ icon: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
97
+ xpReward: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },
98
+ unlockedAt: { type: ScalarTypeEnum.DateTime(), isOptional: true }
99
+ }
253
100
  });
254
- const EnrollInCourseInput = defineSchemaModel({
255
- name: "EnrollInCourseInput",
256
- description: "Input for enrolling in a course",
257
- fields: { courseId: {
258
- type: ScalarTypeEnum.String_unsecure(),
259
- isOptional: false
260
- } }
101
+ var EnrollInCourseInput = defineSchemaModel({
102
+ name: "EnrollInCourseInput",
103
+ description: "Input for enrolling in a course",
104
+ fields: {
105
+ courseId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false }
106
+ }
261
107
  });
262
- const CompleteLessonInput = defineSchemaModel({
263
- name: "CompleteLessonInput",
264
- description: "Input for completing a lesson",
265
- fields: {
266
- lessonId: {
267
- type: ScalarTypeEnum.String_unsecure(),
268
- isOptional: false
269
- },
270
- score: {
271
- type: ScalarTypeEnum.Int_unsecure(),
272
- isOptional: true
273
- },
274
- timeSpent: {
275
- type: ScalarTypeEnum.Int_unsecure(),
276
- isOptional: false
277
- }
278
- }
108
+ var CompleteLessonInput = defineSchemaModel({
109
+ name: "CompleteLessonInput",
110
+ description: "Input for completing a lesson",
111
+ fields: {
112
+ lessonId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
113
+ score: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },
114
+ timeSpent: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false }
115
+ }
279
116
  });
280
- const SubmitCardReviewInput = defineSchemaModel({
281
- name: "SubmitCardReviewInput",
282
- description: "Input for submitting a card review",
283
- fields: {
284
- cardId: {
285
- type: ScalarTypeEnum.String_unsecure(),
286
- isOptional: false
287
- },
288
- rating: {
289
- type: ScalarTypeEnum.String_unsecure(),
290
- isOptional: false
291
- },
292
- responseTimeMs: {
293
- type: ScalarTypeEnum.Int_unsecure(),
294
- isOptional: true
295
- }
296
- }
117
+ var SubmitCardReviewInput = defineSchemaModel({
118
+ name: "SubmitCardReviewInput",
119
+ description: "Input for submitting a card review",
120
+ fields: {
121
+ cardId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
122
+ rating: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
123
+ responseTimeMs: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true }
124
+ }
297
125
  });
298
- const GetDueCardsInput = defineSchemaModel({
299
- name: "GetDueCardsInput",
300
- description: "Input for getting due cards",
301
- fields: {
302
- deckId: {
303
- type: ScalarTypeEnum.String_unsecure(),
304
- isOptional: true
305
- },
306
- limit: {
307
- type: ScalarTypeEnum.Int_unsecure(),
308
- isOptional: true
309
- }
310
- }
126
+ var GetDueCardsInput = defineSchemaModel({
127
+ name: "GetDueCardsInput",
128
+ description: "Input for getting due cards",
129
+ fields: {
130
+ deckId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
131
+ limit: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true }
132
+ }
311
133
  });
312
- const GetDueCardsOutput = defineSchemaModel({
313
- name: "GetDueCardsOutput",
314
- description: "Output for getting due cards",
315
- fields: {
316
- cards: {
317
- type: CardModel,
318
- isArray: true,
319
- isOptional: false
320
- },
321
- total: {
322
- type: ScalarTypeEnum.Int_unsecure(),
323
- isOptional: false
324
- }
325
- }
134
+ var GetDueCardsOutput = defineSchemaModel({
135
+ name: "GetDueCardsOutput",
136
+ description: "Output for getting due cards",
137
+ fields: {
138
+ cards: { type: CardModel, isArray: true, isOptional: false },
139
+ total: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false }
140
+ }
326
141
  });
327
- const GetLearnerDashboardInput = defineSchemaModel({
328
- name: "GetLearnerDashboardInput",
329
- description: "Input for getting learner dashboard",
330
- fields: { learnerId: {
331
- type: ScalarTypeEnum.String_unsecure(),
332
- isOptional: true
333
- } }
142
+ var GetLearnerDashboardInput = defineSchemaModel({
143
+ name: "GetLearnerDashboardInput",
144
+ description: "Input for getting learner dashboard",
145
+ fields: {
146
+ learnerId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true }
147
+ }
334
148
  });
335
- const LearnerDashboardModel = defineSchemaModel({
336
- name: "LearnerDashboard",
337
- description: "Learner dashboard data",
338
- fields: {
339
- learner: {
340
- type: LearnerModel,
341
- isOptional: false
342
- },
343
- currentStreak: {
344
- type: ScalarTypeEnum.Int_unsecure(),
345
- isOptional: false
346
- },
347
- dailyXpGoal: {
348
- type: ScalarTypeEnum.Int_unsecure(),
349
- isOptional: false
350
- },
351
- dailyXpProgress: {
352
- type: ScalarTypeEnum.Int_unsecure(),
353
- isOptional: false
354
- },
355
- activeEnrollments: {
356
- type: EnrollmentModel,
357
- isArray: true,
358
- isOptional: false
359
- },
360
- recentAchievements: {
361
- type: AchievementModel,
362
- isArray: true,
363
- isOptional: false
364
- },
365
- dueCardCount: {
366
- type: ScalarTypeEnum.Int_unsecure(),
367
- isOptional: false
368
- }
369
- }
149
+ var LearnerDashboardModel = defineSchemaModel({
150
+ name: "LearnerDashboard",
151
+ description: "Learner dashboard data",
152
+ fields: {
153
+ learner: { type: LearnerModel, isOptional: false },
154
+ currentStreak: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },
155
+ dailyXpGoal: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },
156
+ dailyXpProgress: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },
157
+ activeEnrollments: {
158
+ type: EnrollmentModel,
159
+ isArray: true,
160
+ isOptional: false
161
+ },
162
+ recentAchievements: {
163
+ type: AchievementModel,
164
+ isArray: true,
165
+ isOptional: false
166
+ },
167
+ dueCardCount: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false }
168
+ }
370
169
  });
371
- const SuccessOutput = defineSchemaModel({
372
- name: "SuccessOutput",
373
- description: "Generic success output",
374
- fields: {
375
- success: {
376
- type: ScalarTypeEnum.Boolean(),
377
- isOptional: false
378
- },
379
- xpEarned: {
380
- type: ScalarTypeEnum.Int_unsecure(),
381
- isOptional: true
382
- }
383
- }
170
+ var SuccessOutput = defineSchemaModel({
171
+ name: "SuccessOutput",
172
+ description: "Generic success output",
173
+ fields: {
174
+ success: { type: ScalarTypeEnum.Boolean(), isOptional: false },
175
+ xpEarned: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true }
176
+ }
384
177
  });
385
-
386
- //#endregion
387
- export { AchievementModel, CardModel, CompleteLessonInput, CourseModel, DeckModel, EnrollInCourseInput, EnrollmentModel, GetDueCardsInput, GetDueCardsOutput, GetLearnerDashboardInput, LearnerDashboardModel, LearnerModel, ProgressModel, SubmitCardReviewInput, SuccessOutput };
388
- //# sourceMappingURL=models.js.map
178
+ export {
179
+ SuccessOutput,
180
+ SubmitCardReviewInput,
181
+ ProgressModel,
182
+ LearnerModel,
183
+ LearnerDashboardModel,
184
+ GetLearnerDashboardInput,
185
+ GetDueCardsOutput,
186
+ GetDueCardsInput,
187
+ EnrollmentModel,
188
+ EnrollInCourseInput,
189
+ DeckModel,
190
+ CourseModel,
191
+ CompleteLessonInput,
192
+ CardModel,
193
+ AchievementModel
194
+ };