You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add Zod validation to server actions and API chat route
- Replace `interface MarkdownSection`, `interface PagePath` in docs.ts
with Zod schemas + `z.output<typeof schema>` types
- Add `ReplacedRangeSchema` and `DynamicMarkdownSectionSchema` to docs.ts,
moving the type definitions out of the client-only pageContent.tsx
- Remove `interface ReplacedRange` from multiHighlight.tsx; re-export
`ReplacedRange` type from @/lib/docs
- Remove `interface DynamicMarkdownSection` from pageContent.tsx; re-export
`DynamicMarkdownSection` type from @/lib/docs
- Replace `ReplOutputType` union, `ReplOutput`, `UpdatedFile`, `ReplCommand`
interfaces in packages/runtime/src/interface.ts with Zod schemas +
`z.output<typeof schema>` types; add zod dependency to runtime package
- Replace `type ChatParams` in route.ts with `ChatParamsSchema` + Zod
validation of POST request body (returns 400 on invalid input)
- Add `z.string().uuid()` validation to deleteChat and getRedirectFromChat
server action parameters
Co-authored-by: na-trium-144 <100704180+na-trium-144@users.noreply.github.com>
0 commit comments