@examplary/schemas 1.6.0 → 1.9.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 (47) hide show
  1. package/dist/common/scalar.d.ts +3 -0
  2. package/dist/common/scalar.js +10 -0
  3. package/dist/index.d.ts +6 -8
  4. package/dist/index.js +5 -5
  5. package/dist/question/index.d.ts +4 -0
  6. package/dist/question/index.js +18 -0
  7. package/dist/question/legacy-question-scoring-criteria.d.ts +9 -0
  8. package/dist/question/legacy-question-scoring-criteria.js +10 -0
  9. package/dist/question/question-scoring.d.ts +55 -0
  10. package/dist/question/question-scoring.js +29 -0
  11. package/dist/question/question.d.ts +42 -0
  12. package/dist/question/question.js +26 -0
  13. package/{src/index.ts → dist/question-type/index.d.ts} +0 -5
  14. package/dist/question-type/index.js +20 -0
  15. package/dist/question-type/question-type-qti3.d.ts +60 -0
  16. package/dist/question-type/question-type-qti3.js +48 -0
  17. package/dist/{question-type-setting.js → question-type/question-type-setting.js} +1 -1
  18. package/dist/{question-type.d.ts → question-type/question-type.d.ts} +31 -0
  19. package/dist/{question-type.js → question-type/question-type.js} +13 -1
  20. package/dist/schemas/question-scoring.json +197 -0
  21. package/dist/schemas/question-type.json +179 -74
  22. package/dist/schemas/question.json +364 -0
  23. package/package.json +7 -1
  24. package/.env +0 -1
  25. package/.serverless/cloudformation-template-update-stack.json +0 -175
  26. package/.serverless/meta.json +0 -274
  27. package/.serverless/serverless-state.json +0 -402
  28. package/.turbo/turbo-build.log +0 -1
  29. package/.turbo/turbo-deploy.log +0 -43
  30. package/.turbo/turbo-release.log +0 -114
  31. package/scripts/build.ts +0 -16
  32. package/serverless.yml +0 -25
  33. package/src/question-type-components.ts +0 -36
  34. package/src/question-type-generation-options.ts +0 -21
  35. package/src/question-type-grading-options.ts +0 -21
  36. package/src/question-type-setting.ts +0 -70
  37. package/src/question-type.ts +0 -104
  38. package/src/translatable.ts +0 -17
  39. /package/dist/{translatable.d.ts → common/translatable.d.ts} +0 -0
  40. /package/dist/{translatable.js → common/translatable.js} +0 -0
  41. /package/dist/{question-type-components.d.ts → question-type/question-type-components.d.ts} +0 -0
  42. /package/dist/{question-type-components.js → question-type/question-type-components.js} +0 -0
  43. /package/dist/{question-type-generation-options.d.ts → question-type/question-type-generation-options.d.ts} +0 -0
  44. /package/dist/{question-type-generation-options.js → question-type/question-type-generation-options.js} +0 -0
  45. /package/dist/{question-type-grading-options.d.ts → question-type/question-type-grading-options.d.ts} +0 -0
  46. /package/dist/{question-type-grading-options.js → question-type/question-type-grading-options.js} +0 -0
  47. /package/dist/{question-type-setting.d.ts → question-type/question-type-setting.d.ts} +0 -0
@@ -1,25 +1,22 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "description": "Schema for defining question types in the Examplary system",
4
3
  "type": "object",
5
4
  "properties": {
6
5
  "$schema": {
7
6
  "type": "string"
8
7
  },
9
8
  "id": {
10
- "description": "Unique identifier for the question type (e.g. 'my-org.color-picker')",
11
9
  "type": "string",
12
- "pattern": "^([a-z][a-z0-9-]*)(\\.[a-z][a-z0-9-]*)+$"
10
+ "pattern": "^([a-z][a-z0-9-]*)(\\.[a-z][a-z0-9-]*)+$",
11
+ "description": "Unique identifier for the question type (e.g. 'my-org.color-picker')"
13
12
  },
14
13
  "name": {
15
- "description": "Display name for the question type, can be a simple string or translation object",
16
14
  "anyOf": [
17
15
  {
18
- "description": "Simple string value",
19
- "type": "string"
16
+ "type": "string",
17
+ "description": "Simple string value"
20
18
  },
21
19
  {
22
- "description": "Translation object with language codes as keys",
23
20
  "type": "object",
24
21
  "propertyNames": {
25
22
  "type": "string",
@@ -27,19 +24,19 @@
27
24
  },
28
25
  "additionalProperties": {
29
26
  "type": "string"
30
- }
27
+ },
28
+ "description": "Translation object with language codes as keys"
31
29
  }
32
- ]
30
+ ],
31
+ "description": "Display name for the question type, can be a simple string or translation object"
33
32
  },
