@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
@@ -0,0 +1,364 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "id": {
6
+ "type": "string"
7
+ },
8
+ "type": {
9
+ "type": "string"
10
+ },
11
+ "title": {
12
+ "anyOf": [
13
+ {
14
+ "type": "string"
15
+ },
16
+ {
17
+ "type": "null"
18
+ }
19
+ ]
20
+ },
21
+ "description": {
22
+ "anyOf": [
23
+ {
24
+ "type": "string"
25
+ },
26
+ {
27
+ "type": "null"
28
+ }
29
+ ]
30
+ },
31
+ "settings": {
32
+ "type": "object",
33
+ "properties": {},
34
+ "additionalProperties": {}
35
+ },
36
+ "scoring": {
37
+ "anyOf": [
38
+ {
39
+ "type": "object",
40
+ "properties": {
41
+ "rubricType": {
42
+ "anyOf": [
43
+ {
44
+ "type": "string",
45
+ "enum": [
46
+ "simple",
47
+ "analytical",
48
+ "holistic",
49
+ "exact-values"
50
+ ]
51
+ },
52
+ {
53
+ "type": "null"
54
+ }
55
+ ]
56
+ },
57
+ "criteria": {
58
+ "anyOf": [
59
+ {
60
+ "type": "array",
61
+ "items": {
62
+ "type": "object",
63
+ "properties": {
64
+ "id": {
65
+ "type": "string"
66
+ },
67
+ "title": {
68
+ "anyOf": [
69
+ {
70
+ "type": "string"
71
+ },
72
+ {
73
+ "type": "null"
74
+ }
75
+ ]
76
+ },
77
+ "description": {
78
+ "anyOf": [
79
+ {
80
+ "type": "string"
81
+ },
82
+ {
83
+ "type": "null"
84
+ }
85
+ ]
86
+ },
87
+ "points": {
88
+ "anyOf": [
89
+ {
90
+ "type": "number"
91
+ },
92
+ {
93
+ "type": "null"
94
+ }
95
+ ]
96
+ },
97
+ "minPoints": {
98
+ "anyOf": [
99
+ {
100
+ "type": "number"
101
+ },
102
+ {
103
+ "type": "null"
104
+ }
105
+ ]
106
+ },
107
+ "maxPoints": {
108
+ "anyOf": [
109
+ {
110
+ "type": "number"
111
+ },
112
+ {
113
+ "type": "null"
114
+ }
115
+ ]
116
+ },
117
+ "levels": {
118
+ "anyOf": [
119
+ {
120
+ "type": "array",
121
+ "items": {
122
+ "type": "object",
123
+ "properties": {
124
+ "id": {
125
+ "type": "string"
126
+ },
127
+ "title": {
128
+ "anyOf": [
129
+ {
130
+ "type": "string"
131
+ },
132
+ {
133
+ "type": "null"
134
+ }
135
+ ]
136
+ },
137
+ "description": {
138
+ "anyOf": [
139
+ {
140
+ "type": "string"
141
+ },
142
+ {
143
+ "type": "null"
144
+ }
145
+ ]
146
+ },
147
+ "points": {
148
+ "anyOf": [
149
+ {
150
+ "type": "number"
151
+ },
152
+ {
153
+ "type": "null"
154
+ }
155
+ ]
156
+ },
157
+ "minPoints": {
158
+ "anyOf": [
159
+ {
160
+ "type": "number"
161
+ },
162
+ {
163
+ "type": "null"
164
+ }
165
+ ]
166
+ },
167
+ "maxPoints": {
168
+ "anyOf": [
169
+ {
170
+ "type": "number"
171
+ },
172
+ {
173
+ "type": "null"
174
+ }
175
+ ]
176
+ }
177
+ },
178
+ "required": [
179
+ "id"
180
+ ],
181
+ "additionalProperties": false
182
+ }
183
+ },
184
+ {
185
+ "type": "null"
186
+ }
187
+ ]
188
+ }
189
+ },
190
+ "required": [
191
+ "id"
192
+ ],
193
+ "additionalProperties": false
194
+ }
195
+ },
196
+ {
197
+ "type": "null"
198
+ }
199
+ ]
200
+ },
201
+ "guidance": {
202
+ "anyOf": [
203
+ {
204
+ "type": "string"
205
+ },
206
+ {
207
+ "type": "null"
208
+ }
209
+ ]
210
+ },
211
+ "modelAnswer": {
212
+ "anyOf": [
213
+ {
214
+ "type": "string"
215
+ },
216
+ {
217
+ "type": "null"
218
+ }
219
+ ]
220
+ },
221
+ "templateId": {
222
+ "anyOf": [
223
+ {
224
+ "type": "string"
225
+ },
226
+ {
227
+ "type": "null"
228
+ }
229
+ ]
230
+ }
231
+ },
232
+ "additionalProperties": false
233
+ },
234
+ {
235
+ "type": "null"
236
+ }
237
+ ]
238
+ },
239
+ "tags": {
240
+ "anyOf": [
241
+ {
242
+ "type": "array",
243
+ "items": {
244
+ "type": "string"
245
+ }
246
+ },
247
+ {
248
+ "type": "null"
249
+ }
250
+ ]
251
+ },
252
+ "metadata": {
253
+ "anyOf": [
254
+ {
255
+ "type": "object",
256
+ "propertyNames": {
257
+ "type": "string"
258
+ },
259
+ "additionalProperties": {
260
+ "anyOf": [
261
+ {
262
+ "type": "string"
263
+ },
264
+ {
265
+ "type": "number"
266
+ },
267
+ {
268
+ "type": "boolean"
269
+ },
270
+ {
271
+ "type": "null"
272
+ }
273
+ ]
274
+ }
275
+ },
276
+ {
277
+ "type": "null"
278
+ }
279
+ ]
280
+ },
281
+ "v": {
282
+ "anyOf": [
283
+ {
284
+ "type": "number"
285
+ },
286
+ {
287
+ "type": "null"
288
+ }
289
+ ]
290
+ },
291
+ "questionBankItemId": {
292
+ "anyOf": [
293
+ {
294
+ "type": "string"
295
+ },
296
+ {
297
+ "type": "null"
298
+ }
299
+ ]
300
+ },
301
+ "traceIds": {
302
+ "anyOf": [
303
+ {
304
+ "type": "array",
305
+ "items": {
306
+ "type": "string"
307
+ }
308
+ },
309
+ {
310
+ "type": "null"
311
+ }
312
+ ]
313
+ },
314
+ "scoringCriteria": {
315
+ "anyOf": [
316
+ {
317
+ "type": "array",
318
+ "items": {
319
+ "type": "object",
320
+ "properties": {
321
+ "id": {
322
+ "type": "string"
323
+ },
324
+ "description": {
325
+ "anyOf": [
326
+ {
327
+ "type": "string"
328
+ },
329
+ {
330
+ "type": "null"
331
+ }
332
+ ]
333
+ },
334
+ "points": {
335
+ "default": 1,
336
+ "anyOf": [
337
+ {
338
+ "type": "number"
339
+ },
340
+ {
341
+ "type": "null"
342
+ }
343
+ ]
344
+ }
345
+ },
346
+ "required": [
347
+ "points"
348
+ ],
349
+ "additionalProperties": false
350
+ }
351
+ },
352
+ {
353
+ "type": "null"
354
+ }
355
+ ]
356
+ }
357
+ },
358
+ "required": [
359
+ "id",
360
+ "type",
361
+ "settings"
362
+ ],
363
+ "additionalProperties": {}
364
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@examplary/schemas",
3
3
  "packageManager": "yarn@4.8.1",
