Commit Graph

4014 Commits

Author SHA1 Message Date
Morgan d334547ac0
chore: OAuth clients tests and fixes (#12762)
* chore: add tests and fixes

* fixup! chore: add tests and fixes

* fixup! fixup! chore: add tests and fixes

* fixup! fixup! fixup! chore: add tests and fixes

* fixup! fixup! fixup! fixup! chore: add tests and fixes

* fixup! fixup! fixup! fixup! fixup! chore: add tests and fixes

* fixup! fixup! fixup! fixup! fixup! fixup! chore: add tests and fixes

* fix: remove unused imports
2023-12-13 12:59:29 +02:00
Morgan Vernay 104f6eb38a Merge branch 'main' into platform 2023-12-13 10:36:01 +02:00
Alex van Andel 2799ddf3a4
fix: 500 error on email conflict (#12725) 2023-12-13 02:24:36 +00:00
Hariom Balhara 6b09c6b3b4
fix: Allow lowercase/uppercase/mixedcase access with org team event booking page (#12721)
Co-authored-by: Carina Wollendorfer <30310907+CarinaWolli@users.noreply.github.com>
2023-12-12 18:02:38 -08:00
Keith Williams 2352bb1075
chore: Wire up Sentry for API (#12756) 2023-12-12 14:57:39 -08:00
DmytroHryshyn a568e1ac66
chore: [app-router-migration-5] apps/installed page (#12618)
Co-authored-by: zomars <zomars@me.com>
2023-12-12 12:48:40 -07:00
DmytroHryshyn add6ffdfc4
chore: [app-router-migration-4]: apps/categories page (#12619) 2023-12-12 11:43:15 -07:00
Alex van Andel 7a67331d96
fix: Disable source maps which looks to be infinitely looping (#12744) 2023-12-12 16:16:04 +00:00
Amitabh Sahu 1aa8b8439a
fix: change booking page filter ui to match Figma (#12134)
* fix: change booking page filter ui to match figma

* fix: style change for filters in mobile

* made all changes requested by reviewers

* fix: add clear filter

---------

Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com>
Co-authored-by: Udit Takkar <udit222001@gmail.com>
2023-12-12 11:29:13 +00:00
Morgan 5463233762
chore: create authenticated user guard (#12677)
* chore: wip next-auth-guard for apiv2

* refactor: use NextAuthGuard on all OAuthClientController routes

* refactor: use passport to get next user

* exclude password from prisma read service

* Revert "exclude password from prisma read service"

This reverts commit 24b1f8ed59.

* fix: userRepo sanitize password

* refactor: function order in UserRepository

* implement user repository service

* refactor: strict null checks for TS

* refactor: fix strict null checks

* delete res locals type

* refactor: switch from zod to class-validator for oAuth client

* refactor: switch from zod to class-validator for booking

* refactor: rename dtos folder to input folder

* fix: create migration for prisma schema oauth clients table

* feature: post oAuth client

* refactor: rename oAuth client_secret to secret

* stricter ts config + oauth secret

* remove migrations

* fix: improve response type

* improve error code types

* fix: prettier by removing eslint as its not needed

* refactor: eslint fix files

* wip organization oauth_lcient

* fix import types

* fix team schema platformOAuthClient name

* fix: import packages transpiled

* feat: roles guard

* refactor: use organisationId instead of userId

* fix: jwt secret signing not having jwt_secret

* fix: stop importing input DTOs as types

* fix: jwt sign expecting plain object

* add sentry, routes logger, generic response type

* fix test config

* fixup! fix test config

* refactor: dont await async function return

* feat: fallback value for getEnv

* feat: add helmet for security

* feat: organization guard

* refactor: check if user set in RolesGuard

* refactor: remove roles requirement for oauth read

* chore: add exceptions filters

* fix: api key strategy throws errors

* chore: set e2e tests

* chore: centralize api type in package

* feat: user repository relations

* feat: user repository relations

* Revert "feat: user repository relations"

This reverts commit 1802b256b5.

* Revert "feat: user repository relations"

This reverts commit 4a8f52583d.

* test: mock next auth

* fixup! test: mock next auth

* test:oAuth  authed user but no org

* refactor: remove unused type

* refactor: organisation guard based on Membership table

* refactor: folder and file structure

* fix: small changes exception filters

* refactor: merge organization and roles guards into one guard

* fix: remove old export

* fix: org roles guard

---------

Co-authored-by: supalarry <lauris.skraucis@gmail.com>
2023-12-12 11:27:04 +02:00
Alex van Andel 50e405353c v3.5.5 2023-12-11 23:11:43 +00:00
Alex van Andel 565e21bc50
fix: Dynamic duration was always overwritten with the default (30) (#12444)
Co-authored-by: Omar López <zomars@me.com>
Co-authored-by: Morgan <33722304+ThyMinimalDev@users.noreply.github.com>
2023-12-11 16:07:21 -07:00
DmytroHryshyn 098d41fc62
chore: [app-router-migration-3] apps/[slug]/index, apps/[slug]/setup (#12620)
Co-authored-by: Omar López <zomars@me.com>
2023-12-11 16:05:07 -07:00
Mehul 2ab7846a4a
fix: location Select auto focus (#12715) 2023-12-09 20:53:49 +00:00
Udit Takkar e9ea0fcc20
feat: add cal video logo whitelabel for organization (#12616) 2023-12-09 09:02:14 +00:00
Ethan Chen 46c51df1e0
fix: Up libphonenumber-js to fix #12394 (#12519)
* Up libphonenumber-js

* Re-patch libphonenumber-js and restore the test files.

* fix: yarn and check

* Conflict Resolution

* fix lint error

* Restore files

* Fix yarn.lock

---------

Co-authored-by: Hariom <hariombalhara@gmail.com>
2023-12-08 14:09:45 +00:00
nicktrn 83c8f97afd
test: booking and duration limits e2e (#10968)
* test: booking and frequency limits e2e

* test: refactor limit e2e and check multiple

* test: move limits e2e to separate file

* fix: blocked day assertions

* chore: rename to booking-limits

* fix: use todo test util

* chore: un-DRY tests

* feat: create user with limits helper

* chore: move user limit helper to utils

* fix: multiple limits test

* feat: fail faster

* chore: event url helper

* fix: prismock count date comparisons

* chore: improve booking limit types in test utils

* test: add typed weekStart to getOrganizer helper

* test: add custom fromDate to getDate helper

* fix: correctly handle negative date increments

* test: add helper for partial weeks

* test: booking limits edge cases

* chore: remove booking limit e2e todos

* chore: normalize getDate return type and skip test

* Fix imports paths that are changes after main merge

* Fix failing types

* Skip failing test

---------

Co-authored-by: Peer Richelsen <peeroke@gmail.com>
Co-authored-by: Keith Williams <keithwillcode@gmail.com>
Co-authored-by: Alex van Andel <me@alexvanandel.com>
Co-authored-by: Hariom <hariombalhara@gmail.com>
2023-12-08 10:23:31 +00:00
Carina Wollendorfer f87eac193f
fix: rr-host booked outside of availability (#12704)
* correctly query overlapping bookings

* remove console.log

* fix getting busy bookings for getAvailableSlots

---------

Co-authored-by: CarinaWolli <wollencarina@gmail.com>
2023-12-08 01:31:02 +00:00
Aswath S c53e891c8a
fix: refactor booking details api middleware to use team member booking join (#12695)
* refactor booking details api middleware to use team member booking join

Signed-off-by: titanventura <aswath7862001@gmail.com>

* fix. security issue in previous commit. check for booking against current user. then check for team booking

Signed-off-by: titanventura <aswath7862001@gmail.com>

---------

Signed-off-by: titanventura <aswath7862001@gmail.com>
2023-12-07 22:43:51 +00:00
Udit Takkar 90a6fc3f26
refactor: Top Banner and add google calendar credential banner (#12532)
Fixes: https://github.com/calcom/cal.com/issues/12473

TODO:
- [x] Fix Type error

<img width="1512" alt="Screenshot 2023-12-02 at 12 47 19 AM" src="https://github.com/calcom/cal.com/assets/53316345/8a5c6dd0-6095-482b-b4d0-81653607a270">


<img width="1512" alt="Screenshot 2023-12-02 at 12 47 39 AM" src="https://github.com/calcom/cal.com/assets/53316345/fc64edb9-27b3-438f-b42d-75b200ac96e9">
2023-12-07 15:32:47 -07:00
Ujjwal Garg 969411041b
fix: Edit Location modal fields truncates on mobile view (#12684)
* fix #12640: Edit Location modal fields truncates on mobile

* chore: fix dialog

---------

Co-authored-by: Udit Takkar <udit222001@gmail.com>
Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com>
2023-12-07 21:10:41 +00:00
Udit Takkar 518cfbc037
feat: daily webhooks (#12273)
Co-authored-by: Joe Au-Yeung <65426560+joeauyeung@users.noreply.github.com>
2023-12-07 16:08:51 -05:00
DmytroHryshyn db625157d1
chore: [app-router-migration-2] migrate trpc, ssgInit, ssrInit (#12593)
* chore: migrate trpc, ssgInit, ssrInit

* manual: fix emails

* manual: fix ts issues

* Update packages/emails/README.md

* remove unneeded use client statements

* fix flaky locale tests, fix flaky login test

---------

Co-authored-by: Omar López <zomars@me.com>
2023-12-07 13:43:41 -07:00
Morgan Vernay ed295e4424 fixup! fix: prettier config 2023-12-07 11:13:07 +02:00
Morgan Vernay 217ff9e21d fix: prettier config 2023-12-07 09:49:03 +02:00
Henrik Klee 55d44ce789
fix: component styles and sign up / onboarding dark mode (#12581)
* fix divider border for addOnLeading

* fix primary button in dark mode and password input border

* signup dark mode and corner fix

* onboarding dark mode

* fix css var issue and use inline vars for light and dark mode

* Invert google icon on dark mode

* Fix typo

* fix eslint errors with yarn lint:fix

* use css vars on login page as well

* running lint manually

* Fix subtle

* Fix

* Fix

* linting

* linting

* chore: restore main yarn.lock

* fix: lint error

---------

Co-authored-by: Peer Richelsen <peeroke@gmail.com>
Co-authored-by: Sean Brydon <sean@brydon.io>
Co-authored-by: sean-brydon <55134778+sean-brydon@users.noreply.github.com>
Co-authored-by: sean-brydon <sean@cal.com>
Co-authored-by: Alex van Andel <me@alexvanandel.com>
2023-12-06 21:10:14 +00:00
Syed Ali Shahbaz adf012643a
fix: '/slots' endpoint API fixes (#12693) 2023-12-06 10:10:25 -07:00
Morgan fe7043de22
fix: get prisma schema from package @calcom/prisma (#12692)
* fix: get prisma schema from package @calcom/prisma

* fixup! fix: get prisma schema from package @calcom/prisma

* fixup! fixup! fix: get prisma schema from package @calcom/prisma
2023-12-06 15:50:45 +02:00
Henrik Klee ca0d23529a
updates storybook config and fixes and updates stories (#12683)
add packages
2023-12-06 10:41:35 +02:00
Hariom Balhara 9f50941904
test: Booking creation failure in case of stray destinationCalendar with no matching calendar credential (#12682) 2023-12-05 18:50:55 +00:00
Erik 9c32052a2b
chore: Prisma exception filters (#12679) 2023-12-05 11:57:48 -03:00
Benny Joo bb7057ea04
fix: type error in `settings/admin` in app router (#12638) 2023-12-04 15:31:36 -08:00
sean-brydon d185d7f7d8
feat: invites bypass disabled signup (#12626)
* invites bypass disabled signup

* nit:remove new line

* add tests

* chore: spelling

---------

Co-authored-by: Udit Takkar <udit222001@gmail.com>
2023-12-04 16:00:36 +00:00
Lauris Skraucis a3955980d5
refactor: remove api-key authguard (#12675) 2023-12-04 14:25:24 +01:00
Lauris Skraucis 6cca86f74c
feat: oauth clients management (#12604)
* feat: oAuth create and update dtos

* feat: WIP oAuth repository

* feat: oAuth controller and module

* refactor: rename cal oAuth to simply oauth

* fix: controller update client

* add oAuth client module to endpoints module

* refactor: OAuthClientRepository

* refactor

* status codes for controller

* oauth create return

* fix: oAuth client only for v2 API

* remove repository as provider from its module

* fix: oAuth module, have repository in providers

* fix: make endpoints run

* comment out oauth prisma schema code: coming next
2023-12-04 09:57:21 -03:00
Morgan Vernay 75f3b35771 fix: storybook atom import 2023-12-04 13:49:45 +02:00
Morgan Vernay cdca42eb6c Merge branch 'main' into platform 2023-12-04 13:47:44 +02:00
Morgan 80b92b5f11
chore: upgrade storybook 7.6.3 + use @storybook/nextjs (#12673)
* chore: upgrade storybook 7.6.3 + use @storybook/nextjs

* fix: color picker tests
2023-12-04 11:06:44 +00:00
Rajiv Sahal ffba6d6d66
feat: validate `CalProvider` api keys (#12672)
* fix: signup nit (#12585)

* Disable submit on empty form

* Fix submit

---------

Co-authored-by: Peer Richelsen <peeroke@gmail.com>

* New Crowdin translations by Github Action

* fix: Signup options are not disabled (#12610)

* fix: Signup options are not disabled

* fixes/signup disabling suggested changes done

* chore: signup and login improvements

---------

Co-authored-by: Udit Takkar <udit222001@gmail.com>

* fix: typo in @calcom/emails readme (#12615)

* fix: handle reschedule request for dynamic meetings (#12275)

* chore: [app-router-migration-1] migrate the pages in `settings/admin` to the app directory (#12561)

Co-authored-by: Dmytro Hryshyn <dev.dmytroh@gmail.com>
Co-authored-by: DmytroHryshyn <125881252+DmytroHryshyn@users.noreply.github.com>
Co-authored-by: zomars <zomars@me.com>

* chore: added cursor-pointer to img upload (#12624)

* added cursor-pointer to img upload

* nit

* feat: add clear filters option in bookings page (#12629)

* add clear filters option

* fix vscode settings.json

* use removeAllQueryParams()

* fix yarn lock

* remove toggleoption

* feat: display long durations in hours on booking (#12631)

Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com>

* New Crowdin translations by Github Action

* fix: workaround for future app dir routes

* feat: Allow only first slot to be booked (#12636)

Co-authored-by: Morgan Vernay <morgan@cal.com>

* New Crowdin translations by Github Action

* feat: add matomo analytics app (#12646)

* chore: Sentry Wrapper with Performance and Error Tracing (#12642)

* add wrapper for sentry and update functions in 'getUserAvailability'. Update tracesSampleRate to 1.0

* Make Sentry Wrapper utilize parent transaction, if it exists.

* Update wrapper for functions to inherit parameters from the child function

* add comment of when to use the wrapper

* check for sentry before wrapping, if not call unwrapped function

* refactored wrapper to have async and sync separate functions that utilize helpers for common behaviour

* update type of args to unknown

* fixed types of returns from wrapped functions

---------

Co-authored-by: Morgan <33722304+ThyMinimalDev@users.noreply.github.com>

* validate api keys to set error and key states for api keys

* organize error messages into one place

* set error messages from errors file instead of hardcoding value

* fix incorrect constant name

---------

Co-authored-by: sean-brydon <55134778+sean-brydon@users.noreply.github.com>
Co-authored-by: Peer Richelsen <peeroke@gmail.com>
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
Co-authored-by: Pratik Kumar <70286186+Pratik-Kumar-621@users.noreply.github.com>
Co-authored-by: Udit Takkar <udit222001@gmail.com>
Co-authored-by: Samyabrata Maji <116789799+samyabrata-maji@users.noreply.github.com>
Co-authored-by: Manpreet Singh <manpoffc@gmail.com>
Co-authored-by: Benny Joo <sldisek783@gmail.com>
Co-authored-by: Dmytro Hryshyn <dev.dmytroh@gmail.com>
Co-authored-by: DmytroHryshyn <125881252+DmytroHryshyn@users.noreply.github.com>
Co-authored-by: zomars <zomars@me.com>
Co-authored-by: Varun Prahlad Balani <varunprahladbalani@gmail.com>
Co-authored-by: Mike Zhou <mikezhoudev@gmail.com>
Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com>
Co-authored-by: Haran Rajkumar <haranrajkumar97@gmail.com>
Co-authored-by: Morgan Vernay <morgan@cal.com>
Co-authored-by: Harshith Pabbati <pabbatiharshith@gmail.com>
Co-authored-by: Brendan Woodward <73412688+bwoody13@users.noreply.github.com>
Co-authored-by: Morgan <33722304+ThyMinimalDev@users.noreply.github.com>
2023-12-04 14:59:25 +05:30
Brendan Woodward 9a6d4e63e8
chore: Sentry Wrapper with Performance and Error Tracing (#12642)
* add wrapper for sentry and update functions in 'getUserAvailability'. Update tracesSampleRate to 1.0

* Make Sentry Wrapper utilize parent transaction, if it exists.

* Update wrapper for functions to inherit parameters from the child function

* add comment of when to use the wrapper

* check for sentry before wrapping, if not call unwrapped function

* refactored wrapper to have async and sync separate functions that utilize helpers for common behaviour

* update type of args to unknown

* fixed types of returns from wrapped functions

---------

Co-authored-by: Morgan <33722304+ThyMinimalDev@users.noreply.github.com>
2023-12-03 21:06:01 -05:00
Crowdin Bot c6f26f2a2a New Crowdin translations by Github Action 2023-12-03 00:10:11 +00:00
Haran Rajkumar 2f4b1818d0
feat: Allow only first slot to be booked (#12636)
Co-authored-by: Morgan Vernay <morgan@cal.com>
2023-12-02 19:07:06 -05:00
zomars 8e1ce633fb fix: workaround for future app dir routes 2023-12-02 13:25:06 -07:00
Crowdin Bot 44e4f4c644 New Crowdin translations by Github Action 2023-12-02 18:30:14 +00:00
Mike Zhou 0b9cf78e9b
feat: display long durations in hours on booking (#12631)
Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com>
2023-12-02 18:27:11 +00:00
Varun Prahlad Balani b2cdb08780
feat: add clear filters option in bookings page (#12629)
* add clear filters option

* fix vscode settings.json

* use removeAllQueryParams()

* fix yarn lock

* remove toggleoption
2023-12-02 23:40:45 +05:30
Benny Joo ca78be011c
chore: [app-router-migration-1] migrate the pages in `settings/admin` to the app directory (#12561)
Co-authored-by: Dmytro Hryshyn <dev.dmytroh@gmail.com>
Co-authored-by: DmytroHryshyn <125881252+DmytroHryshyn@users.noreply.github.com>
Co-authored-by: zomars <zomars@me.com>
2023-12-01 13:07:26 -07:00
Pratik Kumar 3d89809e67
fix: Signup options are not disabled (#12610)
* fix: Signup options are not disabled

* fixes/signup disabling suggested changes done

* chore: signup and login improvements

---------

Co-authored-by: Udit Takkar <udit222001@gmail.com>
2023-12-01 11:09:34 +00:00
Crowdin Bot 252ce07861 New Crowdin translations by Github Action 2023-12-01 08:59:52 +00:00
sean-brydon a75ef8870b
fix: signup nit (#12585)
* Disable submit on empty form

* Fix submit

---------

Co-authored-by: Peer Richelsen <peeroke@gmail.com>
2023-12-01 08:56:19 +00:00