@examplary/schemas 1.10.0 → 1.11.1
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/question/question-scoring.d.ts +1 -0
- package/dist/question/question-scoring.js +1 -0
- package/dist/question/question.d.ts +1 -0
- package/dist/question-type/question-type-setting.d.ts +2 -2
- package/dist/question-type/question-type-setting.js +2 -2
- package/dist/question-type/question-type.d.ts +4 -3
- package/dist/question-type/question-type.js +3 -2
- package/dist/schemas/question-scoring.json +10 -0
- package/dist/schemas/question-type.json +35 -19
- package/dist/schemas/question.json +10 -0
- package/package.json +2 -2
|
@@ -48,6 +48,7 @@ export declare const QuestionScoringSchema: z.ZodObject<{
|
|
|
48
48
|
maxPoints: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
49
49
|
}, z.core.$strip>>>>;
|
|
50
50
|
}, z.core.$strip>>>>;
|
|
51
|
+
exactValuesCaseInsensitive: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
51
52
|
guidance: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
52
53
|
modelAnswer: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
53
54
|
templateId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -23,6 +23,7 @@ var RubricType;
|
|
|
23
23
|
exports.QuestionScoringSchema = zod_1.z.object({
|
|
24
24
|
rubricType: zod_1.z.enum(RubricType).nullish(),
|
|
25
25
|
criteria: zod_1.z.array(exports.TopLevelScoringCriterionSchema).nullish(),
|
|
26
|
+
exactValuesCaseInsensitive: zod_1.z.boolean().nullish(),
|
|
26
27
|
guidance: zod_1.z.string().nullish(),
|
|
27
28
|
modelAnswer: zod_1.z.string().nullish(),
|
|
28
29
|
templateId: zod_1.z.string().nullish(),
|
|
@@ -23,6 +23,7 @@ export declare const QuestionSchema: z.ZodObject<{
|
|
|
23
23
|
maxPoints: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
24
24
|
}, z.core.$strip>>>>;
|
|
25
25
|
}, z.core.$strip>>>>;
|
|
26
|
+
exactValuesCaseInsensitive: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
26
27
|
guidance: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
27
28
|
modelAnswer: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
28
29
|
templateId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -21,13 +21,13 @@ export declare const QuestionTypeSetting: z.ZodObject<{
|
|
|
21
21
|
}>;
|
|
22
22
|
index: z.ZodOptional<z.ZodNumber>;
|
|
23
23
|
hidden: z.ZodOptional<z.ZodBoolean>;
|
|
24
|
-
default: z.ZodOptional<z.ZodAny
|
|
24
|
+
default: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
|
|
25
25
|
required: z.ZodOptional<z.ZodBoolean>;
|
|
26
26
|
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
27
27
|
value: z.ZodString;
|
|
28
28
|
label: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>;
|
|
29
29
|
}, z.core.$strict>>>;
|
|
30
|
-
placeholder: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]
|
|
30
|
+
placeholder: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>>>;
|
|
31
31
|
step: z.ZodOptional<z.ZodNumber>;
|
|
32
32
|
min: z.ZodOptional<z.ZodNumber>;
|
|
33
33
|
max: z.ZodOptional<z.ZodNumber>;
|
|
@@ -39,7 +39,7 @@ exports.QuestionTypeSetting = zod_1.z
|
|
|
39
39
|
.boolean()
|
|
40
40
|
.optional()
|
|
41
41
|
.describe("Whether the setting is hidden from the user"),
|
|
42
|
-
default: zod_1.z.any().
|
|
42
|
+
default: zod_1.z.any().nullish().describe("Default value for the setting"),
|
|
43
43
|
required: zod_1.z
|
|
44
44
|
.boolean()
|
|
45
45
|
.optional()
|
|
@@ -48,7 +48,7 @@ exports.QuestionTypeSetting = zod_1.z
|
|
|
48
48
|
.array(exports.QuestionTypeSettingOption)
|
|
49
49
|
.optional()
|
|
50
50
|
.describe("Available options for enum type settings"),
|
|
51
|
-
placeholder: translatable_1.Translatable.
|
|
51
|
+
placeholder: translatable_1.Translatable.nullish().describe("Placeholder text for the setting"),
|
|
52
52
|
step: zod_1.z.number().optional().describe("Step value for number type settings"),
|
|
53
53
|
min: zod_1.z
|
|
54
54
|
.number()
|
|
@@ -55,13 +55,13 @@ export declare const QuestionTypeSchema: z.ZodObject<{
|
|
|
55
55
|
}>;
|
|
56
56
|
index: z.ZodOptional<z.ZodNumber>;
|
|
57
57
|
hidden: z.ZodOptional<z.ZodBoolean>;
|
|
58
|
-
default: z.ZodOptional<z.ZodAny
|
|
58
|
+
default: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
|
|
59
59
|
required: z.ZodOptional<z.ZodBoolean>;
|
|
60
60
|
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
61
61
|
value: z.ZodString;
|
|
62
62
|
label: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>;
|
|
63
63
|
}, z.core.$strict>>>;
|
|
64
|
-
placeholder: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]
|
|
64
|
+
placeholder: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>>>;
|
|
65
65
|
step: z.ZodOptional<z.ZodNumber>;
|
|
66
66
|
min: z.ZodOptional<z.ZodNumber>;
|
|
67
67
|
max: z.ZodOptional<z.ZodNumber>;
|
|
@@ -98,8 +98,9 @@ export declare const QuestionTypeSchema: z.ZodObject<{
|
|
|
98
98
|
}, z.core.$strip>;
|
|
99
99
|
}, z.core.$strip>>;
|
|
100
100
|
}, z.core.$strip>>;
|
|
101
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>>;
|
|
101
102
|
stylesheet: z.ZodOptional<z.ZodURL>;
|
|
102
103
|
index: z.ZodOptional<z.ZodNumber>;
|
|
103
|
-
|
|
104
|
+
isDefault: z.ZodOptional<z.ZodBoolean>;
|
|
104
105
|
}, z.core.$strict>;
|
|
105
106
|
export type QuestionType = z.infer<typeof QuestionTypeSchema>;
|
|
@@ -80,12 +80,13 @@ exports.QuestionTypeSchema = zod_1.z
|
|
|
80
80
|
})
|
|
81
81
|
.optional()
|
|
82
82
|
.describe("Export configuration for various formats"),
|
|
83
|
-
stylesheet: zod_1.z.url().optional(),
|
|
84
|
-
index: zod_1.z.number().optional(),
|
|
85
83
|
metadata: zod_1.z
|
|
86
84
|
.record(zod_1.z.string(), scalar_1.ScalarSchema)
|
|
87
85
|
.optional()
|
|
88
86
|
.describe("Optional metadata for the question type, only used by external applications"),
|
|
87
|
+
stylesheet: zod_1.z.url().optional(),
|
|
88
|
+
index: zod_1.z.number().optional(),
|
|
89
|
+
isDefault: zod_1.z.boolean().optional(),
|
|
89
90
|
})
|
|
90
91
|
.strict()
|
|
91
92
|
.describe("Schema for defining question types in the Examplary system");
|
|
@@ -354,7 +354,13 @@
|
|
|
354
354
|
"type": "boolean"
|
|
355
355
|
},
|
|
356
356
|
"default": {
|
|
357
|
-
"description": "Default value for the setting"
|
|
357
|
+
"description": "Default value for the setting",
|
|
358
|
+
"anyOf": [
|
|
359
|
+
{},
|
|
360
|
+
{
|
|
361
|
+
"type": "null"
|
|
362
|
+
}
|
|
363
|
+
]
|
|
358
364
|
},
|
|
359
365
|
"required": {
|
|
360
366
|
"description": "Whether this setting is required",
|
|
@@ -403,19 +409,26 @@
|
|
|
403
409
|
"description": "Placeholder text for the setting",
|
|
404
410
|
"anyOf": [
|
|
405
411
|
{
|
|
406
|
-
"
|
|
407
|
-
|
|
412
|
+
"anyOf": [
|
|
413
|
+
{
|
|
414
|
+
"type": "string",
|
|
415
|
+
"description": "Simple string value"
|
|
416
|
+
},
|
|
417
|
+
{
|
|
418
|
+
"type": "object",
|
|
419
|
+
"propertyNames": {
|
|
420
|
+
"type": "string",
|
|
421
|
+
"pattern": "^[a-z]{2}(-[A-Z]{2})?$"
|
|
422
|
+
},
|
|
423
|
+
"additionalProperties": {
|
|
424
|
+
"type": "string"
|
|
425
|
+
},
|
|
426
|
+
"description": "Translation object with language codes as keys"
|
|
427
|
+
}
|
|
428
|
+
]
|
|
408
429
|
},
|
|
409
430
|
{
|
|
410
|
-
"type": "
|
|
411
|
-
"propertyNames": {
|
|
412
|
-
"type": "string",
|
|
413
|
-
"pattern": "^[a-z]{2}(-[A-Z]{2})?$"
|
|
414
|
-
},
|
|
415
|
-
"additionalProperties": {
|
|
416
|
-
"type": "string"
|
|
417
|
-
},
|
|
418
|
-
"description": "Translation object with language codes as keys"
|
|
431
|
+
"type": "null"
|
|
419
432
|
}
|
|
420
433
|
]
|
|
421
434
|
},
|
|
@@ -553,13 +566,6 @@
|
|
|
553
566
|
},
|
|
554
567
|
"additionalProperties": false
|
|
555
568
|
},
|
|
556
|
-
"stylesheet": {
|
|
557
|
-
"type": "string",
|
|
558
|
-
"format": "uri"
|
|
559
|
-
},
|
|
560
|
-
"index": {
|
|
561
|
-
"type": "number"
|
|
562
|
-
},
|
|
563
569
|
"metadata": {
|
|
564
570
|
"description": "Optional metadata for the question type, only used by external applications",
|
|
565
571
|
"type": "object",
|
|
@@ -582,6 +588,16 @@
|
|
|
582
588
|
}
|
|
583
589
|
]
|
|
584
590
|
}
|
|
591
|
+
},
|
|
592
|
+
"stylesheet": {
|
|
593
|
+
"type": "string",
|
|
594
|
+
"format": "uri"
|
|
595
|
+
},
|
|
596
|
+
"index": {
|
|
597
|
+
"type": "number"
|
|
598
|
+
},
|
|
599
|
+
"isDefault": {
|
|
600
|
+
"type": "boolean"
|
|
585
601
|
}
|
|
586
602
|
},
|
|
587
603
|
"required": [
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@examplary/schemas",
|
|
3
3
|
"packageManager": "yarn@4.8.1",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.11.1",
|
|
5
5
|
"description": "Schemas for the Examplary platform.",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"build:schema": "tsx ./scripts/build.ts",
|
|
8
8
|
"build:tsc": "tsc ./src/index.ts --outDir dist --skipLibCheck --declaration",
|
|
9
|
-
"
|
|
9
|
+
"dev": "yarn build:tsc --watch",
|
|
10
10
|
"build": "yarn build:tsc && yarn build:schema",
|
|
11
11
|
"deploy": "bash -c 'serverless deploy --verbose --stage ${STAGE/staging/production}'",
|
|
12
12
|
"release": "semantic-release -e semantic-release-monorepo"
|