34
33
  "description": {
35
- "description": "Description of the question type, can be a simple string or translation object",
36
34
  "anyOf": [
37
35
  {
38
- "description": "Simple string value",
39
- "type": "string"
36
+ "type": "string",
37
+ "description": "Simple string value"
40
38
  },
41
39
  {
42
- "description": "Translation object with language codes as keys",
43
40
  "type": "object",
44
41
  "propertyNames": {
45
42
  "type": "string",
@@ -47,9 +44,11 @@
47
44
  },
48
45
  "additionalProperties": {
49
46
  "type": "string"
50
- }
47
+ },
48
+ "description": "Translation object with language codes as keys"
51
49
  }
52
- ]
50
+ ],
51
+ "description": "Description of the question type, can be a simple string or translation object"
53
52
  },
54
53
  "icon": {
55
54
  "description": "Path to the icon for this question type",
@@ -62,12 +61,11 @@
62
61
  "maxLength": 1
63
62
  },
64
63
  "generation": {
65
- "description": "Options for AI question generation",
66
64
  "type": "object",
67
65
  "properties": {
68
66
  "enabled": {
69
- "description": "Whether this question type can be automatically generated using AI (default to false)",
70
- "type": "boolean"
67
+ "type": "boolean",
68
+ "description": "Whether this question type can be automatically generated using AI (default to false)"
71
69
  },
72
70
  "instructions": {
73
71
  "description": "Optional instructions to guide AI in generating this question type",
@@ -77,15 +75,15 @@
77
75
  "required": [
78
76
  "enabled"
79
77
  ],
80
- "additionalProperties": false
78
+ "additionalProperties": false,
79
+ "description": "Options for AI question generation"
81
80
  },
82
81
  "grading": {
83
- "description": "Options for AI question grading",
84
82
  "type": "object",
85
83
  "properties": {
86
84
  "enabled": {
87
- "description": "Whether this question type can be automatically graded using AI (default to false)",
88
- "type": "boolean"
85
+ "type": "boolean",
86
+ "description": "Whether this question type can be automatically graded using AI (default to false)"
89
87
  },
90
88
  "instructions": {
91
89
  "description": "Optional instructions to guide AI in grading this question type",
@@ -95,7 +93,8 @@
95
93
  "required": [
96
94
  "enabled"
97
95
  ],
98
- "additionalProperties": false
96
+ "additionalProperties": false,
97
+ "description": "Options for AI question grading"
99
98
  },
100
99
  "timeEstimateMinutes": {
101
100
  "description": "Estimated time in minutes to complete this question type",
@@ -122,11 +121,10 @@
122
121
  "description": "Enforced title for this question type",
123
122
  "anyOf": [
124
123
  {
125
- "description": "Simple string value",
126
- "type": "string"
124
+ "type": "string",
125
+ "description": "Simple string value"
127
126
  },
128
127
  {
129
- "description": "Translation object with language codes as keys",
130
128
  "type": "object",
131
129
  "propertyNames": {
132
130
  "type": "string",
@@ -134,7 +132,8 @@
134
132
  },
135
133
  "additionalProperties": {
136
134
  "type": "string"
137
- }
135
+ },
136
+ "description": "Translation object with language codes as keys"
138
137
  }
139
138
  ]
140
139
  },
@@ -154,11 +153,10 @@
154
153
  "description": "Placeholder text for the title field",
155
154
  "anyOf": [
156
155
  {
157
- "description": "Simple string value",
158
- "type": "string"
156
+ "type": "string",
157
+ "description": "Simple string value"
159
158
  },
160
159
  {
161
- "description": "Translation object with language codes as keys",
162
160
  "type": "object",
163
161
  "propertyNames": {
164
162
  "type": "string",
@@ -166,7 +164,8 @@
166
164
  },
167
165
  "additionalProperties": {
168
166
  "type": "string"
169
- }
167
+ },
168
+ "description": "Translation object with language codes as keys"
170
169
  }
171
170
  ]
172
171
  },
@@ -174,11 +173,10 @@
174
173
  "description": "Placeholder text for the description field",
175
174
  "anyOf": [
176
175
  {
177
- "description": "Simple string value",
178
- "type": "string"
176
+ "type": "string",
177
+ "description": "Simple string value"
179
178
  },
180
179
  {
181
- "description": "Translation object with language codes as keys",
182
180
  "type": "object",
183
181
  "propertyNames": {
184
182
  "type": "string",
@@ -186,7 +184,8 @@
186
184
  },
187
185
  "additionalProperties": {
188
186
  "type": "string"
189
- }
187
+ },
188
+ "description": "Translation object with language codes as keys"
190
189
  }
191
190
  ]
192
191
  },
@@ -194,11 +193,10 @@
194
193
  "description": "Placeholder text for untitled questions",
