-
Notifications
You must be signed in to change notification settings - Fork 111
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
Add Zod for parsing event data (OFC-1) #331
Conversation
Looks like there's a bug where events in daily notes are duplicated in the view when they're moved to a new day. Those old events aren't in the eventstore, and so get "event not found" errors when you then try and modify them. Likely this is something to do with the event ID not propagating through? Will investigate. It's not present on Potentially related to the type changes in the DailyNoteCalendar. |
Closes #248.
Zod lets us define the type of an
OFCEvent
and how it's parsed at the same time. As an added bonus, Zod makes it easy to parse values that are stored as strings such asdate
andstart
into relevant types during parsing rather than doing it at every callsite where those types are needed. This will make querying on date ranges in #326 easier.OFCEvent
OFCEvent
andvalidateEvent()
.CalendarInfo
luxon
dates and times and add serialization methods that turn them back in to primitive types. Might leave this for another PR.