* refactor: make individual component for generic and event type specific calendar views
* fixup
* update examples app
* fix: show busy times from calendars in week view
* fix: use calendar busy times not working
* chore: add changesets
* fixup
* chore: implement PR feedback
* fix: merge conflicts
* chore: implement PR feedback
* fixup
* chore: implement PR feedback
* chore: refactor config files to prevent migration tool errors
* refactor: upgrade with the tailwind migration tool
* chore: restore pre-commit command + mc
* refactor(wip): update dependencies and migrate to Tailwind CSS v4 (mainly web)
* chore: resolve Tailwind v4 migration conflicts from merging main
* chore: remove unused Tailwind packages from config and update dependencies for v4 migration
* chore: uncomment Tailwind CSS utility classes in globals.css
* fix: resolve token conflicts between calcom and coss ui
* fix: textarea scrollbar
* Fix CUI-16
* fix: added @tailwindcss/forms plugin and cleaned up CSS classes in various components to remove unnecessary dark mode styles
* fix: selects and inputs of different sizes
* fix: remove unnecessary leading-20 class from modal titles in various components
* fix: update Checkbox component styles to remove unnecessary border on checked state
* fix: clean up styles in RequiresConfirmationController, Checkbox, and Radio components to enhance consistency
* fix: update button and filter component styles to remove unnecessary rounded classes for consistency
* fix: calendar
* fix: update KBarSearch
* fix: refine styles in Empty and Checkbox components for improved consistency
* Fix focus state email input
* fix: update button hover and active states to use 'not-disabled' instead of 'enabled'
* fix: line-height issues
* fix: update class name for muted background in BookingListItem component
* fix: sidebar spacing
* chore: update class names to use new Tailwind CSS color utilities
* fix embed
* chore: upgrade Tailwind CSS to version 4.1.16 and update related dependencies
* Map css variables and add a playground test for heavy css customization
* suggestion for coss-ui
* refactor: update CSS variable usage and clean up styles
- Replace instances of `--cal-brand-color` with `--cal-brand` in embed-related HTML files.
- Remove the now-unnecessary `addAppCssVars` function from the embed core.
- Import theme tokens in the embed core styles for better consistency.
- Clean up whitespace and formatting in CSS files for improved readability.
- Add a comment in `tokens.css` regarding its usage in both embed and webapp contexts.
* Handle within tokens.css instead of fixing coss-ui
* Remove initial, not needed. Also, remove tailwind.config.js as tailwidn scans the html automaically
* fix: examples app breaking
* fix: modal not resizing correctly
* feat: upgrade atoms to tailwind v4
* fix: atoms build breaking
* fix: atoms build breaking
* chore: upgrate examples/base to tailwind 4
* chore: update globals.css
* fix: add missing scheduler css variables
* fix: PlatformAdditionalCalendarSelector
* chore: update global styles
* chore: update tailwindcss and postcss dependencies to stable versions
* chore: remove unneeded class
* fix: dialog and toast animation
* fix: replace flex-shrink-0 with shrink-0 for consistent styling in various components
* fix: dialog modal for Apple connect
* add margin in SaveFilterSegmentButton
* Fix radix button nested states
* add cursor pointer to buttons but keep dsabled state
* Fix commandK selectors and adds cursor pointer
* Fix teams filter
* fix - round checkboxes
* fix filter checkbox
* fix select indicator's margin
* command group font size
* style: fix badge and tooltip radius
* chore: remove unneeded files
* Delete PR_REVIEW_MANAGED_EVENT_REASSIGNMENT.md
* remove ui-playground leftover
* fix: add missing react phone input styles in atoms
* Delete managed-event-reassignment-flow-and-architecture.mermaid
* fix: inter font not loading
* Add theme to skeleton container so that it can support dark mode
* fix: create custom stack-y-* utilities post tw4 upgrade
* fix: typo
* fix: atoms stack class + remove unused css file
* fix default radius valiue
* fix space-y in embed
* fix skeleton background
* Hardcode radius values to match production
* fix border in embed
* add missing externalThemeClass
* feat: create a custom stack-y-* utility
* fix: add stack utility to atom global css
* fix: Skeleton loader class modalbox
* Add stack-y utility in embed
* fix: add missing stack utilities in atoms globals.css
* update yarn.lock
* add popover portla
* update
---------
Co-authored-by: Sean Brydon <sean@cal.com>
Co-authored-by: Hariom Balhara <hariombalhara@gmail.com>
Co-authored-by: Ryukemeister <sahalrajiv6900@gmail.com>
Co-authored-by: cal.com <morgan@cal.com>
Co-authored-by: Eunjae Lee <hey@eunjae.dev>
Co-authored-by: Anik Dhabal Babu <adhabal2002@gmail.com>
* feat: update Office365 getMainTimeZone to handle new Graph API format and convert Windows timezones to IANA
- Handle new Graph API response format with 'value' field containing Windows timezone names
- Add windows-iana dependency for timezone conversion from Windows to IANA format
- Maintain backward compatibility with legacy direct string response format
- Add proper error handling with fallback to original timezone name if conversion fails
- Log conversion details for debugging and monitoring
Co-Authored-By: morgan@cal.com <morgan@cal.com>
* fix: example app select default value
* fixup! fix: example app select default value
* fix: preserve legacy string timezone behavior, only convert new object format
- Address GitHub comments from supalarry about behavior change concerns
- Preserve original behavior: return legacy string responses as-is without conversion
- Only convert Windows timezones from new Graph API object format
- Add explanatory comments about API format evolution
- Restructure conditional logic to handle formats independently
Co-Authored-By: morgan@cal.com <morgan@cal.com>
* trigger CI with ready-for-e2e label
Co-Authored-By: morgan@cal.com <morgan@cal.com>
---------
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: morgan@cal.com <morgan@cal.com>
Co-authored-by: Morgan <33722304+ThyMinimalDev@users.noreply.github.com>
* feat: add api v2 endpoint to fetch all user schedules
* chore: update typing
* feat: custom hook to fetch all user schedules
* refactor: shift logic to transform schedules into function of its own
* init: list schedules atom
* feat: api endpoints for list schedules atom
* refactor: accept redirect url as prop
* fix: pass redirect url prop
* integrate list schedules atom with availability settings
* refactor: extract types to be reused in api v2 endpoints
* skip availability settings page for the time being until we have api v2 endpoints in prod
* feat: add docs for list schedules atom
* fixup
* export Schedule type
* make sure we always have a default schedule if user deletes his default schedule
* chore: implement code rabbit feedback
* chore: implement PR feedback
* fix: resolve merge conflicts
* fix: import path
* update platform libraries
* fix: type check
* resolve merge conflicts
* update atoms export
* update platform libraries schedule
* chore: arrange atoms in alphabetical order
* update atoms controller to include endpoints for list schedules atom
* add create atom scheule atom
* fix: invalidate schedules on new schedule creation
* chore: add changesets
* e2e tests for apple connect atom
* update globalEnv for turbo.json
* update pages for tests
* update playwright config so we can use env variables inside tests
* update packages
* update variable names
* update playwright config
* fix: import variables from env instead of separate files
* update env variables for atoms e2e yml
* chore: Upgrade prisma to 6.7.0
* Build fixes
* type fixes
Signed-off-by: Omar López <zomars@me.com>
* Update schema.prisma
* Patching
* Revert "Update schema.prisma"
This reverts commit 47d8618bf89ef4d007b30084df766f17281e21a1.
* Revert "Patching"
This reverts commit a1d2e3040e71690a44d4324db95d73b4d68c6adb.
* Revert schema changes
Signed-off-by: Omar López <zomars@me.com>
* WIP
Signed-off-by: Omar López <zomars@me.com>
* Update getPublicEvent.ts
* Update imports
Signed-off-by: Omar López <zomars@me.com>
* Update gitignore
Signed-off-by: Omar López <zomars@me.com>
* update remaining imports
Signed-off-by: Omar López <zomars@me.com>
* Delete .cursor/config.json
* Discard changes to packages/features/eventtypes/lib/getPublicEvent.ts
* Update _get.ts
* Update user.ts
* Update .gitignore
* update
* Update WorkflowStepContainer.tsx
* Update next-auth-custom-adapter.ts
* Update getPublicEvent.ts
* Update workflow.ts
* Update next-auth-custom-adapter.ts
* Update next-auth-options.ts
* Update bookingScenario.ts
* fix missing imports
* upgrades prismock
Signed-off-by: Omar López <zomars@me.com>
* patches prismock
Signed-off-by: Omar López <zomars@me.com>
* Update reschedule.test.ts
* Update prisma.ts
* patch prismock
Signed-off-by: Omar López <zomars@me.com>
* fix enums imports
Signed-off-by: Omar López <zomars@me.com>
* Revert "Update prisma.ts"
This reverts commit 64edcf8db54171ff4456c209d563b5d431d99619.
* Revert "patch prismock"
This reverts commit e95819113dc9d88e7130947aa120cd42710977c8.
* fix patch
* Fix test that overrun the boundary, it shouldn't test too much
* Move prisma import to changeSMSLockState
* Bring back broken test without illegal imports
* Merge with main and fix filter hosts by same round robin host
* Fixed buildDryRunBooking fn tests
* Fix and move ooo create or update handler test
* Fix packages/features/eventtypes/lib/isCurrentlyAvailable.test.ts
* Fix packages/trpc/server/routers/viewer/organizations/listMembers.handler.test.ts
* Mock @calcom/prisma
* Fix: verify-email.test.ts
* fix: Moved WebhookService test and fixed default import mock
* Fix: Added missing prisma mock, handleNewBooking uses that of course
* We're not testing createContext here
* fix: Prisma mock fix for listMembers.test.ts
* More fixes to broken testcases
* Forgot to remove borked test
* Prevent the need to mock a lot of dependencies by moving out buildBaseWhereCondition to its own file
* Temporarily skip getCalendarEvents, needs a rewrite
* Fix: turns out you can access protected in testcases
* fix further mocks
* Added packages/features/insights/server/buildBaseWhereCondition.ts, types
* Always great to have a mock and then not use it
* And one less again.
* fix: confirm.handler.test, didn't mock prisma
* fix: Address minor nit by @eunjae & fix ImpersonationProvider test
* Updated isPrismaAvailableCheck that doesn't crash on import
* fix: Get Prisma directly from the client, it usually involves the Validator and does not need 'local' inclusion
* Add zod-prisma-types without the generator enabled (commented out)
* Uncomment and see what happens
* Change method of import as imports did not work in Input Schemas
* Remove custom 'zod' booking model, it does not belong with Prisma
* Fix all other global Model imports
* Rewrite most schema includes AND remove barrel file
* Add bookingCreateBodySchema to features/bookings
* Flurry of type fixes for compatibility with new zod gen
* Refactor out the custom prisma type createEventTypeInput
* Work around nullable eventTypeLocations
* HandlePayment type fix
* More fixes, final fix remaining is CompleteEventType
* Should fix a bunch more booking related type errors
* Missed one
* Some props missing from BookingCreateBodySchema
* Fix location type in handleChildrenEventTypes
* Little bit hacky imo but it works
* Final type error \o/
* Forgot to include Prisma
* Do not include zod-utils in booker/types
* Oops, was already including Booker/types
* Fix membership type, also disallow updating createdAt/updatedAt, make part of patch/post
* Fix api v1 type errors
* Fix EventTypeDescription typings
* Remove getParserWithGeneric, use userBodySchema with UserSchema
* use centralized timeZoneSchema
* Implement feedback by @zomars
* Couple of WIP pushes
* Fix tests
* Type fixes in `handleChildrenEventTypes` test
* Try and parse metadata before use
* Change zod-prisma-types configuration for optimal performance
* Fix prisma validator error in `prisma/selects/credential`
* Disable seperate relations model, hits a bug
* Import absolute - this makes rollup work in @platform/libraries
* Attempt at removing resolutions override
* Refactor using `Prisma.validator` to `satisfies`
* Build atoms using @calcom/prisma/client
* Build atoms using @calcom/prisma/client
* fixes
* Update eventTypeSelect.ts
* Adjust `eventTypeMetaDataSchemaWithUntypedApps` from `unknown` to `record(any)`
* `EventTypeDescription` rely on `descriptionAsSafeHTML` instead of `description`
* Add `seatsPerTimeSlot` to event type public select
* Fix typing in `users-public-view` getServerSide props
* Add missing `schedulingType` to prop
* chore: bump platform libraries
* Function return type is illegal, not sure how this passed eslint (#21567)
* Merged with main
* Update updateTokenObject.ts
* Update handleResponse.ts
* Update index.ts
* Update handleChildrenEventTypes.ts
* Update booking-idempotency-key.ts
* Update WebhookService.test.ts
* Update events.test.ts
* Update queued-response.test.ts
* Update events.test.ts
* Update getRoutedUrl.test.ts
* fix: type checks
Signed-off-by: Omar López <zomars@me.com>
* fixes
Signed-off-by: Omar López <zomars@me.com>
* chore: bump platform libraries
* Update yarn.lock
* more fixes
Signed-off-by: Omar López <zomars@me.com>
* fixes
Signed-off-by: Omar López <zomars@me.com>
* biuld fixes
* chore: bump platform libraries
* Update conferencing.repository.ts
* Update conferencing.repository.ts
* Update getCalendarsEvents.test.ts
* Update vite.config.js
* chore: bump platform libraries
* Update users.ts
* Discard changes to docs/api-reference/v2/openapi.json
* Update vite.config.ts
* updated platform libraries
* Update get.handler.test.ts
* Update get.handler.test.ts
* Update schema.prisma
* Discard changes to docs/api-reference/v2/openapi.json
* Update next-auth-custom-adapter.ts
* Update team.ts
* Flurry of type fixes
* Fix majority of insight related type errors
* Type fixes for unlink of account
* Make user nullable again
* Fixed a bunch of unit tests and one type error
* Attempted mock fix
* Attempted fix for Attribute type
* Ensure default import becomes prisma, but not direct usage
* Import default as prisma in prisma.module
* Add attributeOption to attribute type
* Fix calcom/prisma mock
* Refactor Prisma client imports to @calcom/prisma/client
Updated all imports from '@prisma/client' to '@calcom/prisma/client' across tests and repository files for consistency and to use the correct Prisma client package. This change improves maintainability and ensures the correct client is referenced throughout the codebase.
* Undo removal of max-warnings=0 to get main to merge
* Remove unit tests for e2e fixtures, provide new prisma mock
* Mock @calcom/prisma in event manager
* Mock @calcom/prisma in event manager
* Add correct format even with --no-verify
* Mock prisma in CalendarManager
* Add mock for permission-check.service
* Better injection in PrismaApiKeyRepository imports
* More mock fixes :)
* Fix listMembers.handler.test
* Fix User import
* Appropriately adjust all types to be imported as types, there were a lot of types imported as normal deps
* Why was this a thing?
* Strictly speaking; Not using prismock anymore
* Ditched patch file for prismock
* Fix output.service.ts platform type imports, need concrete for plainToClass
* Better typing and tests for unlinkConnectedAccount.handler
* Small type fix
* Disable calendar cache tests as they are dependent on prismock
* chore: bump platform lib
* getRoutedUrl test remove of unused import
* Extract select to external const on getEventTypesFromDB
* Direct select of userSelect from selects/user
* fix type error from merging 23653
* Fixed integration tests by removing hardcoded values that were possible due to mocking, but as its now directly hitting the db no longer
* fix: vite config atoms prisma client type location
* revert: example app prisma client
* revert: example app prisma client
* bump platform libs
* fix: use class instead of type for DI of PlatformBookingsService
* update platform libs
* remove unused variable
* chore: generate prisma client for api v2
* fix: api v2 e2e
* fix: atoms e2e
* fix: atoms e2e
* fix: atoms e2e
* fix: api v2 e2e
* fix: tsconfig apiv2 enums
* publish libraries
* Simplify check for existence teamId
---------
Signed-off-by: Omar López <zomars@me.com>
Co-authored-by: Alex van Andel <me@alexvanandel.com>
Co-authored-by: Joe Au-Yeung <j.auyeung419@gmail.com>
Co-authored-by: supalarry <laurisskraucis@gmail.com>
Co-authored-by: cal.com <morgan@cal.com>
Co-authored-by: Morgan <33722304+ThyMinimalDev@users.noreply.github.com>
Co-authored-by: Benny Joo <sldisek783@gmail.com>
2025-09-11 15:27:50 +01:00
Peer RichelsenGitHubDevin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>Amit Sharmasean-brydoncoderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
* add data test id for testing
* update tests for creating event type
* add test for creating team event types
* helper function for tests
* update tests
* update tests
* fixup: fix correct data test ids for tabs
* e2e tests for availability settings atom
* init tests for booking page
* add data test id for event type card
* update tests for booking page
* add data test ids for playwright tests
* update test coverage for booking page
* fix: gracefully handle calendar failures when bypassBusyCalendarTimes is enabled
- When _bypassCalendarBusyTimes parameter is true and third-party calendar fetching fails
- System now falls back to internal bookings only instead of throwing error
- Maintains existing error behavior when bypass is disabled
Co-Authored-By: morgan@cal.com <morgan@cal.com>
* feat: add _silentCalendarFailures parameter to handle calendar failures gracefully
- Add silentlyHandleCalendarFailures parameter to getBusyTimes service
- Add _silentCalendarFailures parameter to getUserAvailability schema
- Add _silentCalendarFailures parameter to tRPC slots endpoint
- Add _silentCalendarFailures parameter to API v2 slots/available endpoint
- Parameter attempts calendar calls first, falls back silently on failure
- Different from bypassCalendarBusyTimes which skips calendar calls entirely
Co-Authored-By: morgan@cal.com <morgan@cal.com>
* refactor: remove bypassBusyCalendarTimes logic from error handling
- Keep only silentlyHandleCalendarFailures logic in getBusyTimes error handling
- Remove redundant bypassBusyCalendarTimes condition from calendar failure handling
- Maintain existing bypassBusyCalendarTimes logic that skips calendar calls entirely
Co-Authored-By: morgan@cal.com <morgan@cal.com>
* feat: add silentlyHandleCalendarFailures prop to Booker atom
- Pass silentlyHandleCalendarFailures prop from BookerPlatformWrapper to useAvailableSlots
- Forward prop as _silentCalendarFailures parameter to API v2 slots/available endpoint
- Complete the parameter flow from Booker atom to underlying service layer
- Enables silent handling of calendar provider failures in Booker component
Co-Authored-By: morgan@cal.com <morgan@cal.com>
* chore: fix type and bump library
* chore: bump library
---------
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: morgan@cal.com <morgan@cal.com>
Co-authored-by: Somay Chauhan <somaychauhan98@gmail.com>
Co-authored-by: Morgan <33722304+ThyMinimalDev@users.noreply.github.com>
* feat: add PATCH endpoint for updating Google Calendar events
- Create UpdateUnifiedCalendarEventInput DTO with optional fields for partial updates
- Add PATCH /:calendar/event/:eventUid endpoint to CalUnifiedCalendarsController
- Extend GoogleCalendarService with updateEventDetails method
- Support updating title, description, start/end times for Google Calendar events
- Follow existing patterns for validation, error handling, and response transformation
- Initially support Google Calendar only with extensibility for other providers
Co-Authored-By: somay@cal.com <somay@cal.com>
* feat: expand PATCH endpoint to support all calendar event fields
- Add comprehensive field support to UpdateUnifiedCalendarEventInput DTO
- Include locations, attendees, status, and hosts fields with proper validation
- Expand GoogleCalendarService.updateEventDetails to handle complex field transformations
- Add helper methods for response status and event status mapping
- Preserve existing transformation logic from GoogleCalendarEventOutputPipe
- Support conferenceData updates with conferenceDataVersion parameter
Co-Authored-By: somay@cal.com <somay@cal.com>
* fix: add support for simple location field in Google Calendar events
- Add handling for geographic location field in addition to conferenceData
- Filter non-video locations for the simple location string field
- Preserve existing conferenceData support for video meetings
- Verified against Google Calendar API documentation
Co-Authored-By: somay@cal.com <somay@cal.com>
* refactor: extract transformation logic into GoogleCalendarEventInputPipe
- Create GoogleCalendarEventInputPipe following existing patterns
- Extract transformation logic from updateEventDetails method
- Move mapping methods to the new pipe for better organization
- Improve code reusability and maintainability
Addresses PR comment requesting transformation logic extraction.
Co-Authored-By: somay@cal.com <somay@cal.com>
* refactor: remove locations field and simplify calendar event input handling
* update docs
* refactor: remove hosts field from the update endpoint
* fix: exclude organizer from attendees list in Google Calendar event transformation
* feat: implement organizer preservation logic in PATCH endpoint
- Fetch existing Google Calendar event data before transformation
- Extract organizer attendees from existing event and merge with user-provided attendees
- Prevent accidental removal of organizers when users update attendees
- Add custom interface for GoogleCalendarEventInputPipe to support optional existingEvent parameter
- Preserve organizers unless user explicitly provides hosts field in update request
Co-Authored-By: somay@cal.com <somay@cal.com>
* feat: add hosts array handling to PATCH endpoint
- Add hosts field back to UpdateUnifiedCalendarEventInput DTO
- Implement transformAttendeesWithHostsHandling method in GoogleCalendarEventInputPipe
- Convert hosts to attendees with organizer: true for Google Calendar API
- When hosts are provided, they replace existing organizers (not merge)
- Maintain backward compatibility with existing organizer preservation logic
Co-Authored-By: somay@cal.com <somay@cal.com>
* feat: implement sophisticated attendee update logic with preservation and deletion support
- Add UpdateCalendarEventAttendee class with action: 'delete' support
- Implement attendee preservation logic that starts with existing Google Calendar attendees
- Support explicit attendee deletion using action: 'delete' field
- Update existing attendees when provided without action field
- Add new attendees that don't exist in current event
- Preserve organizer status when updating existing attendees
- Fetch existing event data when attendees OR hosts are being updated
- Maintain hosts array handling that replaces existing organizers
Co-Authored-By: somay@cal.com <somay@cal.com>
* feat: add host management and attendee deletion to calendar event API
* refactor: improve readability of transformAttendeesWithHostsHandling and restrict hosts to responseStatus updates only
- Break down complex transformAttendeesWithHostsHandling method into smaller, more readable helper functions:
- preserveExistingAttendees: handles existing attendee preservation
- processAttendeeDeletions: handles attendee deletion logic
- processAttendeeUpdatesAndAdditions: handles attendee updates and additions
- replaceHostsWithUpdatedOnes: handles host replacement with restrictions
- Create UpdateCalendarEventHost class that only allows responseStatus updates
- Restrict hosts array to prevent changes to name, email, and other fields
- Preserve existing host displayName from Google Calendar when updating responseStatus
Co-Authored-By: somay@cal.com <somay@cal.com>
* feat: restrict host updates to responseStatus only, preserve email and name from Google Calendar data
- Remove email field from UpdateCalendarEventHost class
- Update replaceHostsWithUpdatedOnes to preserve all host data except responseStatus
- Apply responseStatus updates to all existing organizers from Google Calendar
- Prevent users from updating host email or name fields
Co-Authored-By: somay@cal.com <somay@cal.com>
* Revert "feat: restrict host updates to responseStatus only, preserve email and name from Google Calendar data"
This reverts commit 22d07ce0cb13e71661522b2fd8a237d8b6e0809c.
* refactor: replace optional flag with organizer property in calendar event attendees
* refactor: remove organizer field from calendar event attendee input
* feat: add comprehensive test suites for calendar transformation pipes
- Create google-calendar-event-input.pipe.spec.ts with 67 test cases
- Create get-calendar-event-details-output-pipe.spec.ts with 35 test cases
- Follow event-types transformer test patterns with separate describe blocks
- Cover all transformation functions including edge cases and null handling
- Test attendee preservation, deletion, host management, and status transformations
- Ensure comprehensive coverage for sophisticated attendee update logic
Co-Authored-By: somay@cal.com <somay@cal.com>
* fix: remove invalid optional properties from calendar pipe tests
- Remove optional: false from line 85 in 'should transform attendees without existing event' test case
- Remove optional: true from line 388 in 'should update existing attendee' test case
- Remove optional: false from line 421 in 'should add new attendee' test case
- Update expected outputs to match actual pipe implementation behavior
- All 30 tests now pass locally
Co-Authored-By: somay@cal.com <somay@cal.com>
* fix: add platform library path mappings to Jest configuration
- Resolves module resolution errors for @calcom/platform-libraries/* imports in Jest
- Ensures test suite can run without 'Cannot find module' errors
- Adds comprehensive path mappings matching TypeScript configuration
Co-Authored-By: somay@cal.com <somay@cal.com>
* fix: add @calcom/dayjs path mapping to Jest configuration
- Add missing moduleNameMapper entry for @calcom/dayjs to resolve TypeScript path mappings in Jest
- Fixes TypeError: Cannot read properties of undefined (reading 'extend') in calendar pipe tests
- Calendar transformation pipe tests now pass successfully
Co-Authored-By: somay@cal.com <somay@cal.com>
* fix: configure Jest to use dayjs mock system for consistent test environment
- Remove @calcom/dayjs path mapping from Jest config
- Add setupFilesAfterEnv to automatically import dayjs mock
- Update dayjs mock with comprehensive jest.fn() implementation
- Add @calcom/platform-libraries/repositories and @calcom/prisma/client mappings
- Resolves dayjs TypeError in slots.service.spec.ts and other test files
Co-Authored-By: somay@cal.com <somay@cal.com>
* fix: complete shared Google event data with required properties for test suites
- Add missing required properties to sharedGoogleEvent in both test files
- Fix TypeScript compilation errors in calendar transformation pipe tests
- Correct test assertion for attendees filtering logic in output pipe
- All 11 test suites now pass with 199 tests total
Co-Authored-By: somay@cal.com <somay@cal.com>
* undo extra changes
* better tests
* fix: update calendar API endpoints to use plural events in path
* update documentation
* fix: Restrict updates to only the responseStatus field for hosts
* feat: add PATCH endpoint for updating Google Calendar events
- Create UpdateUnifiedCalendarEventInput DTO with optional fields for partial updates
- Add PATCH /:calendar/event/:eventUid endpoint to CalUnifiedCalendarsController
- Extend GoogleCalendarService with updateEventDetails method
- Support updating title, description, start/end times for Google Calendar events
- Follow existing patterns for validation, error handling, and response transformation
- Initially support Google Calendar only with extensibility for other providers
Co-Authored-By: somay@cal.com <somay@cal.com>
* feat: expand PATCH endpoint to support all calendar event fields
- Add comprehensive field support to UpdateUnifiedCalendarEventInput DTO
- Include locations, attendees, status, and hosts fields with proper validation
- Expand GoogleCalendarService.updateEventDetails to handle complex field transformations
- Add helper methods for response status and event status mapping
- Preserve existing transformation logic from GoogleCalendarEventOutputPipe
- Support conferenceData updates with conferenceDataVersion parameter
Co-Authored-By: somay@cal.com <somay@cal.com>
* fix: add support for simple location field in Google Calendar events
- Add handling for geographic location field in addition to conferenceData
- Filter non-video locations for the simple location string field
- Preserve existing conferenceData support for video meetings
- Verified against Google Calendar API documentation
Co-Authored-By: somay@cal.com <somay@cal.com>
* refactor: extract transformation logic into GoogleCalendarEventInputPipe
- Create GoogleCalendarEventInputPipe following existing patterns
- Extract transformation logic from updateEventDetails method
- Move mapping methods to the new pipe for better organization
- Improve code reusability and maintainability
Addresses PR comment requesting transformation logic extraction.
Co-Authored-By: somay@cal.com <somay@cal.com>
* refactor: remove locations field and simplify calendar event input handling
* update docs
* refactor: remove hosts field from the update endpoint
* fix: exclude organizer from attendees list in Google Calendar event transformation
* feat: implement organizer preservation logic in PATCH endpoint
- Fetch existing Google Calendar event data before transformation
- Extract organizer attendees from existing event and merge with user-provided attendees
- Prevent accidental removal of organizers when users update attendees
- Add custom interface for GoogleCalendarEventInputPipe to support optional existingEvent parameter
- Preserve organizers unless user explicitly provides hosts field in update request
Co-Authored-By: somay@cal.com <somay@cal.com>
* feat: add hosts array handling to PATCH endpoint
- Add hosts field back to UpdateUnifiedCalendarEventInput DTO
- Implement transformAttendeesWithHostsHandling method in GoogleCalendarEventInputPipe
- Convert hosts to attendees with organizer: true for Google Calendar API
- When hosts are provided, they replace existing organizers (not merge)
- Maintain backward compatibility with existing organizer preservation logic
Co-Authored-By: somay@cal.com <somay@cal.com>
* feat: implement sophisticated attendee update logic with preservation and deletion support
- Add UpdateCalendarEventAttendee class with action: 'delete' support
- Implement attendee preservation logic that starts with existing Google Calendar attendees
- Support explicit attendee deletion using action: 'delete' field
- Update existing attendees when provided without action field
- Add new attendees that don't exist in current event
- Preserve organizer status when updating existing attendees
- Fetch existing event data when attendees OR hosts are being updated
- Maintain hosts array handling that replaces existing organizers
Co-Authored-By: somay@cal.com <somay@cal.com>
* feat: add host management and attendee deletion to calendar event API
* refactor: improve readability of transformAttendeesWithHostsHandling and restrict hosts to responseStatus updates only
- Break down complex transformAttendeesWithHostsHandling method into smaller, more readable helper functions:
- preserveExistingAttendees: handles existing attendee preservation
- processAttendeeDeletions: handles attendee deletion logic
- processAttendeeUpdatesAndAdditions: handles attendee updates and additions
- replaceHostsWithUpdatedOnes: handles host replacement with restrictions
- Create UpdateCalendarEventHost class that only allows responseStatus updates
- Restrict hosts array to prevent changes to name, email, and other fields
- Preserve existing host displayName from Google Calendar when updating responseStatus
Co-Authored-By: somay@cal.com <somay@cal.com>
* feat: restrict host updates to responseStatus only, preserve email and name from Google Calendar data
- Remove email field from UpdateCalendarEventHost class
- Update replaceHostsWithUpdatedOnes to preserve all host data except responseStatus
- Apply responseStatus updates to all existing organizers from Google Calendar
- Prevent users from updating host email or name fields
Co-Authored-By: somay@cal.com <somay@cal.com>
* Revert "feat: restrict host updates to responseStatus only, preserve email and name from Google Calendar data"
This reverts commit 22d07ce0cb13e71661522b2fd8a237d8b6e0809c.
* feat: add comprehensive test suites for calendar transformation pipes
- Create google-calendar-event-input.pipe.spec.ts with 67 test cases
- Create get-calendar-event-details-output-pipe.spec.ts with 35 test cases
- Follow event-types transformer test patterns with separate describe blocks
- Cover all transformation functions including edge cases and null handling
- Test attendee preservation, deletion, host management, and status transformations
- Ensure comprehensive coverage for sophisticated attendee update logic
Co-Authored-By: somay@cal.com <somay@cal.com>
* refactor: replace optional flag with organizer property in calendar event attendees
* refactor: remove organizer field from calendar event attendee input
* fix: remove invalid optional properties from calendar pipe tests
- Remove optional: false from line 85 in 'should transform attendees without existing event' test case
- Remove optional: true from line 388 in 'should update existing attendee' test case
- Remove optional: false from line 421 in 'should add new attendee' test case
- Update expected outputs to match actual pipe implementation behavior
- All 30 tests now pass locally
Co-Authored-By: somay@cal.com <somay@cal.com>
* fix: complete shared Google event data with required properties for test suites
- Add missing required properties to sharedGoogleEvent in both test files
- Fix TypeScript compilation errors in calendar transformation pipe tests
- Correct test assertion for attendees filtering logic in output pipe
- All 11 test suites now pass with 199 tests total
Co-Authored-By: somay@cal.com <somay@cal.com>
* fix: resolve TypeScript compilation errors in calendar transformation pipe tests
- Add comprehensive Jest mocks for @calcom/prisma/client, @calcom/dayjs, CalendarManager, and delegationCredential
- Fix RedisService AbortSignal.timeout() usage
- Update UserAvailabilityService import path to use @calcom/lib/getUserAvailability
- Configure Jest moduleNameMapper to handle ES module imports and package.json mocking
- All 11 test suites now pass with 199 tests total
Co-Authored-By: somay@cal.com <somay@cal.com>
* fix: use proper CacheService dependency injection in AvailableSlotsService
- Replace direct CacheService instantiation with dependency injection
- Update CacheService import path to use correct calendar-cache module
- Fix repository and service dependencies for proper type safety
- Resolves TypeScript compilation errors in slots service tests
Co-Authored-By: somay@cal.com <somay@cal.com>
* fix: remove duplicate test file causing TypeScript compilation error
Co-Authored-By: somay@cal.com <somay@cal.com>
* undo extra changes
* undo extra changes
* fix: remove the action: "delete" key from attendees
* fix: simplify tests
* update docs
* undo: remove hosts
* Update pre-commit
* feat: add alternate route for calendar event retrieval and simplify test fixtures
* remove userId -- unused
* undo
---------
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: somay@cal.com <somay@cal.com>
Co-authored-by: Somay Chauhan <somaychauhan98@gmail.com>
Co-authored-by: Volnei Munhoz <volnei.munhoz@gmail.com>
* feat: atoms example app e2e
* chore: build atoms when e2e examples app
* docs: readme
* fix: add env variable
* fix: env var
* chore: playwright at monorepo version
* fix: workflow
* chore: increase timeout to have time to build atoms
* increase timeout for e2e
* bump e2e instance
* go back to 4cpu
* feat: expose form validation methods from EventTypePlatformWrapper
- Add validateForm and handleFormSubmit methods to onFormStateChange prop
- Update useEventTypeForm hook to return validateForm method
- Add proper TypeScript types for form validation result
- Enable external form validation and submission capabilities
Co-Authored-By: somay@cal.com <somay@cal.com>
* fix: correct forwardRef syntax to resolve parsing errors
- Fix forwardRef parameter destructuring syntax
- Use proper props parameter pattern for forwardRef components
- Ensure prettier can parse the file correctly
Co-Authored-By: somay@cal.com <somay@cal.com>
* feat: add form validation and submission handlers to event types platform wrapper
* refactor: move form validation and submit handlers from hook to wrapper component
* fix: add ref to the save button for proper form validation
* feat: extend ref-based validation API to AvailabilitySettingsPlatformWrapper
- Add AvailabilityFormValidationResult and AvailabilitySettingsPlatformWrapperRef types
- Implement forwardRef pattern in AvailabilitySettings component with save button ref
- Add validateForm and handleFormSubmit methods using useImperativeHandle
- Update AvailabilitySettingsPlatformWrapper to support ref forwarding
- Add comprehensive documentation for ref-based validation API in both event-type.mdx and availability-settings.mdx
- Follow same patterns established in EventTypePlatformWrapper for consistency
Co-Authored-By: somay@cal.com <somay@cal.com>
* refactor: rename AvailabilitySettingsPlatformWrapperRef to AvailabilitySettingsFormRef
* feat: add ref-based validation pattern to availability example page
- Mirror the ref-based validation implementation from event-types.tsx
- Add useRef, handleValidate, and handleSubmit functions
- Demonstrate validateForm() and handleFormSubmit() methods
- Add validation and submit buttons to showcase the new API
- Use AvailabilitySettingsFormRef type for proper typing
Co-Authored-By: somay@cal.com <somay@cal.com>
* refactor: remove unused state variables
* docs: clarify form validation behavior for availability and event type atoms
* chore: remove console.logs
---------
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: somay@cal.com <somay@cal.com>
Co-authored-by: Somay Chauhan <somaychauhan98@gmail.com>
* Revert "fix: atoms for local development (#22178)"
This reverts commit d74d99dde7.
* chore: remove comment
* feat: local dev scripts
* feat: local dev scripts
* 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>
* fix: reserving first seated booking slot
* fix: input type in useReserveSlot
* fix: handleReserveSlot submit bookingUid to api
* null -> undefined
* dont touch web app
* feat: Add `handleSlotSelect` prop for custom timeslot selection/reservation handling
* Update custom-slot-select-flow.mdx
* Update custom-slot-select-flow.mdx
* refactor: rename handleSlotSelect to handleSlotReservation for clearer intent
* docs: add API reference link for slot reservation api
* feat: add guards to stripe teams controller
* remove logs and comments
* fix return type status
* refactor: move PlatformSubscription to a dedicated module
* reroute to `organizations/stripe/save` for teams
* fix: type errors
* feat: fixed it for conferencing apps
* feat: Add error handling and fallback URL support in Stripe callback
* Refactor OAuth callback handling and move token validation to service layer
* Add documentation for OAuth callback proxying in conferencing and stripe controllers
* Move OAuthCallbackState type from organizations to stripe service module
* revert: refactor v2 access and refresh tokens
* feat: add refreshTokenExpiresAt to /force-refresh, /exchange/, /refresh
* feat: encode ownerId, expiresAt in tokens & return refresh expires at when creating managed user
* driveby:fix: pass language when creating managed user
* docs: tokens expires at and payload
---------
Co-authored-by: supalarry <laurisskraucis@gmail.com>
* feat: added zoom, office365-video as valid event-type locations
* added docs
* Update stripe.service.ts
* enable conferencing apps for teams initial commit
* fix: make conferencing atom work with teams
* update team events in bulk update default location
* feat: Separate endpoints for team conferencing apps instead of query params
* Display all team events in 'Bulk update existing event types' modal when conferencing atom is enabled for Teams
* fix: bulk update default location for team events
* removed the organizations endpoints
* Refactor: Separate functions for team events to follow SRP
* undo extra changes
* undo extra changes
* fix: platform libraries build breaking
* feat: only allow integrations which are installed in create/update team/user event-type endpoints
* fix: merge conflicts
* remove redundant imports
* Update ConferencingAppsViewPlatformWrapper.tsx
* Update useBanners.ts
* fix: axios error response interceptor
* feat: update :app param docs in `organizations-conferencing.controller`
* Revert "fix: axios error response interceptor"
This reverts commit 729eac3eee9f81c19b5368bbae4b1666884221fd.
* Update useAtomsGetInstalledConferencingApps.ts
* upgrade platform libraries
* Update apps.ts
---------
Co-authored-by: Morgan <33722304+ThyMinimalDev@users.noreply.github.com>
Co-authored-by: Morgan Vernay <morgan@cal.com>
* feat: add refreshTokenExpiresAt to /force-refresh, /exchange/, /refresh
* feat: encode ownerId, expiresAt in tokens & return refresh expires at when creating managed user
* driveby:fix: pass language when creating managed user
* refactor: remove void notation and await access token propagation
* refactor: centralize createOAuthTokens and refreshOAuthTokens logic
* docs: tokens expires at and payload
* chore: comment selectedDate in examples app booker
* update booker atom for routing form
* remove logs
* hide routing form properties from docs
* fixup
* add comments to explain why certain fields are not defined for routing forms in v2
* chore: routing for handler return team and org id
* bump libraries platform
* fixup! bump libraries platform
* chore: get routing form params to embed
* logs to remove
* fix import path
* chore: handle routing form params in booker embed
* wip need router api v2 endpoint
* resolve merge conflicts
* fixup
* fixup! Merge branch 'main' into remove-redirect-on-success-for-platform
* fixup! fixup! Merge branch 'main' into remove-redirect-on-success-for-platform
* router atom
* fix libraries version
* cleanup
* remove console logs
* bump libraries
---------
Co-authored-by: Morgan Vernay <morgan@cal.com>
Co-authored-by: Morgan <33722304+ThyMinimalDev@users.noreply.github.com>