195
194
  "anyOf": [
196
195
  {
197
- "description": "Simple string value",
198
- "type": "string"
196
+ "type": "string",
197
+ "description": "Simple string value"
199
198
  },
200
199
  {
201
- "description": "Translation object with language codes as keys",
202
200
  "type": "object",
203
201
  "propertyNames": {
204
202
  "type": "string",
@@ -206,7 +204,8 @@
206
204
  },
207
205
  "additionalProperties": {
208
206
  "type": "string"
209
- }
207
+ },
208
+ "description": "Translation object with language codes as keys"
210
209
  }
211
210
  ]
212
211
  },
@@ -241,22 +240,19 @@
241
240
  "description": "Configuration settings for the question type",
242
241
  "type": "array",
243
242
  "items": {
244
- "description": "Setting configuration",
245
243
  "type": "object",
246
244
  "properties": {
247
245
  "id": {
248
- "description": "Unique identifier for the setting",
249
- "type": "string"
246
+ "type": "string",
247
+ "description": "Unique identifier for the setting"
250
248
  },
251
249
  "name": {
252
- "description": "Display name for the setting",
253
250
  "anyOf": [
254
251
  {
255
- "description": "Simple string value",
256
- "type": "string"
252
+ "type": "string",
253
+ "description": "Simple string value"
257
254
  },
258
255
  {
259
- "description": "Translation object with language codes as keys",
260
256
  "type": "object",
261
257
  "propertyNames": {
262
258
  "type": "string",
@@ -264,19 +260,20 @@
264
260
  },
265
261
  "additionalProperties": {
266
262
  "type": "string"
267
- }
263
+ },
264
+ "description": "Translation object with language codes as keys"
268
265
  }
269
- ]
266
+ ],
267
+ "description": "Display name for the setting"
270
268
  },
271
269
  "helpText": {
272
270
  "description": "Help text for the setting",
273
271
  "anyOf": [
274
272
  {
275
- "description": "Simple string value",
276
- "type": "string"
273
+ "type": "string",
274
+ "description": "Simple string value"
277
275
  },
278
276
  {
279
- "description": "Translation object with language codes as keys",
280
277
  "type": "object",
281
278
  "propertyNames": {
282
279
  "type": "string",
@@ -284,7 +281,8 @@
284
281
  },
285
282
  "additionalProperties": {
286
283
  "type": "string"
287
- }
284
+ },
285
+ "description": "Translation object with language codes as keys"
288
286
  }
289
287
  ]
290
288
  },
@@ -293,7 +291,6 @@
293
291
  "type": "string"
294
292
  },
295
293
  "type": {
296
- "description": "Type of the setting",
297
294
  "type": "string",
298
295
  "enum": [
299
296
  "enum",
@@ -305,7 +302,8 @@
305
302
  "scoring-criteria",
306
303
  "tags",
307
304
  "question-type"
308
- ]
305
+ ],
306
+ "description": "Type of the setting"
309
307
  },
310
308
  "index": {
311
309
  "type": "number"
@@ -325,22 +323,19 @@
325
323
  "description": "Available options for enum type settings",
326
324
  "type": "array",
327
325
  "items": {
328
- "description": "Setting option",
329
326
  "type": "object",
330
327
  "properties": {
331
328
  "value": {
332
- "description": "Option value",
333
- "type": "string"
329
+ "type": "string",
330
+ "description": "Option value"
334
331
  },
335
332
  "label": {
336
- "description": "Option label",
337
333
  "anyOf": [
338
334
  {
339
- "description": "Simple string value",
340
- "type": "string"
335
+ "type": "string",
336
+ "description": "Simple string value"
341
337
  },
342
338
  {
343
- "description": "Translation object with language codes as keys",
344
339
  "type": "object",
345
340
  "propertyNames": {
346
341
  "type": "string",
@@ -348,27 +343,29 @@
348
343
  },
349
344
  "additionalProperties": {
350
345
  "type": "string"
351
- }
346
+ },
347
+ "description": "Translation object with language codes as keys"
352
348
  }
353
- ]
349
+ ],
350
+ "description": "Option label"
354
351
  }
355
352
  },
356
353
  "required": [
357
354
  "value",
358
355
  "label"
359
356
  ],
360
- "additionalProperties": false
357
+ "additionalProperties": false,
358
+ "description": "Setting option"
361
359
  }
362
360
  },
363
361
  "placeholder": {
364
362
  "description": "Placeholder text for the setting",
365
363
  "anyOf": [
366
364
  {
367
- "description": "Simple string value",
368
- "type": "string"
365
+ "type": "string",
366
+ "description": "Simple string value"
369
367
  },
370
368
  {
371
- "description": "Translation object with language codes as keys",
372
369
  "type": "object",
373
370
  "propertyNames": {
374
371
  "type": "string",
@@ -376,7 +373,8 @@
376
373
  },
377
374
  "additionalProperties": {
378
375
  "type": "string"
379
- }
376
+ },
377
+ "description": "Translation object with language codes as keys"
380
378
  }
381
379
  ]