4
- "version": "1.7.0",
4
+ "version": "1.10.0",
5
5
  "description": "Schemas for the Examplary platform.",
6
6
  "scripts": {
7
7
  "build:schema": "tsx ./scripts/build.ts",
@@ -11,16 +11,22 @@
11
11
  "deploy": "bash -c 'serverless deploy --verbose --stage ${STAGE/staging/production}'",
12
12
  "release": "semantic-release -e semantic-release-monorepo"
13
13
  },
14
+ "files": [
15
+ "dist"
16
+ ],
17
+ "publishConfig": {
18
+ "access": "public"
19
+ },
14
20
  "main": "./dist/index.js",
15
21
  "types": "./dist/index.d.ts",
16
22
  "devDependencies": {
17
- "serverless": "^4.19.1",
18
- "serverless-lift": "^1.32.0",
23
+ "serverless": "^4.33.0",
24
+ "serverless-lift": "^1.34.1",
19
25
  "tsx": "^4.20.6",
20
- "typescript": "^5.9.2"
26
+ "typescript": "^5.9.3"
21
27
  },
22
28
  "dependencies": {
23
- "zod": "^4.1.9"
29
+ "zod": "^4.3.6"
24
30
  },
25
31
  "homepage": "https://developers.examplary.ai/",
26
32
  "author": {
package/.env DELETED
@@ -1 +0,0 @@
1
- SERVERLESS_ACCESS_KEY=AKaam9TxRjIdaDijtpL22kSIfgFP8UfuTiOeXjEWTvLqR
@@ -1,175 +0,0 @@
1
- {
2
- "AWSTemplateFormatVersion": "2010-09-09",
3
- "Description": "The AWS CloudFormation template for this Serverless application",
4
- "Resources": {
5
- "schemasBucketBE9E7D9F": {
6
- "Type": "AWS::S3::Bucket",
7
- "Properties": {
8
- "PublicAccessBlockConfiguration": {
9
- "BlockPublicAcls": false,
10
- "BlockPublicPolicy": false,
11
- "IgnorePublicAcls": false,
12
- "RestrictPublicBuckets": false
13
- },
14
- "WebsiteConfiguration": {
15
- "IndexDocument": "index.html"
16
- }
17
- },
18
- "UpdateReplacePolicy": "Delete",
19
- "DeletionPolicy": "Delete"
20
- },
21
- "schemasBucketPolicy7504DC0B": {
22
- "Type": "AWS::S3::BucketPolicy",
23
- "Properties": {
24
- "Bucket": {
25
- "Ref": "schemasBucketBE9E7D9F"
26
- },
27
- "PolicyDocument": {
28
- "Statement": [
29
- {
30
- "Action": "s3:GetObject",
31
- "Effect": "Allow",
32
- "Principal": {
33
- "AWS": "*"
34
- },
35
- "Resource": {
36
- "Fn::Join": [
37
- "",
38
- [
39
- {
40
- "Fn::GetAtt": [
41
- "schemasBucketBE9E7D9F",
42
- "Arn"
43
- ]
44
- },
45
- "/*"
46
- ]
47
- ]
48
- }
49
- }
50
- ],
51
- "Version": "2012-10-17"
52
- }
53
- }
54
- },
55
- "schemasResponseFunctionC5B753EB": {
56
- "Type": "AWS::CloudFront::Function",
57
- "Properties": {
58
- "AutoPublish": true,
59
- "FunctionCode": "function handler(event) {\n var response = event.response;\n response.headers = Object.assign({}, {\n \"x-frame-options\": {\n \"value\": \"SAMEORIGIN\"\n },\n \"x-content-type-options\": {\n \"value\": \"nosniff\"\n },\n \"x-xss-protection\": {\n \"value\": \"1; mode=block\"\n },\n \"strict-transport-security\": {\n \"value\": \"max-age=63072000\"\n }\n}, response.headers);\n return response;\n}",
60
- "FunctionConfig": {
61
- "Comment": "schemas-production-eu-central-1-schemas-response",
62
- "Runtime": "cloudfront-js-1.0"
63
- },
64
- "Name": "schemas-production-eu-central-1-schemas-response"
65
- }
66
- },
67
- "schemasCDNE849A679": {
68
- "Type": "AWS::CloudFront::Distribution",
69
- "Properties": {
70
- "DistributionConfig": {
71
- "Aliases": [
72
- "schemas.examplary.ai"
73
- ],
74
- "Comment": "schemas-production schemas website CDN",
75
- "CustomErrorResponses": [
76
- {
77
- "ErrorCachingMinTTL": 0,
78
- "ErrorCode": 404,
79
- "ResponseCode": 200,
80
- "ResponsePagePath": "/index.html"
81
- }
82
- ],
83
- "DefaultCacheBehavior": {
84
- "AllowedMethods": [
85
- "GET",
86
- "HEAD",
87
- "OPTIONS"
88
- ],
89
- "CachePolicyId": "658327ea-f89d-4fab-a63d-7e88639e58f6",
90
- "Compress": true,
91
- "FunctionAssociations": [
92
- {
93
- "EventType": "viewer-response",
94
- "FunctionARN": {
95
- "Ref": "schemasResponseFunctionC5B753EB"
96
- }
97
- }
98
- ],
99
- "TargetOriginId": "schemasCDNOrigin1ED98F1D0",
100
- "ViewerProtocolPolicy": "redirect-to-https"
101
- },
102
- "DefaultRootObject": "index.html",
103
- "Enabled": true,
104
- "HttpVersion": "http2",
105
- "IPV6Enabled": true,
106
- "Origins": [
107
- {
108
- "CustomOriginConfig": {
109
- "OriginProtocolPolicy": "http-only",
110
- "OriginSSLProtocols": [
111
- "TLSv1.2"
112
- ]
113
- },
114
- "DomainName": {
115
- "Fn::Select": [
116
- 2,
117
- {
118
- "Fn::Split": [
119
- "/",
120
- {
121
- "Fn::GetAtt": [
122
- "schemasBucketBE9E7D9F",
123
- "WebsiteURL"
124
- ]
125
- }
126
- ]
127
- }
128
- ]
129
- },
130
- "Id": "schemasCDNOrigin1ED98F1D0"
131
- }
132
- ],
133
- "ViewerCertificate": {
134
- "AcmCertificateArn": "arn:aws:acm:us-east-1:864899853846:certificate/98929ce6-38a5-41ec-ac3c-6abd2f46087f",
135
- "MinimumProtocolVersion": "TLSv1.2_2021",
136
- "SslSupportMethod": "sni-only"
137
- }
138
- }
139
- }
140
- }
141
- },
142
- "Outputs": {
143
- "ServerlessDeploymentBucketName": {
144
- "Value": "serverless-framework-deployments-eu-central-1-fe769196-9095",
145
- "Export": {
146
- "Name": "sls-schemas-production-ServerlessDeploymentBucketName"
147
- }
148
- },
149
- "schemasBucketName814EA6EC": {
150
- "Description": "Name of the bucket that stores the static website.",
151
- "Value": {
152
- "Ref": "schemasBucketBE9E7D9F"
153
- }
154
- },
155
- "schemasDomainC1437202": {
156
- "Description": "Website domain name.",
157
- "Value": "schemas.examplary.ai"
158
- },
159
- "schemasCloudFrontCName05CBFC31": {
160
- "Description": "CloudFront CNAME.",
161
- "Value": {
162
- "Fn::GetAtt": [
163
- "schemasCDNE849A679",
164
- "DomainName"
165
- ]
166
- }
167
- },
168
- "schemasDistributionIdF843C7D9": {
169
- "Description": "ID of the CloudFront distribution.",
170
- "Value": {
171
- "Ref": "schemasCDNE849A679"
172
- }
173
- }
174
- }
175
- }