@examplary/schemas 0.0.1 → 1.3.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.
- package/.serverless/cloudformation-template-update-stack.json +178 -0
- package/.serverless/meta.json +273 -0
- package/.serverless/serverless-state.json +404 -0
- package/.turbo/turbo-build.log +1 -0
- package/.turbo/turbo-deploy.log +43 -0
- package/.turbo/turbo-release.log +69 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +17 -0
- package/dist/question-type.d.ts +100 -0
- package/dist/question-type.js +149 -0
- package/dist/schemas/question-type.json +387 -0
- package/package.json +2 -2
- package/src/question-type.ts +1 -0
- package/src/question-type.zod.ts +0 -0
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.QuestionTypeSchema = void 0;
|
|
4
|
+
var zod_1 = require("zod");
|
|
5
|
+
// Translatable type - can be a simple string or translation object
|
|
6
|
+
var Translatable = zod_1.z.union([
|
|
7
|
+
zod_1.z.string().describe("Simple string value"),
|
|
8
|
+
zod_1.z
|
|
9
|
+
.record(zod_1.z.string().regex(/^[a-z]{2}(-[A-Z]{2})?$/, "Language code format"), zod_1.z.string())
|
|
10
|
+
.refine(function (obj) { return Object.keys(obj).length >= 1; }, "Translation object must have at least one property")
|
|
11
|
+
.describe("Translation object with language codes as keys"),
|
|
12
|
+
]);
|
|
13
|
+
// Path or URL reference type
|
|
14
|
+
var PathOrUrlReference = zod_1.z
|
|
15
|
+
.string()
|
|
16
|
+
.regex(/^(https?:\/\/|\.)([a-zA-Z0-9._~:/?#@!$&'()*+,;=%-]+)$/, "Valid path or URL format");
|
|
17
|
+
// Component reference type
|
|
18
|
+
var ComponentReference = PathOrUrlReference.describe("Reference to a component, typically a file path or URL");
|
|
19
|
+
// Setting option for enum type settings
|
|
20
|
+
var SettingOption = zod_1.z
|
|
21
|
+
.object({
|
|
22
|
+
value: zod_1.z.string().describe("Option value"),
|
|
23
|
+
label: Translatable.describe("Option label"),
|
|
24
|
+
})
|
|
25
|
+
.strict()
|
|
26
|
+
.describe("Setting option");
|
|
27
|
+
// Setting configuration
|
|
28
|
+
var Setting = zod_1.z
|
|
29
|
+
.object({
|
|
30
|
+
id: zod_1.z.string().describe("Unique identifier for the setting"),
|
|
31
|
+
name: Translatable.describe("Display name for the setting"),
|
|
32
|
+
type: zod_1.z
|
|
33
|
+
.enum([
|
|
34
|
+
"enum",
|
|
35
|
+
"string",
|
|
36
|
+
"number",
|
|
37
|
+
"boolean",
|
|
38
|
+
"custom",
|
|
39
|
+
"scoring-criteria",
|
|
40
|
+
"question-type",
|
|
41
|
+
])
|
|
42
|
+
.describe("Type of the setting"),
|
|
43
|
+
default: zod_1.z.any().optional().describe("Default value for the setting"),
|
|
44
|
+
required: zod_1.z
|
|
45
|
+
.boolean()
|
|
46
|
+
.optional()
|
|
47
|
+
.describe("Whether this setting is required"),
|
|
48
|
+
options: zod_1.z
|
|
49
|
+
.array(SettingOption)
|
|
50
|
+
.optional()
|
|
51
|
+
.describe("Available options for enum type settings"),
|
|
52
|
+
placeholder: Translatable.optional().describe("Placeholder text for the setting"),
|
|
53
|
+
step: zod_1.z.number().optional().describe("Step value for number type settings"),
|
|
54
|
+
min: zod_1.z
|
|
55
|
+
.number()
|
|
56
|
+
.optional()
|
|
57
|
+
.describe("Minimum value for number type settings"),
|
|
58
|
+
max: zod_1.z
|
|
59
|
+
.number()
|
|
60
|
+
.optional()
|
|
61
|
+
.describe("Maximum value for number type settings"),
|
|
62
|
+
})
|
|
63
|
+
.strict()
|
|
64
|
+
.describe("Setting configuration");
|
|
65
|
+
// Components configuration
|
|
66
|
+
var Components = zod_1.z
|
|
67
|
+
.object({
|
|
68
|
+
assessment: ComponentReference.optional().describe("Path to the assessment component (question content)"),
|
|
69
|
+
print: ComponentReference.optional().describe("Path to the print component (for printing the question)"),
|
|
70
|
+
"settings-area": ComponentReference.optional().describe("Path to the settings area component (for configuring question settings)"),
|
|
71
|
+
results: ComponentReference.optional().describe("Path to the results component (for displaying answers)"),
|
|
72
|
+
})
|
|
73
|
+
.strict()
|
|
74
|
+
.describe("Paths to the components used by this question type");
|
|
75
|
+
// Main question type schema
|
|
76
|
+
exports.QuestionTypeSchema = zod_1.z
|
|
77
|
+
.object({
|
|
78
|
+
$schema: zod_1.z.string().optional(),
|
|
79
|
+
id: zod_1.z
|
|
80
|
+
.string()
|
|
81
|
+
.regex(/^([a-z][a-z0-9-]*)(\.[a-z][a-z0-9-]*)+$/, "Valid question type ID format")
|
|
82
|
+
.describe("Unique identifier for the question type (e.g. 'my-org.color-picker')"),
|
|
83
|
+
name: Translatable.describe("Display name for the question type, can be a simple string or translation object"),
|
|
84
|
+
description: Translatable.describe("Description of the question type, can be a simple string or translation object"),
|
|
85
|
+
icon: PathOrUrlReference.optional().describe("Path to the icon for this question type"),
|
|
86
|
+
shortcut: zod_1.z
|
|
87
|
+
.string()
|
|
88
|
+
.max(1)
|
|
89
|
+
.optional()
|
|
90
|
+
.describe("Keyboard shortcut for quick access to this question type"),
|
|
91
|
+
canAutoGenerate: zod_1.z
|
|
92
|
+
.boolean()
|
|
93
|
+
.optional()
|
|
94
|
+
.describe("Whether this question type can be automatically generated"),
|
|
95
|
+
timeEstimateMinutes: zod_1.z
|
|
96
|
+
.number()
|
|
97
|
+
.min(1)
|
|
98
|
+
.optional()
|
|
99
|
+
.describe("Estimated time in minutes to complete this question type"),
|
|
100
|
+
isAi: zod_1.z
|
|
101
|
+
.boolean()
|
|
102
|
+
.optional()
|
|
103
|
+
.describe("Whether this question type uses AI functionality"),
|
|
104
|
+
backgroundColor: zod_1.z
|
|
105
|
+
.string()
|
|
106
|
+
.optional()
|
|
107
|
+
.describe("Background color for the question type"),
|
|
108
|
+
iconBackgroundColor: zod_1.z
|
|
109
|
+
.string()
|
|
110
|
+
.optional()
|
|
111
|
+
.describe("Background color for the question type icon"),
|
|
112
|
+
enforcePosition: zod_1.z
|
|
113
|
+
.enum(["start", "end"])
|
|
114
|
+
.optional()
|
|
115
|
+
.describe("Position enforcement for this question type"),
|
|
116
|
+
enforceTitle: Translatable.optional().describe("Enforced title for this question type"),
|
|
117
|
+
hideSettings: zod_1.z
|
|
118
|
+
.boolean()
|
|
119
|
+
.optional()
|
|
120
|
+
.describe("Whether to hide settings for this question type"),
|
|
121
|
+
isPreviewRefreshable: zod_1.z
|
|
122
|
+
.boolean()
|
|
123
|
+
.optional()
|
|
124
|
+
.describe("Whether the preview can be refreshed for this question type"),
|
|
125
|
+
hasSimpleScoring: zod_1.z
|
|
126
|
+
.boolean()
|
|
127
|
+
.optional()
|
|
128
|
+
.describe("Whether this question type has simple scoring"),
|
|
129
|
+
titlePlaceholder: Translatable.optional().describe("Placeholder text for the title field"),
|
|
130
|
+
descriptionPlaceholder: Translatable.optional().describe("Placeholder text for the description field"),
|
|
131
|
+
untitledPlaceholder: Translatable.optional().describe("Placeholder text for untitled questions"),
|
|
132
|
+
components: Components.optional().describe("Paths to the components used by this question type"),
|
|
133
|
+
settings: zod_1.z
|
|
134
|
+
.array(Setting)
|
|
135
|
+
.optional()
|
|
136
|
+
.describe("Configuration settings for the question type"),
|
|
137
|
+
public: zod_1.z
|
|
138
|
+
.boolean()
|
|
139
|
+
.optional()
|
|
140
|
+
.describe("Whether this question type is public and can be used by all users"),
|
|
141
|
+
translations: zod_1.z
|
|
142
|
+
.record(zod_1.z.string(), Translatable)
|
|
143
|
+
.optional()
|
|
144
|
+
.describe("Custom translations for this question type"),
|
|
145
|
+
stylesheet: zod_1.z.url().optional(),
|
|
146
|
+
index: zod_1.z.number().optional(),
|
|
147
|
+
})
|
|
148
|
+
.strict()
|
|
149
|
+
.describe("Schema for defining question types in the Examplary system");
|
|
@@ -0,0 +1,387 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"description": "Schema for defining question types in the Examplary system",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"properties": {
|
|
6
|
+
"$schema": {
|
|
7
|
+
"type": "string"
|
|
8
|
+
},
|
|
9
|
+
"id": {
|
|
10
|
+
"description": "Unique identifier for the question type (e.g. 'my-org.color-picker')",
|
|
11
|
+
"type": "string",
|
|
12
|
+
"pattern": "^([a-z][a-z0-9-]*)(\\.[a-z][a-z0-9-]*)+$"
|
|
13
|
+
},
|
|
14
|
+
"name": {
|
|
15
|
+
"description": "Display name for the question type, can be a simple string or translation object",
|
|
16
|
+
"anyOf": [
|
|
17
|
+
{
|
|
18
|
+
"description": "Simple string value",
|
|
19
|
+
"type": "string"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"description": "Translation object with language codes as keys",
|
|
23
|
+
"type": "object",
|
|
24
|
+
"propertyNames": {
|
|
25
|
+
"type": "string",
|
|
26
|
+
"pattern": "^[a-z]{2}(-[A-Z]{2})?$"
|
|
27
|
+
},
|
|
28
|
+
"additionalProperties": {
|
|
29
|
+
"type": "string"
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
]
|
|
33
|
+
},
|
|
34
|
+
"description": {
|
|
35
|
+
"description": "Description of the question type, can be a simple string or translation object",
|
|
36
|
+
"anyOf": [
|
|
37
|
+
{
|
|
38
|
+
"description": "Simple string value",
|
|
39
|
+
"type": "string"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"description": "Translation object with language codes as keys",
|
|
43
|
+
"type": "object",
|
|
44
|
+
"propertyNames": {
|
|
45
|
+
"type": "string",
|
|
46
|
+
"pattern": "^[a-z]{2}(-[A-Z]{2})?$"
|
|
47
|
+
},
|
|
48
|
+
"additionalProperties": {
|
|
49
|
+
"type": "string"
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
]
|
|
53
|
+
},
|
|
54
|
+
"icon": {
|
|
55
|
+
"description": "Path to the icon for this question type",
|
|
56
|
+
"type": "string",
|
|
57
|
+
"pattern": "^(https?:\\/\\/|\\.)([a-zA-Z0-9._~:/?#@!$&'()*+,;=%-]+)$"
|
|
58
|
+
},
|
|
59
|
+
"shortcut": {
|
|
60
|
+
"description": "Keyboard shortcut for quick access to this question type",
|
|
61
|
+
"type": "string",
|
|
62
|
+
"maxLength": 1
|
|
63
|
+
},
|
|
64
|
+
"canAutoGenerate": {
|
|
65
|
+
"description": "Whether this question type can be automatically generated",
|
|
66
|
+
"type": "boolean"
|
|
67
|
+
},
|
|
68
|
+
"timeEstimateMinutes": {
|
|
69
|
+
"description": "Estimated time in minutes to complete this question type",
|
|
70
|
+
"type": "number",
|
|
71
|
+
"minimum": 1
|
|
72
|
+
},
|
|
73
|
+
"isAi": {
|
|
74
|
+
"description": "Whether this question type uses AI functionality",
|
|
75
|
+
"type": "boolean"
|
|
76
|
+
},
|
|
77
|
+
"backgroundColor": {
|
|
78
|
+
"description": "Background color for the question type",
|
|
79
|
+
"type": "string"
|
|
80
|
+
},
|
|
81
|
+
"iconBackgroundColor": {
|
|
82
|
+
"description": "Background color for the question type icon",
|
|
83
|
+
"type": "string"
|
|
84
|
+
},
|
|
85
|
+
"enforcePosition": {
|
|
86
|
+
"description": "Position enforcement for this question type",
|
|
87
|
+
"type": "string",
|
|
88
|
+
"enum": [
|
|
89
|
+
"start",
|
|
90
|
+
"end"
|
|
91
|
+
]
|
|
92
|
+
},
|
|
93
|
+
"enforceTitle": {
|
|
94
|
+
"description": "Enforced title for this question type",
|
|
95
|
+
"anyOf": [
|
|
96
|
+
{
|
|
97
|
+
"description": "Simple string value",
|
|
98
|
+
"type": "string"
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"description": "Translation object with language codes as keys",
|
|
102
|
+
"type": "object",
|
|
103
|
+
"propertyNames": {
|
|
104
|
+
"type": "string",
|
|
105
|
+
"pattern": "^[a-z]{2}(-[A-Z]{2})?$"
|
|
106
|
+
},
|
|
107
|
+
"additionalProperties": {
|
|
108
|
+
"type": "string"
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
]
|
|
112
|
+
},
|
|
113
|
+
"hideSettings": {
|
|
114
|
+
"description": "Whether to hide settings for this question type",
|
|
115
|
+
"type": "boolean"
|
|
116
|
+
},
|
|
117
|
+
"isPreviewRefreshable": {
|
|
118
|
+
"description": "Whether the preview can be refreshed for this question type",
|
|
119
|
+
"type": "boolean"
|
|
120
|
+
},
|
|
121
|
+
"hasSimpleScoring": {
|
|
122
|
+
"description": "Whether this question type has simple scoring",
|
|
123
|
+
"type": "boolean"
|
|
124
|
+
},
|
|
125
|
+
"titlePlaceholder": {
|
|
126
|
+
"description": "Placeholder text for the title field",
|
|
127
|
+
"anyOf": [
|
|
128
|
+
{
|
|
129
|
+
"description": "Simple string value",
|
|
130
|
+
"type": "string"
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
"description": "Translation object with language codes as keys",
|
|
134
|
+
"type": "object",
|
|
135
|
+
"propertyNames": {
|
|
136
|
+
"type": "string",
|
|
137
|
+
"pattern": "^[a-z]{2}(-[A-Z]{2})?$"
|
|
138
|
+
},
|
|
139
|
+
"additionalProperties": {
|
|
140
|
+
"type": "string"
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
]
|
|
144
|
+
},
|
|
145
|
+
"descriptionPlaceholder": {
|
|
146
|
+
"description": "Placeholder text for the description field",
|
|
147
|
+
"anyOf": [
|
|
148
|
+
{
|
|
149
|
+
"description": "Simple string value",
|
|
150
|
+
"type": "string"
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
"description": "Translation object with language codes as keys",
|
|
154
|
+
"type": "object",
|
|
155
|
+
"propertyNames": {
|
|
156
|
+
"type": "string",
|
|
157
|
+
"pattern": "^[a-z]{2}(-[A-Z]{2})?$"
|
|
158
|
+
},
|
|
159
|
+
"additionalProperties": {
|
|
160
|
+
"type": "string"
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
]
|
|
164
|
+
},
|
|
165
|
+
"untitledPlaceholder": {
|
|
166
|
+
"description": "Placeholder text for untitled questions",
|
|
167
|
+
"anyOf": [
|
|
168
|
+
{
|
|
169
|
+
"description": "Simple string value",
|
|
170
|
+
"type": "string"
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
"description": "Translation object with language codes as keys",
|
|
174
|
+
"type": "object",
|
|
175
|
+
"propertyNames": {
|
|
176
|
+
"type": "string",
|
|
177
|
+
"pattern": "^[a-z]{2}(-[A-Z]{2})?$"
|
|
178
|
+
},
|
|
179
|
+
"additionalProperties": {
|
|
180
|
+
"type": "string"
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
]
|
|
184
|
+
},
|
|
185
|
+
"components": {
|
|
186
|
+
"description": "Paths to the components used by this question type",
|
|
187
|
+
"type": "object",
|
|
188
|
+
"properties": {
|
|
189
|
+
"assessment": {
|
|
190
|
+
"description": "Path to the assessment component (question content)",
|
|
191
|
+
"type": "string",
|
|
192
|
+
"pattern": "^(https?:\\/\\/|\\.)([a-zA-Z0-9._~:/?#@!$&'()*+,;=%-]+)$"
|
|
193
|
+
},
|
|
194
|
+
"print": {
|
|
195
|
+
"description": "Path to the print component (for printing the question)",
|
|
196
|
+
"type": "string",
|
|
197
|
+
"pattern": "^(https?:\\/\\/|\\.)([a-zA-Z0-9._~:/?#@!$&'()*+,;=%-]+)$"
|
|
198
|
+
},
|
|
199
|
+
"settings-area": {
|
|
200
|
+
"description": "Path to the settings area component (for configuring question settings)",
|
|
201
|
+
"type": "string",
|
|
202
|
+
"pattern": "^(https?:\\/\\/|\\.)([a-zA-Z0-9._~:/?#@!$&'()*+,;=%-]+)$"
|
|
203
|
+
},
|
|
204
|
+
"results": {
|
|
205
|
+
"description": "Path to the results component (for displaying answers)",
|
|
206
|
+
"type": "string",
|
|
207
|
+
"pattern": "^(https?:\\/\\/|\\.)([a-zA-Z0-9._~:/?#@!$&'()*+,;=%-]+)$"
|
|
208
|
+
}
|
|
209
|
+
},
|
|
210
|
+
"additionalProperties": false
|
|
211
|
+
},
|
|
212
|
+
"settings": {
|
|
213
|
+
"description": "Configuration settings for the question type",
|
|
214
|
+
"type": "array",
|
|
215
|
+
"items": {
|
|
216
|
+
"description": "Setting configuration",
|
|
217
|
+
"type": "object",
|
|
218
|
+
"properties": {
|
|
219
|
+
"id": {
|
|
220
|
+
"description": "Unique identifier for the setting",
|
|
221
|
+
"type": "string"
|
|
222
|
+
},
|
|
223
|
+
"name": {
|
|
224
|
+
"description": "Display name for the setting",
|
|
225
|
+
"anyOf": [
|
|
226
|
+
{
|
|
227
|
+
"description": "Simple string value",
|
|
228
|
+
"type": "string"
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
"description": "Translation object with language codes as keys",
|
|
232
|
+
"type": "object",
|
|
233
|
+
"propertyNames": {
|
|
234
|
+
"type": "string",
|
|
235
|
+
"pattern": "^[a-z]{2}(-[A-Z]{2})?$"
|
|
236
|
+
},
|
|
237
|
+
"additionalProperties": {
|
|
238
|
+
"type": "string"
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
]
|
|
242
|
+
},
|
|
243
|
+
"type": {
|
|
244
|
+
"description": "Type of the setting",
|
|
245
|
+
"type": "string",
|
|
246
|
+
"enum": [
|
|
247
|
+
"enum",
|
|
248
|
+
"string",
|
|
249
|
+
"number",
|
|
250
|
+
"boolean",
|
|
251
|
+
"custom",
|
|
252
|
+
"scoring-criteria",
|
|
253
|
+
"question-type"
|
|
254
|
+
]
|
|
255
|
+
},
|
|
256
|
+
"default": {
|
|
257
|
+
"description": "Default value for the setting"
|
|
258
|
+
},
|
|
259
|
+
"required": {
|
|
260
|
+
"description": "Whether this setting is required",
|
|
261
|
+
"type": "boolean"
|
|
262
|
+
},
|
|
263
|
+
"options": {
|
|
264
|
+
"description": "Available options for enum type settings",
|
|
265
|
+
"type": "array",
|
|
266
|
+
"items": {
|
|
267
|
+
"description": "Setting option",
|
|
268
|
+
"type": "object",
|
|
269
|
+
"properties": {
|
|
270
|
+
"value": {
|
|
271
|
+
"description": "Option value",
|
|
272
|
+
"type": "string"
|
|
273
|
+
},
|
|
274
|
+
"label": {
|
|
275
|
+
"description": "Option label",
|
|
276
|
+
"anyOf": [
|
|
277
|
+
{
|
|
278
|
+
"description": "Simple string value",
|
|
279
|
+
"type": "string"
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
"description": "Translation object with language codes as keys",
|
|
283
|
+
"type": "object",
|
|
284
|
+
"propertyNames": {
|
|
285
|
+
"type": "string",
|
|
286
|
+
"pattern": "^[a-z]{2}(-[A-Z]{2})?$"
|
|
287
|
+
},
|
|
288
|
+
"additionalProperties": {
|
|
289
|
+
"type": "string"
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
]
|
|
293
|
+
}
|
|
294
|
+
},
|
|
295
|
+
"required": [
|
|
296
|
+
"value",
|
|
297
|
+
"label"
|
|
298
|
+
],
|
|
299
|
+
"additionalProperties": false
|
|
300
|
+
}
|
|
301
|
+
},
|
|
302
|
+
"placeholder": {
|
|
303
|
+
"description": "Placeholder text for the setting",
|
|
304
|
+
"anyOf": [
|
|
305
|
+
{
|
|
306
|
+
"description": "Simple string value",
|
|
307
|
+
"type": "string"
|
|
308
|
+
},
|
|
309
|
+
{
|
|
310
|
+
"description": "Translation object with language codes as keys",
|
|
311
|
+
"type": "object",
|
|
312
|
+
"propertyNames": {
|
|
313
|
+
"type": "string",
|
|
314
|
+
"pattern": "^[a-z]{2}(-[A-Z]{2})?$"
|
|
315
|
+
},
|
|
316
|
+
"additionalProperties": {
|
|
317
|
+
"type": "string"
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
]
|
|
321
|
+
},
|
|
322
|
+
"step": {
|
|
323
|
+
"description": "Step value for number type settings",
|
|
324
|
+
"type": "number"
|
|
325
|
+
},
|
|
326
|
+
"min": {
|
|
327
|
+
"description": "Minimum value for number type settings",
|
|
328
|
+
"type": "number"
|
|
329
|
+
},
|
|
330
|
+
"max": {
|
|
331
|
+
"description": "Maximum value for number type settings",
|
|
332
|
+
"type": "number"
|
|
333
|
+
}
|
|
334
|
+
},
|
|
335
|
+
"required": [
|
|
336
|
+
"id",
|
|
337
|
+
"name",
|
|
338
|
+
"type"
|
|
339
|
+
],
|
|
340
|
+
"additionalProperties": false
|
|
341
|
+
}
|
|
342
|
+
},
|
|
343
|
+
"public": {
|
|
344
|
+
"description": "Whether this question type is public and can be used by all users",
|
|
345
|
+
"type": "boolean"
|
|
346
|
+
},
|
|
347
|
+
"translations": {
|
|
348
|
+
"description": "Custom translations for this question type",
|
|
349
|
+
"type": "object",
|
|
350
|
+
"propertyNames": {
|
|
351
|
+
"type": "string"
|
|
352
|
+
},
|
|
353
|
+
"additionalProperties": {
|
|
354
|
+
"anyOf": [
|
|
355
|
+
{
|
|
356
|
+
"description": "Simple string value",
|
|
357
|
+
"type": "string"
|
|
358
|
+
},
|
|
359
|
+
{
|
|
360
|
+
"description": "Translation object with language codes as keys",
|
|
361
|
+
"type": "object",
|
|
362
|
+
"propertyNames": {
|
|
363
|
+
"type": "string",
|
|
364
|
+
"pattern": "^[a-z]{2}(-[A-Z]{2})?$"
|
|
365
|
+
},
|
|
366
|
+
"additionalProperties": {
|
|
367
|
+
"type": "string"
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
]
|
|
371
|
+
}
|
|
372
|
+
},
|
|
373
|
+
"stylesheet": {
|
|
374
|
+
"type": "string",
|
|
375
|
+
"format": "uri"
|
|
376
|
+
},
|
|
377
|
+
"index": {
|
|
378
|
+
"type": "number"
|
|
379
|
+
}
|
|
380
|
+
},
|
|
381
|
+
"required": [
|
|
382
|
+
"id",
|
|
383
|
+
"name",
|
|
384
|
+
"description"
|
|
385
|
+
],
|
|
386
|
+
"additionalProperties": false
|
|
387
|
+
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@examplary/schemas",
|
|
3
3
|
"packageManager": "yarn@4.8.1",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "1.3.0",
|
|
5
5
|
"description": "Schemas for the Examplary platform.",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"build:schema": "tsx ./scripts/build.ts",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"zod": "^4.0.10"
|
|
24
24
|
},
|
|
25
|
-
"homepage": "https://developers.examplary.ai",
|
|
25
|
+
"homepage": "https://developers.examplary.ai/",
|
|
26
26
|
"author": {
|
|
27
27
|
"name": "Examplary AI",
|
|
28
28
|
"email": "hi@examplary.ai"
|
package/src/question-type.ts
CHANGED
package/src/question-type.zod.ts
DELETED
|
File without changes
|