Commit Graph
7019 Commits
Author SHA1 Message Date
Keith WilliamsGitHubDevin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
baaa04151d perf: optimize payment app imports to avoid loading entire app store (#23408)
* perf: optimize payment app imports to avoid loading entire app store

- Add PaymentServiceMap generation to app-store-cli build process
- Generate payment.services.generated.ts with lazy imports for 6 payment services
- Update handlePayment.ts, deletePayment.ts, handlePaymentRefund.ts to use PaymentServiceMap
- Update getConnectedApps.ts and tRPC payment routers to use PaymentServiceMap
- Follow same pattern as analytics optimization in PR #23372
- Reduces bundle size by avoiding import of 100+ apps when only payment functionality needed

Co-Authored-By: keith@cal.com <keithwillcode@gmail.com>

* Update build.ts

* fix: update payment service test mocking to work with PaymentServiceMap

- Remove obsolete appStoreMock line from bookingScenario.ts since handlePayment now uses PaymentServiceMap
- Update setupVitest.ts to import prismaMock from correct PrismockClient instance
- Add PaymentServiceMap mock following PR #22450 pattern for calendar services
- Ensure MockPaymentService uses consistent externalId across test files
- Fix webhook handler to return 200 status by ensuring payment records are found correctly

Co-Authored-By: keith@cal.com <keithwillcode@gmail.com>

* fix: revert prismaMock import to avoid interfering with other tests' vi.spyOn() calls

- Remove global prismaMock import from setupVitest.ts that was causing 'is not a spy' errors
- Update MockPaymentService to import prismaMock locally to maintain payment test functionality
- Fixes organization and outOfOffice tests while preserving payment service optimization

Co-Authored-By: keith@cal.com <keithwillcode@gmail.com>

* fix: remove E2E conditional check from payment services map generation

- Payment services map now always includes all payment apps regardless of E2E environment
- Ensures payment functionality is consistently available across all environments
- Addresses CI failures caused by conditional payment service loading

Co-Authored-By: keith@cal.com <keithwillcode@gmail.com>

* refactor: use direct PaymentService imports instead of .lib structure

- Update app-store-cli to import directly from lib/PaymentService.ts files
- Modify all payment handlers to access PaymentService directly
- Update test mocks to match new direct import structure
- Remove .lib property access pattern across payment system
- Maintain backward compatibility while improving import efficiency

Co-Authored-By: keith@cal.com <keithwillcode@gmail.com>

* fix: revert chargeCard booking.id parameter additions

- Remove booking.id parameter from chargeCard calls in chargeCard.handler.ts and payments.tsx
- Addresses GitHub feedback to investigate chargeCard signature changes in separate PR
- Keeps all other direct PaymentService import refactor changes intact

Co-Authored-By: keith@cal.com <keithwillcode@gmail.com>

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2025-08-28 10:05:36 -03:00
emrysal 091327afee chore: release v5.6.8 2025-08-28 11:15:53 +00:00
afea724e4d fix: improve cancellation email of reschedule RR booking (#17768)
* fix: improve cancellation email of reschedule RR booking

* fix failing test

* fix: uses same lucky user when rescheduling RR booking also has a fixed host

* chore

* chore

* better message in the cancelled email

* fix

* fix

* add booker rescheduled in reassigned email to old host

* test

* add reassigned subtite

* fix: use same lucky user when reschedule RR booking has a fixed host

* fix: test

* fix: subtitle

---------

Co-authored-by: Anik Dhabal Babu <81948346+anikdhabal@users.noreply.github.com>
2025-08-27 13:28:33 -03:00
Eunjae LeeGitHubDevin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>Udit Takkar
b7a7797293 feat: add paid, userEmail, userName, and rating filters to insights page (#23299)
* feat: add paid, userEmail, and userName filters to insights page

- Add paid filter as MULTI_SELECT with 'Paid'/'Free' options
- Add userEmail filter as TEXT for searching user emails
- Add userName filter as TEXT for searching user names
- Update DummyTableRow type to include new filter columns
- Add backend filtering logic in buildColumnFilterCondition method
- Use existing columns from BookingTimeStatusDenormalized view
- Follow established patterns from /bookings page implementation

Co-Authored-By: eunjae@cal.com <hey@eunjae.dev>

* fix: change paid filter from MULTI_SELECT to SINGLE_SELECT

- Updated useInsightsBookings.ts to use ColumnFilterType.SINGLE_SELECT for paid filter
- Modified buildColumnFilterCondition to handle single select with isSingleSelectFilterValue
- Simplified backend logic to handle single boolean value instead of array

Co-Authored-By: eunjae@cal.com <hey@eunjae.dev>

* fix paid filter

* feat: add rating filter to insights page

- Add rating field to DummyTableRow type
- Add rating column with SINGLE_SELECT filter type
- Add rating options 1-5 in faceted unique values
- Add rating filtering logic in backend service
- Rating filter allows filtering bookings by 1-5 star ratings

Co-Authored-By: eunjae@cal.com <hey@eunjae.dev>

* feat: change rating filter to NUMBER type

- Update rating filter from SINGLE_SELECT to NUMBER in useInsightsBookings.ts
- Remove rating options from useInsightsBookingFacetedUniqueValues.ts since NUMBER filters don't need predefined options
- Add isNumberFilterValue import and implement number filter logic in InsightsBookingBaseService.ts
- Support eq, gt, gte, lt, lte operators for rating number filter

Co-Authored-By: eunjae@cal.com <hey@eunjae.dev>

* refactor: use makeSqlCondition utility for filter logic

- Import makeSqlCondition from @calcom/features/data-table/lib/server
- Replace manual SQL condition building with makeSqlCondition utility for userEmail, userName, and rating filters
- Maintain existing paid filter logic for boolean conversion
- Follow established pattern from InsightsRoutingBaseService
- Cleaner, more maintainable code with consistent filter handling

Co-Authored-By: eunjae@cal.com <hey@eunjae.dev>

* add missing texts

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com>
2025-08-27 16:00:10 +00:00
Lauris SkraucisandGitHub d0e59f1824 fix: platform confirmed/declined meeting attendee reschedule email url (#23335)
* fix: platform confirmed/declined meeting attendee reschedule email url

* chore: bump platform libraries
2025-08-27 14:35:10 +00:00
67befea66e fix: dutch appearing in booking field name (#23364)
* fix: dutch appearing in booking field name

* fix: tests

---------

Co-authored-by: Anik Dhabal Babu <81948346+anikdhabal@users.noreply.github.com>
2025-08-27 19:43:37 +05:30
Eunjae LeeGitHubDevin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
5324832f13 refactor: extract rating values and emojis into reusable constants (#23340)
* refactor: extract rating values and emojis into reusable constants

- Create packages/lib/rating.ts with RATING_OPTIONS array and validation utilities
- Update bookings-single-view.tsx to use extracted constants
- Add TypeScript interfaces for type safety
- Enable reuse of rating constants across the codebase

Co-Authored-By: eunjae@cal.com <hey@eunjae.dev>

* refactor: move rating utilities to bookings feature directory

- Move packages/lib/rating.ts to packages/features/bookings/lib/rating.ts
- Update import path in bookings-single-view.tsx to use new location
- Maintain domain-specific organization for booking-related utilities

Co-Authored-By: eunjae@cal.com <hey@eunjae.dev>

* fix: resolve linting issues in event-types.tsx

- Fix quote style consistency (single to double quotes)
- Add missing trailing comma
- Resolve pre-commit hook formatting changes

Co-Authored-By: eunjae@cal.com <hey@eunjae.dev>

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2025-08-27 15:54:52 +02:00
Benny JooandGitHub 2d9162a4dd perf: use promise all when possible in RSCs (#23384) 2025-08-27 08:52:27 -03:00
Peer RichelsenGitHubDevin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
e8dbab99eb feat: replace window.todesktop with official @todesktop/client-core package (#23354)
* feat: replace window.todesktop with official @todesktop/client-core package

- Import platform from @todesktop/client-core in _document.tsx
- Pass isDesktopApp result via window.calIsDesktopApp to stringified function
- Update applyToDesktopClass to use passed-in value instead of window.todesktop
- Maintains existing architecture while using official package API

Co-Authored-By: peer@cal.com <peer@cal.com>

* fix: move ToDesktop detection to client-side to resolve SSR issue

- Remove server-side call to platform.todesktop.isDesktopApp() which always returns false
- Move detection logic to client-side stringified script using same logic as official package
- Maintain client-side detection while ensuring proper functionality in ToDesktop environment

Co-Authored-By: peer@cal.com <peer@cal.com>

* feat: use official platform.todesktop.isDesktopApp() function

- Import platform from @todesktop/client-core in _document.tsx
- Call platform.todesktop.isDesktopApp() directly in stringified script
- Replace duplicated logic with official package function call
- Maintain client-side detection while using official API

Co-Authored-By: peer@cal.com <peer@cal.com>

* feat: properly use official platform.todesktop.isDesktopApp() function

- Call platform.todesktop.isDesktopApp() outside stringified context
- Pass result as template variable to avoid SSR issues
- Now actually uses the official @todesktop/client-core package
- Eliminates duplicated detection logic as requested

Co-Authored-By: peer@cal.com <peer@cal.com>

* fix: add SSR safety guards around platform.todesktop.isDesktopApp() call

- Wrap platform.todesktop.isDesktopApp() in try/catch to prevent SSR crashes
- Return false as fallback if library touches browser globals during SSR
- Addresses keithwillcode's comment about SSR safety concerns

Co-Authored-By: peer@cal.com <peer@cal.com>

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2025-08-27 09:21:37 +00:00
emrysal 70cfe8d693 chore: release v5.6.7 2025-08-26 23:13:36 +00:00
Benny JooGitHubDevin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
1cc548284d fix: remove TypeScript path mapping and standardize @calcom/ui imports (#23359)
- Remove '@calcom/ui/*': ['../../packages/ui/components/*'] path mapping from apps/web/tsconfig.json
- Fix imports from '@calcom/ui/componentName' to '@calcom/ui/components/componentName' format
- Preserve direct exports like '@calcom/ui/classNames' and '@calcom/ui/styles'
- Update 200+ files across apps/web, packages/features, packages/app-store, and packages/ui
- Fix localStorage usage to use safe webstorage import
- Remove forbidden 'as any' type casting in favor of proper TypeScript types
- All changes verified to pass TypeScript compilation

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2025-08-26 13:47:06 -03:00
Peer RichelsenandGitHub 42efd95476 chore: fixed typo in recording link (#23363)
* Update common.json

* Update apps/web/public/static/locales/en/common.json
2025-08-26 14:46:37 +00:00
Anik Dhabal BabuandGitHub 2ec68ef1aa fix: team metadata restriction for stripe (#23327) 2025-08-26 14:24:11 +00:00
Keith WilliamsGitHubDevin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>Joe Au-YeungJoe Au-YeungAlex van Andel
6e09489685 perf: implement quick app store loading optimizations (#22450)
* perf: implement quick app store loading optimizations

- Add conditional app store imports in videoClient and handlePayment
- Implement lazy calendar manager pattern in CalendarManager
- Enhance createCachedImport with better concurrency handling
- Create calendar-only registry for common calendar operations
- Add performance instrumentation for debugging

These optimizations reduce initial app store loading time by avoiding
module-level imports and creating smaller, focused registries for
calendar operations.

Co-Authored-By: keith@cal.com <keithwillcode@gmail.com>

* fix: revert getCalendar to use appStore for proper test mocking

- Reverted getCalendar.ts to use main appStore instead of calendarStore
- This ensures test mocking system works properly with existing appStoreMock
- Fixes unit test failures where Google Calendar references were getting null values
- All collective scheduling tests now pass

Co-Authored-By: keith@cal.com <keithwillcode@gmail.com>

* perf: implement CalendarServiceMap for optimized calendar loading

- Add CalendarServiceMap generation following CrmServiceMap pattern
- Update getCalendar.ts to use generated calendar service map
- Remove manual calendar-registry.ts in favor of auto-generated approach
- Reduces calendar initialization from loading 48+ apps to ~10 calendar apps

Co-Authored-By: keith@cal.com <keithwillcode@gmail.com>

* fix: update test mocks for CalendarServiceMap compatibility

- Add missing SelectedCalendar fields (createdAt, updatedAt, lastErrorAt, watchAttempts, etc.)
- Fix CredentialPayload type errors by adding user.email and delegationCredentialId
- Mock CalendarServiceMap to use vi.importActual for real calendar services
- Ensure calendar service tests work with new lazy loading approach

Co-Authored-By: keith@cal.com <keithwillcode@gmail.com>

* fix: resolve CalendarServiceMap test compatibility issues

- Update getCalendarsEvents.test.ts mocks to work with CalendarServiceMap dynamic imports
- Add missing SelectedCalendar fields (createdAt, updatedAt, lastErrorAt, watchAttempts, etc.)
- Fix CredentialPayload type errors by adding user.email and delegationCredentialId
- Use type assertion in getCalendar.ts to resolve credential type conflicts
- Ensure calendar service tests work with new lazy loading approach

Co-Authored-By: keith@cal.com <keithwillcode@gmail.com>

* fix: update test mocking for CalendarServiceMap compatibility

- Add comprehensive vi.mock for calendar.services.generated in delegation-credential tests
- Mock GoogleCalendarService and Office365CalendarService with proper return values
- Update all test files to use await with mockCalendarToHaveNoBusySlots
- Ensure calendar events return expected meetingId, meetingPassword, meetingUrl values
- Fix async/await compatibility issues in booking scenario test utilities

Co-Authored-By: keith@cal.com <keithwillcode@gmail.com>

* fix: resolve TypeScript errors in CalendarServiceMap mocking

- Extract CalendarServiceMap promise to variable to fix 'always true' condition
- Ensure vi.mocked is called on Promise type for proper mockResolvedValue access
- Add await keywords to calendar mock calls in test files
- Maintain existing functionality while making code type-safe

Co-Authored-By: keith@cal.com <keithwillcode@gmail.com>

* Remove Exchange 2013 and 2016

* Mock Exchange in all tests

* Fix tests

* Remove exchange 2013 and 2016 from app store index

* Fix merge error

* Await when getting calendar service

* Fix selectedSlot test

* Add missing variable

* Update openapi.json

* Updated CalendarService imports

* try again

* WIP migrate calendar apps to ES6

* Revert "WIP migrate calendar apps to ES6"

This reverts commit 15bf2c83305e82050779d0bca3380fa9573db1e0.

* Revert changes back to e23991024a5a455c14aa05f100a5b56288db343a

This reverts all calendar service changes that were causing circular dependency issues during builds and E2E tests.

* Remove circular dependency for location constants

* Update yarn.lock with removed package

* Add empty map when running E2E

* Type fies

* Fix merge conflict

* Remove logging statements

* Throw error and reset state if failing to load app

* Revert "Remove Exchange 2013 and 2016"

This reverts commit fedaf6346bd9e4c63337276d5a6f9e8c3943056c.

* Re-introduce exchange{2013,2016}

Revert the removal in app-store/index.ts also.

* Trying to fix tests

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Joe Au-Yeung <j.auyeung419@gmail.com>
Co-authored-by: Joe Au-Yeung <65426560+joeauyeung@users.noreply.github.com>
Co-authored-by: Alex van Andel <me@alexvanandel.com>
2025-08-26 14:35:35 +01:00
af07c411ee fix: auto-open filter dropdown after adding a new filter (#23330)
* fix: auto-open-filter-dropdown

closes #23326

* coderabbit suggestion

Signed-off-by: Hemant M Mehta <hemant29mehta@gmail.com>

* coderabbit suggestion

Signed-off-by: Hemant M Mehta <hemant29mehta@gmail.com>

* removing clickable event

Signed-off-by: Hemant M Mehta <hemant29mehta@gmail.com>

* updated filters

Signed-off-by: Hemant M Mehta <hemant29mehta@gmail.com>

* fix e2e tests

---------

Signed-off-by: Hemant M Mehta <hemant29mehta@gmail.com>
Co-authored-by: Eunjae Lee <hey@eunjae.dev>
2025-08-26 13:22:43 +00:00
Udit TakkarandGitHub ce646c590f chore: update daily dependencies (#23272) 2025-08-26 08:55:18 -03:00
MorganandGitHub ba8cca55e8 refactor: convert lucky user to service class (#23329)
* refactor: lucky user to service class with DI

* fix: unit test filterHostsByLeadThreshold.test.ts

* fixup! fix: unit test filterHostsByLeadThreshold.test.ts

* fix: get lucky user test missing mocks

* fix: get lucky user hosts not within interval

* chore: bump platform library

* chore: bump platform library

* chore: add DAILY_API_KEY to turborepo.json db seed

* chore: add DAILY_API_KEY to cache-db action

* fixup! chore: add DAILY_API_KEY to cache-db action

* chore: remove log in fixture

* chore: bump platform library

* chore: refactor test team-emails.e2e

* only failing test

* run all api v2 tests

* chore: bump platform library

* revert change to turbo.json and action in cache-db

* chore: use inPerson location in team-emails.e2e
2025-08-26 08:43:41 -03:00
sean-brydonandGitHub ae738fae35 revert: "fix: remove fallback permssions on organization Id. (#22769)" (#23013)
* Revert "fix: remove fallback permssions on organization Id. (#22769)"

This reverts commit 30061c0d58.

Removes the manage permission concept and fallback logic to simplify
permission checking back to direct role-based checks.

* remove manage from workflows

* fix type error and remove manage from components
2025-08-26 08:32:49 -03:00
Benny JooandGitHub 2922c8fe77 perf: Move runtime redirects to build-time redirects in next.config.js (#23325)
* routing forms

* auth new

* settings route

* apps installed

* next.config.js
2025-08-26 20:20:12 +09:00
emrysal 4599740637 chore: release v5.6.6 2025-08-26 11:10:41 +00:00
Anik Dhabal BabuandGitHub f4944a05c9 fix: recurring event isn't working (#23346) 2025-08-26 12:40:40 +05:30
Sahitya ChandraandGitHub 6ba49a73df fix: fr and de translation for buttons on the onboarding flow (#23347)
* fix: added french translation for buttons on the onboarding

* added some german also
2025-08-26 01:02:28 +05:30
Sahitya ChandraandGitHub 8d2a072645 fix: german translation for button in the onboarding flow (#23336) 2025-08-25 20:33:59 +05:30
b2244503b1 fix: Missing jose module in saml-jackson package (#23291)
* Ensure packages are bundled with code

* Update dependencies

---------

Co-authored-by: Alex van Andel <me@alexvanandel.com>
2025-08-25 15:36:31 +01:00
Alex van AndelGitHubDevin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
9d67e1c473 feat: enable Stripe Adaptive Currencies for subscription flows (#23328)
* feat: enable Stripe Adaptive Currencies for subscription flows

- Add STRIPE_ADAPTIVE_CURRENCIES_ENABLED environment variable to control feature
- Remove hardcoded USD currency when Adaptive Currencies is enabled
- Update documentation with comprehensive setup instructions
- Focus on team subscriptions, platform billing, and premium username flows
- Maintain backward compatibility with USD default when disabled

Co-Authored-By: alex@cal.com <me@alexvanandel.com>

* refactor: simplify Stripe Adaptive Currencies implementation by removing currency parameter

Co-Authored-By: alex@cal.com <me@alexvanandel.com>

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2025-08-25 14:00:49 +00:00
Benny JooandGitHub 489d56dad1 perf: Make /icons page a static page (#23324)
* write _generateMetadataForStaticPage

* refactor /icons/page.tsx
2025-08-25 14:34:46 +02:00
efca90507b refactor: improve most booked & least booked (#23192)
* refactor: improve most booked & least booked

* add 2 new charts and trpc handlers

* update arg

* update comment

* completed booking filter

* update

* add change in component level and remove unused translations

* current time and accepted status logic handler

* resize some charts

* restore some i18n

* restore i18n

* restore i18n

---------

Co-authored-by: Eunjae Lee <hey@eunjae.dev>
2025-08-25 11:17:07 +00:00
Benny JooandGitHub 8e73421094 perf: do not use next/dist/server image optimizer (#23207)
* write image utils

* refactor

* better comment
2025-08-25 15:13:44 +05:30
Bailey PumfleetGitHubDevin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>amit@cal.com <samit91848@gmail.com>Alex van Andel
5bab2af500 chore: some minor QA fixes (#22727)
* Various fixes

* Remove tooltip

* another string change

* Fix width of custom event name modal to prevent overflow

* Booking questions fixes

* minor string fix

* checkbox alignment

* padding in reassign dialog

* fix: update FormBuilder tests for checkbox UI changes

- Updated test utilities to work with CheckboxField instead of BooleanToggleGroupField
- Fixed badge expectations to check for 'optional' instead of 'required'
- Updated dialog interaction methods to use checkbox.checked instead of button text
- All 13 FormBuilder tests now pass successfully

Fixes failing tests in PR #22727 caused by UI changes from toggle buttons to checkboxes for required field selection.

Co-Authored-By: amit@cal.com <samit91848@gmail.com>

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: amit@cal.com <samit91848@gmail.com>
Co-authored-by: Alex van Andel <me@alexvanandel.com>
2025-08-25 18:11:18 +09:00
9b7c6585d8 fix: add variables dropdown UI (#23214)
* Ui fixes for variables dropdown

* remove other translation keys

* fix test

---------

Co-authored-by: CarinaWolli <wollencarina@gmail.com>
2025-08-25 16:42:27 +09:00
Benny JooandGitHub df12581879 perf: reduce build time and deployment size by removing unused routes (#23319) 2025-08-25 04:56:55 +00:00
Alex van AndelandGitHub 0ec1638ca7 chore: Clean up some code, like console.log, tsx -> ts (#23321) 2025-08-25 01:30:45 +00:00
emrysal 2516e18ebb chore: release v5.6.5 2025-08-24 23:34:40 +00:00
Volnei MunhozandGitHub d2f8076c70 perf: Improve memory cache on build (#23286)
* Improve memory cache on build

* Improve memory cache on build
2025-08-22 19:57:25 +00:00
Keith WilliamsGitHubDevin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
cbfb11015e feat: add E2E test to prevent duplicate schedule API calls (#23232)
* feat: add E2E test to prevent duplicate schedule API calls

- Tests individual user events (/{user}/{eventTypeSlug})
- Tests team events (/team/{teamSlug}/{eventTypeSlug})
- Tests organization team events (/org/{orgSlug}/{teamSlug}/{eventTypeSlug})
- Ensures /api/trpc/getSchedule and /v2/slots/available are called only once
- Prevents regression of double API calls in Booker component
- Uses flexible assertions to handle environment issues while detecting duplicates

Co-Authored-By: keith@cal.com <keithwillcode@gmail.com>

* refactor: rename E2E test file to booking-duplicate-api-calls.e2e.ts

Addresses GitHub comment from keithwillcode to follow naming convention

Co-Authored-By: keith@cal.com <keithwillcode@gmail.com>

* fix: correct tRPC API route pattern to api/trpc/slots/getSchedule

Addresses GitHub comment from keithwillcode - the route pattern should be
api/trpc/slots/getSchedule instead of api/trpc/viewer.slots.getSchedule
in all page.route() interceptors for the getSchedule endpoint.

Co-Authored-By: keith@cal.com <keithwillcode@gmail.com>

* fix: revert to correct tRPC API route pattern api/trpc/viewer.slots.getSchedule

The previous change to api/trpc/slots/getSchedule was incorrect. The tRPC router
structure shows that getSchedule is under viewer.slots, which translates to the
HTTP endpoint api/trpc/viewer.slots.getSchedule as used by trpc.viewer.slots.getSchedule.useQuery().

Co-Authored-By: keith@cal.com <keithwillcode@gmail.com>

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2025-08-22 18:25:40 +00:00
2d90d11e9e feat: Add custom label for organizer default app and link meeting (#23114)
* Create `CalVideoSettings` type

* Create `LocationOptionContainer`

* Extract cal video settings to `CalVideoSettings`

* Refactor `<Locations />` component to use `<CalVideoSettings />`

* Unify naming

* Move location folder back under components

* Type fixes

* Extract types

* Add custom label prop to default app types

* Extract `LocationInput` component

* Create `DefaultLocationSettings` component

* Move `locations` folder

* Add custom label field for link and organizer default locations

* Type fixes

* Save the custom label in db

* Include location custom label when querying db

* Display custom label on booking page

* Add translations

* Type fixes

* Change `customLabel` to `supportsCustomLabel`

* Remove unused code

* Show the customLabel on booking page

* Fix hover tooltip text as well

* Fix displaying exact value on booking page

* Add missing translation

* Remove default label of "Value"

* Replace nullish collescing with OR

* Replace nullish collescing with OR

---------

Co-authored-by: Hariom Balhara <hariombalhara@gmail.com>
Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com>
2025-08-22 16:34:14 +00:00
Lauris SkraucisandGitHub e0dc2ba03a feat: authentication secured event types (#23217)
* feat: EventType bookingRequiresAuthentication column

* feat: toggle EventType bookingRequiresAuthentication via api

* feat: check bookingRequiresAuthentication when booking

* docs: v2 swagger

* fix: ts error

* refactor: use Forbidden exception instead of Unauthorized

* refactor: use findFirst instead of unique

* fix: only count accepted memberships

* fix: orgs schedules docs

* regenerate docs

* chore: update platform libraries

* fix: unit test

* fix: e2e test
2025-08-22 15:22:50 +01:00
Lauris SkraucisandGitHub 61268f36b9 chore: add debug logs (#23278) 2025-08-22 12:20:39 +00:00
99cd0c5c41 fix: Use Memberships with OWNER role for platform owner lookup (#22475)
* fix platform owner identification to use Memberships with OWNER role

* replaced the hardcoded OWNER string with the enum value

* replaced enum with hard coded OWNER value for safty

* added enum usage

* added admin lookout if owner validation fails

* chore

* chore

* fixed tests

* chore

* chore

* chore

* chore

---------

Co-authored-by: Devanshu Sharma <devanshusharma658@gmail.com>
Co-authored-by: Kartik Saini <41051387+kart1ka@users.noreply.github.com>
Co-authored-by: Rajiv Sahal <sahalrajiv-extc@atharvacoe.ac.in>
Co-authored-by: Anik Dhabal Babu <81948346+anikdhabal@users.noreply.github.com>
2025-08-22 14:14:28 +05:30
Eunjae LeeGitHubDevin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2266301469 feat: implement system filter segments for data tables (#22939)
* feat: implement default filter segments for data tables

- Add defaultSegmentId column to UserFilterSegmentPreference table
- Support mixed segment ID types (number for user segments, string for default segments)
- Add DefaultFilterSegment and CombinedFilterSegment types
- Update useSegments hook to handle default segments with date range recalculation
- Modify FilterSegmentSelect to group and display default segments separately
- Add default segments to bookings view (My Bookings, Upcoming Bookings)
- Prevent editing/deleting of default segments in SaveFilterSegmentButton
- Update DataTableProvider to support defaultSegments prop
- Update parsers and repository to handle mixed segment ID types

Implements frontend-only default segments as specified in the requirements.

Co-Authored-By: eunjae@cal.com <hey@eunjae.dev>

* chore: update ESLint dependencies to resolve configuration issues

- Update eslint-config-next and @typescript-eslint packages to latest versions
- Fix dependency compatibility issues that were blocking pre-commit hooks

Co-Authored-By: eunjae@cal.com <hey@eunjae.dev>

* revert eslint change

* some changes

* refactor: implement discriminated union for segment types

- Update SegmentIdentifier to use discriminated union with 'custom' vs 'default' types
- Refactor setSegmentId to accept object parameters: { id: string; type: 'default' } | { id: number; type: 'custom' }
- Update type definitions with DefaultFilterSegment, CustomFilterSegment, and CombinedFilterSegment
- Modify useSegments hook to handle new segment type structure
- Update FilterSegmentSelect component to work with discriminated unions
- Refactor database preference handling to store segment type alongside ID
- Add proper type safety throughout the data flow
- Remove description property from DefaultFilterSegment type

Co-Authored-By: eunjae@cal.com <hey@eunjae.dev>

* fix: update unit test to expect discriminated union format for preferredSegmentId

The test was expecting preferredSegmentId to be a number, but after the discriminated union refactor it now returns { id: number, type: 'custom' } for custom segments. Updated the assertion to use toEqual() for deep object comparison.

Co-Authored-By: eunjae@cal.com <hey@eunjae.dev>

* fix: correct SegmentIdentifier type to exclude undefined

- Remove null from SegmentIdentifier type definition since null/undefined indicate absence of identifier
- Update DataTableProvider and useSegments to handle SegmentIdentifier | null properly
- Fix type safety while maintaining discriminated union functionality
- Ensure setAndPersistSegmentId accepts null values for clearing segments

Co-Authored-By: eunjae@cal.com <hey@eunjae.dev>

* remove unused segment

* a little update

* feat: add default- prefix to default segment IDs for clearer type identification

- Update 'my_bookings' to 'default-my_bookings'
- Update 'upcoming-bookings' to 'default-upcoming-bookings'
- Makes it easier to verify segment type by looking at the ID string
- Maintains all existing discriminated union functionality

Co-Authored-By: eunjae@cal.com <hey@eunjae.dev>

* refactor: rename segment types from default/custom to system/user for better semantics

Co-Authored-By: eunjae@cal.com <hey@eunjae.dev>

* fix: update unit test to expect 'user' type instead of 'custom' in discriminated union

Co-Authored-By: eunjae@cal.com <hey@eunjae.dev>

* fix: complete type renaming from default/custom to system/user across all component files

Co-Authored-By: eunjae@cal.com <hey@eunjae.dev>

* refactor: update segment ID prefix from default- to system- to match type naming

Co-Authored-By: eunjae@cal.com <hey@eunjae.dev>

* remove unused segment

* some fixes

* revert schema change

* rename defaultSegmentId to systemSegmentId

* renaming

* fix save button

* remove as any

* clean up prisma migrations

* type fixes

* many fixes

* remove icon property

* fix infinite rendering

* fix race condition

* re-visiting useSegments implementation WIP

* extract useElementByClassName

* add e2e tests

* fix a bug that the created segment was not selected automatically

* add useSegments to /insights and fix e2e test

* fix type error

* fix type error

* apply feedback

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2025-08-22 10:18:18 +03:00
30b0012e6a fix: truncated droplist in reroute booking (#23263)
Co-authored-by: Kartik Saini <41051387+kart1ka@users.noreply.github.com>
2025-08-22 04:32:21 +00:00
emrysal 77d1958c42 chore: release v5.6.4 2025-08-22 01:49:37 +00:00
Keith WilliamsGitHubDevin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>Alex van Andel
88f347f18c feat: improve unkey error handling with heavy logging for unknown errors (#23223)
* feat: improve unkey error handling with heavy logging for unknown errors

- Add onError handler to all Ratelimit instances to catch unknown service errors
- Log comprehensive error details including stack traces and identifiers
- Return fallback response allowing requests through instead of rejecting promises
- Preserve existing rate limit functionality for legitimate rate limit cases
- Maintain consistency with existing timeout fallback behavior

Co-Authored-By: keith@cal.com <keithwillcode@gmail.com>

* Update rateLimit.ts

* chore: Bump @unkey/ratelimit version

* Add required props to rateLimiter onError response

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Alex van Andel <me@alexvanandel.com>
2025-08-21 23:37:01 +01:00
Somay ChauhanGitHubDevin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
09cf8885cf feat: add send & verify code flow to booker atom when email verification is turned on (#23074)
* feat: extract tRPC verification logic to platform libraries and create v2 atoms endpoints

- Extract verifyCodeUnAuthenticated, verifyCodeAuthenticated, and sendVerifyEmailCode logic from tRPC handlers into reusable platform library functions
- Create VerificationAtomsService and AtomsVerificationController following atoms pattern
- Add v2 endpoints: /atoms/verification/email/send-code, /atoms/verification/email/verify-code, /atoms/verification/email/verify-code-authenticated
- Update useVerifyEmail and useVerifyCode hooks to use new v2 endpoints instead of verified-resources endpoints
- Export verification functions from @calcom/platform-libraries following getPublicEvent pattern
- Integrate platform-specific verification hooks into BookerPlatformWrapper

Co-Authored-By: somay@cal.com <somaychauhan98@gmail.com>

* feat: update platform hooks to use v2 verification endpoints

- Update useVerifyEmail hook to use correct response type for v2 endpoint
- Update useVerifyCode hook to use v2 verification endpoint
- All verification functions now properly exported from platform libraries
- Type checking passes with no errors

Co-Authored-By: somay@cal.com <somaychauhan98@gmail.com>

* fix: update v2 API to use workspace version of platform-libraries

- Change package.json dependency from pinned version to workspace version
- Add proper error handling to verification service with NestJS HTTP exceptions
- Convert generic Error objects to BadRequestException and UnauthorizedException
- Ensure verification endpoints return proper HTTP status codes instead of 500 errors

Co-Authored-By: somay@cal.com <somaychauhan98@gmail.com>

* chore: update auto-generated files after package.json changes

- Update OpenAPI documentation for v2 verification endpoints
- Update yarn.lock after changing platform-libraries dependency

Co-Authored-By: somay@cal.com <somaychauhan98@gmail.com>

* refactor: extract verification logic from tRPC handlers into exportable functions

- Refactor sendVerifyEmailCode.handler.ts to extract core logic into sendVerifyEmailCode function
- Refactor verifyCodeUnAuthenticated.handler.ts to extract core logic into verifyCodeUnAuthenticated function
- Refactor organizations/verifyCode.handler.ts to extract core logic into verifyCodeAuthenticated function
- Update platform/libraries/index.ts to import from refactored handler files instead of standalone verification.ts
- Remove standalone verification.ts file as requested by user
- Keep original tRPC handlers as wrappers that call the extracted functions
- Maintain backward compatibility for existing tRPC endpoints

Co-Authored-By: somay@cal.com <somaychauhan98@gmail.com>

* extract logic into seperate functions

* Update index.ts

* refactor: remove unused type imports from verification-atom service

* feat: create v2 atoms input/output types for verification endpoints

- Add SendVerificationEmailInput and VerifyEmailCodeInput with validation decorators
- Add SendVerificationEmailOutput and VerifyEmailCodeOutput following v2 atoms patterns
- Update atoms verification controller to use custom types instead of platform types
- Auto-update openapi.json with new type definitions

Co-Authored-By: somay@cal.com <somaychauhan98@gmail.com>

* fix: add missing type imports to verification service

- Import ZVerifyCodeInputSchema from @calcom/prisma/zod-utils
- Import VerifyCodeAuthenticatedInput from organizations handler
- Import TSendVerifyEmailCodeSchema from sendVerifyEmailCode schema
- Resolves CI build failure in API v2 tests

Co-Authored-By: somay@cal.com <somaychauhan98@gmail.com>

* feat: add email verification check endpoint and refactor verification flow

* added Throttle

* added chagelog

* chore: update platform libraries to 0.0.317

* refactor: remove unused context and update email verification query key dependencies

* chore: bump @calcom/platform-libraries from 0.0.318 to 0.0.319

* Update verifyCode.handler.ts

* chore: bump @calcom/platform-libraries from 0.0.319 to 0.0.320

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2025-08-21 15:06:42 +00:00
RomitandGitHub f3d4eab951 fix: POST v2/bookings - recurrenceCount (with eventType reoccuring enabled) causes lengthInMinutes to be ignored (#23023)
* fix

* added tests

* chore
2025-08-21 16:54:33 +02:00
Benny JooandGitHub 0ea673e507 feat: update global feature flag to team feature flag for team booking page cache (#23154)
* add team id fetcher based on slugs

* export getOrgContext

* update RSC

* refactor

* further refactor
2025-08-21 21:34:45 +09:00
Eunjae LeeGitHubcoderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
cf367c9340 feat: add attendee filters to /insights/routing (+ use RoutingFormResponseDenormalized) (#21297)
* fix: denormalize RoutingFormResponse with InsightsRoutingService

* fix tests

* fix type error

* update service usage

* fix attendee filters

* display attendee phone number

* use useInsightsRoutingParameters()

* remove unnecessary type check

* clean up

* fix type error

* fix wrong import

* fix integration tests

* Update packages/lib/server/service/__tests__/InsightsRoutingService.integration-test.ts

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2025-08-21 14:09:22 +02:00
Alex van AndelandGitHub d72e15649f chore: Remove maintenance mode middleware (#23251) 2025-08-21 11:12:54 +00:00
emrysal c3731d9f17 chore: release v5.6.3 2025-08-20 22:49:28 +00:00
Joe Au-YeungGitHubAlex van Andelcoderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
cf13c06c57 chore: Upgrade boxyhq/saml-jackson to 1.52.2 (#23231)
* Upgrade jackson to 1.52.2

* Update apps/web/package.json

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Remove unused option prop

---------

Co-authored-by: Alex van Andel <me@alexvanandel.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2025-08-20 23:13:36 +01:00