@examplary/schemas 1.7.0 → 1.10.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 (49) 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} +6 -5
  14. package/dist/question-type/index.js +23 -0
  15. package/dist/{question-type-generation-options.d.ts → question-type/question-type-generation-options.d.ts} +1 -1
  16. package/dist/{question-type-generation-options.js → question-type/question-type-generation-options.js} +1 -0
  17. package/dist/{question-type-grading-options.d.ts → question-type/question-type-grading-options.d.ts} +1 -1
  18. package/dist/{question-type-grading-options.js → question-type/question-type-grading-options.js} +1 -0
  19. package/dist/{question-type-qti3.d.ts → question-type/question-type-qti3.d.ts} +2 -0
  20. package/dist/{question-type-qti3.js → question-type/question-type-qti3.js} +1 -0
  21. package/dist/question-type/question-type-scanning-options.d.ts +5 -0
  22. package/dist/question-type/question-type-scanning-options.js +13 -0
  23. package/dist/{question-type-setting.js → question-type/question-type-setting.js} +1 -1
  24. package/dist/{question-type.d.ts → question-type/question-type.d.ts} +7 -3
  25. package/dist/{question-type.js → question-type/question-type.js} +5 -2
  26. package/dist/schemas/question-scoring.json +197 -0
  27. package/dist/schemas/question-type.json +138 -81
  28. package/dist/schemas/question.json +364 -0
  29. package/package.json +11 -5
  30. package/.env +0 -1
  31. package/.serverless/cloudformation-template-update-stack.json +0 -175
  32. package/.serverless/meta.json +0 -274
  33. package/.serverless/serverless-state.json +0 -402
  34. package/.turbo/turbo-build.log +0 -1
  35. package/.turbo/turbo-deploy.log +0 -43
  36. package/scripts/build.ts +0 -16
  37. package/serverless.yml +0 -25
  38. package/src/question-type-components.ts +0 -36
  39. package/src/question-type-generation-options.ts +0 -21
  40. package/src/question-type-grading-options.ts +0 -21
  41. package/src/question-type-qti3.ts +0 -53
  42. package/src/question-type-setting.ts +0 -70
  43. package/src/question-type.ts +0 -119
  44. package/src/translatable.ts +0 -17
  45. /package/dist/{translatable.d.ts → common/translatable.d.ts} +0 -0
  46. /package/dist/{translatable.js → common/translatable.js} +0 -0
  47. /package/dist/{question-type-components.d.ts → question-type/question-type-components.d.ts} +0 -0
  48. /package/dist/{question-type-components.js → question-type/question-type-components.js} +0 -0
  49. /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,40 +61,81 @@
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",
74
- "type": "string"
72
+ "anyOf": [
73
+ {
74
+ "type": "string"
75
+ },
76
+ {
77
+ "type": "array",
78
+ "items": {
79
+ "type": "string"
80
+ }
81
+ }
82
+ ]
75
83
  }
76
84
  },
77
85
  "required": [
78
86
  "enabled"
79
87
  ],
80
- "additionalProperties": false
88
+ "additionalProperties": false,
89
+ "description": "Options for AI question generation"
81
90
  },
82
91
  "grading": {
83
- "description": "Options for AI question grading",
84
92
  "type": "object",
85
93
  "properties": {
86
94
  "enabled": {
87
- "description": "Whether this question type can be automatically graded using AI (default to false)",
88
- "type": "boolean"
95
+ "type": "boolean",
96
+ "description": "Whether this question type can be automatically graded using AI (default to false)"
89
97
  },
90
98
  "instructions": {
91
99
  "description": "Optional instructions to guide AI in grading this question type",
92
- "type": "string"
100
+ "anyOf": [
101
+ {
102
+ "type": "string"
103
+ },
104
+ {
105
+ "type": "array",
106
+ "items": {
107
+ "type": "string"
108
+ }
109
+ }
110
+ ]
93
111
  }
94
112
  },
95
113
  "required": [
96
114
  "enabled"
97
115
  ],
98
- "additionalProperties": false
116
+ "additionalProperties": false,
117
+ "description": "Options for AI question grading"
118
+ },
119
+ "scanning": {
120
+ "type": "object",
121
+ "properties": {
122
+ "instructions": {
123
+ "description": "Optional instructions to guide AI in converting answers for this question type when scanning documents",
124
+ "anyOf": [
125
+ {
126
+ "type": "string"
127
+ },
128
+ {
129
+ "type": "array",
130
+ "items": {
131
+ "type": "string"
132
+ }
133
+ }
134
+ ]
135
+ }
136
+ },
137
+ "additionalProperties": false,
138
+ "description": "Options for AI question scanning"
99
139
  },
