timeback 0.1.4 → 0.1.6

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/schema.json CHANGED
@@ -1,222 +1,612 @@
1
1
  {
2
2
  "$schema": "http://json-schema.org/draft-07/schema#",
3
- "$id": "https://timeback.dev/schemas/timeback.config.schema.json",
4
- "title": "Timeback Config",
5
- "description": "Configuration schema for timeback.config.ts files",
6
3
  "type": "object",
7
- "required": ["name", "courses"],
8
4
  "properties": {
9
5
  "$schema": {
10
- "type": "string",
11
- "description": "JSON Schema reference for editor support"
6
+ "$ref": "#/definitions/__schema0"
12
7
  },
13
8
  "name": {
14
- "type": "string",
15
- "minLength": 1,
16
- "description": "Display name for your app"
9
+ "$ref": "#/definitions/__schema1"
17
10
  },
18
11
  "defaults": {
19
- "$ref": "#/$defs/CourseDefaults",
20
- "description": "Default properties applied to all courses"
12
+ "$ref": "#/definitions/__schema2"
21
13
  },
22
14
  "courses": {
23
- "type": "array",
24
- "minItems": 1,
25
- "items": {
26
- "$ref": "#/$defs/CourseConfig"
27
- },
28
- "description": "Courses available in this app"
15
+ "$ref": "#/definitions/__schema22"
16
+ },
17
+ "sensor": {
18
+ "$ref": "#/definitions/__schema52"
19
+ },
20
+ "launchUrl": {
21
+ "$ref": "#/definitions/__schema53"
29
22
  }
30
23
  },
31
- "$defs": {
32
- "TimebackSubject": {
24
+ "required": [
25
+ "name",
26
+ "courses"
27
+ ],
28
+ "additionalProperties": false,
29
+ "title": "Timeback Config",
30
+ "description": "Configuration schema for timeback.config.json files",
31
+ "allOf": [
32
+ {
33
+ "$ref": "#/definitions/TimebackConfig"
34
+ }
35
+ ],
36
+ "definitions": {
37
+ "__schema0": {
33
38
  "type": "string",
34
- "enum": [
35
- "Reading",
36
- "Language",
37
- "Vocabulary",
38
- "Social Studies",
39
- "Writing",
40
- "Science",
41
- "FastMath",
42
- "Math",
43
- "None",
44
- "Other"
45
- ],
46
- "description": "Subject area"
39
+ "description": "JSON Schema reference for editor support"
47
40
  },
48
- "TimebackGrade": {
49
- "type": "integer",
50
- "minimum": -1,
51
- "maximum": 13,
52
- "description": "Grade level (-1 = Pre-K, 0 = K, 1-12 = grades, 13 = AP)"
41
+ "__schema1": {
42
+ "type": "string",
43
+ "minLength": 1,
44
+ "description": "Display name for your app"
45
+ },
46
+ "__schema2": {
47
+ "description": "Default properties applied to all courses",
48
+ "allOf": [
49
+ {
50
+ "$ref": "#/definitions/CourseDefaults"
51
+ }
52
+ ]
53
+ },
54
+ "__schema3": {
55
+ "type": "string",
56
+ "description": "Course code (e.g., 'MATH101')"
57
+ },
58
+ "__schema4": {
59
+ "type": "string",
60
+ "description": "Course level (e.g., 'AP', 'Honors')"
61
+ },
62
+ "__schema5": {
63
+ "allOf": [
64
+ {
65
+ "$ref": "#/definitions/CourseMetadata"
66
+ }
67
+ ]
68
+ },
69
+ "CourseMetadata": {
70
+ "type": "object",
71
+ "properties": {
72
+ "courseType": {
73
+ "$ref": "#/definitions/__schema6"
74
+ },
75
+ "isSupplemental": {
76
+ "$ref": "#/definitions/__schema7"
77
+ },
78
+ "isCustom": {
79
+ "$ref": "#/definitions/__schema8"
80
+ },
81
+ "publishStatus": {
82
+ "$ref": "#/definitions/__schema9"
83
+ },
84
+ "contactEmail": {
85
+ "$ref": "#/definitions/__schema10"
86
+ },
87
+ "primaryApp": {
88
+ "$ref": "#/definitions/__schema11"
89
+ },
90
+ "goals": {
91
+ "$ref": "#/definitions/__schema12"
92
+ },
93
+ "metrics": {
94
+ "$ref": "#/definitions/__schema18"
95
+ }
96
+ },
97
+ "additionalProperties": false,
98
+ "description": "Course metadata (matches API metadata object)"
99
+ },
100
+ "__schema6": {
101
+ "allOf": [
102
+ {
103
+ "$ref": "#/definitions/CourseType"
104
+ }
105
+ ]
53
106
  },
54
107
  "CourseType": {
55
108
  "type": "string",
56
- "enum": ["base", "hole-filling", "optional"],
109
+ "enum": [
110
+ "base",
111
+ "hole-filling",
112
+ "optional"
113
+ ],
57
114
  "description": "Course classification type"
58
115
  },
116
+ "__schema7": {
117
+ "type": "boolean",
118
+ "description": "Whether this is supplemental to a base course"
119
+ },
120
+ "__schema8": {
121
+ "type": "boolean",
122
+ "description": "Whether this is a custom course for an individual student"
123
+ },
124
+ "__schema9": {
125
+ "allOf": [
126
+ {
127
+ "$ref": "#/definitions/PublishStatus"
128
+ }
129
+ ]
130
+ },
59
131
  "PublishStatus": {
60
132
  "type": "string",
61
- "enum": ["draft", "testing", "published", "deactivated"],
133
+ "enum": [
134
+ "draft",
135
+ "testing",
136
+ "published",
137
+ "deactivated"
138
+ ],
62
139
  "description": "Course publication status"
63
140
  },
141
+ "__schema10": {
142
+ "type": "string",
143
+ "format": "email",
144
+ "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$",
145
+ "description": "Contact email for course issues"
146
+ },
147
+ "__schema11": {
148
+ "type": "string",
149
+ "description": "Primary application identifier"
150
+ },
151
+ "__schema12": {
152
+ "allOf": [
153
+ {
154
+ "$ref": "#/definitions/CourseGoals"
155
+ }
156
+ ]
157
+ },
64
158
  "CourseGoals": {
65
159
  "type": "object",
66
- "description": "Daily learning goals for a course",
67
160
  "properties": {
68
161
  "dailyXp": {
69
- "type": "integer",
70
- "minimum": 1,
71
- "description": "Target XP to earn per day"
162
+ "$ref": "#/definitions/__schema13"
72
163
  },
73
164
  "dailyLessons": {
74
- "type": "integer",
75
- "minimum": 1,
76
- "description": "Target lessons to complete per day"
165
+ "$ref": "#/definitions/__schema14"
77
166
  },
78
167
  "dailyActiveMinutes": {
79
- "type": "integer",
80
- "minimum": 1,
81
- "description": "Target active learning minutes per day"
168
+ "$ref": "#/definitions/__schema15"
82
169
  },
83
170
  "dailyAccuracy": {
84
- "type": "integer",
85
- "minimum": 0,
86
- "maximum": 100,
87
- "description": "Target accuracy percentage (0-100)"
171
+ "$ref": "#/definitions/__schema16"
88
172
  },
89
173
  "dailyMasteredUnits": {
90
- "type": "integer",
91
- "minimum": 1,
92
- "description": "Target units to master per day"
174
+ "$ref": "#/definitions/__schema17"
93
175
  }
94
176
  },
95
- "additionalProperties": false
177
+ "additionalProperties": false,
178
+ "description": "Daily learning goals for a course"
179
+ },
180
+ "__schema13": {
181
+ "type": "integer",
182
+ "exclusiveMinimum": 0,
183
+ "maximum": 9007199254740991,
184
+ "description": "Target XP to earn per day"
185
+ },
186
+ "__schema14": {
187
+ "type": "integer",
188
+ "exclusiveMinimum": 0,
189
+ "maximum": 9007199254740991,
190
+ "description": "Target lessons to complete per day"
191
+ },
192
+ "__schema15": {
193
+ "type": "integer",
194
+ "exclusiveMinimum": 0,
195
+ "maximum": 9007199254740991,
196
+ "description": "Target active learning minutes per day"
197
+ },
198
+ "__schema16": {
199
+ "type": "integer",
200
+ "minimum": 0,
201
+ "maximum": 100,
202
+ "description": "Target accuracy percentage (0-100)"
203
+ },
204
+ "__schema17": {
205
+ "type": "integer",
206
+ "exclusiveMinimum": 0,
207
+ "maximum": 9007199254740991,
208
+ "description": "Target units to master per day"
209
+ },
210
+ "__schema18": {
211
+ "allOf": [
212
+ {
213
+ "$ref": "#/definitions/CourseMetrics"
214
+ }
215
+ ]
96
216
  },
97
217
  "CourseMetrics": {
98
218
  "type": "object",
99
- "description": "Aggregate metrics for a course",
100
219
  "properties": {
101
220
  "totalXp": {
102
- "type": "integer",
103
- "minimum": 1,
104
- "description": "Total XP available in the course"
221
+ "$ref": "#/definitions/__schema19"
105
222
  },
106
223
  "totalLessons": {
107
- "type": "integer",
108
- "minimum": 1,
109
- "description": "Total number of lessons/activities"
224
+ "$ref": "#/definitions/__schema20"
110
225
  },
111
226
  "totalGrades": {
112
- "type": "integer",
113
- "minimum": 1,
114
- "description": "Total grade levels covered"
227
+ "$ref": "#/definitions/__schema21"
115
228
  }
116
229
  },
117
- "additionalProperties": false
230
+ "additionalProperties": false,
231
+ "description": "Aggregate metrics for a course"
118
232
  },
119
- "CourseIds": {
120
- "type": ["object", "null"],
121
- "description": "Environment-specific course IDs (populated by sync)",
233
+ "__schema19": {
234
+ "type": "integer",
235
+ "exclusiveMinimum": 0,
236
+ "maximum": 9007199254740991,
237
+ "description": "Total XP available in the course"
238
+ },
239
+ "__schema20": {
240
+ "type": "integer",
241
+ "exclusiveMinimum": 0,
242
+ "maximum": 9007199254740991,
243
+ "description": "Total number of lessons/activities"
244
+ },
245
+ "__schema21": {
246
+ "type": "integer",
247
+ "exclusiveMinimum": 0,
248
+ "maximum": 9007199254740991,
249
+ "description": "Total grade levels covered"
250
+ },
251
+ "CourseDefaults": {
252
+ "type": "object",
122
253
  "properties": {
123
- "staging": {
124
- "type": "string",
125
- "description": "Course ID in staging environment"
254
+ "courseCode": {
255
+ "$ref": "#/definitions/__schema3"
126
256
  },
127
- "production": {
128
- "type": "string",
129
- "description": "Course ID in production environment"
257
+ "level": {
258
+ "$ref": "#/definitions/__schema4"
259
+ },
260
+ "metadata": {
261
+ "$ref": "#/definitions/__schema5"
130
262
  }
131
263
  },
132
- "additionalProperties": false
264
+ "additionalProperties": false,
265
+ "description": "Default properties that apply to all courses unless overridden"
133
266
  },
134
- "CourseMetadata": {
267
+ "__schema22": {
268
+ "minItems": 1,
269
+ "type": "array",
270
+ "items": {
271
+ "$ref": "#/definitions/CourseConfig"
272
+ },
273
+ "description": "Courses available in this app"
274
+ },
275
+ "CourseConfig": {
135
276
  "type": "object",
136
- "description": "Course metadata (matches API metadata object)",
137
277
  "properties": {
138
- "courseType": {
139
- "$ref": "#/$defs/CourseType"
278
+ "courseCode": {
279
+ "$ref": "#/definitions/__schema3"
140
280
  },
141
- "isSupplemental": {
142
- "type": "boolean",
143
- "description": "Whether this is supplemental to a base course"
281
+ "level": {
282
+ "$ref": "#/definitions/__schema4"
144
283
  },
145
- "isCustom": {
146
- "type": "boolean",
147
- "description": "Whether this is a custom course for an individual student"
284
+ "metadata": {
285
+ "$ref": "#/definitions/__schema5"
148
286
  },
149
- "publishStatus": {
150
- "$ref": "#/$defs/PublishStatus"
287
+ "subject": {
288
+ "$ref": "#/definitions/__schema23"
151
289
  },
152
- "contactEmail": {
153
- "type": "string",
154
- "format": "email",
155
- "description": "Contact email for course issues"
290
+ "grade": {
291
+ "$ref": "#/definitions/__schema24"
156
292
  },
157
- "primaryApp": {
158
- "type": "string",
159
- "description": "Primary application identifier"
293
+ "ids": {
294
+ "$ref": "#/definitions/__schema40"
160
295
  },
161
- "goals": {
162
- "$ref": "#/$defs/CourseGoals"
296
+ "sensor": {
297
+ "$ref": "#/definitions/__schema43"
163
298
  },
164
- "metrics": {
165
- "$ref": "#/$defs/CourseMetrics"
299
+ "launchUrl": {
300
+ "$ref": "#/definitions/__schema44"
301
+ },
302
+ "overrides": {
303
+ "$ref": "#/definitions/__schema45"
166
304
  }
167
305
  },
168
- "additionalProperties": false
306
+ "required": [
307
+ "subject"
308
+ ],
309
+ "additionalProperties": false,
310
+ "description": "Configuration for a single course. Must have either grade or courseCode (or both)."
169
311
  },
170
- "CourseDefaults": {
312
+ "__schema23": {
313
+ "description": "Subject area for this course",
314
+ "allOf": [
315
+ {
316
+ "$ref": "#/definitions/TimebackSubject"
317
+ }
318
+ ]
319
+ },
320
+ "TimebackSubject": {
321
+ "type": "string",
322
+ "enum": [
323
+ "Reading",
324
+ "Language",
325
+ "Vocabulary",
326
+ "Social Studies",
327
+ "Writing",
328
+ "Science",
329
+ "FastMath",
330
+ "Math",
331
+ "None",
332
+ "Other"
333
+ ],
334
+ "description": "Subject area"
335
+ },
336
+ "__schema24": {
337
+ "allOf": [
338
+ {
339
+ "$ref": "#/definitions/TimebackGrade"
340
+ }
341
+ ]
342
+ },
343
+ "__schema25": {
344
+ "type": "number",
345
+ "const": -1
346
+ },
347
+ "__schema26": {
348
+ "type": "number",
349
+ "const": 0
350
+ },
351
+ "__schema27": {
352
+ "type": "number",
353
+ "const": 1
354
+ },
355
+ "__schema28": {
356
+ "type": "number",
357
+ "const": 2
358
+ },
359
+ "__schema29": {
360
+ "type": "number",
361
+ "const": 3
362
+ },
363
+ "__schema30": {
364
+ "type": "number",
365
+ "const": 4
366
+ },
367
+ "__schema31": {
368
+ "type": "number",
369
+ "const": 5
370
+ },
371
+ "__schema32": {
372
+ "type": "number",
373
+ "const": 6
374
+ },
375
+ "__schema33": {
376
+ "type": "number",
377
+ "const": 7
378
+ },
379
+ "__schema34": {
380
+ "type": "number",
381
+ "const": 8
382
+ },
383
+ "__schema35": {
384
+ "type": "number",
385
+ "const": 9
386
+ },
387
+ "__schema36": {
388
+ "type": "number",
389
+ "const": 10
390
+ },
391
+ "__schema37": {
392
+ "type": "number",
393
+ "const": 11
394
+ },
395
+ "__schema38": {
396
+ "type": "number",
397
+ "const": 12
398
+ },
399
+ "__schema39": {
400
+ "type": "number",
401
+ "const": 13
402
+ },
403
+ "TimebackGrade": {
404
+ "anyOf": [
405
+ {
406
+ "$ref": "#/definitions/__schema25"
407
+ },
408
+ {
409
+ "$ref": "#/definitions/__schema26"
410
+ },
411
+ {
412
+ "$ref": "#/definitions/__schema27"
413
+ },
414
+ {
415
+ "$ref": "#/definitions/__schema28"
416
+ },
417
+ {
418
+ "$ref": "#/definitions/__schema29"
419
+ },
420
+ {
421
+ "$ref": "#/definitions/__schema30"
422
+ },
423
+ {
424
+ "$ref": "#/definitions/__schema31"
425
+ },
426
+ {
427
+ "$ref": "#/definitions/__schema32"
428
+ },
429
+ {
430
+ "$ref": "#/definitions/__schema33"
431
+ },
432
+ {
433
+ "$ref": "#/definitions/__schema34"
434
+ },
435
+ {
436
+ "$ref": "#/definitions/__schema35"
437
+ },
438
+ {
439
+ "$ref": "#/definitions/__schema36"
440
+ },
441
+ {
442
+ "$ref": "#/definitions/__schema37"
443
+ },
444
+ {
445
+ "$ref": "#/definitions/__schema38"
446
+ },
447
+ {
448
+ "$ref": "#/definitions/__schema39"
449
+ }
450
+ ],
451
+ "description": "Grade level (-1 = Pre-K, 0 = K, 1-12 = grades, 13 = AP)"
452
+ },
453
+ "__schema40": {
454
+ "anyOf": [
455
+ {
456
+ "$ref": "#/definitions/CourseIds"
457
+ },
458
+ {
459
+ "type": "null"
460
+ }
461
+ ]
462
+ },
463
+ "CourseIds": {
171
464
  "type": "object",
172
- "description": "Default properties that apply to all courses unless overridden",
173
465
  "properties": {
174
- "courseCode": {
175
- "type": "string",
176
- "description": "Course code (e.g., 'MATH101')"
466
+ "staging": {
467
+ "$ref": "#/definitions/__schema41"
468
+ },
469
+ "production": {
470
+ "$ref": "#/definitions/__schema42"
471
+ }
472
+ },
473
+ "additionalProperties": false,
474
+ "description": "Environment-specific course IDs (populated by sync)"
475
+ },
476
+ "__schema41": {
477
+ "type": "string",
478
+ "description": "Course ID in staging environment"
479
+ },
480
+ "__schema42": {
481
+ "type": "string",
482
+ "description": "Course ID in production environment"
483
+ },
484
+ "__schema43": {
485
+ "type": "string",
486
+ "format": "uri",
487
+ "description": "Caliper sensor endpoint URL for this course"
488
+ },
489
+ "__schema44": {
490
+ "type": "string",
491
+ "format": "uri",
492
+ "description": "LTI launch URL for this course"
493
+ },
494
+ "__schema45": {
495
+ "allOf": [
496
+ {
497
+ "$ref": "#/definitions/CourseOverrides"
498
+ }
499
+ ]
500
+ },
501
+ "CourseOverrides": {
502
+ "type": "object",
503
+ "properties": {
504
+ "staging": {
505
+ "$ref": "#/definitions/__schema46"
177
506
  },
507
+ "production": {
508
+ "$ref": "#/definitions/__schema51"
509
+ }
510
+ },
511
+ "additionalProperties": false,
512
+ "description": "Per-environment course overrides"
513
+ },
514
+ "__schema46": {
515
+ "description": "Overrides for staging environment",
516
+ "allOf": [
517
+ {
518
+ "$ref": "#/definitions/CourseEnvOverrides"
519
+ }
520
+ ]
521
+ },
522
+ "__schema47": {
523
+ "type": "string",
524
+ "description": "Course level for this environment"
525
+ },
526
+ "__schema48": {
527
+ "type": "string",
528
+ "format": "uri",
529
+ "description": "Caliper sensor endpoint URL for this environment"
530
+ },
531
+ "__schema49": {
532
+ "type": "string",
533
+ "format": "uri",
534
+ "description": "LTI launch URL for this environment"
535
+ },
536
+ "__schema50": {
537
+ "allOf": [
538
+ {
539
+ "$ref": "#/definitions/CourseMetadata"
540
+ }
541
+ ]
542
+ },
543
+ "CourseEnvOverrides": {
544
+ "type": "object",
545
+ "properties": {
178
546
  "level": {
179
- "type": "string",
180
- "description": "Course level (e.g., 'AP', 'Honors')"
547
+ "$ref": "#/definitions/__schema47"
548
+ },
549
+ "sensor": {
550
+ "$ref": "#/definitions/__schema48"
551
+ },
552
+ "launchUrl": {
553
+ "$ref": "#/definitions/__schema49"
181
554
  },
182
555
  "metadata": {
183
- "$ref": "#/$defs/CourseMetadata"
556
+ "$ref": "#/definitions/__schema50"
184
557
  }
185
558
  },
186
- "additionalProperties": false
559
+ "additionalProperties": false,
560
+ "description": "Environment-specific course overrides (non-identity fields)"
187
561
  },
188
- "CourseConfig": {
189
- "type": "object",
190
- "description": "Configuration for a single course",
191
- "required": ["subject", "grade"],
562
+ "__schema51": {
563
+ "description": "Overrides for production environment",
192
564
  "allOf": [
193
565
  {
194
- "$ref": "#/$defs/CourseDefaults"
566
+ "$ref": "#/definitions/CourseEnvOverrides"
195
567
  }
196
- ],
568
+ ]
569
+ },
570
+ "__schema52": {
571
+ "type": "string",
572
+ "format": "uri",
573
+ "description": "Default Caliper sensor endpoint URL for all courses"
574
+ },
575
+ "__schema53": {
576
+ "type": "string",
577
+ "format": "uri",
578
+ "description": "Default LTI launch URL for all courses"
579
+ },
580
+ "TimebackConfig": {
581
+ "type": "object",
197
582
  "properties": {
198
- "subject": {
199
- "$ref": "#/$defs/TimebackSubject"
583
+ "$schema": {
584
+ "$ref": "#/definitions/__schema0"
200
585
  },
201
- "grade": {
202
- "$ref": "#/$defs/TimebackGrade"
586
+ "name": {
587
+ "$ref": "#/definitions/__schema1"
203
588
  },
204
- "courseCode": {
205
- "type": "string",
206
- "description": "Course code (e.g., 'MATH101')"
589
+ "defaults": {
590
+ "$ref": "#/definitions/__schema2"
207
591
  },
208
- "level": {
209
- "type": "string",
210
- "description": "Course level (e.g., 'AP', 'Honors')"
592
+ "courses": {
593
+ "$ref": "#/definitions/__schema22"
211
594
  },
212
- "metadata": {
213
- "$ref": "#/$defs/CourseMetadata"
595
+ "sensor": {
596
+ "$ref": "#/definitions/__schema52"
214
597
  },
215
- "ids": {
216
- "$ref": "#/$defs/CourseIds"
598
+ "launchUrl": {
599
+ "$ref": "#/definitions/__schema53"
217
600
  }
218
601
  },
219
- "additionalProperties": false
602
+ "required": [
603
+ "name",
604
+ "courses"
605
+ ],
606
+ "additionalProperties": false,
607
+ "title": "Timeback Config",
608
+ "description": "Configuration schema for timeback.config.json files"
220
609
  }
221
- }
610
+ },
611
+ "$id": "https://timeback.dev/schema.json"
222
612
  }