Commit Graph
643 Commits
Author SHA1 Message Date
MorganandGitHub bc1d73e9fe fix: broken metadata import from platform/types (#19986)
* fix: broken metadata import from platform/types

* fix: OAuthClientUsersService instead of this in oauth-clients-users.service.ts
2025-03-11 22:05:40 +00:00
4ad1127184 refactor: extract schedules from libraries barrel file (#19838)
* refactor: extract schedules from libraries barrel file

* cleanup: remove functions not being used by schedules

* fix tsconfig ]

* bump platform libs

* bump platform libs

---------

Co-authored-by: Morgan Vernay <morgan@cal.com>
Co-authored-by: Morgan <33722304+ThyMinimalDev@users.noreply.github.com>
2025-03-11 19:07:06 +00:00
76b9b9b0fe fix: v2 rescheduled booking with confirmation (#19833)
* fix: old bookings controller

* fix: new bookings controller

* fix: BookerPlatformWrapper pass rescheduledBy to BookerComponent

* rescheduleBy email

* fix test

* remove log

* centralize getOAuthUserEmail, examples app rescheduledBy

* revert

* finalize

* fix: old bookings rescheduling

* unify email validation

* update input description

* chore: move booker platform wrapper types

---------

Co-authored-by: Morgan Vernay <morgan@cal.com>
2025-03-11 20:04:59 +01:00
e6f561c3d7 fix: v2 team metadata (#19939)
* refactor: allow metadata to also receive numbers and booleans

* refactor: Team metadata

* refactor: Managed orgs metadata

* refactor: Team metadata

* test: organizations teams create team with metadata

---------

Co-authored-by: Morgan <33722304+ThyMinimalDev@users.noreply.github.com>
2025-03-11 15:03:30 +00:00
Lauris SkraucisandGitHub b7c5cfcf02 feat: v2 get managed users by email (#19526)
* 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
2025-03-11 15:01:43 +00:00
b1bcbe9dfb feat: calendar-links API (#19777)
* 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>
2025-03-11 17:01:32 +02:00
MorganandGitHub 83736785b7 fix: catch error for getOwnerId with invalid token (#19949) 2025-03-11 13:27:20 +02:00
Lauris SkraucisandGitHub 43f6db194e test: managed org creator profiles (#19944) 2025-03-11 10:13:50 +00:00
MorganandGitHub 43156fa4d7 refactor: extract emails from libraries barrel file (#19836)
* refactor: extract emails from libraries barrel file

* fixup! Merge branch 'main' into refactor-libraries-barrel-emails

* fix: add missing configs

* add sendSignupToOrganizationEmail to barrel email file

* bump libs
2025-03-11 11:36:21 +02:00
Somay ChauhanandGitHub 861e3aa24f fix: extracted app-store and DWD platform-libraries imports to a /app-store barrel file (#19938)
* fix: platform libraries barrel file extract app-store

* extracted DWD to app-store barrel file

* removed getCalendar as not used in api/v2

* bump platform-libraries
2025-03-11 08:30:37 +00:00
1e86f1046b chore: Fix build failure due to trpc inference depth (#19884)
* chore: Fix build failure due to trpc inference depth

* Also bump platform libraries typescript version

* fix: e2e test using unassigned variable

* chore: bump libraries to 0.0.142

---------

Co-authored-by: Morgan Vernay <morgan@cal.com>
2025-03-10 17:06:05 +00:00
Keith WilliamsandGitHub 7ed32d3c77 perf: Reduce imports by moving bookings zod out of utils (#19869) 2025-03-10 13:54:05 +00:00
cb437231ad fix: platform libraries barrel file extract event-types (#19846)
* fix: event-types

* chore: added "+ group link" tip (#19809)

* added + link tip

* nit

---------

Co-authored-by: amrit <iamamrit27@gmail.com>
Co-authored-by: Anik Dhabal Babu <81948346+anikdhabal@users.noreply.github.com>
Co-authored-by: Tushar Bhatt <95581504+TusharBhatt1@users.noreply.github.com>

* Added fix to solve the id TypeError (#19810)

Co-authored-by: amrit <iamamrit27@gmail.com>
Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com>
Co-authored-by: Anik Dhabal Babu <81948346+anikdhabal@users.noreply.github.com>
Co-authored-by: Tushar Bhatt <95581504+TusharBhatt1@users.noreply.github.com>

* Revert "fix: prevent background scroll on opening timezone select menu (#19789)" (#19814)

This reverts commit 1a96149ce3.

* fix: Calendar events attached to workflow emails are missing meeting link (#19790)

* fixup! fix: Calendar events attached to workflow emails are missing meeting link (#19790)

* chore: fix type errors

* fix: wrong import in e2e file

* fix: tsconfig api v2 for /event-types

* fix: import and refactor

* fixed remaning type issues

* undo extra changes

* bump platform libs

* Update event-types.controller.e2e-spec.ts

* fix: test with seats enabled

---------

Co-authored-by: Peer Richelsen <peeroke@gmail.com>
Co-authored-by: amrit <iamamrit27@gmail.com>
Co-authored-by: Anik Dhabal Babu <81948346+anikdhabal@users.noreply.github.com>
Co-authored-by: Tushar Bhatt <95581504+TusharBhatt1@users.noreply.github.com>
Co-authored-by: Harshit Singh <73997189+harshit078@users.noreply.github.com>
Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com>
Co-authored-by: Morgan Vernay <morgan@cal.com>
Co-authored-by: Morgan <33722304+ThyMinimalDev@users.noreply.github.com>
2025-03-10 12:34:53 +00:00
277ce1c244 refactor: extract slots from libraries barrel file (#19895)
* refactor: extract slots fn from libraries barrel file

* bump platform libs

---------

Co-authored-by: Morgan Vernay <morgan@cal.com>
2025-03-10 10:33:29 +00:00
Rajiv SahalandGitHub 870cadd81f fix: dry run improvements for v2 (#19196)
* add dry run param for v2 getSlots

* fixup

* revert changes

* dont reserve a slot for booking dry run

* accept dry run prop as a parameter instead of computing

* fix merge conflicts

* fixup

* dont reserve slots for booking dry run
2025-03-07 14:49:54 +05:30
MorganandGitHub b5e08ea80f fix: api v2 create event-type with delegation credentials (#19797) 2025-03-06 19:46:46 +02:00
Rajiv SahalandGitHub 6cdc9c9f59 fix invalid access token bug (#19793) 2025-03-06 14:51:39 +00:00
GitHub Actions 34cff214dd chore: release v5.0.12 2025-03-05 18:40:35 +00:00
Alex van AndelandGitHub f7af19b7cb chore: Bump node to 20 in APIv2 Dockerfile (#19770) 2025-03-05 18:19:29 +00:00
6849638b1f fix: apps/api/v2/package.json & apps/api/v2/.snyk to reduce vulnerabilities (#19755)
The following vulnerabilities are fixed with a Snyk patch:
- https://snyk.io/vuln/npm:semver:20150403

Co-authored-by: snyk-bot <snyk-bot@snyk.io>
2025-03-05 18:07:55 +00:00
be1377e9af fix: typos in apps/api (#19762)
Found via codespell

Co-authored-by: Tushar Bhatt <95581504+TusharBhatt1@users.noreply.github.com>
2025-03-05 14:29:11 +00:00
MorganandGitHub 524c0d81a7 chore: rename DWD to DelegationCredential (#19744)
* Revert "Revert "chore: rename DWD to DelegationCredential (#19703)" (#19734)"

This reverts commit 340b5ab061.

* chore: fix schema and types for now

* fix: domainWideDelegationCredentialId error type
2025-03-05 10:42:20 -03:00
Alex van AndelandGitHub 1545a8ec82 chore: Upgrade to node v20 as v18 is EOL next month (#19733)
* chore: Upgrade to node v20 as v18 is EOL next month

* Run tests using node 20
2025-03-05 13:34:17 +02:00
MorganandGitHub 340b5ab061 Revert "chore: rename DWD to DelegationCredential (#19703)" (#19734)
This reverts commit 7a9ddf2194.
2025-03-05 10:30:23 +00:00
Rajiv SahalandGitHub 75627cb097 fix: booking fields not saving properly for team events (#19702) 2025-03-05 05:38:07 +00:00
Lauris SkraucisandGitHub fff521e171 fix: v2 managed user attendee bookings (#19716)
* Revert "Revert "fix: v2 managed user attendee bookings (#19612)" (#19635)"

This reverts commit 2600a6c3d5.

* fix: make guests optional
2025-03-04 18:08:21 +01:00
MorganandGitHub 7a9ddf2194 chore: rename DWD to DelegationCredential (#19703)
* chore: rename DWD to DelegationCredential

* fixup! chore: rename DWD to DelegationCredential

* fixup! fixup! chore: rename DWD to DelegationCredential

* fixup! Merge branch 'main' into rename-domain-wide-delegation

* fixup! fixup! Merge branch 'main' into rename-domain-wide-delegation

* fixup! fixup! fixup! Merge branch 'main' into rename-domain-wide-delegation
2025-03-04 09:45:39 -03:00
MorganandGitHub ae8180e7c2 chore: improve validate hosts api v2 team event-types (#19696)
* chore: improve validate hosts api v2 team event-types

* fixup! chore: improve validate hosts api v2 team event-types
2025-03-04 08:55:40 +00:00
MorganandGitHub 72832354e6 fix: api v2 axiom logs exceed column size (#19636) 2025-03-04 05:40:36 +00:00
Keith WilliamsandGitHub 7701edb0bb chore: TS config - ignore node_modules in subdirectories (#19680)
* chore: TS config - ignore node_modules in subdirectories

* Update tsconfig.json

* Applied the pattern to the entire monorepo
2025-03-03 15:53:28 -03:00
5a6a13b954 fix: allow cancelledBy query param to work on api v1 (#19268)
* fix: cancelledby to work on api v1

* fix: scheduleId to work with hosts in eventtype api v1

* Update event-type.ts

---------

Co-authored-by: Anik Dhabal Babu <81948346+anikdhabal@users.noreply.github.com>
2025-03-03 18:19:09 +00:00
340f15fea5 fix: scheduleId to work on event type host assignment via patch api v1 (#19546)
Co-authored-by: amrit <iamamrit27@gmail.com>
2025-03-03 18:18:06 +00:00
ee9c73476b chore: add docs to /v2/organizations/:orgId/organizations endpoints (#19668)
Co-authored-by: Somay Chauhan <somaychauhan98@gmail.com>
2025-03-03 16:03:32 +00:00
6244b5a2c0 feat: added Ability to set organizer's default app as a valid input location in api/v2 (#19549)
* 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>
2025-03-03 09:01:24 +00:00
Keith WilliamsandGitHub 7180eb067a refactor: Move @calcom/core to @calcom/lib (#19655)
* refactor: Move @calcom/core to @calcom/lib

* Merging imports

* Clean up

* Ignoreing type error for now
2025-03-02 23:02:35 -03:00
be77ac133c feat: Domain-wide delegation for Google Calendar and Google Meet (#16622)
* 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>
2025-03-02 16:52:57 -03:00
2600a6c3d5 Revert "fix: v2 managed user attendee bookings (#19612)" (#19635)
This reverts commit c0591f3cdb.

Co-authored-by: Morgan <33722304+ThyMinimalDev@users.noreply.github.com>
2025-03-01 03:01:45 +00:00
Somay ChauhanandGitHub 5b961f7d96 fix: added zoom, msTeams as valid locations in event-type, booker atoms (#19599) 2025-02-28 10:10:02 +02:00
Lauris SkraucisandGitHub c0591f3cdb fix: v2 managed user attendee bookings (#19612)
* fix: CreateBookingInput_2024_04_15 stripping off responses

* fix: bi-directional managed user bookings

* test: bookings 2024-08-13 bi-directional managed user bookings

* test: bookings 2024-04-15 bi-directional managed user bookings

* test: bookings 2024-04-15 bi-directional managed user bookings
2025-02-28 10:08:24 +02:00
Benny JooandGitHub d7960021aa perf: do not import from @calcom/lib/server barrel file (#19579)
* do not import from lib/server barrel file

* fix build
2025-02-26 18:10:52 -03:00
MorganandGitHub af524d9e93 fix: enable event-type booking field url with api v2 (#19577)
* 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
2025-02-26 19:12:41 +00:00
Lauris SkraucisandGitHub e437dfa000 refactor: platform default event types (#19225)
* 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
2025-02-26 12:06:08 -03:00
MorganandGitHub 52662b3375 fix: old v2 booking cancel endpoint issue (#19564)
* fix: old v2 booking cancel endpoint issue

* fixup! fix: old v2 booking cancel endpoint issue
2025-02-26 13:14:13 +00:00
Lauris SkraucisandGitHub a44bcafcf2 feat: v2 managed organizations (#19341)
* refactor: allow non unique PlatformBilling customerId

* feat: add PlatformBilling managed organizations fields

* feat: ManagedOrganization table

* refactor: bill overdue based on teamId

* refactor: restructure organizations module

* wip: organizations endpoints

* Revert "wip: organizations endpoints"

This reverts commit 0e9e66fc74f31da436f12930c1b6597c650ed621.

* refactor: unique index for managed organizations

* wip: organizations endpoints

* wip: create managed organization

* remove unecessary membership check because we have guard

* feat: create managed org

* feat: get managed org and orgs

* feat: update and delete managed orgs

* wip: api key logic

* feat: allow variable api key length

* feat: refresh managed org api key

* feat: create managed org OAuth clients using api key

* finish merge main

* chore: bump platform libraries

* tests: fix and add more tests to api-auth.strategy.e2e

* refactor: dont request managed org slug and handle metadata as object

* revert: billing service and repository update overdue based on sub and customer ids

* refactor: v2 OAuth client permissions (#19501)

* refactor: v2 permissions as string array

* refactor: frontend work with permissions as string

* tests: test '*' permissions

* fix:managed org creator have profile & test can fetch oauth client

* fix: tests

* fix: OAuthClientCard on frontend

* fix: tests
2025-02-25 18:10:46 -07:00
Peer RichelsenandGitHub 4b2265c35d chore: removed experimental calcom license api call (#19366) 2025-02-24 14:58:25 +00:00
Peer RichelsenandGitHub 4dc2d3236d Update .env.example (#19364) 2025-02-24 14:55:43 +00:00
Rajiv SahalandGitHub 46f73e79c1 fix: booking fields being overridden whenever saving with atom (#19339)
* fix booking fields not saving properly

* fixup
2025-02-21 12:42:11 +01:00
Lauris SkraucisandGitHub e6daed762b feat: v2 routing forms responses endpoints (#19319)
* wip: routing forms responses

* refactor structure

* Revert "refactor structure"

This reverts commit b641c06592cd9314008e81c4584039bd42393ac7.

* routing forms

* remove unused file
2025-02-21 13:38:00 +05:30
Peer RichelsenandGitHub 6d4b05cf1d Update README.md 2025-02-19 10:48:15 +01:00
Peer RichelsenandGitHub bd1af4027f Update README.md 2025-02-19 10:47:45 +01:00