* fix: Only Team Event Types are supported for Instant Meeting
* refactor: Cannot read properties of undefined (reading 'timeZone')
* fix: Cannot read properties of undefined (reading 'map')
* refactor: rearrange function order
* refactor: booking_seats_full_error
* fix: invalid_round_robin_host
* refactor: booking_time_out_of_bounds_error
* refactor: Attempting to book a meeting in the past.
* fix: obj.phoneNumber.trim is not a function
* fix: Cannot use 'in' operator to search for 'disabled' in 1
* 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
* feat: allow teamSlug + eventTypeSlug + optional organizationSlug as input
* feat: return team event slots
* test: get slots using teamSlug + eventTypeSlug + optional organizationalSlug
* docs: how to get team event slots
* feat: routing form response slots
* fix
* test routing form slots
* chore: bump libraries
* docs
* docs
* chore: api docs from main to merge main
* chore: regenerate api docs
* 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: membership user return bio and metadata
* feat: input and output bio and metadata for users and manager users
* test: managed event type appears when fetching user event types
* test: managed event type appears when fetching user event types
* test: managed event type appears when fetching user event types
* test: managed event type appears when fetching non-org team user event types
* feat: organizations users bookings endpoint
* feat: book using eventSlug & username & organizationSlug
* chore: generate latest docs
* feat: get org bookings endpoint api-v2
* fix userId filter transform
* fix: update getBookings to take filter.userIds in account
* refactor: getBooking where clause
* fixup! refactor: getBooking where clause
* feat: enable org owners to see org member bookings as attendees
* update flaky e2e tests
* fixup! feat: enable org owners to see org member bookings as attendees
* fixup! fixup! feat: enable org owners to see org member bookings as attendees
* chore: differentiate between org/team owner/admin
* chore: throw error with invalid userIds filter
* chore: clearly ensure non team orgs when orgId is not specified
* bump libraries and add comments
* bump libraries
* chore: give main profile orgId to getAllUserBookings
---------
Co-authored-by: Eunjae Lee <hey@eunjae.dev>
* 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
* fix: platform seed data
* fix: assignAllTeamMembers: true excludes team owners in platform
* refactor: platform plan guard explicit error message
* refactor: require either hosts or assignAllTeamMembers=true
* refactor: require either hosts or assignAllTeamMembers=true
* fix: before creating or updating team event type check if doesnt exist with that slug
* chore: regenerate docs
* test: can update round robin that had assign all team members true
* fix: platform guard spec test
* fix: seed platform membership role
* fix: test ts error
* refactor: input event types service remove unused code
* feat: toggle if email field is hidden
* chore: ensure event type has email or attendee phone field required
* chore: ensure non-org team cant have phone only event type
* chore: ensure users cant have phone only event type
* chore: ensure org team can have phone only event type
* chore: bump libraries
* docs
* refactor: confirm failing test response message
* fix: unit test
* chore: default organizer booking location docs
---------
Co-authored-by: Morgan <33722304+ThyMinimalDev@users.noreply.github.com>
* feat: v2 get managed users by email
* docs
* fix: offset query param not showing up in docs
* finish merge main
* fix: check if each email in emails query param is email
* refactor: Remove intervalLimits from @calcom/lib and export directly (#19710)
* refactor: Remove intervalLimits from @calcom/lib and export directly
* Tackle other places that use parseBookingLimit/parseDurationLimit
* More type fixups that were hidden by previous fails
* Fixed up booking-limits file
* Remove server-only
## What does this PR do?
<!-- Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change. -->
- Fixes #XXXX (GitHub issue number)
- Fixes CAL-XXXX (Linear issue number - should be visible at the bottom of the GitHub issue description)
## Visual Demo (For contributors especially)
A visual demonstration is strongly recommended, for both the original and new change **(video / image - any one)**.
#### Video Demo (if applicable):
- Show screen recordings of the issue or feature.
- Demonstrate how to reproduce the issue, the behavior before and after the change.
#### Image Demo (if applicable):
- Add side-by-side screenshots of the original and updated change.
- Highlight any significant change(s).
## Mandatory Tasks (DO NOT REMOVE)
- [ ] I have self-reviewed the code (A decent size PR without self-review might be rejected).
- [ ] I have updated the developer docs in /docs if this PR makes changes that would require a [documentation change](https://cal.com/docs). If N/A, write N/A here and check the checkbox.
- [ ] I confirm automated tests are in place that prove my fix is effective or that my feature works.
## How should this be tested?
<!-- Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration. Write details that help to start the tests -->
- Are there environment variables that should be set?
- What are the minimal test data to have?
- What is expected (happy path) to have (input and output)?
- Any other important info that could help to test that PR
## Checklist
<!-- Remove bullet points below that don't apply to you -->
- I haven't read the [contributing guide](https://github.com/calcom/cal.com/blob/main/CONTRIBUTING.md)
- My code doesn't follow the style guidelines of this project
- I haven't commented my code, particularly in hard-to-understand areas
- I haven't checked if my changes generate no new warnings
* Add unit tests and e2e
* fix ts errors
* Add comment
* bump platform libs
* fix: yarn-lock
* fix yarn.lock
* doc update
* Add isString
---------
Co-authored-by: Morgan Vernay <morgan@cal.com>
* Revert "Revert "chore: rename DWD to DelegationCredential (#19703)" (#19734)"
This reverts commit 340b5ab061.
* chore: fix schema and types for now
* fix: domainWideDelegationCredentialId error type
* feat: added Ability to set organizer's default app as a valid input location in api/v2
* only allow organizers default for team events
* fixed for atoms and added unit and e2e tests
* Update organizations-event-types.e2e-spec.ts
* Update transformApiEventTypeForAtom.ts
* published platform-libraries@0.0.124
---------
Co-authored-by: Peer Richelsen <peeroke@gmail.com>
* Add endpoints for testing the flow
* Add MVP
* new route
* Fixes
* Fixes
* Remove enable toggle support from domainWideDelegation
* Fixes
* Revert "Remove enable toggle support from domainWideDelegation"
This reverts commit c29e729206cd1fa063f9c9ce0cf148ef1577d60b.
* Revert yarn.lock
* More fixes
* Fix new workspace platform add
* refactor: improvements
* refactor: bug fixes and improvements
* fix: type errors
* fix: conflicts
* chore: update test
* fix: logic
* chore: improvements
* fix: toglle
* fix: bugs
* fix: type err
* chore: check number type
* fix: after conflicts
* chore: fix type err
* fix: type errors and tests
* fix: tets
* test
* chore: remove unused
* fix: google meet url on booking page and secondary calendar
* fix: add property
* fix: type err
* fix: re assingment bug
* fix: use getAllCredentials
* chore: fix import
* fix: installed count
* fix: pass event type
* fix: import
* fix: [Stacked PR] Review fixes (#17958)
* Review fixes
* fix: destination calendar bug
---------
Co-authored-by: Udit Takkar <udit222001@gmail.com>
* refactor: use repository
* chore: remove duplicate
* fix: More review fixes for domain wide delegation (#17969)
* Reuse buildCredentialPayloadForCalendar
* fixes
---------
Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com>
* fix ts error
* Fix getSchedule not using dwd credentials (#17995)
* fix: Remove direct DWD table access from google-calendar and remove delegatedToId column from Credential (#18015)
* Remove fn rename to reduce number of files changed
* chore: check feature globally
* test: add unit tests
* chore: move function
* test: add booking test
* wip
* Remove domain-wide-delegation team feature flag
* Make sure duplicate calendars are not shown due to DWD. Show DWD when there is conflict
* Fix tests and their ts errors
* Fix more tests
* Move findUsersForAvailabilityCheck to separate file as it has AppStore dependency causing problem with Routing Forms. Build crashes
* fix: Multiple calendar connections from Google not showing up in apps/installed
* DestinationCalendar must have either credentialId or domainWideDeelgationId. Also handle the case when DWD is disabled and there was a non-dwd credential that could be used
* Disable deletetion of DWD as it is destructive and prefer disabling instead
* Show DWD credential calendars at the top
* Fixed tests
* Calendar Cache DWD support
* Self-Review: Verify email required and add more selectedCalendar tests
* Self Review: shorten names
* Self ReviewL Dead code removal
* Revert "Calendar Cache DWD support"
This reverts commit 009f236470fa21eba5986117d4f6e4d4c5e38c34.
* Some misc fixes
* fixes
* Performance improvememt in slots loading and booking
* More cases for handling dwd credentials
* simplify the logic. Ensure that EventManager and the modules below it in the flow have CredentialForCalendarService available
* Fix tests
* Fix installed/conferencing not showing gogole meet
* Shorten name
* Fix ApI v2 tests
* Add some more tests
* add getSchedule tests
* Improve tests
* Make Google Meet default when DWD for google is enabled
* Enable feature flagging for DWD
* chore: bump libraries
* Encrypt serviceaccount private key
* Fix ts errors
* bump platform libraries
* org add dwd
* org add dwd
* bump platform libraries
* fix selected calendars
* fix remove selected dwd calendar
* remove oauthclient id aliad in authedCalendar
* remove oauthclient id aliad in authedCalendar
* refactor: OrganizationsDwdController
* chore: export toggleDwdEnabled from platform-libraries
* feat: v2 update (enable / disable) dwd
* refactor: SelectedCalendarsController check if user belongs to dwd org & for not dwd use previous logic
* wip: DestinationCalendar send domainWideDelegationCredentialId from frontend to api
* try fix set destination calendar api v2
* fixup! try fix set destination calendar api v2
* setting google meet as default location working for dwd
* bump platform libraries version
* allow office 365 workspace slug
* allow office 365 workspace slug
* chore: v2 create dwd MS and Google service keys input
* fix: CreateDwdInput serviceAccountKey
* fix: CredentialForCalendarService type
* fix: check workspace slug
* feat: update serviceAccessKey of DWD
* testing
* fixup! testing
* fix: getAuthUtl bug
* fix: unit tests
* fix: type err and unit test
* fix: e2e test
* fix: credentials bug and failing unit tests
* Update CalendarService.ts
* chore: refactor office365 calendar service and add testDomainWideDelegationSetup
* fix: office365Calendar use correct clientId/Secret for DWD
* fix: office365Calendar dwd no need refresh token
* test: add unit test for outlook dwd and setup
* feat: added dwd support for office365 calendar
* feat: added dwd support for office365 video
* test: finish test for outlook dwd
* fix: create dialog bug
* chore: remove console logs
* fix: refreshToken bug
* bump version libraries
* refactor: fetch dwd credentials only in findQualifiedHosts
* fixup! refactor: fetch dwd credentials only in findQualifiedHosts
* fix: type err
* fix: type err
* fix: getUserDisplayName
* fix: unit test
* chore: bump platform lib
---------
Co-authored-by: Syed Ali Shahbaz <52925846+alishaz-polymath@users.noreply.github.com>
Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com>
Co-authored-by: Udit Takkar <udit222001@gmail.com>
Co-authored-by: Morgan Vernay <morgan@cal.com>
Co-authored-by: supalarry <laurisskraucis@gmail.com>
Co-authored-by: Somay Chauhan <somaychauhan98@gmail.com>
Co-authored-by: Morgan <33722304+ThyMinimalDev@users.noreply.github.com>
* fix: enable event-type booking field url with api v2
* fixup! fix: enable event-type booking field url with api v2
* fixup! fixup! fix: enable event-type booking field url with api v2
* fixup! fixup! fixup! fix: enable event-type booking field url with api v2
* feat: add areDefaultEventTypesEnabled to PlatformOAuthClient
* feat: specify areDefaultEventTypesEnabled when creating OAuth client
* feat: specify areDefaultEventTypesEnabled when updating OAuth client
* feat: display areDefaultEventTypesEnabled in OAuth clients list
* refactor: set areDefaultEventTypesEnabled by default to false on API level
* feat: v2 API CREATE managed user toggle default event types
* refactor: centralize OAuth inputs and outputs in platform/types
* fix: correct response types for OAuth hooks
* refactor: web/lib/hooks/settings/platform/oauth-clients/useOAuthClients.ts
* refactor: web/lib/hooks/settings/platform/oauth-clients/useOAuthClients.ts
* refactor: split web OAuth hooks into separate files
* refactor: split web OAuth hooks into separate files
* docs: v2 OAuth client inputs and outputs
* refactor: update and create oauth client inputs
* refactor: version old slots
* feat: init new slots endpoints
* chore: range format
* fix: duratin
* fix: duratin
* test: slot releaseAt
* refactor: reserve slot response
* refactor variable name
* docs: have new slots controller in docs
* feat: crud for slots reservations
* refactor: use exclude all for response
* docs
* chore: slots input service
* refactor mini
* refactor: remove unused imports
* docs
* handle orgSlug for dynamic events
* refactor: correct name
* docs
* add optional organizationSlug to BySlug search
* refactor: slot output format
* refactor: return seated slot info
* docs
* rename functions
* refactor: slots seated response
* fix: handle same username in org and non org
* refactor: test format
* fix: allow reservationDuration only for authed requests
* chore: check if auth user has permissions to define custom reservation duration
* refactor: split e2e test files
* refactor: invalid request exception codes
* chore: old slots controller uses all old versions