100
140
  "timeEstimateMinutes": {
101
141
  "description": "Estimated time in minutes to complete this question type",
@@ -122,11 +162,10 @@
122
162
  "description": "Enforced title for this question type",
123
163
  "anyOf": [
124
164
  {
125
- "description": "Simple string value",
126
- "type": "string"
165
+ "type": "string",
166
+ "description": "Simple string value"
127
167
  },
128
168
  {
129
- "description": "Translation object with language codes as keys",
130
169
  "type": "object",
131
170
  "propertyNames": {
132
171
  "type": "string",
@@ -134,7 +173,8 @@
134
173
  },
135
174
  "additionalProperties": {
136
175
  "type": "string"
137
- }
176
+ },
177
+ "description": "Translation object with language codes as keys"
138
178
  }
139
179
  ]
140
180
  },
@@ -154,11 +194,10 @@
154
194
  "description": "Placeholder text for the title field",
155
195
  "anyOf": [
156
196
  {
157
- "description": "Simple string value",
158
- "type": "string"
197
+ "type": "string",
198
+ "description": "Simple string value"
159
199
  },
160
200
  {
161
- "description": "Translation object with language codes as keys",
162
201
  "type": "object",
163
202
  "propertyNames": {
164
203
  "type": "string",
@@ -166,7 +205,8 @@
166
205
  },
167
206
  "additionalProperties": {
168
207
  "type": "string"
169
- }
208
+ },
209
+ "description": "Translation object with language codes as keys"
170
210
  }
171
211
  ]
172
212
  },
@@ -174,11 +214,10 @@
174
214
  "description": "Placeholder text for the description field",
175
215
  "anyOf": [
176
216
  {
177
- "description": "Simple string value",
178
- "type": "string"
217
+ "type": "string",
218
+ "description": "Simple string value"
179
219
  },
180
220
  {
181
- "description": "Translation object with language codes as keys",
182
221
  "type": "object",
183
222
  "propertyNames": {
184
223
  "type": "string",
@@ -186,7 +225,8 @@
186
225
  },
187
226
  "additionalProperties": {
188
227
  "type": "string"
189
- }
228
+ },
229
+ "description": "Translation object with language codes as keys"
190
230
  }
191
231
  ]
192
232
  },
@@ -194,11 +234,10 @@
194
234
  "description": "Placeholder text for untitled questions",
195
235
  "anyOf": [
196
236
  {
197
- "description": "Simple string value",
198
- "type": "string"
237
+ "type": "string",
238
+ "description": "Simple string value"
199
239
  },
200
240
  {
201
- "description": "Translation object with language codes as keys",
202
241
  "type": "object",
203
242
  "propertyNames": {
204
243
  "type": "string",
@@ -206,7 +245,8 @@
206
245
  },
207
246
  "additionalProperties": {
208
247
  "type": "string"
209
- }
248
+ },
249
+ "description": "Translation object with language codes as keys"
210
250
  }
211
251
  ]
212
252
  },
@@ -241,22 +281,19 @@
241
281
  "description": "Configuration settings for the question type",
242
282
  "type": "array",
243
283
  "items": {
244
- "description": "Setting configuration",
245
284
  "type": "object",
246
285
  "properties": {
247
286
  "id": {
248
- "description": "Unique identifier for the setting",
249
- "type": "string"
287
+ "type": "string",
288
+ "description": "Unique identifier for the setting"
250
289
  },
251
290
  "name": {
252
- "description": "Display name for the setting",
253
291
  "anyOf": [
254
292
  {
255
- "description": "Simple string value",
256
- "type": "string"
293
+ "type": "string",
294
+ "description": "Simple string value"
257
295
  },
258
296
  {
259
- "description": "Translation object with language codes as keys",
260
297
  "type": "object",
261
298
  "propertyNames": {
262
299
  "type": "string",
@@ -264,19 +301,20 @@
264
301
  },
265
302
  "additionalProperties": {
266
303
  "type": "string"
267
- }
304
+ },
305
+ "description": "Translation object with language codes as keys"
268
306
  }
269
- ]
307
+ ],
308
+ "description": "Display name for the setting"
270
309
  },
271
310
  "helpText": {
272
311
  "description": "Help text for the setting",
273
312
  "anyOf": [
274
313
  {
275
- "description": "Simple string value",
276
- "type": "string"
314
+ "type": "string",
315
+ "description": "Simple string value"
277
316
  },
278
317
  {
279
- "description": "Translation object with language codes as keys",
280
318
  "type": "object",
281
319
  "propertyNames": {
282
320
  "type": "string",
@@ -284,7 +322,8 @@
284
322
  },
285
323
  "additionalProperties": {
286
324
  "type": "string"
287
- }
325
+ },
326
+ "description": "Translation object with language codes as keys"
288
327
  }
289
328
  ]
290
329
  },
@@ -293,7 +332,6 @@
293
332
  "type": "string"
294
333
  },
295
334
  "type": {
296
- "description": "Type of the setting",
297
335
  "type": "string",
298
336
  "enum": [
299
337
  "enum",
@@ -305,7 +343,8 @@
305
343
  "scoring-criteria",
306
344
  "tags",
307
345
  "question-type"
308
- ]
346
+ ],
347
+ "description": "Type of the setting"
309
348
  },
