Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(egh): Refactor Sanity Schema Types and Add Course Creation Function #343

Merged
merged 3 commits into from
Dec 13, 2024

Conversation

Creeland
Copy link
Contributor

@Creeland Creeland commented Dec 9, 2024

of course

What's Changed

This PR introduces a function for creating course documents in Sanity when a post with the "course" type is created.

I've also brought in some new schemas and made types more consistent.

1. New Course Creation Functionality

  • Added createCourseInSanity.ts function to handle course creation in Sanity
  • Integrated with POST_CREATED_EVENT to automatically create courses
  • Added course creation function to inngest config

2. Schema Refactoring

  • Consolidated and standardized Sanity schema types
  • Introduced new base schemas (SystemFields, Reference, Image, Slug)
  • Renamed schema constants to follow consistent PascalCase convention
  • Added SanityCourse schema type and validation

3. Type Improvements

  • Updated references to schema types
  • Improved type safety with more specific schema definitions
  • Renamed ambiguous type names for better clarity

Copy link

vercel bot commented Dec 9, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
ai-hero ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 13, 2024 5:08pm
course-builder-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 13, 2024 5:08pm
course-builder-egghead ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 13, 2024 5:08pm
course-builder-poc 🛑 Canceled (Inspect) Dec 13, 2024 5:08pm
course-builder-video-blog ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 13, 2024 5:08pm
epic-react-builder ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 13, 2024 5:08pm
epic-web-v2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 13, 2024 5:08pm
go-local-first ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 13, 2024 5:08pm
pro-aws ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 13, 2024 5:08pm
pro-nextjs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 13, 2024 5:08pm
value-based-design ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 13, 2024 5:08pm
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
astro-party ⬜️ Ignored (Inspect) Visit Preview Dec 13, 2024 5:08pm

@Creeland Creeland self-assigned this Dec 9, 2024
@Creeland Creeland added the enhancement New feature or request label Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants