@memizy/oqse 0.1.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/LICENSE +21 -0
- package/README.md +58 -0
- package/SPECIFICATION.md +2444 -0
- package/dist/index.cjs +2 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +845 -0
- package/dist/src/index.d.ts +7 -0
- package/dist/src/manifest.d.ts +429 -0
- package/dist/src/manifestValidation.d.ts +167 -0
- package/dist/src/manifestValidation.test.d.ts +1 -0
- package/dist/src/oqse.d.ts +1121 -0
- package/dist/src/oqseValidation.d.ts +6120 -0
- package/dist/src/oqseValidation.test.d.ts +1 -0
- package/dist/src/progress.d.ts +42 -0
- package/dist/src/progressValidation.d.ts +9 -0
- package/dist/src/progressValidation.test.d.ts +1 -0
- package/dist/src/utils.d.ts +3 -0
- package/package.json +40 -0
- package/schemas/README.md +1 -0
- package/schemas/oqse-manifest-v0.1.json +256 -0
- package/schemas/oqse-v0.1.json +7573 -0
- package/schemas/oqsep-v0.1.json +172 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 memizy
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# OQSE SDK
|
|
2
|
+
|
|
3
|
+
Official TypeScript SDK for the Open Quiz & Study Exchange ecosystem, published as @memizy/oqse.
|
|
4
|
+
|
|
5
|
+
This repository contains:
|
|
6
|
+
- Runtime validators built with Zod.
|
|
7
|
+
- Manually authored TypeScript types for developer ergonomics.
|
|
8
|
+
- Auto-generated JSON Schemas distributed with the package.
|
|
9
|
+
- The human-readable specification in SPECIFICATION.md.
|
|
10
|
+
|
|
11
|
+
## Package
|
|
12
|
+
|
|
13
|
+
- Name: @memizy/oqse
|
|
14
|
+
- Purpose: validate, parse, and type OQSE, OQSE Manifest, and OQSEP progress data.
|
|
15
|
+
|
|
16
|
+
## Architecture & Single Source of Truth
|
|
17
|
+
|
|
18
|
+
1. The specification markdown is for humans.
|
|
19
|
+
SPECIFICATION.md is the normative documentation for concepts, rules, and semantics.
|
|
20
|
+
|
|
21
|
+
2. Zod schemas (*Validation.ts) are the absolute source of truth for code validation.
|
|
22
|
+
Runtime validation behavior is defined in src/oqseValidation.ts, src/manifestValidation.ts, and src/progressValidation.ts.
|
|
23
|
+
|
|
24
|
+
3. TypeScript types (oqse.ts, manifest.ts, progress.ts) manually mirror the Zod schemas for better Developer Experience.
|
|
25
|
+
These files are intentionally hand-written to provide clearer interfaces, JSDoc, and IntelliSense quality.
|
|
26
|
+
|
|
27
|
+
4. JSON schemas are strictly auto-generated using npm run generate:schemas and contributors MUST NOT edit them manually.
|
|
28
|
+
If validation behavior changes, update the Zod schemas first, then regenerate.
|
|
29
|
+
|
|
30
|
+
## Development
|
|
31
|
+
|
|
32
|
+
Install dependencies:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
npm install
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Build and regenerate schemas:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
npm run build
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Generate only JSON schemas:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
npm run generate:schemas
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Run tests:
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
npm test
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Contributing Rule
|
|
57
|
+
|
|
58
|
+
Never edit files in schemas/ by hand. Always regenerate via npm run generate:schemas.
|