@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.
- package/dist/browser/contracts/index.js +578 -0
- package/dist/browser/contracts/models.js +193 -0
- package/dist/browser/contracts/onboarding.js +417 -0
- package/dist/browser/contracts/operations.js +326 -0
- package/dist/browser/contracts/shared.js +5 -0
- package/dist/browser/docs/index.js +124 -0
- package/dist/browser/docs/learning-journey.docblock.js +124 -0
- package/dist/browser/engines/index.js +526 -0
- package/dist/browser/engines/srs.js +198 -0
- package/dist/browser/engines/streak.js +159 -0
- package/dist/browser/engines/xp.js +171 -0
- package/dist/browser/entities/ai.js +343 -0
- package/dist/browser/entities/course.js +276 -0
- package/dist/browser/entities/flashcard.js +222 -0
- package/dist/browser/entities/gamification.js +340 -0
- package/dist/browser/entities/index.js +2136 -0
- package/dist/browser/entities/learner.js +329 -0
- package/dist/browser/entities/onboarding.js +301 -0
- package/dist/browser/entities/quiz.js +304 -0
- package/dist/browser/events.js +423 -0
- package/dist/browser/index.js +3833 -0
- package/dist/browser/learning-journey.capability.js +40 -0
- package/dist/browser/learning-journey.feature.js +56 -0
- package/dist/browser/track-spec.js +0 -0
- package/dist/contracts/index.d.ts +5 -5
- package/dist/contracts/index.d.ts.map +1 -0
- package/dist/contracts/index.js +578 -5
- package/dist/contracts/models.d.ts +426 -431
- package/dist/contracts/models.d.ts.map +1 -1
- package/dist/contracts/models.js +178 -372
- package/dist/contracts/onboarding.d.ts +621 -627
- package/dist/contracts/onboarding.d.ts.map +1 -1
- package/dist/contracts/onboarding.js +404 -388
- package/dist/contracts/operations.d.ts +243 -249
- package/dist/contracts/operations.d.ts.map +1 -1
- package/dist/contracts/operations.js +324 -148
- package/dist/contracts/shared.d.ts +1 -4
- package/dist/contracts/shared.d.ts.map +1 -1
- package/dist/contracts/shared.js +6 -6
- package/dist/docs/index.d.ts +2 -1
- package/dist/docs/index.d.ts.map +1 -0
- package/dist/docs/index.js +125 -1
- package/dist/docs/learning-journey.docblock.d.ts +2 -1
- package/dist/docs/learning-journey.docblock.d.ts.map +1 -0
- package/dist/docs/learning-journey.docblock.js +47 -58
- package/dist/engines/index.d.ts +4 -4
- package/dist/engines/index.d.ts.map +1 -0
- package/dist/engines/index.js +526 -4
- package/dist/engines/srs.d.ts +89 -92
- package/dist/engines/srs.d.ts.map +1 -1
- package/dist/engines/srs.js +197 -217
- package/dist/engines/streak.d.ts +84 -87
- package/dist/engines/streak.d.ts.map +1 -1
- package/dist/engines/streak.js +158 -192
- package/dist/engines/xp.d.ts +80 -83
- package/dist/engines/xp.d.ts.map +1 -1
- package/dist/engines/xp.js +170 -211
- package/dist/entities/ai.d.ts +199 -204
- package/dist/entities/ai.d.ts.map +1 -1
- package/dist/entities/ai.js +336 -368
- package/dist/entities/course.d.ts +149 -154
- package/dist/entities/course.d.ts.map +1 -1
- package/dist/entities/course.js +267 -306
- package/dist/entities/flashcard.d.ts +144 -149
- package/dist/entities/flashcard.d.ts.map +1 -1
- package/dist/entities/flashcard.js +217 -243
- package/dist/entities/gamification.d.ts +197 -202
- package/dist/entities/gamification.d.ts.map +1 -1
- package/dist/entities/gamification.js +331 -382
- package/dist/entities/index.d.ts +613 -618
- package/dist/entities/index.d.ts.map +1 -1
- package/dist/entities/index.js +2135 -43
- package/dist/entities/learner.d.ts +191 -196
- package/dist/entities/learner.d.ts.map +1 -1
- package/dist/entities/learner.js +322 -357
- package/dist/entities/onboarding.d.ts +164 -169
- package/dist/entities/onboarding.d.ts.map +1 -1
- package/dist/entities/onboarding.js +296 -301
- package/dist/entities/quiz.d.ts +184 -189
- package/dist/entities/quiz.d.ts.map +1 -1
- package/dist/entities/quiz.js +296 -361
- package/dist/events.d.ts +608 -614
- package/dist/events.d.ts.map +1 -1
- package/dist/events.js +421 -687
- package/dist/index.d.ts +8 -20
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +3834 -22
- package/dist/learning-journey.capability.d.ts +3 -8
- package/dist/learning-journey.capability.d.ts.map +1 -1
- package/dist/learning-journey.capability.js +41 -46
- package/dist/learning-journey.feature.d.ts +1 -6
- package/dist/learning-journey.feature.d.ts.map +1 -1
- package/dist/learning-journey.feature.js +55 -155
- package/dist/node/contracts/index.js +578 -0
- package/dist/node/contracts/models.js +193 -0
- package/dist/node/contracts/onboarding.js +417 -0
- package/dist/node/contracts/operations.js +326 -0
- package/dist/node/contracts/shared.js +5 -0
- package/dist/node/docs/index.js +124 -0
- package/dist/node/docs/learning-journey.docblock.js +124 -0
- package/dist/node/engines/index.js +526 -0
- package/dist/node/engines/srs.js +198 -0
- package/dist/node/engines/streak.js +159 -0
- package/dist/node/engines/xp.js +171 -0
- package/dist/node/entities/ai.js +343 -0
- package/dist/node/entities/course.js +276 -0
- package/dist/node/entities/flashcard.js +222 -0
- package/dist/node/entities/gamification.js +340 -0
- package/dist/node/entities/index.js +2136 -0
- package/dist/node/entities/learner.js +329 -0
- package/dist/node/entities/onboarding.js +301 -0
- package/dist/node/entities/quiz.js +304 -0
- package/dist/node/events.js +423 -0
- package/dist/node/index.js +3833 -0
- package/dist/node/learning-journey.capability.js +40 -0
- package/dist/node/learning-journey.feature.js +56 -0
- package/dist/node/track-spec.js +0 -0
- package/dist/track-spec.d.ts +115 -118
- package/dist/track-spec.d.ts.map +1 -1
- package/dist/track-spec.js +1 -0
- package/package.json +237 -60
- package/dist/contracts/models.js.map +0 -1
- package/dist/contracts/onboarding.js.map +0 -1
- package/dist/contracts/operations.js.map +0 -1
- package/dist/contracts/shared.js.map +0 -1
- package/dist/docs/learning-journey.docblock.js.map +0 -1
- package/dist/engines/srs.js.map +0 -1
- package/dist/engines/streak.js.map +0 -1
- package/dist/engines/xp.js.map +0 -1
- package/dist/entities/ai.js.map +0 -1
- package/dist/entities/course.js.map +0 -1
- package/dist/entities/flashcard.js.map +0 -1
- package/dist/entities/gamification.js.map +0 -1
- package/dist/entities/index.js.map +0 -1
- package/dist/entities/learner.js.map +0 -1
- package/dist/entities/onboarding.js.map +0 -1
- package/dist/entities/quiz.js.map +0 -1
- package/dist/events.js.map +0 -1
- package/dist/learning-journey.capability.js.map +0 -1
- package/dist/learning-journey.feature.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"models.d.ts","
|
|
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"}
|
package/dist/contracts/models.js
CHANGED
|
@@ -1,388 +1,194 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
// src/contracts/models.ts
|
|
1
3
|
import { ScalarTypeEnum, defineSchemaModel } from "@contractspec/lib.schema";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
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
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
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
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
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
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
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
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
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
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
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
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
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
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
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
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
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
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
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
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
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
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
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
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
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
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
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
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
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
|
-
|
|
387
|
-
|
|
388
|
-
|
|
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
|
+
};
|