[PR #1500] [MERGED] fix: refactor teams router #1675

Closed
opened 2026-02-26 19:34:16 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/documenso/documenso/pull/1500
Author: @dguyen
Created: 12/2/2024
Status: Merged
Merged: 12/5/2024
Merged by: @dguyen

Base: mainHead: fix/refactor-teams-router


📝 Commits (7)

  • b552180 fix: refactor teams router
  • 39f1828 chore: upgrade zod
  • aadc2e6 Merge branch 'main' into fix/refactor-teams-router
  • 6ef0b59 Merge branch 'main' into fix/refactor-teams-router
  • 72ba591 chore: restructure zod dep
  • d764896 fix: dep
  • 72685b3 Merge branch 'main' into fix/refactor-teams-router

📊 Changes

38 files changed (+364 additions, -97 deletions)

View changed files

📝 apps/marketing/package.json (+1 -1)
📝 apps/web/package.json (+1 -1)
📝 apps/web/src/app/(profile)/profile-header.tsx (+3 -3)
📝 apps/web/src/app/(recipient)/layout.tsx (+2 -2)
📝 apps/web/src/app/(signing)/sign/[token]/layout.tsx (+2 -2)
📝 apps/web/src/components/(dashboard)/layout/header.tsx (+3 -3)
📝 apps/web/src/components/(dashboard)/layout/menu-switcher.tsx (+2 -2)
📝 apps/web/src/providers/team.tsx (+3 -3)
📝 package-lock.json (+57 -13)
📝 packages/api/package.json (+2 -2)
📝 packages/ee/package.json (+2 -2)
📝 packages/lib/package.json (+1 -1)
📝 packages/lib/server-only/team/create-team-email-verification.ts (+1 -1)
📝 packages/lib/server-only/team/create-team-member-invites.ts (+1 -1)
📝 packages/lib/server-only/team/create-team.ts (+12 -9)
📝 packages/lib/server-only/team/find-team-member-invites.ts (+16 -2)
📝 packages/lib/server-only/team/find-team-members.ts (+15 -2)
📝 packages/lib/server-only/team/find-teams-pending.ts (+13 -2)
📝 packages/lib/server-only/team/get-team-invitations.ts (+17 -1)
📝 packages/lib/server-only/team/get-team-members.ts (+17 -1)

...and 18 more files

📄 Description

Description

With the upcoming plans for SDK support, we need to ensure we have a proper OpenAPI spec, regardless if we decide on using ts-rest or trpc for generating an open api spec.

These changes are the initial prototype to bring in API response schemas.

Changes Made

  • Installed latest Zod in root package and removed zod from nested packages
  • Updated teams router with output zod schema parsers
  • Added a Prisma generator to produce Zod schemas to allow us to easily create response schemas.
  • Added WIP metadata for trpc openapi as a demostration.
  • Set strictNullChecks to true
  • Added a Prisma generator to produce Zod schemas to allow us to easily create response schemas.

I looked into packages which converts types to zod schemas to try streaming this easier, but I'm not sure it will work well


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/documenso/documenso/pull/1500 **Author:** [@dguyen](https://github.com/dguyen) **Created:** 12/2/2024 **Status:** ✅ Merged **Merged:** 12/5/2024 **Merged by:** [@dguyen](https://github.com/dguyen) **Base:** `main` ← **Head:** `fix/refactor-teams-router` --- ### 📝 Commits (7) - [`b552180`](https://github.com/documenso/documenso/commit/b552180ca875c12fc5eab3783b50d311bf4d6711) fix: refactor teams router - [`39f1828`](https://github.com/documenso/documenso/commit/39f1828305ec10c12e5c26c70c2f353fcff92a80) chore: upgrade zod - [`aadc2e6`](https://github.com/documenso/documenso/commit/aadc2e605cca8e3246b8d006ea701b94d45146e8) Merge branch 'main' into fix/refactor-teams-router - [`6ef0b59`](https://github.com/documenso/documenso/commit/6ef0b59f5d90a6d86fff419a5627624b96eac482) Merge branch 'main' into fix/refactor-teams-router - [`72ba591`](https://github.com/documenso/documenso/commit/72ba591504ba653fe393337e44fa97315b247ef0) chore: restructure zod dep - [`d764896`](https://github.com/documenso/documenso/commit/d7648962d5bb7d87e04b390dc8f5122564fc68df) fix: dep - [`72685b3`](https://github.com/documenso/documenso/commit/72685b3a86e99ffbe98341faec30854db64e1ea5) Merge branch 'main' into fix/refactor-teams-router ### 📊 Changes **38 files changed** (+364 additions, -97 deletions) <details> <summary>View changed files</summary> 📝 `apps/marketing/package.json` (+1 -1) 📝 `apps/web/package.json` (+1 -1) 📝 `apps/web/src/app/(profile)/profile-header.tsx` (+3 -3) 📝 `apps/web/src/app/(recipient)/layout.tsx` (+2 -2) 📝 `apps/web/src/app/(signing)/sign/[token]/layout.tsx` (+2 -2) 📝 `apps/web/src/components/(dashboard)/layout/header.tsx` (+3 -3) 📝 `apps/web/src/components/(dashboard)/layout/menu-switcher.tsx` (+2 -2) 📝 `apps/web/src/providers/team.tsx` (+3 -3) 📝 `package-lock.json` (+57 -13) 📝 `packages/api/package.json` (+2 -2) 📝 `packages/ee/package.json` (+2 -2) 📝 `packages/lib/package.json` (+1 -1) 📝 `packages/lib/server-only/team/create-team-email-verification.ts` (+1 -1) 📝 `packages/lib/server-only/team/create-team-member-invites.ts` (+1 -1) 📝 `packages/lib/server-only/team/create-team.ts` (+12 -9) 📝 `packages/lib/server-only/team/find-team-member-invites.ts` (+16 -2) 📝 `packages/lib/server-only/team/find-team-members.ts` (+15 -2) 📝 `packages/lib/server-only/team/find-teams-pending.ts` (+13 -2) 📝 `packages/lib/server-only/team/get-team-invitations.ts` (+17 -1) 📝 `packages/lib/server-only/team/get-team-members.ts` (+17 -1) _...and 18 more files_ </details> ### 📄 Description ## Description With the upcoming plans for SDK support, we need to ensure we have a proper OpenAPI spec, regardless if we decide on using ts-rest or trpc for generating an open api spec. These changes are the initial prototype to bring in API response schemas. ## Changes Made - Installed latest Zod in root package and removed zod from nested packages - Updated teams router with output zod schema parsers - Added a Prisma generator to produce Zod schemas to allow us to easily create response schemas. - Added WIP metadata for trpc openapi as a demostration. - Set `strictNullChecks` to true > - Added a Prisma generator to produce Zod schemas to allow us to easily create response schemas. I looked into packages which converts types to zod schemas to try streaming this easier, but I'm not sure it will work well --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-26 19:34:16 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/documenso#1675
No description provided.