@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.
- package/dist/common/scalar.d.ts +3 -0
- package/dist/common/scalar.js +10 -0
- package/dist/index.d.ts +6 -8
- package/dist/index.js +5 -5
- package/dist/question/index.d.ts +4 -0
- package/dist/question/index.js +18 -0
- package/dist/question/legacy-question-scoring-criteria.d.ts +9 -0
- package/dist/question/legacy-question-scoring-criteria.js +10 -0
- package/dist/question/question-scoring.d.ts +55 -0
- package/dist/question/question-scoring.js +29 -0
- package/dist/question/question.d.ts +42 -0
- package/dist/question/question.js +26 -0
- package/{src/index.ts → dist/question-type/index.d.ts} +0 -5
- package/dist/question-type/index.js +20 -0
- package/dist/question-type/question-type-qti3.d.ts +60 -0
- package/dist/question-type/question-type-qti3.js +48 -0
- package/dist/{question-type-setting.js → question-type/question-type-setting.js} +1 -1
- package/dist/{question-type.d.ts → question-type/question-type.d.ts} +31 -0
- package/dist/{question-type.js → question-type/question-type.js} +13 -1
- package/dist/schemas/question-scoring.json +197 -0
- package/dist/schemas/question-type.json +179 -74
- package/dist/schemas/question.json +364 -0
- package/package.json +7 -1
- package/.env +0 -1
- package/.serverless/cloudformation-template-update-stack.json +0 -175
- package/.serverless/meta.json +0 -274
- package/.serverless/serverless-state.json +0 -402
- package/.turbo/turbo-build.log +0 -1
- package/.turbo/turbo-deploy.log +0 -43
- package/.turbo/turbo-release.log +0 -114
- package/scripts/build.ts +0 -16
- package/serverless.yml +0 -25
- package/src/question-type-components.ts +0 -36
- package/src/question-type-generation-options.ts +0 -21
- package/src/question-type-grading-options.ts +0 -21
- package/src/question-type-setting.ts +0 -70
- package/src/question-type.ts +0 -104
- package/src/translatable.ts +0 -17
- /package/dist/{translatable.d.ts → common/translatable.d.ts} +0 -0
- /package/dist/{translatable.js → common/translatable.js} +0 -0
- /package/dist/{question-type-components.d.ts → question-type/question-type-components.d.ts} +0 -0
- /package/dist/{question-type-components.js → question-type/question-type-components.js} +0 -0
- /package/dist/{question-type-generation-options.d.ts → question-type/question-type-generation-options.d.ts} +0 -0
- /package/dist/{question-type-generation-options.js → question-type/question-type-generation-options.js} +0 -0
- /package/dist/{question-type-grading-options.d.ts → question-type/question-type-grading-options.d.ts} +0 -0
- /package/dist/{question-type-grading-options.js → question-type/question-type-grading-options.js} +0 -0
- /package/dist/{question-type-setting.d.ts → question-type/question-type-setting.d.ts} +0 -0
package/.turbo/turbo-deploy.log
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
|
|
4
|
-
✔ Installed Serverless Framework v4.19.1
|
|
5
|
-
|
|
6
|
-
Initializing
|
|
7
|
-
Initializing
|
|
8
|
-
Authenticating
|
|
9
|
-
Resolving variables
|
|
10
|
-
Resolving variables
|
|
11
|
-
Deploying "schemas" to stage "production" (eu-central-1)
|
|
12
|
-
[WARNING] aws-cdk-lib.aws_cloudfront_origins.S3Origin is deprecated.
|
|
13
|
-
Use `S3BucketOrigin` or `S3StaticWebsiteOrigin` instead.
|
|
14
|
-
This API will be removed in the next major release.
|
|
15
|
-
[WARNING] aws-cdk-lib.aws_cloudfront_origins.S3Origin#bind is deprecated.
|
|
16
|
-
Use `S3BucketOrigin` or `S3StaticWebsiteOrigin` instead.
|
|
17
|
-
This API will be removed in the next major release.
|
|
18
|
-
Packaging
|
|
19
|
-
Packaging
|
|
20
|
-
Retrieving AWS CloudFormation stack
|
|
21
|
-
Uploading
|
|
22
|
-
Uploading (0/0)
|
|
23
|
-
Uploading CloudFormation file to S3
|
|
24
|
-
Uploading State file to S3
|
|
25
|
-
Updating AWS CloudFormation stack
|
|
26
|
-
Fetching Service Information
|
|
27
|
-
Updating
|
|
28
|
-
Uploading directory 'dist/schemas' to bucket 'schemas-production-schemasbucketbe9e7d9f-q1aisqmk2pik'
|
|
29
|
-
Uploading directory 'dist/schemas' to bucket 'schemas-production-schemasbucketbe9e7d9f-q1aisqmk2pik'
|
|
30
|
-
Skipped uploading 1 unchanged files
|
|
31
|
-
Removing old service artifacts from S3
|
|
32
|
-
✔ Service deployed to stack schemas-production (9s)
|
|
33
|
-
Stack Outputs:
|
|
34
|
-
schemasBucketName814EA6EC: schemas-production-schemasbucketbe9e7d9f-q1aisqmk2pik
|
|
35
|
-
schemasCloudFrontCName05CBFC31: djykovp21c0ec.cloudfront.net
|
|
36
|
-
schemasDistributionIdF843C7D9: E1Z7GHEM2TF0UN
|
|
37
|
-
schemasDomainC1437202: schemas.examplary.ai
|
|
38
|
-
ServerlessDeploymentBucketName: serverless-framework-deployments-eu-central-1-fe769196-9095
|
|
39
|
-
|
|
40
|
-
schemas:
|
|
41
|
-
url: https://schemas.examplary.ai
|
|
42
|
-
cname: djykovp21c0ec.cloudfront.net
|
|
43
|
-
|
|
44
|
-
Finalizing
|
package/.turbo/turbo-release.log
DELETED
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
[2:48:29 PM] [semantic-release] › ℹ Running semantic-release version 24.2.9
|
|
2
|
-
[2:48:30 PM] [semantic-release] › ✔ Loaded plugin "verifyConditions" from "@semantic-release/npm"
|
|
3
|
-
[2:48:30 PM] [semantic-release] › ✔ Loaded plugin "verifyConditions" from "@semantic-release/github"
|
|
4
|
-
[2:48:30 PM] [semantic-release] › ✔ Loaded plugin "prepare" from "@semantic-release/npm"
|
|
5
|
-
[2:48:30 PM] [semantic-release] › ✔ Loaded plugin "publish" from "@semantic-release/npm"
|
|
6
|
-
[2:48:30 PM] [semantic-release] › ✔ Loaded plugin "publish" from "@semantic-release/github"
|
|
7
|
-
[2:48:30 PM] [semantic-release] › ✔ Loaded plugin "addChannel" from "@semantic-release/npm"
|
|
8
|
-
[2:48:30 PM] [semantic-release] › ✔ Loaded plugin "addChannel" from "@semantic-release/github"
|
|
9
|
-
[2:48:41 PM] [semantic-release] › ✔ Run automated release from branch main on repository https://github.com/examplary-ai/examplary
|
|
10
|
-
[2:48:42 PM] [semantic-release] › ✔ Allowed to push to the Git repository
|
|
11
|
-
[2:48:42 PM] [semantic-release] › ℹ Start step "verifyConditions" of plugin "@semantic-release/npm"
|
|
12
|
-
[2:48:42 PM] [semantic-release] [@semantic-release/npm] › ℹ Verify authentication for registry https://registry.npmjs.org/
|
|
13
|
-
[2:48:42 PM] [semantic-release] [@semantic-release/npm] › ℹ Reading npm config from /home/runner/work/examplary/examplary/.npmrc
|
|
14
|
-
[2:48:42 PM] [semantic-release] [@semantic-release/npm] › ℹ Wrote NPM_TOKEN to /tmp/78df127ca37f312a93b35fa0637e1515/.npmrc
|
|
15
|
-
tschoffelen
|
|
16
|
-
[2:48:43 PM] [semantic-release] › ✔ Completed step "verifyConditions" of plugin "@semantic-release/npm"
|
|
17
|
-
[2:48:43 PM] [semantic-release] › ℹ Start step "verifyConditions" of plugin "@semantic-release/github"
|
|
18
|
-
[2:48:43 PM] [semantic-release] [@semantic-release/github] › ℹ Verify GitHub authentication (https://api.github.com)
|
|
19
|
-
[2:48:43 PM] [semantic-release] › ✔ Completed step "verifyConditions" of plugin "@semantic-release/github"
|
|
20
|
-
[2:48:43 PM] [semantic-release] › ℹ Found git tag @examplary/schemas-v1.5.0 associated with version 1.5.0 on branch main
|
|
21
|
-
[2:48:43 PM] [semantic-release] › ℹ Found 109 commits since last release
|
|
22
|
-
[2:48:43 PM] [semantic-release] › ℹ Start step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
|
|
23
|
-
[2:48:43 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ Start step "analyzeCommits" of plugin "@semantic-release/commit-analyzer"
|
|
24
|
-
[2:48:44 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ Found 3 commits for package @examplary/schemas since last release
|
|
25
|
-
[2:48:44 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ Analyzing commit: feat(dashboard): question setting help text
|
|
26
|
-
[2:48:44 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ The release type for the commit is minor
|
|
27
|
-
[2:48:44 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ Analyzing commit: chore(deps-dev): bump tsx from 4.20.5 to 4.20.6
|
|
28
|
-
|
|
29
|
-
Bumps [tsx](https://github.com/privatenumber/tsx) from 4.20.5 to 4.20.6.
|
|
30
|
-
- [Release notes](https://github.com/privatenumber/tsx/releases)
|
|
31
|
-
- [Changelog](https://github.com/privatenumber/tsx/blob/master/release.config.cjs)
|
|
32
|
-
- [Commits](https://github.com/privatenumber/tsx/compare/v4.20.5...v4.20.6)
|
|
33
|
-
|
|
34
|
-
---
|
|
35
|
-
updated-dependencies:
|
|
36
|
-
- dependency-name: tsx
|
|
37
|
-
dependency-version: 4.20.6
|
|
38
|
-
dependency-type: direct:development
|
|
39
|
-
update-type: version-update:semver-patch
|
|
40
|
-
...
|
|
41
|
-
|
|
42
|
-
Signed-off-by: dependabot[bot] <support@github.com>
|
|
43
|
-
[2:48:44 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ The commit should not trigger a release
|
|
44
|
-
[2:48:44 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ Analyzing commit: chore(schemas): remove deprecated keys
|
|
45
|
-
[2:48:44 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ The commit should not trigger a release
|
|
46
|
-
[2:48:44 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ Analysis of 3 commits complete: minor release
|
|
47
|
-
[2:48:44 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ Completed step "analyzeCommits" of plugin "@semantic-release/commit-analyzer"
|
|
48
|
-
[2:48:44 PM] [semantic-release] › ✔ Completed step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
|
|
49
|
-
[2:48:44 PM] [semantic-release] › ℹ Start step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
|
|
50
|
-
[2:48:45 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ Plugin "@semantic-release/release-notes-generator" does not provide step "analyzeCommits"
|
|
51
|
-
[2:48:45 PM] [semantic-release] › ✔ Completed step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
|
|
52
|
-
[2:48:45 PM] [semantic-release] › ℹ Start step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
|
|
53
|
-
[2:48:45 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ Plugin "@semantic-release/npm" does not provide step "analyzeCommits"
|
|
54
|
-
[2:48:45 PM] [semantic-release] › ✔ Completed step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
|
|
55
|
-
[2:48:45 PM] [semantic-release] › ℹ Start step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
|
|
56
|
-
[2:48:45 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ Plugin "@semantic-release/github" does not provide step "analyzeCommits"
|
|
57
|
-
[2:48:45 PM] [semantic-release] › ✔ Completed step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
|
|
58
|
-
[2:48:45 PM] [semantic-release] › ℹ Start step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
|
|
59
|
-
[2:48:45 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ No more plugins
|
|
60
|
-
[2:48:45 PM] [semantic-release] › ✔ Completed step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
|
|
61
|
-
[2:48:45 PM] [semantic-release] › ℹ Start step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
|
|
62
|
-
[2:48:45 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ No more plugins
|
|
63
|
-
[2:48:45 PM] [semantic-release] › ✔ Completed step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
|
|
64
|
-
[2:48:45 PM] [semantic-release] › ℹ Start step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
|
|
65
|
-
[2:48:45 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ No more plugins
|
|
66
|
-
[2:48:45 PM] [semantic-release] › ✔ Completed step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
|
|
67
|
-
[2:48:45 PM] [semantic-release] › ℹ Start step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
|
|
68
|
-
[2:48:45 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ No more plugins
|
|
69
|
-
[2:48:45 PM] [semantic-release] › ✔ Completed step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
|
|
70
|
-
[2:48:45 PM] [semantic-release] › ℹ Start step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
|
|
71
|
-
[2:48:45 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ No more plugins
|
|
72
|
-
[2:48:45 PM] [semantic-release] › ✔ Completed step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
|
|
73
|
-
[2:48:45 PM] [semantic-release] › ℹ Start step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
|
|
74
|
-
[2:48:45 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ No more plugins
|
|
75
|
-
[2:48:45 PM] [semantic-release] › ✔ Completed step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
|
|
76
|
-
[2:48:45 PM] [semantic-release] › ℹ The next release version is 1.6.0
|
|
77
|
-
[2:48:45 PM] [semantic-release] › ℹ Start step "generateNotes" of plugin "[Function: semantic-release-monorepo]"
|
|
78
|
-
[2:48:45 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ Plugin "@semantic-release/commit-analyzer" does not provide step "generateNotes"
|
|
79
|
-
[2:48:45 PM] [semantic-release] › ✔ Completed step "generateNotes" of plugin "[Function: semantic-release-monorepo]"
|
|
80
|
-
[2:48:45 PM] [semantic-release] › ℹ Start step "generateNotes" of plugin "[Function: semantic-release-monorepo]"
|
|
81
|
-
[2:48:45 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ Start step "generateNotes" of plugin "@semantic-release/release-notes-generator"
|
|
82
|
-
[2:48:45 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ Found 3 commits for package @examplary/schemas since last release
|
|
83
|
-
[2:48:45 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ Completed step "generateNotes" of plugin "@semantic-release/release-notes-generator"
|
|
84
|
-
[2:48:45 PM] [semantic-release] › ✔ Completed step "generateNotes" of plugin "[Function: semantic-release-monorepo]"
|
|
85
|
-
[2:48:45 PM] [semantic-release] › ℹ Start step "generateNotes" of plugin "[Function: semantic-release-monorepo]"
|
|
86
|
-
[2:48:45 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ Plugin "@semantic-release/npm" does not provide step "generateNotes"
|
|
87
|
-
[2:48:45 PM] [semantic-release] › ✔ Completed step "generateNotes" of plugin "[Function: semantic-release-monorepo]"
|
|
88
|
-
[2:48:45 PM] [semantic-release] › ℹ Start step "generateNotes" of plugin "[Function: semantic-release-monorepo]"
|
|
89
|
-
[2:48:45 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ Plugin "@semantic-release/github" does not provide step "generateNotes"
|
|
90
|
-
[2:48:45 PM] [semantic-release] › ✔ Completed step "generateNotes" of plugin "[Function: semantic-release-monorepo]"
|
|
91
|
-
[2:48:45 PM] [semantic-release] › ℹ Start step "generateNotes" of plugin "[Function: semantic-release-monorepo]"
|
|
92
|
-
[2:48:45 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ No more plugins
|
|
93
|
-
[2:48:45 PM] [semantic-release] › ✔ Completed step "generateNotes" of plugin "[Function: semantic-release-monorepo]"
|
|
94
|
-
[2:48:45 PM] [semantic-release] › ℹ Start step "generateNotes" of plugin "[Function: semantic-release-monorepo]"
|
|
95
|
-
[2:48:45 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ No more plugins
|
|
96
|
-
[2:48:45 PM] [semantic-release] › ✔ Completed step "generateNotes" of plugin "[Function: semantic-release-monorepo]"
|
|
97
|
-
[2:48:45 PM] [semantic-release] › ℹ Start step "generateNotes" of plugin "[Function: semantic-release-monorepo]"
|
|
98
|
-
[2:48:45 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ No more plugins
|
|
99
|
-
[2:48:45 PM] [semantic-release] › ✔ Completed step "generateNotes" of plugin "[Function: semantic-release-monorepo]"
|
|
100
|
-
[2:48:45 PM] [semantic-release] › ℹ Start step "generateNotes" of plugin "[Function: semantic-release-monorepo]"
|
|
101
|
-
[2:48:45 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ No more plugins
|
|
102
|
-
[2:48:45 PM] [semantic-release] › ✔ Completed step "generateNotes" of plugin "[Function: semantic-release-monorepo]"
|
|
103
|
-
[2:48:45 PM] [semantic-release] › ℹ Start step "generateNotes" of plugin "[Function: semantic-release-monorepo]"
|
|
104
|
-
[2:48:45 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ No more plugins
|
|
105
|
-
[2:48:45 PM] [semantic-release] › ✔ Completed step "generateNotes" of plugin "[Function: semantic-release-monorepo]"
|
|
106
|
-
[2:48:45 PM] [semantic-release] › ℹ Start step "generateNotes" of plugin "[Function: semantic-release-monorepo]"
|
|
107
|
-
[2:48:45 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ No more plugins
|
|
108
|
-
[2:48:45 PM] [semantic-release] › ✔ Completed step "generateNotes" of plugin "[Function: semantic-release-monorepo]"
|
|
109
|
-
[2:48:45 PM] [semantic-release] › ℹ Start step "prepare" of plugin "@semantic-release/npm"
|
|
110
|
-
[2:48:45 PM] [semantic-release] [@semantic-release/npm] › ℹ Write version 1.6.0 to package.json in /home/runner/work/examplary/examplary/schemas
|
|
111
|
-
@examplary/schemas
|
|
112
|
-
v1.6.0
|
|
113
|
-
[2:48:46 PM] [semantic-release] › ✔ Completed step "prepare" of plugin "@semantic-release/npm"
|
|
114
|
-
[2:48:47 PM] [semantic-release] › ✔ Created tag @examplary/schemas-v1.6.0
|
package/scripts/build.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { mkdir, writeFile } from "node:fs/promises";
|
|
2
|
-
|
|
3
|
-
import * as z from "zod";
|
|
4
|
-
|
|
5
|
-
import { QuestionTypeSchema } from "../src";
|
|
6
|
-
|
|
7
|
-
(async () => {
|
|
8
|
-
await mkdir("./dist/schemas", { recursive: true });
|
|
9
|
-
await writeFile(
|
|
10
|
-
"./dist/schemas/question-type.json",
|
|
11
|
-
JSON.stringify(z.toJSONSchema(QuestionTypeSchema), null, 2),
|
|
12
|
-
"utf-8",
|
|
13
|
-
);
|
|
14
|
-
|
|
15
|
-
console.log("Schema built successfully!");
|
|
16
|
-
})();
|
package/serverless.yml
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
service: schemas
|
|
2
|
-
|
|
3
|
-
params:
|
|
4
|
-
default:
|
|
5
|
-
domain: schemas-${sls:stage}.examplary.ai
|
|
6
|
-
certificateArn: arn:aws:acm:us-east-1:864899853846:certificate/98929ce6-38a5-41ec-ac3c-6abd2f46087f
|
|
7
|
-
production:
|
|
8
|
-
domain: schemas.examplary.ai
|
|
9
|
-
certificateArn: arn:aws:acm:us-east-1:864899853846:certificate/98929ce6-38a5-41ec-ac3c-6abd2f46087f
|
|
10
|
-
|
|
11
|
-
provider:
|
|
12
|
-
name: aws
|
|
13
|
-
region: eu-central-1
|
|
14
|
-
stage: ${opt:stage, 'dev'}
|
|
15
|
-
deploymentMethod: direct
|
|
16
|
-
|
|
17
|
-
plugins:
|
|
18
|
-
- serverless-lift
|
|
19
|
-
|
|
20
|
-
constructs:
|
|
21
|
-
schemas:
|
|
22
|
-
type: static-website
|
|
23
|
-
path: dist/schemas
|
|
24
|
-
domain: ${param:domain}
|
|
25
|
-
certificate: ${param:certificateArn}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
|
|
3
|
-
// Path or URL reference type
|
|
4
|
-
export const PathOrUrlReference = z
|
|
5
|
-
.string()
|
|
6
|
-
.regex(
|
|
7
|
-
/^(https?:\/\/|\.)([a-zA-Z0-9._~:/?#@!$&'()*+,;=%-]+)$/,
|
|
8
|
-
"Valid path or URL format",
|
|
9
|
-
);
|
|
10
|
-
|
|
11
|
-
// Component reference type
|
|
12
|
-
export const ComponentReference = PathOrUrlReference.describe(
|
|
13
|
-
"Reference to a component, typically a file path or URL",
|
|
14
|
-
);
|
|
15
|
-
|
|
16
|
-
// Components configuration
|
|
17
|
-
export const QuestionTypeComponents = z
|
|
18
|
-
.object({
|
|
19
|
-
assessment: ComponentReference.optional().describe(
|
|
20
|
-
"Path to the assessment component (question content)",
|
|
21
|
-
),
|
|
22
|
-
print: ComponentReference.optional().describe(
|
|
23
|
-
"Path to the print component (for printing the question)",
|
|
24
|
-
),
|
|
25
|
-
"settings-area": ComponentReference.optional().describe(
|
|
26
|
-
"Path to the settings area component (for configuring question settings)",
|
|
27
|
-
),
|
|
28
|
-
results: ComponentReference.optional().describe(
|
|
29
|
-
"Path to the results component (for displaying answers)",
|
|
30
|
-
),
|
|
31
|
-
})
|
|
32
|
-
.strict()
|
|
33
|
-
.describe("Paths to the components used by this question type");
|
|
34
|
-
|
|
35
|
-
export type ComponentReferenceType = z.infer<typeof ComponentReference>;
|
|
36
|
-
export type ComponentsType = z.infer<typeof QuestionTypeComponents>;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
|
|
3
|
-
export const QuestionTypeGenerationOptions = z
|
|
4
|
-
.object({
|
|
5
|
-
enabled: z
|
|
6
|
-
.boolean()
|
|
7
|
-
.describe(
|
|
8
|
-
"Whether this question type can be automatically generated using AI (default to false)",
|
|
9
|
-
),
|
|
10
|
-
instructions: z
|
|
11
|
-
.string()
|
|
12
|
-
.optional()
|
|
13
|
-
.describe(
|
|
14
|
-
"Optional instructions to guide AI in generating this question type",
|
|
15
|
-
),
|
|
16
|
-
})
|
|
17
|
-
.describe("Options for AI question generation");
|
|
18
|
-
|
|
19
|
-
export type QuestionTypeGenerationOptionsType = z.infer<
|
|
20
|
-
typeof QuestionTypeGenerationOptions
|
|
21
|
-
>;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
|
|
3
|
-
export const QuestionTypeGradingOptions = z
|
|
4
|
-
.object({
|
|
5
|
-
enabled: z
|
|
6
|
-
.boolean()
|
|
7
|
-
.describe(
|
|
8
|
-
"Whether this question type can be automatically graded using AI (default to false)",
|
|
9
|
-
),
|
|
10
|
-
instructions: z
|
|
11
|
-
.string()
|
|
12
|
-
.optional()
|
|
13
|
-
.describe(
|
|
14
|
-
"Optional instructions to guide AI in grading this question type",
|
|
15
|
-
),
|
|
16
|
-
})
|
|
17
|
-
.describe("Options for AI question grading");
|
|
18
|
-
|
|
19
|
-
export type QuestionTypeGradingOptionsType = z.infer<
|
|
20
|
-
typeof QuestionTypeGradingOptions
|
|
21
|
-
>;
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
|
|
3
|
-
import { Translatable } from "./translatable";
|
|
4
|
-
|
|
5
|
-
// Setting option for enum type settings
|
|
6
|
-
export const QuestionTypeSettingOption = z
|
|
7
|
-
.object({
|
|
8
|
-
value: z.string().describe("Option value"),
|
|
9
|
-
label: Translatable.describe("Option label"),
|
|
10
|
-
})
|
|
11
|
-
.strict()
|
|
12
|
-
.describe("Setting option");
|
|
13
|
-
|
|
14
|
-
// Setting configuration
|
|
15
|
-
export const QuestionTypeSetting = z
|
|
16
|
-
.object({
|
|
17
|
-
id: z.string().describe("Unique identifier for the setting"),
|
|
18
|
-
name: Translatable.describe("Display name for the setting"),
|
|
19
|
-
helpText: Translatable.optional().describe("Help text for the setting"),
|
|
20
|
-
description: z
|
|
21
|
-
.string()
|
|
22
|
-
.optional()
|
|
23
|
-
.describe(
|
|
24
|
-
"Description to help AI agents auto-generate question settings",
|
|
25
|
-
),
|
|
26
|
-
type: z
|
|
27
|
-
.enum([
|
|
28
|
-
"enum",
|
|
29
|
-
"string",
|
|
30
|
-
"string-array",
|
|
31
|
-
"number",
|
|
32
|
-
"boolean",
|
|
33
|
-
"custom",
|
|
34
|
-
"scoring-criteria",
|
|
35
|
-
"tags",
|
|
36
|
-
"question-type",
|
|
37
|
-
])
|
|
38
|
-
.describe("Type of the setting"),
|
|
39
|
-
index: z.number().optional(),
|
|
40
|
-
hidden: z
|
|
41
|
-
.boolean()
|
|
42
|
-
.optional()
|
|
43
|
-
.describe("Whether the setting is hidden from the user"),
|
|
44
|
-
default: z.any().optional().describe("Default value for the setting"),
|
|
45
|
-
required: z
|
|
46
|
-
.boolean()
|
|
47
|
-
.optional()
|
|
48
|
-
.describe("Whether this setting is required"),
|
|
49
|
-
options: z
|
|
50
|
-
.array(QuestionTypeSettingOption)
|
|
51
|
-
.optional()
|
|
52
|
-
.describe("Available options for enum type settings"),
|
|
53
|
-
placeholder: Translatable.optional().describe(
|
|
54
|
-
"Placeholder text for the setting",
|
|
55
|
-
),
|
|
56
|
-
step: z.number().optional().describe("Step value for number type settings"),
|
|
57
|
-
min: z
|
|
58
|
-
.number()
|
|
59
|
-
.optional()
|
|
60
|
-
.describe("Minimum value for number type settings"),
|
|
61
|
-
max: z
|
|
62
|
-
.number()
|
|
63
|
-
.optional()
|
|
64
|
-
.describe("Maximum value for number type settings"),
|
|
65
|
-
})
|
|
66
|
-
.strict()
|
|
67
|
-
.describe("Setting configuration");
|
|
68
|
-
|
|
69
|
-
export type SettingType = z.infer<typeof QuestionTypeSetting>;
|
|
70
|
-
export type SettingOptionType = z.infer<typeof QuestionTypeSettingOption>;
|
package/src/question-type.ts
DELETED
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
PathOrUrlReference,
|
|
5
|
-
QuestionTypeComponents,
|
|
6
|
-
} from "./question-type-components";
|
|
7
|
-
import { QuestionTypeGenerationOptions } from "./question-type-generation-options";
|
|
8
|
-
import { QuestionTypeGradingOptions } from "./question-type-grading-options";
|
|
9
|
-
import { QuestionTypeSetting } from "./question-type-setting";
|
|
10
|
-
import { Translatable } from "./translatable";
|
|
11
|
-
|
|
12
|
-
export const QuestionTypeSchema = z
|
|
13
|
-
.object({
|
|
14
|
-
$schema: z.string().optional(),
|
|
15
|
-
id: z
|
|
16
|
-
.string()
|
|
17
|
-
.regex(
|
|
18
|
-
/^([a-z][a-z0-9-]*)(\.[a-z][a-z0-9-]*)+$/,
|
|
19
|
-
"Valid question type ID format",
|
|
20
|
-
)
|
|
21
|
-
.describe(
|
|
22
|
-
"Unique identifier for the question type (e.g. 'my-org.color-picker')",
|
|
23
|
-
),
|
|
24
|
-
name: Translatable.describe(
|
|
25
|
-
"Display name for the question type, can be a simple string or translation object",
|
|
26
|
-
),
|
|
27
|
-
description: Translatable.describe(
|
|
28
|
-
"Description of the question type, can be a simple string or translation object",
|
|
29
|
-
),
|
|
30
|
-
icon: PathOrUrlReference.optional().describe(
|
|
31
|
-
"Path to the icon for this question type",
|
|
32
|
-
),
|
|
33
|
-
shortcut: z
|
|
34
|
-
.string()
|
|
35
|
-
.max(1)
|
|
36
|
-
.optional()
|
|
37
|
-
.describe("Keyboard shortcut for quick access to this question type"),
|
|
38
|
-
generation: QuestionTypeGenerationOptions.optional(),
|
|
39
|
-
grading: QuestionTypeGradingOptions.optional(),
|
|
40
|
-
timeEstimateMinutes: z
|
|
41
|
-
.number()
|
|
42
|
-
.min(1)
|
|
43
|
-
.optional()
|
|
44
|
-
.describe("Estimated time in minutes to complete this question type"),
|
|
45
|
-
isAi: z
|
|
46
|
-
.boolean()
|
|
47
|
-
.optional()
|
|
48
|
-
.describe("Whether this question type uses AI functionality"),
|
|
49
|
-
backgroundColor: z
|
|
50
|
-
.string()
|
|
51
|
-
.optional()
|
|
52
|
-
.describe("Background color for the question type"),
|
|
53
|
-
enforcePosition: z
|
|
54
|
-
.enum(["start", "end"])
|
|
55
|
-
.optional()
|
|
56
|
-
.describe("Position enforcement for this question type"),
|
|
57
|
-
enforceTitle: Translatable.optional().describe(
|
|
58
|
-
"Enforced title for this question type",
|
|
59
|
-
),
|
|
60
|
-
hideSettings: z
|
|
61
|
-
.boolean()
|
|
62
|
-
.optional()
|
|
63
|
-
.describe("Whether to hide settings for this question type"),
|
|
64
|
-
isPreviewRefreshable: z
|
|
65
|
-
.boolean()
|
|
66
|
-
.optional()
|
|
67
|
-
.describe("Whether the preview can be refreshed for this question type"),
|
|
68
|
-
hasSimpleScoring: z
|
|
69
|
-
.boolean()
|
|
70
|
-
.optional()
|
|
71
|
-
.describe("Whether this question type has simple scoring"),
|
|
72
|
-
titlePlaceholder: Translatable.optional().describe(
|
|
73
|
-
"Placeholder text for the title field",
|
|
74
|
-
),
|
|
75
|
-
descriptionPlaceholder: Translatable.optional().describe(
|
|
76
|
-
"Placeholder text for the description field",
|
|
77
|
-
),
|
|
78
|
-
untitledPlaceholder: Translatable.optional().describe(
|
|
79
|
-
"Placeholder text for untitled questions",
|
|
80
|
-
),
|
|
81
|
-
components: QuestionTypeComponents.optional().describe(
|
|
82
|
-
"Paths to the components used by this question type",
|
|
83
|
-
),
|
|
84
|
-
settings: z
|
|
85
|
-
.array(QuestionTypeSetting)
|
|
86
|
-
.optional()
|
|
87
|
-
.describe("Configuration settings for the question type"),
|
|
88
|
-
public: z
|
|
89
|
-
.boolean()
|
|
90
|
-
.optional()
|
|
91
|
-
.describe(
|
|
92
|
-
"Whether this question type is public and can be used by all users",
|
|
93
|
-
),
|
|
94
|
-
translations: z
|
|
95
|
-
.record(z.string(), Translatable)
|
|
96
|
-
.optional()
|
|
97
|
-
.describe("Custom translations for this question type"),
|
|
98
|
-
stylesheet: z.url().optional(),
|
|
99
|
-
index: z.number().optional(),
|
|
100
|
-
})
|
|
101
|
-
.strict()
|
|
102
|
-
.describe("Schema for defining question types in the Examplary system");
|
|
103
|
-
|
|
104
|
-
export type QuestionType = z.infer<typeof QuestionTypeSchema>;
|
package/src/translatable.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
|
|
3
|
-
// Translatable type - can be a simple string or translation object
|
|
4
|
-
export const Translatable = z.union([
|
|
5
|
-
z.string().describe("Simple string value"),
|
|
6
|
-
z
|
|
7
|
-
.record(
|
|
8
|
-
z.string().regex(/^[a-z]{2}(-[A-Z]{2})?$/, "Language code format"),
|
|
9
|
-
z.string(),
|
|
10
|
-
)
|
|
11
|
-
.refine(
|
|
12
|
-
(obj) => Object.keys(obj).length >= 1,
|
|
13
|
-
"Translation object must have at least one property",
|
|
14
|
-
)
|
|
15
|
-
.describe("Translation object with language codes as keys"),
|
|
16
|
-
]);
|
|
17
|
-
export type TranslatableType = z.infer<typeof Translatable>;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/{question-type-grading-options.js → question-type/question-type-grading-options.js}
RENAMED
|
File without changes
|
|
File without changes
|