@oaknational/oak-curriculum-schema-v2 0.0.3 → 0.0.4-alpha
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/README.md +17 -0
- package/cjs/index.cjs +136 -54
- package/cjs/index.cjs.map +1 -1
- package/esm/index.js +135 -53
- package/esm/index.js.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +4 -0
- package/src/schema/content-guidance.ts +35 -0
- package/src/schema/draft-lesson-with-status.ts +11 -0
- package/src/schema/gdrive-file.ts +9 -0
- package/src/schema/media-status.ts +9 -0
- package/types.d.ts +3359 -442
package/README.md
CHANGED
|
@@ -33,6 +33,23 @@ const newLesson = lessonInsertSchema.parse(payload);
|
|
|
33
33
|
const publishedLesson = lessonPublishedSchema.parse(row);
|
|
34
34
|
```
|
|
35
35
|
|
|
36
|
+
## Row types
|
|
37
|
+
|
|
38
|
+
The schema declarations in `types.d.ts` are built by `drizzle-zod` and are
|
|
39
|
+
hard to read. To see a table's fields, hover (or go to definition on) the
|
|
40
|
+
matching row type, which is `z.infer` of the schema and resolves to a flat
|
|
41
|
+
list of columns.
|
|
42
|
+
|
|
43
|
+
| Schema | Select type | Insert type |
|
|
44
|
+
| --- | --- | --- |
|
|
45
|
+
| `lessonSelectSchema` | `Lesson` | `LessonInsert` |
|
|
46
|
+
| `documentSelectSchema` | `Document` | `DocumentInsert` |
|
|
47
|
+
| `gdriveFileSelectSchema` | `GdriveFile` | `GdriveFileInsert` |
|
|
48
|
+
| `lessonComponentStatusSelectSchema` | `LessonComponentStatus` | `LessonComponentStatusInsert` |
|
|
49
|
+
| `mediaStatusSelectSchema` | `MediaStatus` | `MediaStatusInsert` |
|
|
50
|
+
| `contentGuidanceSelectSchema` | `ContentGuidance` | `ContentGuidanceInsert` |
|
|
51
|
+
| `draftLessonWithStatusSelectSchema` | `DraftLessonWithStatus` | n/a (view) |
|
|
52
|
+
|
|
36
53
|
## Links
|
|
37
54
|
|
|
38
55
|
- [npm package](https://www.npmjs.com/package/@oaknational/oak-curriculum-schema-v2)
|