@oaknational/oak-curriculum-schema-v2 0.0.2 → 0.0.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oaknational/oak-curriculum-schema-v2",
3
- "version": "0.0.2",
3
+ "version": "0.0.3",
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
@@ -1 +1,3 @@
1
+ export * from "@/oak-curriculum-schema/src/schema/document";
1
2
  export * from "@/oak-curriculum-schema/src/schema/lesson";
3
+ export * from "@/oak-curriculum-schema/src/schema/lesson-component-status";
@@ -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
+ >;