* chore: Implement short-lived redis cache for slots
* chore: adapt apiv2 redis service to match with upstash redis
* chore: safer redis service and ms ttl
* fixup! chore: safer redis service and ms ttl
* Wrap with timeout, currently doesn't work yet
* Updated @upstash/redis for better signal support
* Fix type errors, remove ts value
* Inject NoopRedisService for NODE_ENV test
* chore: bump platform libs
* chore: bump platform libs
* Upstash Redis upgrade no longer resulted in expected hard crash on init, so updated factory and our Upstash Redis Adapter to mimick old behaviour
* Add SLOTS_CACHE_TTL variable for configurable ttl on slots cache
* Update parseInt to use right types
* chore: bump platform libs
* chore: bump platform libs
* chore: bump platform libs
* update e2e api v2 action
* set SLOTS_CACHE_TTL env var api v2 e2e
---------
Co-authored-by: cal.com <morgan@cal.com>
* refactor: rename SelectedSlotsRepository to PrismaSelectedSlotRepository
- Rename class from SelectedSlotsRepository to PrismaSelectedSlotRepository for consistency
- Update all imports and type references throughout the codebase
- Update DI module bindings and variable names
- Maintain type safety without breaking changes
Co-Authored-By: alex@cal.com <me@alexvanandel.com>
* refactor: complete PrismaSelectedSlotRepository rename
- Update DI module binding property name from selectedSlotsRepo to selectedSlotRepo
- Update test mock to use PrismaSelectedSlotRepository class name
- Ensure all references are consistently updated
Co-Authored-By: alex@cal.com <me@alexvanandel.com>
* fix: rename file to prismaSelectedSlotRepository.ts and fix plural variable references
- Rename apps/api/v2/src/lib/repositories/prisma-selected-slots.repository.ts to prismaSelectedSlotRepository.ts
- Update class name from PrismaSelectedSlotsRepository to PrismaSelectedSlotRepository
- Fix plural variable reference selectedSlotsRepository to selectedSlotRepository in service
- Update all import paths to reference the new file name
- Maintain consistency with camelCase naming convention
Co-Authored-By: alex@cal.com <me@alexvanandel.com>
* fix: rename SelectedSlotsRepositoryFixture to SelectedSlotRepositoryFixture for consistency
- Rename test fixture class from SelectedSlotsRepositoryFixture to SelectedSlotRepositoryFixture (singular)
- Update all import statements in test files to use the renamed class
- Resolves naming mismatch between fixture class and variable declarations
- Fixes TypeScript compilation errors in CI tests
Co-Authored-By: alex@cal.com <me@alexvanandel.com>
* feat: add SelectedSlotRepositoryInterface and update DI to use interface
Co-Authored-By: alex@cal.com <me@alexvanandel.com>
* refactor: rename selectedSlots.ts to selectedSlot.ts and update all imports
Co-Authored-By: alex@cal.com <me@alexvanandel.com>
* fix: update test mock import path after file rename
Co-Authored-By: alex@cal.com <me@alexvanandel.com>
* Update apps/api/v2/src/lib/modules/available-slots.module.ts
* Update apps/api/v2/src/lib/modules/available-slots.module.ts
* Implement DTO
* dont declare dependencies locally, duplicating
* Small DTO/token fix
* chore: bump @calcom/platform-libraries from 0.0.266 to 0.0.267
* oops.
* Update fixture names also
* Omg these vscode actions preventing saves
* Final fix, hopefully
---------
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Somay Chauhan <somaychauhan98@gmail.com>
* refactor: replace Prisma.validator<Select>() with satisfies syntax
- Convert all Prisma.validator<Prisma.SomeSelect>()({...}) patterns to {...} satisfies Prisma.SomeSelect
- Update import { Prisma } to import type { Prisma } where only used for types
- Maintain existing functionality while modernizing TypeScript syntax
- Covers 89+ files across packages/prisma/selects, repository classes, tRPC handlers, and API modules
Co-Authored-By: alex@cal.com <me@alexvanandel.com>
* refactor: complete remaining Prisma.validator conversions
- Update test fixture files with satisfies syntax
- Apply lint-staged formatting fixes
- Complete refactoring of all remaining files
Co-Authored-By: alex@cal.com <me@alexvanandel.com>
* revert: remove unintended platform library update
- Revert yarn.lock changes that updated @calcom/platform-libraries from 0.0.236 to 0.0.239
- This was an unintended side effect of the refactoring process
- Keep only the intended Prisma.validator → satisfies syntax changes
Co-Authored-By: alex@cal.com <me@alexvanandel.com>
* fix: update ESLint plugin references to correct package name
- Change @calcom/eslint to @calcom/eslint-plugin-eslint in eslint-preset.js
- Resolves 'Failed to load plugin @calcom/eslint' error causing CI failures
Co-Authored-By: alex@cal.com <me@alexvanandel.com>
---------
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: alex@cal.com <me@alexvanandel.com>
2025-07-04 21:08:05 +01:00
Hariom BalharaGitHubDevin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>hariom@cal.com <hariom@cal.com>cal.comMorgan
* feat: Add routing-forms record response endpoint with available slots
* fix: resolve TypeScript error in handleResponse.test.ts
- Fix type mismatch where mockResponse was passed as identifierKeyedResponse
- identifierKeyedResponse expects Record<string, string | string[]> structure
- Updated test to pass correct data structure for type compatibility
Co-Authored-By: hariom@cal.com <hariom@cal.com>
* fix: correct POST endpoint parameter handling and request body parsing in routing forms responses controller
- Change @Query() to @Body() decorator for POST request data in controller
- Update service method to accept parsed body data directly
- Remove incorrect URLSearchParams parsing of request.body object
- Fix getRoutingUrl method to use form response data parameter
This resolves API v2 test failures by following proper NestJS patterns for POST request handling.
Co-Authored-By: hariom@cal.com <hariom@cal.com>
* Pass teamMemberEmail as well
* Devin fixes reverted
* Keep all routing related props together in both endpoints
* Remove newly added slots props from Slots documentation as they are used through internal fn call only
* fix test
* Pass skipContactOwner
* Pass crmAppSlug and crmOwnerRecordGType and add more tests
* handle external redirect case and form not found case
* hide props
* chore: bump platform libs
---------
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: hariom@cal.com <hariom@cal.com>
Co-authored-by: cal.com <morgan@cal.com>
Co-authored-by: Morgan <33722304+ThyMinimalDev@users.noreply.github.com>
* feat: split atoms endpoints and add public event type endpoint
* Update ConnectedDestinationCalendars import path across platform/atoms components
* refactor: update BookingResponse import path from platform-libraries to features/bookings
* Move AvailableSlotsType to util.ts and update imports to use GetAvailableSlotsResponse
* Refactor import path for RecurringBookingCreateBody type from libraries to types
* Fix import path for getBookingForReschedule type from platform-libraries to features
* Refactor PublicEventType export location and update import references
* Remove @calcom/platform-libraries dependency from atoms package.json
* chore(deps): update yarn.lock dependencies
* Remove console.log statements and fix indentation in event type hooks
* Migrate event type transformers from platform/libraries to api/v2 directory
* Remove console.log
* Update BookerPlatformWrapper.tsx
* Add script to populate empty team slugs with slugified team names
* Remove vitest imports
* reset platform libraries version
* Remove unused orgId comment from useAtomGetPublicEvent hook params
* Update useApiV2AvailableSlots.ts
* refactor: remove unused exports from lib package index file
* Undo: @SomayChauhan
Add script to populate empty team slugs with slugified team names
* Update booking.tsx
* chore: upgrade @calcom/platform-libraries from 0.0.202 to 0.0.205
* chore: bump @calcom/platform-libraries from 0.0.205 to 0.0.206
* chore: configure babel and jest for node module transpilation in api v2
* fix: type errors
* Revert "chore: configure babel and jest for node module transpilation in api v2"
This reverts commit b2cf172a84fe8953f9497bf6e43874f476fbc04b.
* Update calendars.service.ts
* chore: bump @calcom/platform-libraries from 0.0.208 to 0.0.209
* fix: add proper type definition for calendar busy times to resolve ts-expect-error
* refactor: deprecate v2 old availability endpoints (#21075)
Co-authored-by: Morgan <33722304+ThyMinimalDev@users.noreply.github.com>
* chore: publish platform librareis
* feat: add delegation credential fields to calendar service mock
* chore: update @calcom/platform-libraries from 0.0.211 to 0.0.213
* fix: skip failing calendar integration test
* chore: bump @calcom/platform-libraries from 0.0.213 to 0.0.214
* fix: api/v2 build error
* fix: e2e tests
---------
Co-authored-by: Morgan <33722304+ThyMinimalDev@users.noreply.github.com>
Co-authored-by: supalarry <laurisskraucis@gmail.com>
Co-authored-by: Lauris Skraucis <lauris.skraucis@gmail.com>
* refactor: slots input service rely on eventTypeId and set start hours if none set
* fix: filter out ooo slots
* test: ooo days filtered out of slots
* revert changes
* fix: platform seed data
* fix: assignAllTeamMembers: true excludes team owners in platform
* refactor: platform plan guard explicit error message
* refactor: require either hosts or assignAllTeamMembers=true
* refactor: require either hosts or assignAllTeamMembers=true
* fix: before creating or updating team event type check if doesnt exist with that slug
* chore: regenerate docs
* test: can update round robin that had assign all team members true
* fix: platform guard spec test
* fix: seed platform membership role
* fix: test ts error
* feat: v2 get managed users by email
* docs
* fix: offset query param not showing up in docs
* finish merge main
* fix: check if each email in emails query param is email
* refactor: Remove intervalLimits from @calcom/lib and export directly (#19710)
* refactor: Remove intervalLimits from @calcom/lib and export directly
* Tackle other places that use parseBookingLimit/parseDurationLimit
* More type fixups that were hidden by previous fails
* Fixed up booking-limits file
* Remove server-only
## What does this PR do?
<!-- Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change. -->
- Fixes #XXXX (GitHub issue number)
- Fixes CAL-XXXX (Linear issue number - should be visible at the bottom of the GitHub issue description)
## Visual Demo (For contributors especially)
A visual demonstration is strongly recommended, for both the original and new change **(video / image - any one)**.
#### Video Demo (if applicable):
- Show screen recordings of the issue or feature.
- Demonstrate how to reproduce the issue, the behavior before and after the change.
#### Image Demo (if applicable):
- Add side-by-side screenshots of the original and updated change.
- Highlight any significant change(s).
## Mandatory Tasks (DO NOT REMOVE)
- [ ] I have self-reviewed the code (A decent size PR without self-review might be rejected).
- [ ] I have updated the developer docs in /docs if this PR makes changes that would require a [documentation change](https://cal.com/docs). If N/A, write N/A here and check the checkbox.
- [ ] I confirm automated tests are in place that prove my fix is effective or that my feature works.
## How should this be tested?
<!-- Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration. Write details that help to start the tests -->
- Are there environment variables that should be set?
- What are the minimal test data to have?
- What is expected (happy path) to have (input and output)?
- Any other important info that could help to test that PR
## Checklist
<!-- Remove bullet points below that don't apply to you -->
- I haven't read the [contributing guide](https://github.com/calcom/cal.com/blob/main/CONTRIBUTING.md)
- My code doesn't follow the style guidelines of this project
- I haven't commented my code, particularly in hard-to-understand areas
- I haven't checked if my changes generate no new warnings
* Add unit tests and e2e
* fix ts errors
* Add comment
* bump platform libs
* fix: yarn-lock
* fix yarn.lock
* doc update
* Add isString
---------
Co-authored-by: Morgan Vernay <morgan@cal.com>
* refactor: version old slots
* feat: init new slots endpoints
* chore: range format
* fix: duratin
* fix: duratin
* test: slot releaseAt
* refactor: reserve slot response
* refactor variable name
* docs: have new slots controller in docs
* feat: crud for slots reservations
* refactor: use exclude all for response
* docs
* chore: slots input service
* refactor mini
* refactor: remove unused imports
* docs
* handle orgSlug for dynamic events
* refactor: correct name
* docs
* add optional organizationSlug to BySlug search
* refactor: slot output format
* refactor: return seated slot info
* docs
* rename functions
* refactor: slots seated response
* fix: handle same username in org and non org
* refactor: test format
* fix: allow reservationDuration only for authed requests
* chore: check if auth user has permissions to define custom reservation duration
* refactor: split e2e test files
* refactor: invalid request exception codes
* chore: old slots controller uses all old versions
* refactor: use unique names in e2e tests
* refactor: version number in tests
* refactor: use unique names in e2e tests
* refactor: use unique names in e2e tests
* refactor: test cleanup
* refactor: increase e2e maxWorkers to 8
* refactor: randomNumber -> randomString
* chore: add local e2e command
* feat: teams endpoints
* refactor: organization teams reuse team types
* refactor: move team specific functions out of organizations-teams.repository
* supporting files
* regenerate docs
* feat: stripe service to generate team creation checkout
* refactor: request payment when creating a team
* fix: tests
* fix env
* driveby: event type name and email booking fields
* finish merge main
* refactor: define inputs and outputs by separating default and custom fields
* refactor: event type api <-> internal transformers
* refactor: v2 use refactored libraries to transform input and output booking fields
* refactor: dont allow custom slugs with default reserved slugs
* refactor: input service store only specific default system fields
* refactor: atoms display only specific default system fields
* refactor: delete unused system field constants
* fix: tests
* fix: old event types
* fix: imports
* fix: import
* chore: release libraries and use v2 with them
* fix: unit tests
* refactor: push email in case of missing phone
* refactor: satisfies check for event-type locations
* WIP
* services
* controllers + outputs
* unit tests for repositories
* use hard coded enum type
* use prisma import
* remove redunant input file
* fix packagejson
* rename to spec files
* fix typo in option service file name
* move membership call to org membership service
* move logic to service > repo
* fix membership query
* attribute controller e2e spec
* add options e2e test
* add jest watch for e2e
---------
Co-authored-by: Morgan Vernay <morgan@cal.com>
* chore: platform-libraries export updateNewTeamMemberEventTypes
* chore: platform-libraries export updateNewTeamMemberEventTypes
* chore: v2 api bump platform-libraries to 0.0.22
* fix: add created managed user to assignAllMembers: true team event-types
* fix: add created organizations user to assignAllMembers: true team event-types
* refactor: organization teams chose if team creator is auto-accepted
* refactor: managed users have only 2 default event types with video
* refactor: lowercase schedulingType for creating team event-types
* refactor: lowercase schedulingType for creating team event-types
* feat: separate platform teams by OAuth client
* swagger regenerate
* refactor: delete platform team when oauth client deleted
* revert: keep 4 default event-types
* fix: tests && merge of main into this branch
* fix: typecheck
---------
Co-authored-by: Morgan <33722304+ThyMinimalDev@users.noreply.github.com>
* refactor: event-types CREATE, UPDATE accept scheduleId and return scheduleId
* chore: enable passing scheduleId to event-types create handler
* chore: use platform-libraries at version 0.0.20
* fix: remove team output schedule
* finish merge main into this branch
* fix: dont allow adding scheduleId to event-type if user does not own schedule
* fix: event-types input service transform length property
* feat: create organizations event-types controller, service and repository
* feat: enable organizations event types
* fix: create team request user isOrgAdmin check
* refactor: hosts array required in team input and output
* chore: use platform-libraries at version 0.0.19
* tests: test organizations event-types
* feat: enable managed event-types
* chore: fix main merge into this branch
* feat: assign all team members for managed event-types
* refactor: gathering managed event-type users ids
* chore: include assignAllTeamMembers in team event response
* test: assign all team members db event
* chore: delete unused files
* docs: swagger create and update request body objects
* revert: event-types platform-libraries update
* refactor: organisations event-types endpoints accessible by TEAM_ADMIN and up
* fix: managed event types output hosts array empty
* fix: dont allow creating event-type for non-team member
* chore: delete unused variables
* tests: negative tests
* chore: finish main merge
* refactor: UserAvatarGroupWithOrg.tsx remove unecessary profile prop
* chore: define event-type types in platform/types
* feat: event-type transformes in lib and re-exported through platform-libraries
* chore: define user types in platform/types
* chore: add users endpoint to platform-constants
* refactor: app-store use narrowed down booker event type
* chore: version old event-types module
* fix: old event-types e2e test
* fix: libraries add missing export
* fix: reset libraries version to 0
* feat: new event-types module and users endpoints
* feat: make booker atom work with v2 event-types
* updating event type
* refactor: remove guard for get event-types
* refactor: move private hook to public
* Revert "refactor: remove guard for get event-types"
This reverts commit d41204069f1d5bb1305b388ce53399f9175f4249.
* Revert "refactor: move private hook to public"
This reverts commit 09322e8fba102e57104959f79ed6bfa9a677dc9d.
* refactor: get by username and slug in /event-types
* remove console log
* feat: locations handle displayEventPublicly
* test e2e event-types
* revert: user output from types
* refactor: event-types hooks have private and public folders
* refactor: require event-type.slug in input
* refactor: demand that all labels of booking fields are unique
* refactor: remove unused import
* refactor: only have email and name by default in booker
* refactor: add booking field slug
* fix: display event-type location publicly / hide it in booker
* fix: display event-type location publicly / hide it in booker
* fix: packages/lib tests
* fix: typescript in e2e test
* fix: dynamic event types input
* refactor: use IsIn instead of IsEnum
* refactor: simplify getEventTypes
* fix: use ApiAuthGuard instead of AccessTokenGuard
* chore: export more stuff from libraries
* refactor: SchedulingTypeEnum and Type
---------
Co-authored-by: Morgan <33722304+ThyMinimalDev@users.noreply.github.com>
* chore: enable apiv2 auth with api keys
* chore: enable apiv2 auth with api keys
* chore: enable apiv2 auth with api keys
* chore: enable apiv2 auth with api keys
* chore: enable apiv2 auth with api keys
* fixup! chore: enable apiv2 auth with api keys
* fixup! Merge branch 'chore-apiv2-auth-api-key' of github.com:calcom/cal.com into chore-apiv2-auth-api-key
* fixup! fixup! Merge branch 'chore-apiv2-auth-api-key' of github.com:calcom/cal.com into chore-apiv2-auth-api-key
* fixup! fixup! fixup! Merge branch 'chore-apiv2-auth-api-key' of github.com:calcom/cal.com into chore-apiv2-auth-api-key