* feat: add hostSubsetIds parameter for round robin host filtering
Add support for filtering round robin event type hosts via API v2.
When hostSubsetIds is provided, only the specified hosts are considered
for availability calculation and booking assignment.
Changes:
- Add hostSubsetIds to slots API input (GET /slots/available)
- Add hostSubsetIds to booking API input (POST /bookings)
- Update _findQualifiedHostsWithDelegationCredentials to filter by hostSubsetIds
- Pass hostSubsetIds through all layers: API -> tRPC -> slots/booking services
This allows API consumers to request availability and create bookings
for a subset of hosts within a round robin event type.
Co-Authored-By: morgan@cal.com <morgan@cal.com>
* chore: add e2e tests
* chore: add enableHostSubset team event-type setting
* fixup! chore: add enableHostSubset team event-type setting
* fix tests
* fix tests
* improve isWithinRRHostSubset
* rename to rrHost subset
* fix ai review
* fix: add booker platform wrapper rrHostSubsetIds prop
---------
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2025-12-10 10:37:39 +00:00
Joe Au-YeungGitHubDevin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
* feat: add toggle to opt out of booking title translation in instant meetings
Co-Authored-By: joe@cal.com <j.auyeung419@gmail.com>
* fix: add autoTranslateTitleEnabled to test builder
Co-Authored-By: joe@cal.com <j.auyeung419@gmail.com>
* fix: respect autoTranslateTitleEnabled toggle in InstantBookingCreateService
Co-Authored-By: joe@cal.com <j.auyeung419@gmail.com>
* fix: fetch autoTranslateTitleEnabled directly in InstantBookingCreateService
Co-Authored-By: joe@cal.com <j.auyeung419@gmail.com>
* refactor: rename autoTranslateTitleEnabled to autoTranslateInstantMeetingTitleEnabled
- Renamed field to clarify it only applies to instant meeting title translation
- Moved Prisma query to EventTypeRepository.findInstantMeetingConfigById()
- Removed title translation logic from update.handler.ts (flag only controls instant meeting title)
- Updated all references across the codebase
- Added new i18n translation keys for the renamed field
Co-Authored-By: joe@cal.com <j.auyeung419@gmail.com>
* fix: add autoTranslateInstantMeetingTitleEnabled to test destructuring patterns
Co-Authored-By: joe@cal.com <j.auyeung419@gmail.com>
* fix: use Prisma.TeamCreateInput type for metadata in test helper
Co-Authored-By: joe@cal.com <j.auyeung419@gmail.com>
* fix: add autoTranslateInstantMeetingTitleEnabled to mockUpdatedEventType in test
Co-Authored-By: joe@cal.com <j.auyeung419@gmail.com>
* refactor: use generic findByIdMinimal instead of business-specific method
- Add autoTranslateInstantMeetingTitleEnabled to eventTypeSelect constant
- Remove findInstantMeetingConfigById from EventTypeRepository
- Update InstantBookingCreateService to use findByIdMinimal
Co-Authored-By: joe@cal.com <j.auyeung419@gmail.com>
* refactor: remove autoTranslateInstantMeetingTitleEnabled from eventTypeSelect (not needed for findByIdMinimal)
Co-Authored-By: joe@cal.com <j.auyeung419@gmail.com>
* feat: add autoTranslateInstantMeetingTitleEnabled to event type form defaults
- Rename shouldTranslateTitle to shouldAutoTranslateInstantMeetingTitle for clarity
- Add autoTranslateInstantMeetingTitleEnabled to findById and findByIdForOrgAdmin selects
- Add autoTranslateInstantMeetingTitleEnabled to useEventTypeForm defaultValues
Co-Authored-By: joe@cal.com <j.auyeung419@gmail.com>
* fix: only update autoTranslateInstantMeetingTitleEnabled when explicitly provided
Fixes issue where omitting the field in update requests would overwrite
the saved opt-out setting with the default value (true). Now the field
is only included in the update payload when explicitly provided.
Co-Authored-By: joe@cal.com <j.auyeung419@gmail.com>
---------
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
* feat: add createdAt and updatedAt fields to EventType model
- Add timestamp fields to EventType schema with backward compatibility
- Update all EventType select statements across API v1, v2, and tRPC
- Update platform API output types to include timestamp fields
- Generate migration for existing database records
- Fix test files to handle new timestamp fields properly
The timestamp fields are added as optional (DateTime?) to ensure backward
compatibility - existing EventType records will have null values for these
fields, while new records will automatically get timestamps.
Co-Authored-By: anik@cal.com <adhabal2002@gmail.com>
* fix: remove @default(now()) from EventType createdAt to prevent existing records from getting current timestamp
- Remove @default(now()) from createdAt field in schema to ensure backward compatibility
- Create migration that only drops DEFAULT constraint without updating existing records
- Existing EventType records will keep null timestamps
- New records will get timestamps via application logic
Co-Authored-By: anik@cal.com <adhabal2002@gmail.com>
* feat: add createdAt and updatedAt timestamps to all EventType creation locations
- Update all seed scripts to set timestamps for new EventType records
- Ensure consistency across all EventType creation patterns
- Maintain backward compatibility with nullable timestamp fields
Co-Authored-By: anik@cal.com <adhabal2002@gmail.com>
* feat: add timestamps to remaining EventType creation locations in test files
- Update integration test files to include createdAt and updatedAt
- Ensure consistency across all EventType creation patterns
- Complete comprehensive update of all EventType creation locations
Co-Authored-By: anik@cal.com <adhabal2002@gmail.com>
* add migration
* few left
* feat: implement Prisma extension for automatic EventType timestamps
- Create eventTypeTimestampsExtension to automatically set createdAt and updatedAt
- Handle both eventType.create and eventType.createMany operations
- Revert all manual timestamp setting from application code
- Extension only sets timestamps if not already provided
- Maintains backward compatibility - existing records keep null timestamps
- New records get automatic timestamps via Prisma extension
- Follows existing Cal.com extension patterns and architecture
Co-Authored-By: anik@cal.com <adhabal2002@gmail.com>
* feat: remove hardcoded timestamp settings from test files
- Remove manual createdAt/updatedAt settings from routing forms controller test
- Remove manual timestamp settings from event types repository fixture
- Prisma extension now handles timestamps automatically for all EventType operations
Co-Authored-By: anik@cal.com <adhabal2002@gmail.com>
* update
* Update event-type.output.ts
* fix test
---------
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>
* 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>
* feature to enable optimized slots
* type check (was not caught running locally)
* update for typechecks
* update for type checks
* initialize form
* update slots test for showOptimizedSlots
* added some more tests
* handled edge case
* added test for edge case
* generalized condition
* refactored instead of ternary and added comments
* update condition
* Update apps/web/public/static/locales/en/common.json
Co-authored-by: Carina Wollendorfer <30310907+CarinaWolli@users.noreply.github.com>
* moved showOptimizedSlots setting to advanced tab
* updated to always move to next 15min if not possible to next interval
* correct after merge
* chore
* fix typecheck after latest merges
* remove workinghours when dateRanges input
* refactor: extract to fn
* chore
* remove unrelated changes
* remove unrealted change
* updated tests
* unrelated format changes no-verify
* unrelated format changes no-verify
* handle current day booking cases, to show roundedoff minutes
* remove unrelated format changes in openapi.json
* add test for new condition
* remove unrelated auto-format changes
* remove unrelated auto-format changes
* update after merge
* For current day bookings, normalizing the seconds to zero to avoid issues with time calculations
* Update packages/platform/atoms/event-types/hooks/useEventTypeForm.ts
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
* update for typecheck due to latest changes
* resolve merge conflicts
* Smaller description
* Minor style change to prefer early return
---------
Co-authored-by: Carina Wollendorfer <30310907+CarinaWolli@users.noreply.github.com>
Co-authored-by: Anik Dhabal Babu <81948346+anikdhabal@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: CarinaWolli <wollencarina@gmail.com>
Co-authored-by: Devanshu Sharma <devanshusharma658@gmail.com>
Co-authored-by: Volnei Munhoz <volnei.munhoz@gmail.com>
Co-authored-by: Keith Williams <keithwillcode@gmail.com>
Co-authored-by: Alex van Andel <me@alexvanandel.com>
* feat - Restrict same email to create more than 'n' active bookings at a time
* updated checkbookerbookinglimit function
* type fix
* minor change
* import fix
* minor fixes
* back to null on disable
* back
* type check
* managed edge cases
* chore: name changes
* name changes
* fix
* minor change
* changed name
* use default value for maxactivebookingsperbooker, and some minor changes
* disabling bookerbooking limit for recurring event
* disabling bookerbooking limit for recurring event
* type fix
* ui fix and backend eventtype update check
* Add `maxActiveBookingPerBookerOfferReschedule` to schema
* Create `MaxActiveBookingsPerBookerController` and offer reschedule option
* Add offer reschedule to event type form data
* Pass data through to HttpError
* When checking max bookings, return last booking info if applicable
* removed unused code
* minor changes
* update validation
* chore
* Do not check booking limits if rescheduling
* Add data for reschedule
* Add reschedule specific error code
* On maximum booking error, write to booker store reschedule params
* Add translations for error codes
* Write to error message previous booking time
* minor fix
* Write to error message previous booking time
* Type fixes
* Clean up comment
* Refactor eventType update errors
* Typo fix
* Type fix
* Type fix
* Type fix
* Fix test
* Fix test
* Add migration
* Addressed feedback and missed merges
---------
Co-authored-by: romit <romitgabani@icloud.com>
* feat - Restrict same email to create more than 'n' active bookings at a time
* updated checkbookerbookinglimit function
* type fix
* minor change
* import fix
* minor fixes
* back to null on disable
* back
* type check
* managed edge cases
* chore: name changes
* name changes
* fix
* minor change
* changed name
* use default value for maxactivebookingsperbooker, and some minor changes
* disabling bookerbooking limit for recurring event
* disabling bookerbooking limit for recurring event
* type fix
* ui fix and backend eventtype update check
* removed unused code
* minor changes
* update validation
* chore
* Do not check booking limits if rescheduling
* minor fix
* Refactor eventType update errors
* Typo fix
---------
Co-authored-by: Joe Au-Yeung <j.auyeung419@gmail.com>
* feature eventType specific language or bookingPage language
* chore
* fix type checks
* chore
* chore: remove log
* improvement: this updates in DatePicker is not required with context provider method
* added e2e tests for InterfaceLanguage feature
* corrected prev merge conflict issues
* update to align with hooks usage pattern
* chore
* unrelated auto-formatting changes
* unrelated auto-formatting changes
* unrelated auto-formatting changes
* update to affect interfaceLanguage on success page
* undone prettier changes
* update test for success page translation
* chore
* return null from memo
* fix typecheck error due to atom imports in useLocale
* set default interfaceLanguage as null
* updated to use null instead of constant
* enhancements
* fix latest unit test, use prop instead of useSession hook
* fix build issue
* chore
* fix atom build issue
* fix unit test with reqd mock
* update to use server i18n rendering
* nit
* Move import localeOptions to EventSetupTabWebWrapper
* make sure we only display interface language option in web app
* using customI18nProvider
---------
Co-authored-by: amrit <iamamrit27@gmail.com>
Co-authored-by: Tushar Bhatt <95581504+TusharBhatt1@users.noreply.github.com>
Co-authored-by: Tushar <tusharbhatt0135@gmail.com>
Co-authored-by: Anik Dhabal Babu <81948346+anikdhabal@users.noreply.github.com>
Co-authored-by: Peer Richelsen <peeroke@gmail.com>
Co-authored-by: Ryukemeister <sahalrajiv6900@gmail.com>
Co-authored-by: Rajiv Sahal <sahalrajiv-extc@atharvacoe.ac.in>
Co-authored-by: Benny Joo <sldisek783@gmail.com>
* Show distribution option for RR scheduling type
* Add `includeNoShowInRRCalculation` to event type schema
* Add `includeNoShowInRRCalculation` initial event type data
* Add FE option for `includeNoShowInRRCalculation`
* Consider `includeNoShowInRRCalculation` when building `where` clause when getting bookings for RR
* Add `includeNoShowInRRCalculation` param to `getAllBookingsForRoundRobin`
* Add `includeNoShow...` param to `GetLuckyUserParams`
* Pass `includeNoShow...` param to `getBookingsOfInterval` calls
* Add FE option for `includeNoShow...` (actual commit)
* Type fixes
* Fix brackets
* Add booking repository test
* Remove unused method
* Add translation
* Type fix
* Type fix
* Test passing
* Fix tests
* Fix tests
* Fix test
* Type fixes
* feat: add option to disable sending transcription emails
* fix: types and tests
* fix: type error
* fix: type err
* fix: type err
---------
Co-authored-by: Peer Richelsen <peeroke@gmail.com>
Co-authored-by: Keith Williams <keithwillcode@gmail.com>
* migration and init to accept creationSource for new bookings
* V1 create booking
* V1 user creation
* webapp booking + V1 user
* user creation in V1, V2 and webapp
* booking source V2 and fix for v1 user
* fit type
* --fix type
* add test -- WIP
* fix type
* fix type
* ^
* Need more sleep zzz
* -_-
* bump libraries platform
* adds for v2 recurring booking
* fix lint
* instant meetings
* fix: api v2 creation source
* fixup! fix: api v2 creation source
* bump libraries
* add user
* fix test
* fixup! fix test
* add more source
* more source...
* fix type & test --1
* fix type & test --2
* typefix
* fixup test
---------
Co-authored-by: Morgan Vernay <morgan@cal.com>
* Add email domain array
* Create numbered email domain object
* Check email domain
* Rename function
* Add tests
* Frontend enable skip ownership check if free email domain
* Backend ignore adding ownership to return records if free email domain check is enabled
* feat: Only require confirmation for free email domains (#17917)
* Add requiresConfirmationForFreeEmail to db
* Add option to event type settings
* Get requiresConfirmationForFreeEmail for event type page
* Include requiresConfirmationForFreeEmail in fetching event type
* Pass bookerEmail to `getRequiresConfirmationFlags`
* Add free email domain check to `determineRequiresConfirmation`
* Add `requiresConfirmationForFreeEmail` to types
* Add severity to Watchlist table
* Add migration for watchlist severity
* Add `getEmailDomainInWatchlist` method to watchlist repository
* Use watchlist repository to check for free email domain
* Mock watchlist repository in test
* Update test
* Rename method
* Add severity to blocked list
* Move check free email domain to async
* Type checks
* Adjust for promise returned
* Fix tests
* Fix
* Fix tests
* feat: AI description - DB model + frontend + backend (fetch only)
* fix types and add validation to backend
* improve log
* improve
* import type
* fix replexica error
* fix
* fix test
* update replexica type
* Renamed descriptionTranslations to fieldTranslations
* Moved the eventTypeId column to 2nd
---------
Co-authored-by: Keith Williams <keithwillcode@gmail.com>
* feat: Implements maxLeadThreshold which puts a maximum to the amount of lead a given host is allowed to be ahead
* Refactor getLuckyUser + implement in handleNewBooking + move logic to repo
* Decoupled @prisma from findQualifiedHosts
* Fix deep type error
* Add maxLeadThreshold to builder.ts
* Removed a console.log :O + fix handleChildrenEventTypes input
* Add distribution UI to enable balanced distribution/maximize availability
* 0-1-2 instead of 0-1-2-3 (3 bookings instead of 4)
* only fetch bookings of this month for weighted rr
* test set up
* only get bookings of current month
* reverts test setup
* first changes for weight adjustments
* reset booking count + adjust calibration
* depreciate weightAdjustment
* get only bookings created this month
* fix typo
* make sure createdAt for hosts is correct
* use earliest possibel date as fallback
* add missing createdAt date to tests
* fix typo
* clean up changes in tests
* fix typo
* change end date to current date
* fix: Fall back to empty host array when no hosts are found
* fix: Restructure code a little
* fixed test, incorrectly used now outdated var
* perf: remove Dayjs from getLuckyUser
* Refactor getHostsWithCalibration for optimised performance, intentionally break test as findMany is always an array
* Better mock for host.findMany
* Remove team-event-types.test.ts, move to appropriate package
* TypeScript cannot auto-infer that an array is non-empty when assigning to a var
* fix: Type Fixes and DistributionMethod enum add
* Optimise tests
* Added test to show that bookings made before a newHost was added affect the lucky user result
* Throw error when the usersWithHighestPriority is empty, which should never happen
---------
Co-authored-by: CarinaWolli <wollencarina@gmail.com>
Co-authored-by: Alex van Andel <me@alexvanandel.com>
* add reassignedBy and reassign reason to both status
* fix w-full issue in dialog
* fix types
---------
Co-authored-by: Peer Richelsen <peeroke@gmail.com>
* Add `hideCalendarEventDetails` to DB
Co-authored-by: Alex van Andel <emrysal@users.noreply.github.com>
* Add option to hide calendar event details
* Pass `hideCalendarEventDetails` to event object
* Add to API
* Add to CalendarEvent class
* Pass `hideCalendarEventDetails` to calendar services
* Adjust test
* fix: move `hideCalendarEventDetails` to `api/v2/event-types_2024_06_14` and remove from older versions
- Added `hideCalendarEventDetails` to `api/v2/event-types_2024_06_14`
- Removed `hideCalendarEventDetails` from `api/v1` and `api/v2/event-types_2024_04_15`
* fix: calEventRaw is undefined (use event instead)
* chore: Remove debug artifact
* fix: description id + update to copy
* fix: Attempt at fixing type error
* Add hideCalendarEventDetails to test builder
---------
Co-authored-by: Alex van Andel <emrysal@users.noreply.github.com>
Co-authored-by: Somay Chauhan <somaychauhan98@gmail.com>
Co-authored-by: Alex van Andel <me@alexvanandel.com>
* feat: block pending meetings for requires confirmation
* add i18n
* fix:typecheck
* fix(requires-confirmation-block): Fixes type error
* fix(requires-confirmation-block): Fixes type error
* Tweak to set BookingWhereInput as the explicit type instead of as
* fix: type error
---------
Co-authored-by: Alex van Andel <me@alexvanandel.com>
* feat: Add rescheduledBy & canceledBy fields in the DB
* fix: type check
* fix: type check
* fix: use session user email for reschedule
* fix: unit test
* feat: db field email validation
* feat: rescheduledBy and cancelledBy in webhooks
* revert unrelated changes.
* make session user secondary, default to Anonymous
* if condition not required
* Make cancelledBy optional
Co-authored-by: Syed Ali Shahbaz <52925846+alishaz-polymath@users.noreply.github.com>
* update cancel booking type
* fix: update cancelledBy in db when requesting reschedule
* remove default value for fields
* fix: type check
* feat: manage fields via api v1
* fix: add fields in booking read api v1
* test: expand to cover new fields
* fix: use cancelledBy param on booking page
---------
Co-authored-by: Anik Dhabal Babu <81948346+anikdhabal@users.noreply.github.com>
Co-authored-by: Syed Ali Shahbaz <52925846+alishaz-polymath@users.noreply.github.com>
Co-authored-by: Peer Richelsen <peeroke@gmail.com>
* WIP
* add frontend
* backend to update weight
* UI improvements
* WIP weight algorithm
* enable weights switch + algorithm improvements
* fix weightDescription
* clean up code
* remove OOOEntryHost from schema.prisma
* implement logic (not yet tested)
* add tests for weight algorithm
* add test with weight adjustment
* finish unit tests
* fix type error
* fix type error
* add migration
* fix type error
* fix event type update handler
* fix failing test
* UI fixes for saving hosts
* make sure weightAdjustment is not lost on host changes
* fix weightadjustment for new hosts
* add weightAdjustment to availableUsers
* fix type errors
* fix default value for weight
* make weight and weightAdjustment optional
* fix type errors from schema changes
* type fix
* clean up code
* improve comments
* remove comment
* clean up code
* add tests & weight adjustment improvments
* better variable naming
* fixes for weight adjustments
* make weightAdjustments proportional to weights
* fix previous host weight adjustments
* improved tests for weight adjustments
* save weight and priority + sort hosts correctly
* fix type error
* code clean up
* remove console.log
* use BookingRepository to fetch bookings of users
* use BookingRepository to fetch bookings in getLuckyUser
* fix type errors
* fix weightAdjustment if changed from fixed to rr host
* disable weights when 'assign all' is enabled
* typo
* allow 0 weight
* set min (and max) for weight and priority
* use useWatch
* code clean up
* fix type error
* only count accepted bookings for RR
* fix type error
* improve data fetching of bookings
* only filter bookings of availableUsers
* code clean up form feedback
* fix tests
* don't count no show bookings
* code clean up
* choose user with highest weight
* use one reduce instead of two
* use reduce instead of filter and map
* don't show weights toggle when 'assign all' is enabled
* design fixes
* fix type errors
* fix: type check
* Update packages/features/eventtypes/components/AddMembersWithSwitch.tsx
---------
Co-authored-by: CarinaWolli <wollencarina@gmail.com>
Co-authored-by: Alex van Andel <me@alexvanandel.com>
* feat: provide option to allow rescheduling with the same round-robin
host
* update
* fix type error
* fix and update
* fix type error
* update
* remove
* Update getEventTypesFromDB.ts
* add test
* small fix
* fix requested changes
* remove event type requires confirmation
* allow sms sending also for team (frontend)
* allow text to attendee for team (backend)
* add rate limiting for SMS (WIP)
* add functionality to lock and unlock SMS sending (+admin UI view)
* rename to smsLockState
* add ability to lock users and teams
* don't send sms if locked
* add missing imports
* fix rate limit namespace
* add translation
* fix type error
* remove prop from UsersTable
* add smsLockState to buildUser
* code clean up
* create seperate sms rate limit function
* fix type error
* add missing userId and teamId to sendSMS
* code improvements
* add User Team type
* fix marking as reviewed
* check monthly sms limit only for user
* don't lock orgs
* fix type error
* fix avatars
* fix type error
* fix type error
* fix type error
---------
Co-authored-by: CarinaWolli <wollencarina@gmail.com>
Co-authored-by: Joe Au-Yeung <65426560+joeauyeung@users.noreply.github.com>
Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com>
* chore: Remove all avatar/logo references
* Updated user profile to only use avatarUrl
* fix: minor style issue
* chore: Remove redundant includeTeamLogo
* fix: Use right avatar default in event type list
* fix: placeholder avatar team profile, target
* chore: Add logoUrl/avatarUrl to JWT
* fix: Bunch of org avatar issues, fix members list
* Fix logoUrl on org pages
* More type fixes
* Hopefully final type fixes
* Another round of type fixes
* fix: UserForm ts
* fix: Handle as return types, not input types
* fix: Remove profile and add avatarUrl
* fix: notFound as const
* fix: Seeder avatarUrl params
* revert: Migration changes for easier recovery
* fix: Add explicit type to builder as avatar is now set
* Add logoUrl to unpublished entity
* Avatar test out of scope here
* fix: Use the new avatarUrl after save
* chore: Removed getOrgAvatarUrl/getTeamAvatarUrl
* fix: Update sidebar image immediately after change
* Unable to safe unnamed user, so default
* fix: Unpublished page, add organization test
* Add more tests
* feat: add isPlatformManaged property to user
* do not allow deleting non managed users
* refactor: rename managed user create and update inputs
* refactor response code
* feat: add isPlatformManaged when creating managed user
* fix TS
* db migration
* adjusted ui to include `platform` in dropdown for admin webhooks
* adjusted webhook/create.handler for platform
* adjusted `edit.handler` so that only ADMIN can update `platform` webhooks
* update `getWebhooks` for platform wide webhooks
* list platform webhooks if admin
* createFunction refactor
* update subscriberUrlReserved for platform webhooks
* fix delete webhook handler
* fix: added readOnly to WebhookListItem
* fix: admin cannot delete its own webhooks
* fix: ts error
---------
Co-authored-by: Joe Au-Yeung <65426560+joeauyeung@users.noreply.github.com>