@oaknational/oak-curriculum-schema-v2 0.0.2 → 0.0.4
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/cjs/index.cjs +5 -5
- package/cjs/index.cjs.map +1 -1
- package/esm/index.js +3 -3
- package/esm/index.js.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +2 -0
- package/src/schema/document.ts +9 -0
- package/src/schema/lesson-component-status.ts +15 -0
- package/types.d.ts +1058 -152
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oaknational/oak-curriculum-schema-v2",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "drizzle-zod derived Zod schemas for Oak National Academy's curriculum data (temporary package name for validation).",
|
|
6
6
|
"main": "cjs/index.cjs",
|
package/src/index.ts
CHANGED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { createInsertSchema, createSelectSchema } from "drizzle-zod";
|
|
2
|
+
import { documents } from "drizzle/schema";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
|
|
5
|
+
export const documentSelectSchema = createSelectSchema(documents);
|
|
6
|
+
export const documentInsertSchema = createInsertSchema(documents);
|
|
7
|
+
|
|
8
|
+
export type Document = z.infer<typeof documentSelectSchema>;
|
|
9
|
+
export type DocumentInsert = z.infer<typeof documentInsertSchema>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { createInsertSchema, createSelectSchema } from "drizzle-zod";
|
|
2
|
+
import { lessonComponentStatus } from "drizzle/schema";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
|
|
5
|
+
export const lessonComponentStatusSelectSchema =
|
|
6
|
+
createSelectSchema(lessonComponentStatus);
|
|
7
|
+
export const lessonComponentStatusInsertSchema =
|
|
8
|
+
createInsertSchema(lessonComponentStatus);
|
|
9
|
+
|
|
10
|
+
export type LessonComponentStatus = z.infer<
|
|
11
|
+
typeof lessonComponentStatusSelectSchema
|
|
12
|
+
>;
|
|
13
|
+
export type LessonComponentStatusInsert = z.infer<
|
|
14
|
+
typeof lessonComponentStatusInsertSchema
|
|
15
|
+
>;
|