feat: Add Zod-based typing for API responses across frontend and backend#1892
feat: Add Zod-based typing for API responses across frontend and backend#1892kodiakhq[bot] merged 4 commits intomainfrom
Conversation
🦋 Changeset detectedLatest commit: f056c32 The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Define API response Zod schemas in common-utils for alerts, webhooks, team, installation, and me endpoints. Apply Response<T> typing on backend route handlers with explicit Mongoose-to-JSON serialization (ObjectId, Date, Map). Replace all `any` types and `as Promise<T>` casts in frontend TanStack Query hooks with proper generics.
c1147ff to
e538732
Compare
E2E Test Results✅ All tests passed • 86 passed • 3 skipped • 992s
Tests ran across 4 shards in parallel. |
PR Review
|
…end (#1892) ## Summary Define API response Zod schemas in common-utils for alerts, webhooks, team, installation, and me endpoints. Apply Response<T> typing on backend route handlers with explicit Mongoose-to-JSON serialization (ObjectId, Date, Map). Replace all `any` types and `as Promise<T>` casts in frontend TanStack Query hooks with proper generics. ### How to test locally or on Vercel 1. `yarn dev` 2. Interact with app, ensuring nothing is broken ### References - Linear Issue: HDX-3464
…end (#1892) ## Summary Define API response Zod schemas in common-utils for alerts, webhooks, team, installation, and me endpoints. Apply Response<T> typing on backend route handlers with explicit Mongoose-to-JSON serialization (ObjectId, Date, Map). Replace all `any` types and `as Promise<T>` casts in frontend TanStack Query hooks with proper generics. ### How to test locally or on Vercel 1. `yarn dev` 2. Interact with app, ensuring nothing is broken ### References - Linear Issue: HDX-3464 Co-authored-by: peter-leonov-ch <209667683+peter-leonov-ch@users.noreply.github.com>
Summary
Define API response Zod schemas in common-utils for alerts, webhooks, team, installation, and me endpoints. Apply Response typing on backend route handlers with explicit Mongoose-to-JSON serialization (ObjectId, Date, Map). Replace all
anytypes andas Promise<T>casts in frontend TanStack Query hooks with proper generics.How to test locally or on Vercel
yarn devReferences