382
380
  },
@@ -398,7 +396,8 @@
398
396
  "name",
399
397
  "type"
400
398
  ],
401
- "additionalProperties": false
399
+ "additionalProperties": false,
400
+ "description": "Setting configuration"
402
401
  }
403
402
  },
404
403
  "public": {
@@ -414,11 +413,10 @@
414
413
  "additionalProperties": {
415
414
  "anyOf": [
416
415
  {
417
- "description": "Simple string value",
418
- "type": "string"
416
+ "type": "string",
417
+ "description": "Simple string value"
419
418
  },
420
419
  {
421
- "description": "Translation object with language codes as keys",
422
420
  "type": "object",
423
421
  "propertyNames": {
424
422
  "type": "string",
@@ -426,17 +424,123 @@
426
424
  },
427
425
  "additionalProperties": {
428
426
  "type": "string"
429
- }
427
+ },
428
+ "description": "Translation object with language codes as keys"
430
429
  }
431
430
  ]
432
431
  }
433
432
  },
433
+ "export": {
434
+ "description": "Export configuration for various formats",
435
+ "type": "object",
436
+ "properties": {
437
+ "qti3": {
438
+ "description": "QTI 3.0 mapping configuration for transforming questions to QTI format",
439
+ "type": "object",
440
+ "properties": {
441
+ "interaction": {
442
+ "type": "object",
443
+ "properties": {
444
+ "type": {
445
+ "type": "string",
446
+ "enum": [
447
+ "AssociateInteraction",
448
+ "ChoiceInteraction",
449
+ "DrawingInteraction",
450
+ "EndAttemptInteraction",
451
+ "ExtendedTextInteraction",
452
+ "GapMatchInteraction",
453
+ "GraphicAssociateInteraction",
454
+ "GraphicGapMatchInteraction",
455
+ "GraphicOrderInteraction",
456
+ "HotspotInteraction",
457
+ "HottextInteraction",
458
+ "InlineChoiceInteraction",
459
+ "MatchInteraction",
460
+ "MediaInteraction",
461
+ "OrderInteraction",
462
+ "PortableCustomInteraction",
463
+ "PositionObjectInteraction",
464
+ "SelectPointInteraction",
465
+ "SliderInteraction",
466
+ "TextEntryInteraction",
467
+ "UploadInteraction"
468
+ ],
469
+ "description": "The QTI interaction type to generate"
470
+ },
471
+ "options": {
472
+ "type": "object",
473
+ "propertyNames": {
474
+ "type": "string"
475
+ },
476
+ "additionalProperties": {
477
+ "anyOf": [
478
+ {
479
+ "type": "string"
480
+ },
481
+ {
482
+ "type": "number"
483
+ },
484
+ {
485
+ "type": "boolean"
486
+ },
487
+ {
488
+ "type": "array",
489
+ "items": {}
490
+ },
491
+ {
492
+ "type": "object",
493
+ "properties": {},
494
+ "additionalProperties": false
495
+ }
496
+ ],
497
+ "description": "Literal or JSONata expression string starting with '='"
498
+ }
499
+ }
500
+ },
501
+ "required": [
502
+ "type"
503
+ ],
504
+ "additionalProperties": false
505
+ }
506
+ },
507
+ "required": [
508
+ "interaction"
509
+ ],
510
+ "additionalProperties": false
511
+ }
512
+ },
513
+ "additionalProperties": false
514
+ },
434
515
  "stylesheet": {
435
516
  "type": "string",
436
517
  "format": "uri"
437
518
  },
438
519
  "index": {
439
520
  "type": "number"
521
+ },
522
+ "metadata": {
523
+ "description": "Optional metadata for the question type, only used by external applications",
524
+ "type": "object",
525
+ "propertyNames": {
526
+ "type": "string"
527
+ },
528
+ "additionalProperties": {
529
+ "anyOf": [
530
+ {
531
+ "type": "string"
532
+ },
533
+ {
534
+ "type": "number"
535
+ },
536
+ {
537
+ "type": "boolean"
538
+ },
539
+ {
540
+ "type": "null"
541
+ }
542
+ ]
543
+ }
440
544
  }
441
545
  },
442
546
  "required": [
@@ -444,5 +548,6 @@
444
548
  "name",
445
549
  "description"
446
550
  ],
447
- "additionalProperties": false
551
+ "additionalProperties": false,
552
+ "description": "Schema for defining question types in the Examplary system"
448
553
  }