310
349
  "index": {
311
350
  "type": "number"
@@ -325,22 +364,19 @@
325
364
  "description": "Available options for enum type settings",
326
365
  "type": "array",
327
366
  "items": {
328
- "description": "Setting option",
329
367
  "type": "object",
330
368
  "properties": {
331
369
  "value": {
332
- "description": "Option value",
333
- "type": "string"
370
+ "type": "string",
371
+ "description": "Option value"
334
372
  },
335
373
  "label": {
336
- "description": "Option label",
337
374
  "anyOf": [
338
375
  {
339
- "description": "Simple string value",
340
- "type": "string"
376
+ "type": "string",
377
+ "description": "Simple string value"
341
378
  },
342
379
  {
343
- "description": "Translation object with language codes as keys",
344
380
  "type": "object",
345
381
  "propertyNames": {
346
382
  "type": "string",
@@ -348,27 +384,29 @@
348
384
  },
349
385
  "additionalProperties": {
350
386
  "type": "string"
351
- }
387
+ },
388
+ "description": "Translation object with language codes as keys"
352
389
  }
353
- ]
390
+ ],
391
+ "description": "Option label"
354
392
  }
355
393
  },
356
394
  "required": [
357
395
  "value",
358
396
  "label"
359
397
  ],
360
- "additionalProperties": false
398
+ "additionalProperties": false,
399
+ "description": "Setting option"
361
400
  }
362
401
  },
363
402
  "placeholder": {
364
403
  "description": "Placeholder text for the setting",
365
404
  "anyOf": [
366
405
  {
367
- "description": "Simple string value",
368
- "type": "string"
406
+ "type": "string",
407
+ "description": "Simple string value"
369
408
  },
370
409
  {
371
- "description": "Translation object with language codes as keys",
372
410
  "type": "object",
373
411
  "propertyNames": {
374
412
  "type": "string",
@@ -376,7 +414,8 @@
376
414
  },
377
415
  "additionalProperties": {
378
416
  "type": "string"
379
- }
417
+ },
418
+ "description": "Translation object with language codes as keys"
380
419
  }
381
420
  ]
382
421
  },
@@ -398,7 +437,8 @@
398
437
  "name",
399
438
  "type"
400
439
  ],
401
- "additionalProperties": false
440
+ "additionalProperties": false,
441
+ "description": "Setting configuration"
402
442
  }
403
443
  },
404
444
  "public": {
@@ -414,11 +454,10 @@
414
454
  "additionalProperties": {
415
455
  "anyOf": [
416
456
  {
417
- "description": "Simple string value",
418
- "type": "string"
457
+ "type": "string",
458
+ "description": "Simple string value"
419
459
  },
420
460
  {
421
- "description": "Translation object with language codes as keys",
422
461
  "type": "object",
423
462
  "propertyNames": {
424
463
  "type": "string",
@@ -426,7 +465,8 @@
426
465
  },
427
466
  "additionalProperties": {
428
467
  "type": "string"
429
- }
468
+ },
469
+ "description": "Translation object with language codes as keys"
430
470
  }
431
471
  ]
432
472
  }
@@ -443,7 +483,6 @@
443
483
  "type": "object",
444
484
  "properties": {
445
485
  "type": {
446
- "description": "The QTI interaction type to generate",
447
486
  "type": "string",
448
487
  "enum": [
449
488
  "AssociateInteraction",
@@ -461,12 +500,14 @@
461
500
  "MatchInteraction",
462
501
  "MediaInteraction",
463
502
  "OrderInteraction",
503
+ "PortableCustomInteraction",
464
504
  "PositionObjectInteraction",
465
505
  "SelectPointInteraction",
466
506
  "SliderInteraction",
467
507
  "TextEntryInteraction",
468
508
  "UploadInteraction"
469
- ]
509
+ ],
510
+ "description": "The QTI interaction type to generate"
470
511
  },
471
512
  "options": {
472
513
  "type": "object",
@@ -474,7 +515,6 @@
474
515
  "type": "string"
475
516
  },
476
517
  "additionalProperties": {
477
- "description": "Literal or JSONata expression string starting with '='",
478
518
  "anyOf": [
479
519
  {
480
520
  "type": "string"
@@ -494,7 +534,8 @@
494
534
  "properties": {},
495
535
  "additionalProperties": false
496
536
  }
497
- ]
537
+ ],
538
+ "description": "Literal or JSONata expression string starting with '='"
498
539
  }
499
540
  }
500
541
  },
@@ -525,7 +566,22 @@
525
566
  "propertyNames": {
526
567
  "type": "string"
527
568
  },
528
- "additionalProperties": {}
569
+ "additionalProperties": {
570
+ "anyOf": [
571
+ {
572
+ "type": "string"
573
+ },
574
+ {
575
+ "type": "number"
576
+ },
577
+ {
578
+ "type": "boolean"
579
+ },
580
+ {
581
+ "type": "null"
582
+ }
583
+ ]
584
+ }
529
585
  }
530
586
  },
531
587
  "required": [
@@ -533,5 +589,6 @@
533
589
  "name",
534
590
  "description"
535
591
  ],
536
- "additionalProperties": false
592
+ "additionalProperties": false,
593
+ "description": "Schema for defining question types in the Examplary system"
537
594
  }