* refactor: import AppRouter from generated types instead of server source
This change improves tRPC build performance by having the client-side code
import AppRouter from pre-generated type declarations instead of traversing
the entire server router tree.
Changes:
- Create type bridge file at packages/trpc/types/app-router.ts
- Update packages/trpc/react/trpc.ts to import from the bridge
- Update .gitignore to only ignore types/server (generated files)
- Update eslint.config.mjs to only ignore types/server (generated files)
The type bridge provides:
1. Faster typechecking - avoids parsing 458 server files
2. Stable import location that's easy to lint against
3. Single place to adjust if generated path changes
Build order is already enforced in turbo.json (type-check depends on @calcom/trpc#build).
Co-Authored-By: [email protected] <[email protected]>
* fix: move bridge file to react/ to avoid TS5055 error
Move the AppRouter type bridge file from types/app-router.ts to react/app-router.ts
to avoid the TS5055 'Cannot write file because it would overwrite input file' error.
The issue was that placing the bridge file in types/ caused TypeScript to treat
the generated .d.ts files as input files during the tRPC build, then fail when
trying to emit to the same location.
By placing the bridge in react/ (which is excluded from the tRPC server build),
the bridge file is only used by client code and doesn't interfere with the
server type generation.
Changes:
- Move bridge file from types/app-router.ts to react/app-router.ts
- Update import in react/trpc.ts to use ./app-router
- Revert .gitignore to ignore all of types/ (generated files)
- Revert eslint.config.mjs to ignore all of types/**
Co-Authored-By: [email protected] <[email protected]>
* refactor: split tRPC build into server and react phases
- Create tsconfig.server.json for server-only type generation
- Create tsconfig.react.json for react/client type generation
- Update build script to run server build first, then react build
- Remove || true so build properly fails on errors
- This allows react code to import from generated server types
Co-Authored-By: [email protected] <[email protected]>
* refactor: split @calcom/trpc exports to separate server and react entrypoints
- Remove react exports from @calcom/trpc root (index.ts)
- Update 89 files to import from @calcom/trpc/react instead of @calcom/trpc
- This fixes the boundary leak where server builds were pulling in react code
- Server build no longer compiles react/app-router.ts, fixing the chicken-and-egg
issue where react code needed generated server types that didn't exist yet
This improves TypeScript build performance by preventing the server type
generation from traversing the entire react/client type graph.
Co-Authored-By: [email protected] <[email protected]>
* fix: import WorkflowType from lib/types instead of React component
This fixes a boundary leak where the server build was pulling in React
components through the WorkflowRepository import chain. By importing
WorkflowListType from lib/types instead of WorkflowListPage.tsx, the
server build no longer traverses React component files.
Co-Authored-By: [email protected] <[email protected]>
* fix: extract server-safe types to prevent boundary leaks in tRPC build
- Extract ChildrenEventType to lib/childrenEventType.ts (server-safe)
- Extract Slots type to calendars/lib/slots.ts (server-safe)
- Create types.server.ts files for eventtypes and bookings
- Update server code to import from server-safe type files
- Update DatePicker.tsx to use extracted Slots type
- Update app-store utils to use BookerEventForAppData type
This prevents the server build from pulling in React files through
transitive imports from @calcom/features barrel exports.
Co-Authored-By: [email protected] <[email protected]>
* fix: update Segment.test.tsx mock path to @calcom/trpc/react
The test was mocking @calcom/trpc but importing from @calcom/trpc/react.
After the entrypoint separation, the mock path needs to match the import path.
Co-Authored-By: [email protected] <[email protected]>
* fix: temporarily restore || true to unblock PR merge
The pre-existing Prisma type errors (~345 errors) will be addressed in a follow-up PR.
This allows the two-phase build architecture changes to be merged first.
Co-Authored-By: [email protected] <[email protected]>
* Run trpc build as part of API v2 build
* Removed the bridge file
* refactor: extract event type schemas to server-safe file
- Create packages/features/eventtypes/lib/schemas.ts with createEventTypeInput and EventTypeDuplicateInput
- Update types.ts to re-export schemas from the new server-safe location
- Update tRPC schema files to import from schemas.ts instead of types.server.ts
- Delete types.server.ts (was duplicating ~200 lines unnecessarily)
This keeps the server build graph clean while avoiding code duplication.
Co-Authored-By: [email protected] <[email protected]>
* Removed the optionality of the tRPC builds
* Removed the extra command for API v2
* refactor: rename calendars/lib/slots.ts to types.ts
Per Keith's feedback, renamed the file to types.ts since it contains type definitions.
Co-Authored-By: [email protected] <[email protected]>
* Added back tRPC build:server for API v2
---------
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Dhairyashil Shinde <[email protected]>
2025-12-20 23:43:04 -03:00
Hariom BalharaGitHubDevin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
* docs: update embed-events.mdx with all currently emitted embed events
Co-Authored-By: [email protected] <[email protected]>
* docs: remove V2 suffix from event names in documentation
Per feedback, the documentation should not expose internal versioning details.
Event names are now presented as clean, non-versioned names:
- bookingSuccessful (instead of bookingSuccessfulV2)
- rescheduleBookingSuccessful (instead of rescheduleBookingSuccessfulV2)
- dryRunBookingSuccessful (instead of dryRunBookingSuccessfulV2)
- dryRunRescheduleBookingSuccessful (instead of dryRunRescheduleBookingSuccessfulV2)
Added note about using wildcard listener for future-proofing.
Co-Authored-By: [email protected] <[email protected]>
* docs: use V2 suffix for embed event names to match code (#25263)
* docs: update embed events to use V2 event names
- Document bookingSuccessfulV2 instead of deprecated bookingSuccessful
- Document rescheduleBookingSuccessfulV2 instead of deprecated rescheduleBookingSuccessful
- Keep dryRunBookingSuccessful and dryRunRescheduleBookingSuccessful without V2 suffix (only V2 versions exist)
- Add comprehensive event documentation with all public and internal events
- Organize events into Public Events and Internal Events sections
Co-Authored-By: [email protected] <[email protected]>
* fix: use V2 suffix for dry-run event names
- Change dryRunBookingSuccessful to dryRunBookingSuccessfulV2
- Change dryRunRescheduleBookingSuccessful to dryRunRescheduleBookingSuccessfulV2
- These match the actual event names emitted in the code (only V2 versions exist)
Co-Authored-By: [email protected] <[email protected]>
---------
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
---------
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Hariom Balhara <[email protected]>
* docs: improve English naturalness in API v2 documentation
- Fix awkward API summary 'Find out when is an event type ready to be booked' to 'Get available time slots for an event type'
- Correct 'setup' vs 'set up' usage throughout documentation
- Fix OAuth capitalization consistency
- Improve 'api' to 'API' capitalization in v2 docs
- Enhance readability while preserving technical accuracy
Fixes unnatural English phrasing in titles, headers, descriptions, and summaries across API v2 documentation files.
Co-Authored-By: [email protected] <[email protected]>
* docs: add missing articles 'the' in API v2 documentation
- Fix 'How to Set Up API' to 'How to Set Up the API' in titles
- Add 'the' before 'API' in descriptions and summaries
- Fix grammar error 'all you need to is' to 'all you need to do is'
- Improve naturalness while maintaining technical accuracy
Co-Authored-By: [email protected] <[email protected]>
* docs: fix unnatural English in API v2 @ApiOperation summaries
- Fix grammatically incorrect 'conferencing apps oauths callback' to 'Conferencing app OAuth callback'
- Replace 'ooo' with 'out-of-office' in user-facing summaries for clarity
- Ensure consistent sentence case capitalization (only first letter capitalized)
- Remove trailing periods from summaries for consistency
- Fix awkward phrasing like 'Get by attribute id all of...' to more natural English
- Revert 'Introduction to the API v2' back to 'Introduction to API v2'
- Improve naturalness while maintaining technical accuracy
Co-Authored-By: [email protected] <[email protected]>
* Update apps/api/v2/src/modules/slots/slots-2024-09-04/controllers/slots.controller.ts
* Update docs/api-reference/v2/openapi.json
* docs: fix setup/set up usage - use 'backend setup' (noun) not 'backend set up' (verb)
Co-Authored-By: [email protected] <[email protected]>
* docs: fix setup/set up verb usage - use 'set up' (verb) not 'setup' (verb)
- Fix 'You have to setup' → 'You have to set up' in quickstart.mdx
- Fix 'Setup environment variables' → 'Set up environment variables'
- Fix 'Setup root of your app' → 'Set up root of your app'
- Fix 'prompted to setup' → 'prompted to set up' in setup.mdx
Co-Authored-By: [email protected] <[email protected]>
* Ran v2 locally to regen the doc json files
---------
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
* Updating how-to-setup-api-in-a-local-instance.mdx with correction after api v2
After the implementation of api v2, some of the documents are not yet updated and could you make developers spend too much time on finding these things.
* fix: typo
---------
Co-authored-by: Prashant Varma <[email protected]>
* --init
* progress...
* add more docs
* bunch of changes and added back platform
* development guides added
* more guides in develop with cal
* self hosted WIP
* deployments
* fix deployment steps
* self-hosted guides
* ..
* Removed the development only sections
* Removed 'with Cal.com'
* use steps component for steps
---------
Co-authored-by: Keith Williams <[email protected]>