Compare commits

...

233 Commits

Author SHA1 Message Date
Gustavo Maronato 51ca072d0e Add terms of service
Signed-off-by: Gustavo Maronato <maronato@noreply@maronato.dev>
2024-01-28 02:46:39 -03:00
Gustavo Maronato f730ad9ff5 Add privacy policy
Signed-off-by: Gustavo Maronato <maronato@noreply@maronato.dev>
2024-01-28 02:31:06 -03:00
Benny Joo b76a2a4019
chore: [app-router-migration 21] Migrate "/d/*" pages (#13047)
* Migrate d/* page group

* Fix metadata

* manual: fix type of arg of getData

* fix

* manual: fix type errors

* Fix type errors

* fix type errors

* fix error

* fix

* fix build error
2024-01-12 18:37:25 -03:00
DmytroHryshyn a28b9cacd2
chore: [app-router-migration 17]: migrate payments page (#13039)
* chore: migrate payments page

* migrate page to WithLayout HOC, replace new ssrInit

* fix type error

* fix

* revert version changes

* fix

---------

Co-authored-by: Benny Joo <sldisek783@gmail.com>
2024-01-12 18:36:48 -03:00
DmytroHryshyn abd90f6af8
chore: [app-router-migration 14] migrate not-found page (#13032)
* chore: migrate not-found page

* migrate page, replace ssgInit

* fix flaky test

* fix

* fix

* fix
2024-01-12 18:21:35 -03:00
Benny Joo 0bdc45a1a5
chore: [app-router-migration 18] Migrate "/settings/organizations/*" pages (#13042)
* manual: app-directory-boilerplate-calcom

* manual: import components directly

* manual: move files to correct route groups and add metadata

* manual: Change structure & Refactor to make code up to date

* manual: refactors

* Fix

* manual: fix type of arg of getData

* manual: fix type error

* fix type bugs

* fix

* fixing the build

* wip

---------

Co-authored-by: Greg Pabian <35925521+grzpab@users.noreply.github.com>
2024-01-12 15:32:39 -03:00
Riddhesh Mahajan 65d9704f2b
fix: add check for already used slug (#13076)
* add check for already used slug

* Update _patch.ts

Removed comment that added no value based on the code. Renamed const

---------

Co-authored-by: Keith Williams <keithwillcode@gmail.com>
2024-01-12 11:07:39 -03:00
sean-brydon d8ba783369
fix: use brand accent instead of invert on current day selector (#13194)
* fix: use brand accent instead of invert

* fix: use brand accent instead of invert

* chore: remove constants from commit
2024-01-12 13:44:26 +00:00
Alex van Andel 782127a993 v3.6.4 2024-01-12 12:42:31 +00:00
sean-brydon fbc3f7b51f
fix: correctly use eventTriggers parsed and use Array.from (#13193)
Co-authored-by: Keith Williams <keithwillcode@gmail.com>
2024-01-12 11:19:40 +00:00
Crowdin Bot 619ccf4065 New Crowdin translations by Github Action 2024-01-12 11:12:57 +00:00
Alan Daniel 40d8f34e8d
chore: rename 'reason' to 'cancellationReason' to match the api params schema (#13178)
Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com>
2024-01-12 11:10:04 +00:00
DmytroHryshyn 9c1e1d7312
chore: [app-router-migration 24] migrate more page (#13054) 2024-01-11 21:45:45 +00:00
Carina Wollendorfer 710a1a7d38
add teamId when refreshing access token (#13159)
Co-authored-by: CarinaWolli <wollencarina@gmail.com>
Co-authored-by: Keith Williams <keithwillcode@gmail.com>
2024-01-11 21:43:15 +00:00
Peer Richelsen f25605ef4d
chore: corrected event-types icons (#13173) 2024-01-11 21:42:29 +00:00
DmytroHryshyn 684575d0a4
chore: [app-router-migration 15] migrate bookings/* page group (#13038)
* codemod: remove-get-static-props

* replace ssrInit

* manual: extract getServerSideProps into a file

* manual: Export getServerSideProps from legacy page

---------

Co-authored-by: Benny Joo <sldisek783@gmail.com>
2024-01-11 18:20:03 -03:00
sean-brydon bc6267e99b
fix: Use constants.ts for brand colours > db DEFAULT (#13167)
* fix: user proper default values if no brand colour is set.

* fix:default value

* fix: more ?? to defined default as color is possibly null
2024-01-11 20:22:35 +00:00
Crowdin Bot 9901c91e9b New Crowdin translations by Github Action 2024-01-11 18:32:20 +00:00
Rahil Ansari dfe03efc37
fix: fix the fluctuations in sidebar when we scroll main content (#13115)
* fix the fluctuations in sidebar when we scroll main content

* fix: reduced vertical padding instead of
TOP_BANNER_HEIGHT

---------

Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com>
2024-01-11 18:29:03 +00:00
Crowdin Bot 0eabb56f07 New Crowdin translations by Github Action 2024-01-11 15:35:52 +00:00
Carina Wollendorfer cdd066c653
add missing translations (#13125)
Co-authored-by: CarinaWolli <wollencarina@gmail.com>
2024-01-11 15:31:52 +00:00
Ethan Chen 026f22fbaf
feat: add utcOffset in webhook payload (#12709)
* add utcOffset in webhook

* add utcOffset in webhook

* fix type

* fix type

* fix function error

* fix: UTCOffset DST

* getUTCOffsetByTimezone support date param

* add startTime in `getUTCOffsetByTimezone` func

---------

Co-authored-by: Keith Williams <keithwillcode@gmail.com>
2024-01-11 14:35:02 +00:00
Keith Williams 5950c5a756
fix: Bundle analysis message (#13161) 2024-01-11 13:30:14 +00:00
Greg Pabian cd9d16be3e
chore: [app-router-migration 23] Migrate the "enterprise" page (#13044) 2024-01-11 12:56:30 +00:00
Keith Williams 993f92acba
chore: Ignore admin and devops team labels (#13162) 2024-01-11 09:46:42 -03:00
Benny Joo 6f110d21fd
chore: [app-router-migration 22] Migrate `/insights` page (#13055)
* intuita codemod: remove-get-static-props

* intuita codemod: app-directory-boilerplate-calcom

* manual: refactor and add metadata title/description

* manual: Change structure & Refactor to make code up to date
2024-01-11 12:45:26 +00:00
Benny Joo 0df6777814
chore: [app-router-migration 20] Migrate `/settings/security/*` pages (#13046)
* intuita codemod: app-directory-boilerplate-calcom

* manual: move folders to (settings-layout) route group

* manual: add title/description metadata

* manual: Change structure & Refactor to make code up to date
2024-01-11 12:44:44 +00:00
Benny Joo 5f14cd31d1
chore: [app-router-migration 19] Migrate `/settings/my-account/*` pages (#13045)
* intuita codemod: app-directory-boilerplate-codemod

* manual: move to (settings-layout) route group

* manual: add title/description metadata

* manual: Change structure & Refactor to make code up to date
2024-01-11 09:22:44 -03:00
DmytroHryshyn 070ec326aa
chore: [app-router-migration 13] Migrate reschedule page group (#13030)
* app-boilerplate-codemod

* fin

* fix

* fix & test & move to new struct

* manual: fix type error

* manual: fix lint error

---------

Co-authored-by: Benny Joo <sldisek783@gmail.com>
2024-01-11 07:50:29 -03:00
DmytroHryshyn 4ca79af13f
chore: [app-router-migration-11] Migrate workflow page group (#12777)
* add a/b test flags for apps, workflows, getting-started, settings/teams

* Finalize

* Discard changes to apps/web/app/layoutHOC.tsx

* fix: types

* manual: address Keith's comments

---------

Co-authored-by: Benny Joo <sldisek783@gmail.com>
Co-authored-by: Omar López <zomars@me.com>
2024-01-11 07:49:46 -03:00
Crowdin Bot a2e70f9aad New Crowdin translations by Github Action 2024-01-11 03:01:54 +00:00
Benny Joo f186d2e41d
Migrate: `/maintenance` page group (#13056) 2024-01-10 23:58:38 -03:00
Riddhesh Mahajan aaeea250bc
fix: only consider unique eventTriggers (#13080)
* only consider unique eventTriggers

* remove intermediary const

---------

Co-authored-by: Syed Ali Shahbaz <52925846+alishaz-polymath@users.noreply.github.com>
2024-01-10 18:26:19 +00:00
alannnc 96af17d8d7
feat: OOO booking-forwarding (#12653)
* feat-profile-forwarding

* fix for promises of handling

* fix badge success color

* clean up

* fix suggested changes

* Changed design on booking-forward pages and moar test

* taking care of suggested changes, trpc errors and code cleaning

* improve text

* fix conflicting data-testid

* fix unique data-testid

* fix error css-global, email button styles, error conditional

* rename files to match functionality, remove away ui

* Add translations and migration

* remove log

* small fixes + improvements

* fix styles to match new design

* merge fixes

* Fix styles dark mode

* Solving merge conflicts from earlier

* Fix/change test to match new elements

* use trash icon button insted of dots (design issues)

* only send email if toUserId is set

* Fix date picker dark mode

* merge with remote

* removed status field from table and email its now for notify

* small text improvement in email

* check for team plan not paid plan

* fixes and clean up due to removing status

* fix old send request name to new behaviour

* more naming improvements and text

* remove status from handle-type

* code clean up

* fix type error

---------

Co-authored-by: Peer Richelsen <peeroke@gmail.com>
Co-authored-by: Carina Wollendorfer <30310907+CarinaWolli@users.noreply.github.com>
Co-authored-by: CarinaWolli <wollencarina@gmail.com>
2024-01-10 17:04:02 +00:00
Carina Wollendorfer dfaa6d28e4
fix: scheduling/canceling workflow emails in cron api call (#13123)
* set credentials for sendgrid client on all requests

* fix typo

---------

Co-authored-by: CarinaWolli <wollencarina@gmail.com>
2024-01-10 16:44:37 +00:00
Peer Richelsen 6a2de993bb
fix: org link for desktop (#13119)
* fixed org link for desktop

* Update globals.css

---------

Co-authored-by: Keith Williams <keithwillcode@gmail.com>
2024-01-10 15:02:07 +00:00
Keith Williams b69d885ee6
fix: Bundle analysis commenting (#13116)
* fix: Bundle analysis commenting

* Remove if on build step for testing

* Remove GitHub event number check for testing

* Reverted changes for testing
2024-01-10 14:35:27 +00:00
Alex van Andel d001c4e2ae v3.6.3 2024-01-10 13:41:03 +00:00
Hariom Balhara 558f1c9478
fix: Payment Page not showing (#13146) 2024-01-10 13:34:49 +00:00
zomars 74748a6183 Update yarn.lock 2024-01-09 12:42:37 -07:00
Omar López 986f17f54b
chore: mitigates docker rate limiting (#13130) 2024-01-09 12:40:56 -07:00
Alex van Andel ab342016d2 v3.6.2 2024-01-09 12:08:05 +00:00
Alex van Andel c34c27fc0a
fix: Button re-enables on sluggish networks whilst redirecting (#13106)
* fix: Button re-enables on sluggish networks whilst re-direct is happening

* Add explanatory comment

* fix: Booking form validation can take a while

---------

Co-authored-by: Joe Au-Yeung <65426560+joeauyeung@users.noreply.github.com>
Co-authored-by: Peer Richelsen <peeroke@gmail.com>
2024-01-09 11:32:25 +00:00
Riddhesh Mahajan 6dbf372ab0
add check for parentId (#13078) 2024-01-09 11:16:44 +00:00
Keith Williams 7dc7f949cf
chore: Upgrade deprecated parts of bundle analysis (#13104)
* chore: Upgrade deprecated parts of bundle analysis

* Added workflow_dispatch to allow for manual runs

* Removed conditions just for testing
2024-01-09 11:13:41 +00:00
DmytroHryshyn 5690718e7f
chore: [app-router-migration 10.5]: replace new trpc helper with legacy ssrInit/ssgInit (#13108) 2024-01-09 02:59:11 +00:00
zomars 97d5bb9fe6 Update turbo.json 2024-01-08 15:37:32 -07:00
DmytroHryshyn fcc50c1d0f
chore: [app-router-migration-11] Migrate settings/teams page group (#12778)
* intuita codemod: app-directory-boilerplate-calcom

* manual: add title and description metadata for each page

* manual: move between folders

* manual: finalize migration

* manual: fix client components

* manual: Change structure & Refactor to make code up to date

---------

Co-authored-by: Benny Joo <sldisek783@gmail.com>
2024-01-08 10:51:40 -07:00
Morgan b832289f8e
refactor: booker import dynamically specific ui components instead of the whole package (#13101) 2024-01-08 17:49:39 +00:00
Hariom Balhara 4aa0b4cc65
fix: Team URL and booker URLs (#13050)
Co-authored-by: Bailey Pumfleet <bailey@pumfleet.co.uk>
Co-authored-by: Peer Richelsen <peeroke@gmail.com>
2024-01-08 15:25:48 +00:00
Hariom Balhara e2ef9dd710
fix: Failing tests (#13091)
* Stripe needs month starting from 1 and not 0

* Fix Routing form failure

* Fix failing test
2024-01-08 14:23:41 +00:00
Keith Williams 15b0e0c5bd
chore: Change PR template to have bullet points instead of checkboxes for type (#13096) 2024-01-08 13:59:03 +00:00
Udit Takkar 020515de8c
fix: invalid cal video bug (#13058)
* fix: invalid cal video bug

* chore: undo

* fix: daily video

* chore: refactor code
2024-01-08 13:10:06 +00:00
Keith Williams 87cb8e918f
chore: Add E2E test suite back to PRs (#13093)
Co-authored-by: Peer Richelsen <peeroke@gmail.com>
2024-01-08 12:36:47 +00:00
Peer Richelsen 69677495ca
Revert "feat(app-store): add feishu calendar (#13089)" (#13094)
This reverts commit a40520b90c.
2024-01-08 12:28:59 +00:00
techknowlogick a40520b90c
feat(app-store): add feishu calendar (#13089)
* feat(app-store): add feishu calendar

* fix type names
2024-01-08 12:28:21 +00:00
Keith Williams c07b456b2d
chore: Stop closing stale PRs (#13092) 2024-01-08 12:19:52 +00:00
Crowdin Bot 7ec2a4b8fa New Crowdin translations by Github Action 2024-01-07 20:49:49 +00:00
Riddhesh Mahajan dccaf5fb67
align username update, cancel and check icon (#13085) 2024-01-07 20:46:45 +00:00
Erik d76060e037
fix: Stripe e2e regression (#13062)
* fix: Stripe e2e regression

* chore: remove
2024-01-07 05:47:01 +00:00
Crowdin Bot 48d4725e10 New Crowdin translations by Github Action 2024-01-07 03:24:54 +00:00
Hariom Balhara 2f1e545976
feat: Allow org creation with conflicting slug and renaming team slug during migration (#13065) 2024-01-07 08:51:59 +05:30
Gabriel Hall 50fb903ba6
chore: minor typo (#13064) 2024-01-06 12:42:06 +00:00
DmytroHryshyn ccda3fd71e
chore: [app-router-migration-10] Migrate getting started page (#12776)
* make no-meeting-found page use ssr

* remove-route-groups

* add LayoutHOC

* fix

* fix

* add a/b test flags for apps, workflows, getting-started, settings/teams

* chore: migrate getting-started-page

* fix: move fonts css variables to layout

* chore/implement-ab-test

* Discard changes to .env.example

---------

Co-authored-by: zomars <zomars@me.com>
2024-01-05 10:21:11 -07:00
Udit Takkar c44fb074ab
fix: Mobile scrolling issue (#13049) 2024-01-05 16:07:17 +00:00
Alex van Andel d56d649bf0
fix: Broken test after recent organization avatar revamp (#13059)
Co-authored-by: Peer Richelsen <peeroke@gmail.com>
2024-01-05 15:44:59 +00:00
Amit Sharma 8856ba7d70
fix: Changed dynamic to group meeting and udpated meta (#13028)
* Changed dynamic to group meeting and udpated meta

* type fix

* Update packages/features/bookings/components/BookerSeo.tsx

* Update packages/features/eventtypes/lib/getPublicEvent.ts

* Update packages/features/bookings/components/BookerSeo.tsx

* Update packages/features/eventtypes/lib/getPublicEvent.ts

* Update getPublicEvent.ts

* Apply suggestions from code review

* Update packages/lib/defaultEvents.ts

* Update packages/lib/defaultEvents.ts

* Update packages/lib/defaultEvents.ts

* Update packages/lib/defaultEvents.ts

---------

Co-authored-by: Peer Richelsen <peer@cal.com>
Co-authored-by: Peer Richelsen <peeroke@gmail.com>
2024-01-05 13:20:17 +00:00
Alex van Andel 0897bf20da
feat: Add newline as a bulk import seperator (#13052) 2024-01-05 12:50:11 +00:00
Hariom Balhara 6ce6d570db
Avoid duplicate inline embeds (#13048) 2024-01-05 12:32:53 +00:00
Amit Sharma b99ccb1a5a
fix: Can't resubmit otp while verifying email (#13034)
* Can't resubmit otp while verifying email fix

* submit button added

* chore: remove disabled

---------

Co-authored-by: Udit Takkar <udit222001@gmail.com>
2024-01-05 12:28:20 +00:00
sean-brydon 698d8ae4bd
chore: front-end-avatars (#12716)
* Update UserAvatar and remove org avatar

* Update Imports

* Fix imports to use calcom/ui

* type: fix imports

* fix: use testId on profile

* test: use image src instead of innerHTML

* fix: Allow alt on useravatar

* test: add testId to org profile

---------

Co-authored-by: Peer Richelsen <peeroke@gmail.com>
Co-authored-by: Alex van Andel <me@alexvanandel.com>
2024-01-05 10:36:44 +00:00
DmytroHryshyn 0dddc2224a
chore: [app-router-migration-9] Migrate apps/index page (#12775)
Co-authored-by: zomars <zomars@me.com>
2024-01-04 14:36:31 -07:00
Peer Richelsen 49f9f5489b
fix: team availability data table scrolling (#13036)
* fixed data table scrolling for team availability

* Update packages/features/shell/Shell.tsx

* nit
2024-01-04 20:33:02 +00:00
DmytroHryshyn ecb693c70e
chore: [app-router-migration 8.6] reorganize future pages file structure (#12988)
* make no-meeting-found page use ssr

* remove-route-groups

* add LayoutHOC

* fix

* fix

* ensure proper types for withLayout function

---------

Co-authored-by: Greg Pabian <35925521+grzpab@users.noreply.github.com>
2024-01-04 11:26:11 -07:00
Peer Richelsen 3c6fdfe724
chore: removed old booker feature flag (#13040)
Co-authored-by: Omar López <zomars@me.com>
2024-01-04 11:23:51 -07:00
Somay Chauhan ef7f0e2259
feat: Organization Add member to a team email communication (#12946) 2024-01-04 16:29:07 +00:00
Riddhesh Mahajan 3791af8644
feat: Make private URLs easier to copy-paste from web app (#13018)
* Make private URLs easier to copy-paste from web app

* Apply suggestions from code review

* Update apps/web/pages/event-types/index.tsx

* lint

---------

Co-authored-by: Peer Richelsen <peer@cal.com>
Co-authored-by: Peer Richelsen <peeroke@gmail.com>
2024-01-04 16:28:23 +00:00
Keith Williams c19799e275
chore: Remove invalid DATABASE_URL 'with' value (#13027) 2024-01-04 01:39:45 -03:00
Keith Williams 4c4fc9e38b
chore: Fix NODE_OPTIONS error (#13024) 2024-01-04 01:39:17 -03:00
Keith Williams 2220778e6b
chore: Upgrade buildjet cache action to v3 (#13026) 2024-01-04 14:38:48 +10:00
Keith Williams 0f707a55b0
chore: Upgrade upload-artifact action to v4 (#13025) 2024-01-04 14:38:27 +10:00
Hariom Balhara de1c9d01cd
feat: orgMigration - Support moving users as an option when moving a team (#12917)
* Move orgMigration routes to app to allow them to be tested as they are here to stay for longer tim

* move to Form everywhere and fix session reading

---------

Co-authored-by: sean-brydon <55134778+sean-brydon@users.noreply.github.com>
2024-01-04 08:33:51 +05:30
gitstart-app[bot] 6a1325867e
fix: Fix all TS warnings (fix-tsWarnings) (#12139)
Co-authored-by: gitstart-calcom <gitstart-calcom@users.noreply.github.com>
Co-authored-by: GitStart-Cal.com <121884634+gitstart-calcom@users.noreply.github.com>
Co-authored-by: Peer Richelsen <peeroke@gmail.com>
2024-01-03 18:18:42 -07:00
Keith Williams 574a4a847d
chore: Allow labeler action to use workflow_dispatch (#12993)
* chore: Update team labeler to workflow_dispatch

* Fixed conflict
2024-01-03 20:35:16 -03:00
Benny Joo f201266d69
chore: [app-router-migration-7] Migrate `/teams` page (#12622)
Co-authored-by: Dmytro Hryshyn <dev.dmytroh@gmail.com>
Co-authored-by: zomars <zomars@me.com>
2024-01-03 21:29:11 +00:00
Keith Williams 71e57bafde
chore: Remove need for force merges (#13021) 2024-01-03 19:51:24 +00:00
Peer Richelsen c4b296d580
chore: replace global.css with todesktop tailwind variant (#12991)
* installed todesktop tailwind variant

* moved todesktop styles into tailwind classes

* fixed back button in settings
2024-01-03 13:54:44 -03:00
Riddhesh Mahajan 7d7e74c869
fix: skeleton width for settings menu in sidebar (#13017) 2024-01-03 16:46:10 +00:00
Udit Takkar 6dec98129c
fix: bad request in webhook route (#13008) 2024-01-03 14:35:29 +00:00
Kartik Saini c7b62950de
fix: cal video link on booking confirmation (#12944)
* fix: Ensure generated Cal Video link matches expected pattern on booking confirmation

* fix: missing Google Meet videoCallUrl in webhooks on booking confirmation

---------

Co-authored-by: Peer Richelsen <peeroke@gmail.com>
Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com>
2024-01-03 07:35:46 +00:00
Keith Williams 4dba72fecb
fix: Permissions issue with team labeler (#12992)
* fix: Permissions issue with team labeler

* Made the job runnable
2024-01-02 22:39:39 +00:00
gitstart-app[bot] e61be783d1
test: Check the recurring event tab and your funtionalities (teste2e-recurring) (#12331)
Co-authored-by: gitstart-calcom <gitstart-calcom@users.noreply.github.com>
Co-authored-by: GitStart-Cal.com <121884634+gitstart-calcom@users.noreply.github.com>
Co-authored-by: Keith Williams <keithwillcode@gmail.com>
2024-01-02 21:56:48 +00:00
Amit Sharma 299a866aac
fix: dynamic booking duration (#12951)
* dynamic booking duration fix

* fix: Correct duration handling from boolean -> number

---------

Co-authored-by: Alex van Andel <me@alexvanandel.com>
2024-01-02 16:24:45 +00:00
Keith Williams e39e6ccf79
chore: Merge PR labeler actions (#12987) 2024-01-02 16:07:58 +00:00
Peer Richelsen 218f6a84b9
fix: layout for settings/teams (#12979)
* fixed url

* added settings fix
2024-01-02 20:24:28 +05:30
Keith Williams 1a3e4d10c0
chore: Update permissions used for assigning team labels (#12984)
* chore: Inherit secrets for assigning team labels

* Added workflow_call for testing

* Added this branch for testing

* Moved secrets label

* Trying to set permissions differently

* Removed testing branch
2024-01-02 14:34:59 +00:00
Shubham Palriwala f848a44f1a
feat: integrate formbricks in help feedback box (#12276)
* feat: integrate formbricks in help feedback box

* Update yarn.lock

* Update yarn.lock

* fix: use formbricks/api@v1.1 & set user with userId linked to feedback

* fix: use separate env vars as suggested

* test: Add more orgs tests (#12241)

* feat: integrate formbricks in help feedback box

* Update yarn.lock

* fix: yarn lockfile

* fix: yarn lockfile again

* feat: link cal and formbricks user.id and add attributes of email and username to formbricks person object

* Update yarn.lock

* Update yarn.lock

* fix: type safety in enums

---------

Co-authored-by: Peer Richelsen <peer@cal.com>
Co-authored-by: Hariom Balhara <hariombalhara@gmail.com>
Co-authored-by: Peer Richelsen <peeroke@gmail.com>
2024-01-02 14:08:11 +00:00
Robbie 2181731d64
docs: Add Tunnelmole as an open source alternative to ngrok (#12925)
* doc: Add Tunnelmole as an open source alternative to ngrok plus minor grammar fixes

* Update README.md

---------

Co-authored-by: Peer Richelsen <peeroke@gmail.com>
Co-authored-by: Keith Williams <keithwillcode@gmail.com>
2024-01-02 14:00:38 +00:00
Udit Takkar 8c8401330a
fix: preview url for booking page (#12973)
* fix: preview url for booking page

* chore: use cal url

* chore: fix tests

---------

Co-authored-by: Peer Richelsen <peeroke@gmail.com>
2024-01-02 14:00:00 +00:00
DmytroHryshyn 7015c8909f
fix: fix-animations on event-types/[type] page (#12900) 2024-01-02 08:56:50 -05:00
Peer Richelsen cbee4ff704
added macos styles to global.css (#12981) 2024-01-02 13:45:31 +00:00
Ankit Das ffefb3461e
fix: check your email page flickers (#12969)
* fixes#12966

* fixes#12966

* "fix-modification

* fix-mis-paste

* checks-fixes

* civilized-code-of-same-previous-approach

* civilized-changes-of-same-approach

* fix

* checks-fix

* fix

* fix

* checks-fix

* checksfix

* check fix

* undochanges-_-

---------

Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com>
2024-01-02 09:32:57 +00:00
Udit Takkar 1c2fff5447
fix: ui bugs in settings page (#12975) 2024-01-01 22:50:56 +00:00
Peer Richelsen 6f942cfcac
chore: removed isSignup for 404 page (#12967)
* removed isSignup for 404 page

* removed unused i18n

* minor fix to go back button

* nit
2023-12-30 22:23:14 +00:00
DmytroHryshyn 7579417d7e
chore: allow disabling source map generation with env var (#12899) 2023-12-29 18:21:19 +00:00
Peer Richelsen 16d1adf990
fix: dark mode improvements for signup (#12965)
* dark mode improvements

* small changes

* readded producthunt badges

* only show social proof on cal.com
2023-12-29 18:08:36 +00:00
Saurabh Jaswal bdc36acdf5
fix: updated the bg-emphasis style in dark mode (#12933)
Co-authored-by: sean-brydon <55134778+sean-brydon@users.noreply.github.com>
Co-authored-by: Peer Richelsen <peeroke@gmail.com>
2023-12-29 17:33:41 +00:00
Jatin Sandilya 1f036bf35e
feat: pipedrive crm app on cal (#12316)
* add pipedrive crm app w/ revert api

* update lockfile

* fix issues highlighted by codacy

* get pipedrive `client_id` & `client_secret` from db

* update readme with instructions to add credentials

* Fix yarn.lock

* fix `turbo.json`

---------

Co-authored-by: Hariom <hariombalhara@gmail.com>
2023-12-29 09:55:26 +00:00
sean-brydon 5de77e386c
fix:Remove fixed height and overflow (#12959) 2023-12-28 20:32:48 +00:00
Peer Richelsen 412e7ecbce
fixes to org email (#12937) 2023-12-27 16:16:17 +00:00
Hariom Balhara 55c9efec3e
fix: Flakiness in tests (#12929) 2023-12-23 07:48:02 -05:00
Peer Richelsen c4792c55fe
chore: minor changes to instant meetings (#12931) 2023-12-22 19:52:25 +00:00
Peer Richelsen 04cad3a69e
chore: remove scrollbar-gutter (#12936) 2023-12-22 19:02:22 +00:00
Keith Williams f7b257750a
v3.6.1 2023-12-22 08:28:33 -05:00
Hariom Balhara 4fa7bb64eb
test: e2e for not allowing reschedule of a cancelled booking (#12928)
* test: e2e for not allowing reschedule of a cancelled booking

* Fix failing test
2023-12-22 08:07:47 -05:00
Hariom Balhara 69656b7861
fix: Dont allow rescheduling for an already cancelled/rejected and thus resheduled booking (#12926) 2023-12-22 15:15:55 +05:30
Sourav b543c4030c
Fix: #12898 (#12919) 2023-12-22 09:54:43 +05:30
Jas Krrish Singh 4ce62b84ce
fix: Link Provided in the Setup of PostgreSQL DB with Railway.app was wrong or not Updated (#12915)
* Fix #12863

* Fixes #12863

* Revert yarn.lock

* Update README.md fix:#12914

* Update fix: #12914

* Update fix: #12914

* Update [[...step]].tsx

---------

Co-authored-by: Keith Williams <keithwillcode@gmail.com>
Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com>
2023-12-21 15:01:13 +00:00
Carina Wollendorfer 076868d243
test: testing workflow triggers (#12823)
* add workflows to bookingScenario

* activate sandbox mode for unit/integreation tests

* add sendgrid specific code to SendgridProvider

* Refactor WIP

* remove duplicate sendgridProvider file

* first implementation for testing workflows

* revert unintended changes

* comment out Workflow trigger tests

* move sendgrid check after test mode

* Update signup.tsx

* fix esLint

* test webhooks on all tests in fresh-booking.test.ts

* fix subjectPattern as title can be different

* add workflow tests to reschedule.test.ts

* code clean up

* code clean up

* fix sendgrid credentials missing message

* code clean up

---------

Co-authored-by: CarinaWolli <wollencarina@gmail.com>
2023-12-21 18:57:06 +05:30
Hariom Balhara a03a1ba34e
fix: bookerUrl for the user that isn't part of the org but appears in a team inside the org (#12911) 2023-12-21 09:17:41 -03:00
Somay Chauhan dea873fef1
feat: Restrict organization creation to admins and then automatically verify all organizations (#12787)
Co-authored-by: Hariom Balhara <hariombalhara@gmail.com>
2023-12-21 12:10:46 +00:00
sean-brydon 9fbb0808be
fix: leading-none (#12908)
Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com>
2023-12-21 08:22:19 +00:00
Udit Takkar beae1aae8b
fix: siderbar hover state (#12910) 2023-12-21 13:43:15 +05:30
Carina Wollendorfer e56b4b57bf
fix organization invitation e2e tests (#12904)
Co-authored-by: CarinaWolli <wollencarina@gmail.com>
2023-12-20 19:51:57 -05:00
Joe Au-Yeung 4faad64978
test: Seed GCal test credentials (#12596)
* Seed GCal test credentials

* Set yml .env to secrets

* Switch to vars

* Add error messages

* Set error message

* Error messages

* Change .env to secrets

* Run db-seed even with cache

* Add with DATABASE_URL

* Set DB URL

* Set DB URL

* Inputs DB URL

* Move database URL to with block

* Create env under yarn db-studio

* Fix typo

* WIP

* WIP

* WIP

* WIP

* WIP

* Add credential console log

* Hit cache

* Add logs

* Remove echo

* Run on ubuntu latest

* Don't cache db

* Uncache

* WIP

* WIP

* Change back to buildjet

* Seed GCal keys in test

* Test uses GCal keys

* Parse keys

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* Clean up

* Type fix

* Clean up

* Clean up
2023-12-20 14:28:24 -05:00
Keith Williams b384e4a9d8
chore: Reduced shard count to 5 for E2E (#12901) 2023-12-20 18:31:27 +00:00
Joe Au-Yeung d07e86e4f3
fix: Update Event Type Pricing For Multiple Installed Payment Apps (#12272)
* Prevent two payment apps from being enabled

* Find the enabled payment app to update the event type

* Add string

* Add tests

* Type fix

* Abstract check for multiple payment app logic

* Type check

* Address feedback

* chore: Enable One Payment App Per Event Type (#12414)

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

* Fix bug

* Fix test

* Clean up

* Fix test

* Fix test

---------

Co-authored-by: Morgan <33722304+ThyMinimalDev@users.noreply.github.com>
Co-authored-by: Peer Richelsen <peeroke@gmail.com>
Co-authored-by: Alex van Andel <me@alexvanandel.com>
Co-authored-by: Omar López <zomars@me.com>
Co-authored-by: Morgan Vernay <morgan@cal.com>
Co-authored-by: Keith Williams <keithwillcode@gmail.com>
2023-12-20 13:29:23 -05:00
Somay Chauhan 68d40cabbe
fix: Organization's Team invite emails (#12843)
Co-authored-by: Hariom <hariombalhara@gmail.com>
2023-12-20 21:21:42 +05:30
Alex van Andel f07d0479d4 fix: openssl rand -base64 32 documentation error 2023-12-20 14:25:58 +00:00
Hariom Balhara 9a2c2aaca4
fix: Links on avatar for org events (#12892)
* fix: Links on avatar for org events

* Remove noop code

* Fix self review feedbavk
2023-12-20 14:21:29 +00:00
Ritik Sharma 2693b30c51
fix: managed event type string (#12891)
* fix: managed event type string

* Update EventTypeSingleLayout.tsx

Updated the translation string with the right value.

* Update EventTypeSingleLayout.tsx

Bring back formMethods variable.

---------

Co-authored-by: Alex van Andel <me@alexvanandel.com>
2023-12-20 14:09:39 +00:00
Udit Takkar 95cc0eeaae
fix: only use event type's webhooks (#12894)
* fix: only use event type's webhooks

* chore: improve code
2023-12-20 18:48:10 +05:30
Crowdin Bot b49317a83f New Crowdin translations by Github Action 2023-12-20 10:05:19 +00:00
Carina Wollendorfer 24264c32dc
fix: creating workflow reminders for existing bookings when new step is added (#12878)
Co-authored-by: CarinaWolli <wollencarina@gmail.com>
2023-12-20 15:31:56 +05:30
DmytroHryshyn e248dfbda7
chore: [app-router-migration-8.5]: add a/b test flags for apps, workflows, getting-started, settings/teams (#12797)
* add a/b test flags for apps, workflows, getting-started, settings/teams

* fix linter

* fix

* fix

---------

Co-authored-by: zomars <zomars@me.com>
2023-12-19 21:58:33 +00:00
Benny Joo 31c0804386
chore: [app-router-migration-8] Migrate all pages in `/video` directory (#12623)
* chore: migrate trpc, ssgInit, ssrInit

* intuita codemod: remove-get-static-props

* intuita codemod: app-directory-boilerplate-calcom

* manual: refactor and add title/description metadata

* intuita codemod: app-directory-boilerplate-calcom

* manual: refactor and add metadata

* manual: add ab test redirect

* fix: restore emails

* fix linter and ts issues

---------

Co-authored-by: Dmytro Hryshyn <dev.dmytroh@gmail.com>
Co-authored-by: zomars <zomars@me.com>
2023-12-19 14:47:47 -07:00
zomars a3443b4e76 fix: deploy script 2023-12-19 14:00:04 -07:00
zomars 254dfc9e6a fix: deploy script 2023-12-19 13:36:42 -07:00
zomars ef6bf3d451 chore: add staging deploy script for Vercel 2023-12-19 13:19:49 -07:00
DmytroHryshyn 4b3ad579c8
chore: [app-router-migration-6] bookings/[status] page (#12621)
Co-authored-by: zomars <zomars@me.com>
2023-12-19 19:57:18 +00:00
zomars 27ce5e7808 fix: type fix 2023-12-19 12:48:14 -07:00
zomars 4d99a7fbdf chore: Lockfile update 2023-12-19 12:26:52 -07:00
zomars 27541227c8 chore: Settings update 2023-12-19 12:26:52 -07:00
zomars 83a187bf11 Revert "fix: temp renamed app dir to prevent OOM"
This reverts commit 0d3baee593.

Revert "fix: temp renamed app dir to prevent OOM"

This reverts commit 0d3baee593.

Revert "fix: temp renamed app dir to prevent OOM"

This reverts commit 0d3baee593.

Revert "fix: temp renamed app dir to prevent OOM"

This reverts commit 0d3baee593.
2023-12-19 12:26:52 -07:00
Peer Richelsen 200ce6932d
feat: Instant Meeting (#12345)
Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com>
Co-authored-by: Udit Takkar <udit222001@gmail.com>
2023-12-19 11:01:42 -08:00
Sourav 6d5983fabc
fix: #12863 (#12874)
* Fix: #12830

* Fix: ##12863

---------

Co-authored-by: Omar López <zomars@me.com>
Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com>
2023-12-19 18:30:15 +00:00
Manavpreet Singh 18b994bb4c
Fix: dropdown menu awkward hover state fixed (#12876)
Co-authored-by: ManavpreetSingh <119919977+manavpreetsingh@users.noreply.github.com>
Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com>
2023-12-19 18:05:33 +00:00
Hariom Balhara a8975f541f
fix: Dynamic Group Booking link for organization (#12825)
Co-authored-by: Erik <erik@erosemberg.com>
Co-authored-by: Omar López <zomars@me.com>
2023-12-19 17:42:40 +00:00
Alex van Andel 31b88c5537
chore: User page crash on bad metadata (#12858)
* chore: User page crash on bad metadata

* Sentry.captureException -> logger.error

---------

Co-authored-by: Keith Williams <keithwillcode@gmail.com>
2023-12-19 12:17:39 -05:00
Carina Wollendorfer f0bd628713
fix: ZodError in auth/oauth/authorize (#12877)
Co-authored-by: CarinaWolli <wollencarina@gmail.com>
2023-12-19 16:55:09 +00:00
Somay Chauhan 260bd4829c
fix: Users Cannot Be Upgraded to Owner in Organizations (#12737)
Co-authored-by: Peer Richelsen <peeroke@gmail.com>
2023-12-19 16:38:06 +00:00
Crowdin Bot dc8731d64f New Crowdin translations by Github Action 2023-12-19 16:36:58 +00:00
Amit Sharma 48eba5ef5c
fix: translate boolean values in emails (#12741)
Co-authored-by: Peer Richelsen <peeroke@gmail.com>
2023-12-19 16:33:06 +00:00
Sourav 544d76d503
fix: Troubleshooter - Vertical scrolling not working on left panel or calendar (#12792)
Co-authored-by: Udit Takkar <udit222001@gmail.com>
Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com>
Co-authored-by: Peer Richelsen <peer@cal.com>
Co-authored-by: Peer Richelsen <peeroke@gmail.com>
Co-authored-by: sean-brydon <55134778+sean-brydon@users.noreply.github.com>
2023-12-19 11:15:06 -05:00
Somay Chauhan 6ce2d9819e
fix: multiple bookings created on verify-email (#12864)
Co-authored-by: Rajiv Sahal <sahalrajiv-extc@atharvacoe.ac.in>
2023-12-19 10:47:54 -05:00
Somay Chauhan 2e0c9c7068
feat: meeting started webhook (#12764)
Co-authored-by: Syed Ali Shahbaz <52925846+alishaz-polymath@users.noreply.github.com>
2023-12-19 09:52:35 -05:00
Thanh Nguyen 038008502c
fix: minor typo (#12842)
Co-authored-by: Rajiv Sahal <sahalrajiv-extc@atharvacoe.ac.in>
2023-12-19 11:20:54 -03:00
Hariom Balhara 5886792285
feat: More admin options for organizations (#12424)
* Add more features in org admin

* Pr feedback addressed
2023-12-19 18:31:22 +05:30
Hariom Balhara e3905f631f
fix: Copy invite link on safari (#12873) 2023-12-19 12:38:34 +00:00
Hariom Balhara e5e0fa97eb
fix: Across Org Scenarios - Wrong links for event and team (#12358)
Co-authored-by: sean-brydon <55134778+sean-brydon@users.noreply.github.com>
2023-12-19 19:33:30 +10:00
Somay Chauhan f1caaad536
fix: videoCallUrl missing in webhooks for event types that require confirmation (#12856) 2023-12-19 13:55:06 +05:30
Udit Takkar b6279f4128
fix: country code [Testing] (#12807)
* fix: country code

* chore

* chore: only test cloudflare

---------

Co-authored-by: Alex van Andel <me@alexvanandel.com>
2023-12-19 08:01:08 +00:00
Hariom Balhara 5fb1857538
fix: Org invitation e2e flakiness (#12861) 2023-12-19 07:34:15 +00:00
Carina Wollendorfer a8d9b0210a
fix: catch error for invalid subcriber url on webhook ping test (#12784)
Co-authored-by: CarinaWolli <wollencarina@gmail.com>
2023-12-19 07:18:08 +00:00
Somay Chauhan 5751f0f634
fix: join subteam as their respective organization role (#12216)
* fix: join subteam as their respective organization role

* refactor code

* fix: join subteam as their respective organization role

* fix: join subteam as their respective organization role for pending members

* fix: Set subteam role to admin when updating organization role to admin

* refactor: suggested changes and fix type error

* fix: type error
2023-12-19 06:10:06 +00:00
Hariom Balhara 4b16860d07
fix: Correctly prefill username in case of non-org email invite in an org (#12854)
* fix: Correctly prefill username in case of non-org email invite in an org

* Update test

---------

Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com>
2023-12-19 02:44:48 +00:00
SuPrabhu f77e480d02
fix: Fix the Bg color of the sign In button after clicking Fix No #12773 (#12833)
* Updated the Big FIx 12773 sing-in

* FIX #12773 CSS Issue - Type Error

* Lint Error CHanges

* Debug Lint Error

* Lint Error Fix

* Changed

* Added CSS typo Error

* Added CSS typo Error - Removed Style Componet

* VS COde lint error fix

* Removing in the Button

* chore: fix login button

---------

Co-authored-by: Udit Takkar <udit222001@gmail.com>
Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com>
2023-12-18 18:21:46 +00:00
Keith Williams 099f36deeb
fix: Workflow files for E2E naming issue (#12859) 2023-12-18 18:15:14 +00:00
Keith Williams 09f804413b
chore: Moved e2e suite to run on pushes to main (#12819)
* chore: Moved e2e suite to run on pushes to main

* Update yarn.lock

* Small cleanup

* Moved production build without database to pre-release

* Added name to script

* Added changes, lint and build dependencies
2023-12-18 17:48:55 +00:00
Somay Chauhan e1a9576530
fix: only owners can award owner role in an organization. (#12803)
* fix: only owners can award owner role in an organization.

* chore: improve code

---------

Co-authored-by: Udit Takkar <udit222001@gmail.com>
2023-12-18 12:39:27 +00:00
sean-brydon 2410f8b3aa
Payment success screen re-design (#12831)
Co-authored-by: Peer Richelsen <peeroke@gmail.com>
2023-12-18 12:34:20 +00:00
Hariom Balhara a28e8ff39b
fix: A user joining from invite link of a team doesn't automatically become member of the org (#12774)
* fix: Add org membership when invite link for a team in an org is generated

* Run tests sequentially till we fix emails fixture
2023-12-18 17:48:35 +05:30
Sourav 7d2500a32f
Fix: #12830 (#12837) 2023-12-18 12:12:57 +00:00
Udit Takkar 22d906798e
fix: dark mode switch color (#12850) 2023-12-18 12:11:48 +00:00
Kartik Saini f71759f70b
feat: Shows link location and respective icon in /bookings (#12760)
* Add metadata to bookingMinimalSelect

* add: Show link location in /bookings

* Refactor: Update variable declaration and conditional rendering in booking metadata

- Remove explicit type declaration in locationVideoCallUrl assignment
- Use conditional rendering for provider icon based on iconUrl existence

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

* Display URL location exclusively, omitting addresses

---------

Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com>
Co-authored-by: Peer Richelsen <peeroke@gmail.com>
2023-12-18 01:28:49 +00:00
Peer Richelsen a323e06e88
Revert "Inter 4.0 (#12766)" (#12839) 2023-12-17 08:21:22 +10:00
Omar López b4db3a75a8
v3.6.0 2023-12-15 14:27:12 -07:00
Hariom Balhara a9fcd900cd
fix: Enhance the Robustness of Embed Snippets for Multiple Embeds on a Single Page (#11512)
Co-authored-by: Morgan <33722304+ThyMinimalDev@users.noreply.github.com>
Co-authored-by: Omar López <zomars@me.com>
2023-12-15 11:51:51 -07:00
Riddhesh Mahajan fcb443a8eb
fix: Zapier subscriber url shown in webhooks (#12702)
Co-authored-by: Carina Wollendorfer <30310907+CarinaWolli@users.noreply.github.com>
2023-12-15 16:09:59 +00:00
Joe Au-Yeung 9dfa596e3e
feat: Add consistent iCalUID (#12122)
Co-authored-by: Hariom <hariombalhara@gmail.com>
Co-authored-by: Keith Williams <keithwillcode@gmail.com>
2023-12-15 10:28:32 -05:00
Natnael Yilma 0e8ac7e4ed
fix: email validation in user post method API (#12743)
Co-authored-by: Peer Richelsen <peeroke@gmail.com>
2023-12-15 08:03:18 -07:00
Alex van Andel b236bffca2
fix: 404 /event-types on login (#12811)
* fix: 404 /event-types on login

* Set APP_ROUTER env vars to 0 whilst appdir is disabled
2023-12-15 14:39:15 +00:00
Udit Takkar 6e829e23f9
fix: type error (#12808)
* fix: type error

* chore

* Dont run future tests

* Skip more tests

* Fix 404 text

* Fix more tests

---------

Co-authored-by: Hariom <hariombalhara@gmail.com>
2023-12-15 13:21:38 +00:00
sean-brydon b778b2962a
chore: hsl-update-colors (#12199)
* chore:hsl-update-colors

* chore:hsl-update-colors

* update % color

* Fix HSL SL %

* Update SB styles

* lint

---------

Co-authored-by: Peer Richelsen <peeroke@gmail.com>
2023-12-15 04:52:51 +00:00
zomars 0d3baee593 fix: temp renamed app dir to prevent OOM 2023-12-14 14:40:40 -07:00
Matt Nicolls f9dcbaaa42
fix: create event type for a team that you are an owner or admin of (#12564)
* fix: allow API access to creating a team that you are a member of

* update roles allowed to create event types

* add back comment

* revert yarn.lock

---------

Co-authored-by: Omar López <zomars@me.com>
Co-authored-by: Peer Richelsen <peeroke@gmail.com>
2023-12-14 07:14:12 -05:00
Amit Sharma 60700e1a7a
fix: padding off event user avatar (#12733) 2023-12-13 20:16:19 -08:00
Peer Richelsen 456adea570
Update semantic-pull-requests.yml 2023-12-13 20:05:52 -08:00
Manavpreet Singh 63abda1693
chore: changed checkbox color (#12783)
Co-authored-by: ManavpreetSingh <119919977+manavpreetsingh@users.noreply.github.com>
2023-12-13 19:29:37 -08:00
sean-brydon 4dd73f4d86
fix: Add scroll to troubleshooter sidebar (#12785) 2023-12-13 19:29:13 -08:00
Peer Richelsen 31caf8288d
feat: roam (ro.am) conferencing (#12579) 2023-12-14 02:19:22 +00:00
Hariom Balhara 99e71365ab
fix: Disallow changing username and email in case of Organization email invite (#12735)
Co-authored-by: Omar López <zomars@me.com>
2023-12-13 20:08:16 +00:00
Somay Chauhan 943c7a4c6c
fix: other team members page invite issue (#12745) 2023-12-13 19:53:20 +00:00
sean-brydon 228e509a3b
Inter 4.0 (#12766) 2023-12-13 16:18:50 +00:00
sean-brydon eb909cc87a
fix: datatable toolbar (#12757)
* Fix toolbar

* Slide animation

* Animate out and fix selection model

* Disable on mobile - fix tablet position

---------

Co-authored-by: Peer Richelsen <peeroke@gmail.com>
2023-12-13 10:15:18 +00:00
Peer Richelsen 65a36b37c5
removed org_team_names_example_1 (#12759) 2023-12-13 13:08:59 +05:30
Alex van Andel 2799ddf3a4
fix: 500 error on email conflict (#12725) 2023-12-13 02:24:36 +00:00
Carina Wollendorfer 3164cd4ae7
feat: mandatory email reminder for attendees with @gmail.com (#12747)
Co-authored-by: Chiranjeev Vishnoi <somu209e@gmail.com>
Co-authored-by: CarinaWolli <wollencarina@gmail.com>
2023-12-13 02:23:48 +00:00
Udit Takkar 6b26dbc6da
fix: checkbox color (#12742)
Co-authored-by: Peer Richelsen <peeroke@gmail.com>
2023-12-13 02:19:12 +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
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
Patrick Arminio a20179727b
Hide expires on message if never expires is selected (#12723) 2023-12-11 17:15:56 +00:00
sean-brydon 795aaca64f
Trim spaces on datatable search key (#12713) 2023-12-11 06:58:26 +00: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
Hariom Balhara 090b166b1c
Update PULL_REQUEST_TEMPLATE.md (#12711) 2023-12-08 17:24:41 +00:00
Bijoy Sijo ea2d8fc873
docs: Remove duplicate CALENDSO key setup from README. (#12595) 2023-12-08 07:23:21 -08: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
Guilherme Santos 5fe919452b
test: Make sure response is still writable before setting headers (#12478) 2023-12-08 18:56:49 +05:30
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
Harshith Pabbati 47277ced2d
chore: auto verify OTP whenever user enters 6 digits OTP instead of waiting for them to click on verify button (#12326) 2023-12-07 16:08:11 -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
Alex van Andel bf2af799d5
perf: Improve performance of working hours processing (#12687) 2023-12-07 09:46:45 +00:00
Somay Chauhan 75eaed1c4d
fix: adding team members from organization tab that alredy exist (#11689)
* fix: adding team members from organization tab that alredy exist

* changed organizations.listOtherTeamMembers from useQuery to useInfiniteQuery

* undo yarn.lock

* fix: invalidate the organizations.getMembers query on removeMember and inviteMember Mutation

---------

Co-authored-by: Peer Richelsen <peeroke@gmail.com>
Co-authored-by: Hariom <hariombalhara@gmail.com>
2023-12-07 09:39:23 +00:00
Carina Wollendorfer e1ac6f5454
fix: ignore original rescheduled booking for booking limits (#12625)
* ignore original rescheduled booking for booking limits

* fix unit test

---------

Co-authored-by: CarinaWolli <wollencarina@gmail.com>
Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com>
2023-12-07 13:13:19 +05:30
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
zomars 8bed690ed6 Update yarn.lock 2023-12-06 10:49:52 -07:00
Syed Ali Shahbaz adf012643a
fix: '/slots' endpoint API fixes (#12693) 2023-12-06 10:10:25 -07: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
Hariom Balhara f2a59fe4e8
Fix booking error in case of no calendar credential but stray destinationCalendar (#12680) 2023-12-05 16:16:54 +00:00
701 changed files with 26093 additions and 11973 deletions

View File

@ -37,6 +37,7 @@ BASECAMP3_USER_AGENT=
DAILY_API_KEY=
DAILY_SCALE_PLAN=''
DAILY_WEBHOOK_SECRET=''
# - GOOGLE CALENDAR/MEET/LOGIN
# Needed to enable Google Calendar integration and Login with Google
@ -126,4 +127,12 @@ ZOHOCRM_CLIENT_ID=""
ZOHOCRM_CLIENT_SECRET=""
# - REVERT
# Used for the Pipedrive integration (via/ Revert (https://revert.dev))
# @see https://github.com/calcom/cal.com/#obtaining-revert-api-keys
REVERT_API_KEY=
REVERT_PUBLIC_TOKEN=
# NOTE: If you're self hosting Revert, update this URL to point to your own instance.
REVERT_API_URL=https://api.revert.dev/
# *********************************************************************************************************

View File

@ -133,6 +133,11 @@ NEXT_PUBLIC_SENDGRID_SENDER_NAME=
# Used for capturing exceptions and logging messages
NEXT_PUBLIC_SENTRY_DSN=
# Formbricks Experience Management Integration
FORMBRICKS_HOST_URL=https://app.formbricks.com
FORMBRICKS_ENVIRONMENT_ID=
FORMBRICKS_FEEDBACK_SURVEY_ID=
# Twilio
# Used to send SMS reminders in workflows
TWILIO_SID=
@ -249,6 +254,18 @@ PROJECT_ID_VERCEL=
TEAM_ID_VERCEL=
# Get it from: https://vercel.com/account/tokens
AUTH_BEARER_TOKEN_VERCEL=
# Add the main domain that you want to use for testing vercel domain management for organizations. This is necessary because WEBAPP_URL of local isn't a valid public domain
# Would create org1.example.com for an org with slug org1
# LOCAL_TESTING_DOMAIN_VERCEL="example.com"
## Set it to 1 if you use cloudflare to manage your DNS and would like us to manage the DNS for you for organizations
# CLOUDFLARE_DNS=1
## Get it from: https://dash.cloudflare.com/profile/api-tokens. Select Edit Zone template and choose a zone(your domain)
# AUTH_BEARER_TOKEN_CLOUDFLARE=
## Zone ID can be found in the Overview tab of your domain in Cloudflare
# CLOUDFLARE_ZONE_ID=
## It should usually work with the default value. This is the DNS CNAME record content to point to Vercel domain
# CLOUDFLARE_VERCEL_CNAME=cname.vercel-dns.com
# - APPLE CALENDAR
# Used for E2E tests on Apple Calendar
@ -260,6 +277,8 @@ E2E_TEST_APPLE_CALENDAR_PASSWORD=""
E2E_TEST_CALCOM_QA_EMAIL="qa@example.com"
# Replace with your own password
E2E_TEST_CALCOM_QA_PASSWORD="password"
E2E_TEST_CALCOM_QA_GCAL_CREDENTIALS=
E2E_TEST_CALCOM_GCAL_KEYS=
# - APP CREDENTIAL SYNC ***********************************************************************************
# Used for self-hosters that are implementing Cal.com into their applications that already have certain integrations
@ -293,5 +312,22 @@ E2E_TEST_OIDC_USER_PASSWORD=
# redirected from the legacy to the future pages
AB_TEST_BUCKET_PROBABILITY=50
# whether we redirect to the future/event-types from event-types or not
APP_ROUTER_EVENT_TYPES_ENABLED=1
APP_ROUTER_SETTINGS_ADMIN_ENABLED=1
APP_ROUTER_EVENT_TYPES_ENABLED=0
APP_ROUTER_SETTINGS_ADMIN_ENABLED=0
APP_ROUTER_APPS_INSTALLED_CATEGORY_ENABLED=0
APP_ROUTER_APPS_SLUG_ENABLED=0
APP_ROUTER_APPS_SLUG_SETUP_ENABLED=0
# whether we redirect to the future/apps/categories from /apps/categories or not
APP_ROUTER_APPS_CATEGORIES_ENABLED=0
# whether we redirect to the future/apps/categories/[category] from /apps/categories/[category] or not
APP_ROUTER_APPS_CATEGORIES_CATEGORY_ENABLED=0
APP_ROUTER_BOOKINGS_STATUS_ENABLED=0
APP_ROUTER_WORKFLOWS_ENABLED=0
APP_ROUTER_SETTINGS_TEAMS_ENABLED=0
APP_ROUTER_GETTING_STARTED_STEP_ENABLED=0
APP_ROUTER_APPS_ENABLED=0
APP_ROUTER_VIDEO_ENABLED=0
APP_ROUTER_TEAMS_ENABLED=0
# disable setry server source maps
SENTRY_DISABLE_SERVER_WEBPACK_PLUGIN=1

View File

@ -19,11 +19,12 @@ Fixes # (issue)
<!-- Please delete bullets that are not relevant. -->
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] Chore (refactoring code, technical debt, workflow improvements)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] This change requires a documentation update
- Bug fix (non-breaking change which fixes an issue)
- Chore (refactoring code, technical debt, workflow improvements)
- New feature (non-breaking change which adds functionality)
- Breaking change (fix or feature that would cause existing functionality to not work as expected)
- Tests (Unit/Integration/E2E or any other test)
- This change requires a documentation update
## How should this be tested?

View File

@ -17,10 +17,14 @@ runs:
cache-name: cache-db
key-1: ${{ hashFiles('packages/prisma/schema.prisma', 'packages/prisma/migrations/**/**.sql', 'packages/prisma/*.ts') }}
key-2: ${{ github.event.pull_request.number || github.ref }}
DATABASE_URL: ${{ inputs.DATABASE_URL }}
E2E_TEST_CALCOM_QA_EMAIL: ${{ inputs.E2E_TEST_CALCOM_QA_EMAIL }}
E2E_TEST_CALCOM_QA_PASSWORD: ${{ inputs.E2E_TEST_CALCOM_QA_PASSWORD }}
E2E_TEST_CALCOM_QA_GCAL_CREDENTIALS: ${{ inputs.E2E_TEST_CALCOM_QA_GCAL_CREDENTIALS }}
with:
path: ${{ inputs.path }}
key: ${{ runner.os }}-${{ env.cache-name }}-${{ inputs.path }}-${{ env.key-1 }}-${{ env.key-2 }}
- run: yarn db-seed
- run: echo ${{ env.E2E_TEST_CALCOM_QA_GCAL_CREDENTIALS }} && yarn db-seed
if: steps.cache-db.outputs.cache-hit != 'true'
shell: bash
- name: Postgres Dump Backup

View File

@ -5,7 +5,7 @@ runs:
steps:
- name: Cache playwright binaries
id: playwright-cache
uses: buildjet/cache@v2
uses: buildjet/cache@v3
with:
path: |
~/Library/Caches/ms-playwright

View File

@ -1,74 +0,0 @@
name: "Apply issue labels to PR"
on:
pull_request_target:
types:
- opened
jobs:
label_on_pr:
runs-on: ubuntu-latest
permissions:
contents: none
issues: read
pull-requests: write
steps:
- name: Apply labels from linked issue to PR
uses: actions/github-script@v5
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
async function getLinkedIssues(owner, repo, prNumber) {
const query = `query GetLinkedIssues($owner: String!, $repo: String!, $prNumber: Int!) {
repository(owner: $owner, name: $repo) {
pullRequest(number: $prNumber) {
closingIssuesReferences(first: 10) {
nodes {
number
labels(first: 10) {
nodes {
name
}
}
}
}
}
}
}`;
const variables = {
owner: owner,
repo: repo,
prNumber: prNumber,
};
const result = await github.graphql(query, variables);
return result.repository.pullRequest.closingIssuesReferences.nodes;
}
const pr = context.payload.pull_request;
const linkedIssues = await getLinkedIssues(
context.repo.owner,
context.repo.repo,
pr.number
);
const labelsToAdd = new Set();
for (const issue of linkedIssues) {
if (issue.labels && issue.labels.nodes) {
for (const label of issue.labels.nodes) {
labelsToAdd.add(label.name);
}
}
}
if (labelsToAdd.size) {
await github.rest.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: pr.number,
labels: Array.from(labelsToAdd),
});
}

View File

@ -2,7 +2,7 @@ name: Check types
on:
workflow_call:
env:
NODE_OPTIONS: "--max-old-space-size=8192"
NODE_OPTIONS: --max-old-space-size=4096
jobs:
check-types:
runs-on: buildjet-4vcpu-ubuntu-2204

View File

@ -17,10 +17,11 @@ jobs:
steps:
- uses: actions/stale@v7
with:
days-before-close: -1
days-before-issue-stale: 60
days-before-issue-close: -1
days-before-pr-stale: 14
days-before-pr-close: 7
days-before-pr-close: -1
stale-pr-message: "This PR is being marked as stale due to inactivity."
close-pr-message: "This PR is being closed due to inactivity. Please reopen if work is intended to be continued."
operations-per-run: 100

View File

@ -1,7 +1,8 @@
name: E2E App-Store Apps
name: E2E App-Store Apps Tests
on:
workflow_call:
env:
NODE_OPTIONS: --max-old-space-size=4096
jobs:
e2e-app-store:
timeout-minutes: 20
@ -29,10 +30,15 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/dangerous-git-checkout
- run: echo 'NODE_OPTIONS="--max_old_space_size=4096"' >> $GITHUB_ENV
- uses: ./.github/actions/yarn-install
- uses: ./.github/actions/yarn-playwright-install
- uses: ./.github/actions/cache-db
env:
DATABASE_URL: ${{ secrets.CI_DATABASE_URL }}
E2E_TEST_CALCOM_QA_EMAIL: ${{ secrets.E2E_TEST_CALCOM_QA_EMAIL }}
E2E_TEST_CALCOM_QA_PASSWORD: ${{ secrets.E2E_TEST_CALCOM_QA_PASSWORD }}
E2E_TEST_CALCOM_QA_GCAL_CREDENTIALS: ${{ secrets.E2E_TEST_CALCOM_QA_GCAL_CREDENTIALS }}
E2E_TEST_CALCOM_GCAL_KEYS: ${{ secrets.E2E_TEST_CALCOM_GCAL_KEYS }}
- uses: ./.github/actions/cache-build
- name: Run Tests
run: yarn e2e:app-store --shard=${{ matrix.shard }}/${{ strategy.job-total }}
@ -43,6 +49,10 @@ jobs:
DEPLOYSENTINEL_API_KEY: ${{ secrets.DEPLOYSENTINEL_API_KEY }}
E2E_TEST_APPLE_CALENDAR_EMAIL: ${{ secrets.E2E_TEST_APPLE_CALENDAR_EMAIL }}
E2E_TEST_APPLE_CALENDAR_PASSWORD: ${{ secrets.E2E_TEST_APPLE_CALENDAR_PASSWORD }}
E2E_TEST_CALCOM_QA_EMAIL: ${{ secrets.E2E_TEST_CALCOM_QA_EMAIL }}
E2E_TEST_CALCOM_QA_PASSWORD: ${{ secrets.E2E_TEST_CALCOM_QA_PASSWORD }}
E2E_TEST_CALCOM_QA_GCAL_CREDENTIALS: ${{ secrets.E2E_TEST_CALCOM_QA_GCAL_CREDENTIALS }}
E2E_TEST_CALCOM_GCAL_KEYS: ${{ secrets.E2E_TEST_CALCOM_GCAL_KEYS }}
E2E_TEST_MAILHOG_ENABLED: ${{ vars.E2E_TEST_MAILHOG_ENABLED }}
GOOGLE_API_CREDENTIALS: ${{ secrets.CI_GOOGLE_API_CREDENTIALS }}
GOOGLE_LOGIN_ENABLED: ${{ vars.CI_GOOGLE_LOGIN_ENABLED }}
@ -65,7 +75,7 @@ jobs:
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
- name: Upload Test Results
if: ${{ always() }}
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: app-store-results-${{ matrix.shard }}_${{ strategy.job-total }}
path: test-results

View File

@ -1,7 +1,8 @@
name: E2E Embed React tests and booking flow(for non-embed as well)
name: E2E Embed React tests and booking flow (for non-embed as well)
on:
workflow_call:
env:
NODE_OPTIONS: --max-old-space-size=4096
jobs:
e2e-embed:
timeout-minutes: 20
@ -24,7 +25,6 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/dangerous-git-checkout
- run: echo 'NODE_OPTIONS="--max_old_space_size=4096"' >> $GITHUB_ENV
- uses: ./.github/actions/yarn-install
- uses: ./.github/actions/yarn-playwright-install
- uses: ./.github/actions/cache-db
@ -61,7 +61,7 @@ jobs:
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
- name: Upload Test Results
if: ${{ always() }}
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: embed-react-results-${{ matrix.shard }}_${{ strategy.job-total }}
path: test-results

View File

@ -1,7 +1,8 @@
name: E2E Embed Core tests and booking flow(for non-embed as well)
name: E2E Embed Core tests and booking flow (for non-embed as well)
on:
workflow_call:
env:
NODE_OPTIONS: --max-old-space-size=4096
jobs:
e2e-embed:
timeout-minutes: 20
@ -29,7 +30,6 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/dangerous-git-checkout
- run: echo 'NODE_OPTIONS="--max_old_space_size=4096"' >> $GITHUB_ENV
- uses: ./.github/actions/yarn-install
- uses: ./.github/actions/yarn-playwright-install
- uses: ./.github/actions/cache-db
@ -65,7 +65,7 @@ jobs:
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
- name: Upload Test Results
if: ${{ always() }}
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: embed-core-results-${{ matrix.shard }}_${{ strategy.job-total }}
path: test-results

View File

@ -1,8 +1,8 @@
name: E2E test
name: E2E tests
on:
workflow_call:
env:
NODE_OPTIONS: --max-old-space-size=4096
jobs:
e2e:
timeout-minutes: 20
@ -24,11 +24,10 @@ jobs:
strategy:
fail-fast: false
matrix:
shard: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
shard: [1, 2, 3, 4, 5]
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/dangerous-git-checkout
- run: echo 'NODE_OPTIONS="--max_old_space_size=4096"' >> $GITHUB_ENV
- uses: ./.github/actions/yarn-install
- uses: ./.github/actions/yarn-playwright-install
- uses: ./.github/actions/cache-db
@ -68,7 +67,7 @@ jobs:
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
- name: Upload Test Results
if: ${{ always() }}
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: test-results-${{ matrix.shard }}_${{ strategy.job-total }}
path: test-results

View File

@ -1,6 +1,7 @@
name: "Pull Request Labeler"
on:
- pull_request_target
pull_request_target:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
@ -16,3 +17,81 @@ jobs:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
# https://github.com/actions/labeler/issues/442#issuecomment-1297359481
sync-labels: ""
team-labels:
permissions:
contents: read
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: equitybee/team-label-action@main
with:
repo-token: ${{ secrets.EQUITY_BEE_TEAM_LABELER_ACTION_TOKEN }}
organization-name: calcom
ignore-labels: "admin, app-store, ai, authentication, automated-testing, devops, platform, billing, bookings, caldav, calendar-apps, ci, console, crm-apps, docs, documentation, emails, embeds, event-types, i18n, impersonation, manual-testing, ui, performance, ops-stack, organizations, public-api, routing-forms, seats, teams, webhooks, workflows, zapier"
apply-labels-from-issue:
runs-on: ubuntu-latest
permissions:
contents: none
issues: read
pull-requests: write
steps:
- name: Apply labels from linked issue to PR
uses: actions/github-script@v5
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
async function getLinkedIssues(owner, repo, prNumber) {
const query = `query GetLinkedIssues($owner: String!, $repo: String!, $prNumber: Int!) {
repository(owner: $owner, name: $repo) {
pullRequest(number: $prNumber) {
closingIssuesReferences(first: 10) {
nodes {
number
labels(first: 10) {
nodes {
name
}
}
}
}
}
}
}`;
const variables = {
owner: owner,
repo: repo,
prNumber: prNumber,
};
const result = await github.graphql(query, variables);
return result.repository.pullRequest.closingIssuesReferences.nodes;
}
const pr = context.payload.pull_request;
const linkedIssues = await getLinkedIssues(
context.repo.owner,
context.repo.repo,
pr.number
);
const labelsToAdd = new Set();
for (const issue of linkedIssues) {
if (issue.labels && issue.labels.nodes) {
for (const label of issue.labels.nodes) {
labelsToAdd.add(label.name);
}
}
}
if (labelsToAdd.size) {
await github.rest.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: pr.number,
labels: Array.from(labelsToAdd),
});
}

View File

@ -25,7 +25,7 @@ jobs:
- name: Upload ESLint report
if: ${{ always() }}
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: lint-results
path: lint-results

View File

@ -2,6 +2,7 @@ name: "Next.js Bundle Analysis"
on:
workflow_call:
workflow_dispatch:
push:
branches:
- main
@ -27,14 +28,14 @@ jobs:
npx -p nextjs-bundle-analysis@0.5.0 report
- name: Upload bundle
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: bundle
path: apps/web/.next/analyze/__bundle_analysis.json
- name: Download base branch bundle stats
uses: dawidd6/action-download-artifact@v2
if: success() && github.event.number
if: success()
with:
workflow: nextjs-bundle-analysis.yml
branch: ${{ github.event.pull_request.base.ref }}
@ -54,7 +55,7 @@ jobs:
# Either of these arguments can be changed or removed by editing the `nextBundleAnalysis`
# entry in your package.json file.
- name: Compare with base branch bundle
if: success() && github.event.number
if: success()
run: |
cd apps/web
ls -laR .next/analyze/base && npx -p nextjs-bundle-analysis compare
@ -68,10 +69,10 @@ jobs:
body="${body//'%'/'%25'}"
body="${body//$'\n'/'%0A'}"
body="${body//$'\r'/'%0D'}"
echo ::set-output name=body::$body
echo "{body}=${body}" >> $GITHUB_OUTPUT
- name: Find Comment
uses: peter-evans/find-comment@v1
uses: peter-evans/find-comment@v2
if: success() && github.event.number
id: fc
with:
@ -79,14 +80,14 @@ jobs:
body-includes: "<!-- __NEXTJS_BUNDLE_@calcom/web -->"
- name: Create Comment
uses: peter-evans/create-or-update-comment@v1.4.4
uses: peter-evans/create-or-update-comment@v3
if: success() && github.event.number && steps.fc.outputs.comment-id == 0
with:
issue-number: ${{ github.event.number }}
body: ${{ steps.get-comment-body.outputs.body }}
- name: Update Comment
uses: peter-evans/create-or-update-comment@v1.4.4
uses: peter-evans/create-or-update-comment@v3
if: success() && github.event.number && steps.fc.outputs.comment-id != 0
with:
issue-number: ${{ github.event.number }}

View File

@ -1,16 +0,0 @@
name: Assign PR team labels
on:
pull_request:
branches:
- main
jobs:
team-labels:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: equitybee/team-label-action@main
with:
repo-token: ${{ secrets.GH_ACCESS_TOKEN }}
organization-name: calcom
ignore-labels: "app-store, ai, authentication, automated-testing, platform, billing, bookings, caldav, calendar-apps, ci, console, crm-apps, docs, documentation, emails, embeds, event-types, i18n, impersonation, manual-testing, ui, performance, ops-stack, organizations, public-api, routing-forms, seats, teams, webhooks, workflows, zapier"

View File

@ -4,9 +4,6 @@ on:
pull_request_target:
branches:
- main
paths-ignore:
- "**.md"
- ".github/CODEOWNERS"
merge_group:
workflow_dispatch:
@ -15,15 +12,21 @@ concurrency:
cancel-in-progress: true
jobs:
login:
runs-on: ubuntu-latest
steps:
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
changes:
name: Detect changes
runs-on: buildjet-4vcpu-ubuntu-2204
permissions:
pull-requests: read
outputs:
app-store: ${{ steps.filter.outputs.app-store }}
embed: ${{ steps.filter.outputs.embed }}
embed-react: ${{ steps.filter.outputs.embed-react }}
has-files-requiring-all-checks: ${{ steps.filter.outputs.has-files-requiring-all-checks }}
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/dangerous-git-checkout
@ -31,78 +34,83 @@ jobs:
id: filter
with:
filters: |
app-store:
- 'apps/web/**'
- 'packages/app-store/**'
- 'playwright.config.ts'
embed:
- 'apps/web/**'
- 'packages/embeds/**'
- 'playwright.config.ts'
embed-react:
- 'apps/web/**'
- 'packages/embeds/**'
- 'playwright.config.ts'
has-files-requiring-all-checks:
- "!(**.md|.github/CODEOWNERS)"
type-check:
name: Type check
needs: [changes]
if: ${{ needs.changes.outputs.has-files-requiring-all-checks == 'true' }}
uses: ./.github/workflows/check-types.yml
secrets: inherit
test:
name: Unit tests
uses: ./.github/workflows/test.yml
needs: [changes]
if: ${{ needs.changes.outputs.has-files-requiring-all-checks == 'true' }}
uses: ./.github/workflows/unit-tests.yml
secrets: inherit
lint:
name: Linters
needs: [changes]
if: ${{ needs.changes.outputs.has-files-requiring-all-checks == 'true' }}
uses: ./.github/workflows/lint.yml
secrets: inherit
build:
name: Production build
needs: [changes]
if: ${{ needs.changes.outputs.has-files-requiring-all-checks == 'true' }}
uses: ./.github/workflows/production-build.yml
secrets: inherit
build-without-database:
name: Production build (without database)
needs: [changes]
if: ${{ needs.changes.outputs.has-files-requiring-all-checks == 'true' }}
uses: ./.github/workflows/production-build-without-database.yml
secrets: inherit
e2e:
name: E2E tests
needs: [changes, lint, build]
if: ${{ needs.changes.outputs.has-files-requiring-all-checks == 'true' }}
uses: ./.github/workflows/e2e.yml
secrets: inherit
e2e-app-store:
name: E2E App Store tests
needs: [changes, lint, build]
if: ${{ needs.changes.outputs.has-files-requiring-all-checks == 'true' }}
uses: ./.github/workflows/e2e-app-store.yml
secrets: inherit
e2e-embed:
name: E2E embeds tests
needs: [changes, lint, build]
if: ${{ needs.changes.outputs.has-files-requiring-all-checks == 'true' }}
uses: ./.github/workflows/e2e-embed.yml
secrets: inherit
e2e-embed-react:
name: E2E React embeds tests
needs: [changes, lint, build]
if: ${{ needs.changes.outputs.has-files-requiring-all-checks == 'true' }}
uses: ./.github/workflows/e2e-embed-react.yml
secrets: inherit
analyze:
needs: build
name: Analyze Build
needs: [changes, build]
if: ${{ needs.changes.outputs.has-files-requiring-all-checks == 'true' }}
uses: ./.github/workflows/nextjs-bundle-analysis.yml
secrets: inherit
required:
needs: [lint, type-check, test, build, e2e, e2e-embed, e2e-embed-react, e2e-app-store]
needs: [changes, lint, type-check, test, build, e2e, e2e-embed, e2e-embed-react, e2e-app-store]
if: always()
runs-on: buildjet-4vcpu-ubuntu-2204
steps:
- name: fail if conditional jobs failed
if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'skipped') || contains(needs.*.result, 'cancelled')
if: needs.changes.outputs.has-files-requiring-all-checks == 'true' && (contains(needs.*.result, 'failure') || contains(needs.*.result, 'skipped') || contains(needs.*.result, 'cancelled'))
run: exit 1

82
.github/workflows/pre-release.yml vendored Normal file
View File

@ -0,0 +1,82 @@
name: Pre-release checks
on:
workflow_dispatch:
jobs:
changes:
name: Detect changes
runs-on: buildjet-4vcpu-ubuntu-2204
permissions:
pull-requests: read
outputs:
app-store: ${{ steps.filter.outputs.app-store }}
embed: ${{ steps.filter.outputs.embed }}
embed-react: ${{ steps.filter.outputs.embed-react }}
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/dangerous-git-checkout
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
app-store:
- 'apps/web/**'
- 'packages/app-store/**'
- 'playwright.config.ts'
embed:
- 'apps/web/**'
- 'packages/embeds/**'
- 'playwright.config.ts'
embed-react:
- 'apps/web/**'
- 'packages/embeds/**'
- 'playwright.config.ts'
lint:
name: Linters
uses: ./.github/workflows/lint.yml
secrets: inherit
build:
name: Production build
uses: ./.github/workflows/production-build.yml
secrets: inherit
e2e:
name: E2E tests
needs: [changes, lint, build]
uses: ./.github/workflows/e2e.yml
secrets: inherit
e2e-app-store:
name: E2E App Store tests
needs: [changes, lint, build]
uses: ./.github/workflows/e2e-app-store.yml
secrets: inherit
e2e-embed:
name: E2E embeds tests
needs: [changes, lint, build]
uses: ./.github/workflows/e2e-embed.yml
secrets: inherit
e2e-embed-react:
name: E2E React embeds tests
needs: [changes, lint, build]
uses: ./.github/workflows/e2e-embed-react.yml
secrets: inherit
build-without-database:
name: Production build (without database)
uses: ./.github/workflows/production-build-without-database.yml
secrets: inherit
required:
needs: [e2e, e2e-app-store, e2e-embed, e2e-embed-react, build-without-database]
if: always()
runs-on: buildjet-4vcpu-ubuntu-2204
steps:
- name: fail if conditional jobs failed
if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'skipped') || contains(needs.*.result, 'cancelled')
run: exit 1

View File

@ -9,6 +9,10 @@ env:
DATABASE_URL: ${{ secrets.CI_DATABASE_URL }}
E2E_TEST_APPLE_CALENDAR_EMAIL: ${{ secrets.E2E_TEST_APPLE_CALENDAR_EMAIL }}
E2E_TEST_APPLE_CALENDAR_PASSWORD: ${{ secrets.E2E_TEST_APPLE_CALENDAR_PASSWORD }}
E2E_TEST_CALCOM_QA_EMAIL: ${{ secrets.E2E_TEST_CALCOM_QA_EMAIL }}
E2E_TEST_CALCOM_QA_PASSWORD: ${{ secrets.E2E_TEST_CALCOM_QA_PASSWORD }}
E2E_TEST_CALCOM_QA_GCAL_CREDENTIALS: ${{ secrets.E2E_TEST_CALCOM_QA_GCAL_CREDENTIALS }}
E2E_TEST_CALCOM_GCAL_KEYS: ${{ secrets.E2E_TEST_CALCOM_GCAL_KEYS }}
GOOGLE_API_CREDENTIALS: ${{ secrets.CI_GOOGLE_API_CREDENTIALS }}
GOOGLE_LOGIN_ENABLED: ${{ vars.CI_GOOGLE_LOGIN_ENABLED }}
NEXTAUTH_SECRET: ${{ secrets.CI_NEXTAUTH_SECRET }}

View File

@ -44,5 +44,5 @@ jobs:
with:
header: pr-title-lint-error
message: |
Thank you for following the naming conventions! 🙏 Feel free to join our [discord](https://go.cal.com/discord) and post your PR link to [collect XP and win prizes!](https://cal.com/blog/community-incentives)
Thank you for following the naming conventions! 🙏 Feel free to join our [discord](https://go.cal.com/discord) and post your PR link.

View File

@ -11,7 +11,6 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/dangerous-git-checkout
- run: echo 'NODE_OPTIONS="--max_old_space_size=6144"' >> $GITHUB_ENV
- uses: ./.github/actions/yarn-install
# Should be an 8GB machine as per https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners
- run: yarn test

View File

@ -2,7 +2,7 @@
"typescript.tsdk": "node_modules/typescript/lib",
"editor.formatOnSave": false,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
"source.fixAll.eslint": "explicit"
},
"typescript.preferences.importModuleSpecifier": "non-relative",
"spellright.language": ["en"],

View File

@ -1,15 +1,15 @@
diff --git a/index.cjs b/index.cjs
index b645707a3549fc298508726e404243499bbed499..f34b0891e99b275a9218e253f303f43d31ef3f73 100644
index c83f700ae9998cd87b4c2d66ecbb2ad3d7b4603c..76a2200b57f0b9243e2c61464d578b67746ad5a4 100644
--- a/index.cjs
+++ b/index.cjs
@@ -13,8 +13,8 @@ function withMetadataArgument(func, _arguments) {
// https://github.com/babel/babel/issues/2212#issuecomment-131827986
// An alternative approach:
// https://www.npmjs.com/package/babel-plugin-add-module-exports
-exports = module.exports = min.parsePhoneNumberFromString
-exports['default'] = min.parsePhoneNumberFromString
+// exports = module.exports = min.parsePhoneNumberFromString
+// exports['default'] = min.parsePhoneNumberFromString
// `parsePhoneNumberFromString()` named export is now considered legacy:
// it has been promoted to a default export due to being too verbose.
// https://github.com/babel/babel/issues/2212#issuecomment-131827986
// An alternative approach:
// https://www.npmjs.com/package/babel-plugin-add-module-exports
-exports = module.exports = min.parsePhoneNumberFromString
-exports['default'] = min.parsePhoneNumberFromString
+// exports = module.exports = min.parsePhoneNumberFromString
+// exports['default'] = min.parsePhoneNumberFromString
// `parsePhoneNumberFromString()` named export is now considered legacy:
// it has been promoted to a default export due to being too verbose.

37
PRIVACY.md Normal file
View File

@ -0,0 +1,37 @@
## PRIVACY POLICY
Last updated January 28, 2024
### Introduction
This is the privacy notice of MaroCalendar, a personal calendar booking service that is only used by me, Gustavo Maronato, to manage my personal and work calendars, and allow you to book events with me. Here, you'll find a description of how and why I might collect, store, and use your information when you book an event with me using this service.
The service is located at [https://cal.maronato.dev](https://cal.maronato.dev).
### Questions or concerns?
Reading this privacy notice will help you understand your privacy rights and choices. If you do not agree with my policies and practices, please do not access or book an event with me using this service.
## SUMMARY OF KEY POINTS
### What personal information do I process?
When you choose to book an event with me, you provide me with your name and email address.
### Do I process any sensitive personal information?
I do not process sensitive personal information.
### Do I receive any information from third parties?
I do not receive any information from third parties.
### How do I process your information?
When you book an event with me, I use your name and email address to send you an email with a calendar invite to the event you booked.
### In what situations and with which parties do I share personal information?
The information you submit is used to create a booking between myself and you. I do not share your information with any third parties.
### How do I keep your information safe?
I use reasonable and appropriate security measures to protect your personal information from loss, misuse, and unauthorized access, disclosure, alteration, and destruction.
### What are your rights?
You can cancel your booking at any time by clicking the link in the confirmation email you received when you booked the event.
### Google Calendar
I use a Google Calendar oAuth integration to automatically display to you what are my free time slots and manage the events you book on my calendar. You do not interact with this integration and you are not allowed to use your Google account to add this integration to your Google Calendar. This integration is only used by me to manage my calendar and is not shared with anyone else.

View File

@ -147,7 +147,7 @@ Here is what you need to be able to run Cal.com.
- Duplicate `.env.example` to `.env`
- Use `openssl rand -base64 32` to generate a key and add it under `NEXTAUTH_SECRET` in the `.env` file.
- Use `openssl rand -base64 24` to generate a key and add it under `CALENDSO_ENCRYPTION_KEY` in the `.env` file.
- Use `openssl rand -base64 32` to generate a key and add it under `CALENDSO_ENCRYPTION_KEY` in the `.env` file.
5. Setup Node
If your Node version does not meet the project's requirements as instructed by the docs, "nvm" (Node Version Manager) allows using Node at the version required by the project:
@ -216,12 +216,11 @@ echo 'NEXT_PUBLIC_DEBUG=1' >> .env
If you don't want to create a local DB. Then you can also consider using services like railway.app or render.
- [Setup postgres DB with railway.app](https://arctype.com/postgres/setup/railway-postgres)
- [Setup postgres DB with railway.app](https://docs.railway.app/guides/postgresql)
- [Setup postgres DB with render](https://render.com/docs/databases)
1. Copy and paste your `DATABASE_URL` from `.env` to `.env.appStore`.
1. Set a 24 character random string in your `.env` file for the `CALENDSO_ENCRYPTION_KEY` (You can use a command like `openssl rand -base64 24` to generate one).
1. Set up the database using the Prisma schema (found in `packages/prisma/schema.prisma`)
In a development environment, run:
@ -555,6 +554,10 @@ following
[Follow these steps](./packages/app-store/zoho-bigin/)
### Obtaining Pipedrive Client ID and Secret
[Follow these steps](./packages/app-store/pipedrive-crm/)
## Workflows
### Setting up SendGrid for Email reminders

117
TERMS-OF-SERVICE.md Normal file
View File

@ -0,0 +1,117 @@
Terms of Service
----------------
Effective date: 01/28/2024
Introduction
------------
These are the terms of service for my personal calendar booking service, MaroCalendar. You may use this service to book events with me by providing your name, email address, and date/time preferences.
These Terms of Service (“Terms”, “Terms of Service”) govern your use of this service located at https://cal.maronato.dev operated by Gustavo Maronato.
You can also find it's privacy policy here https://git.maronato.dev/maronato/cal/src/branch/main/PRIVACY.md
And the source code here https://git.maronato.dev/maronato/cal
If you do not agree with (or cannot comply with) these terms, then you may not use the Service.
Thank you for being responsible.
Communications
--------------
By using this service to book an event with me, you agree to receive an email with the calendar invite. You may also receive a reminder email before the event, or a confirmation email if you reschedule or cancel the event.
Purchases
---------
There are no purchases on this service. You may use it to book events with me, but you will not be charged for it.
Contests, Sweepstakes and Promotions
------------------------------------
There are no contests, sweepstakes, or promotions on this service.
Subscriptions
-------------
There is no subscription on this service.
Fee Changes
-----------
There are no fees on this service.
Refunds
-------
This is a free service, so there are no refunds.
Content
-------
Our Service allows you to create an event with me by providing your name and email address. You are responsible for that information that you submit on or through Service, including its legality, reliability, and appropriateness.
By posting Content on or through Service, You represent and warrant that: (i) Content is yours (you own it) and/or you have the right to use it, and (ii) that the posting of your Content on or through Service does not violate the privacy rights, publicity rights, copyrights, contract rights or any other rights of any person or entity. I reserve the right to not meet with you.
Prohibited Uses
---------------
You may use Service only for lawful purposes and in accordance with Terms. You agree not to use Service:
* In any way that violates any applicable national or international law or regulation.
* For the purpose of exploiting, harming, or attempting to exploit or harm minors in any way by exposing them to inappropriate content or otherwise.
* To transmit, or procure the sending of, any advertising or promotional material, including any “junk mail”, “chain letter,” “spam,” or any other similar solicitation.
* To impersonate or attempt to impersonate Company, a Company employee, another user, or any other person or entity.
* In any way that infringes upon the rights of others, or in any way is illegal, threatening, fraudulent, or harmful, or in connection with any unlawful, illegal, fraudulent, or harmful purpose or activity.
* To engage in any other conduct that restricts or inhibits anyones use or enjoyment of Service, or which, as determined by us, may harm or offend Company or users of Service or expose them to liability.
Additionally, you agree not to:
* Use Service in any manner that could disable, overburden, damage, or impair Service or interfere with any other partys use of Service, including their ability to engage in real time activities through Service.
* Use any robot, spider, or other automatic device, process, or means to access Service for any purpose, including monitoring or copying any of the material on Service.
* Use any manual process to monitor or copy any of the material on Service or for any other unauthorized purpose without our prior written consent.
* Use any device, software, or routine that interferes with the proper working of Service.
* Introduce any viruses, trojan horses, worms, logic bombs, or other material which is malicious or technologically harmful.
* Attempt to gain unauthorized access to, interfere with, damage, or disrupt any parts of Service, the server on which Service is stored, or any server, computer, or database connected to Service.
* Attack Service via a denial-of-service attack or a distributed denial-of-service attack.
* Take any action that may damage or falsify Company rating.
* Otherwise attempt to interfere with the proper working of Service.
Analytics
---------
There is no analytics on this service.
No Use By Minors
----------------
Service is intended only for access and use by individuals at least eighteen (18) years old. By accessing or using any of Company, you warrant and represent that you are at least eighteen (18) years of age and with the full authority, right, and capacity to enter into this agreement and abide by all of the terms and conditions of Terms. If you are not at least eighteen (18) years old, you are prohibited from both the access and usage of Service.
Accounts
--------
You cannot create an account on this service. The only account that exists is mine.
Changes To Service
------------------
I reserve the right to withdraw or amend this Service, and any service or material I provide via Service, in my sole discretion without notice. I will not be liable if for any reason all or any part of Service is unavailable at any time or for any period. From time to time, I may restrict access to some parts of Service, or the entire Service, to visitors.
Amendments To Terms
-------------------
I may amend Terms at any time by posting the amended terms on this site. It is your responsibility to review these Terms periodically.
Acknowledgement
---------------
BY USING SERVICE OR OTHER SERVICES PROVIDED BY ME, YOU ACKNOWLEDGE THAT YOU HAVE READ THESE TERMS OF SERVICE AND AGREE TO BE BOUND BY THEM.
Contact Me
----------
If you have any questions about these terms of service, please contact me:
By email: support@maronato.dev

View File

@ -41,6 +41,28 @@ test.describe("Org", () => {
await expectPageToBeServerSideRendered(page);
});
});
test.describe("Dynamic Group Booking", () => {
test("Dynamic Group booking link should load", async ({ page }) => {
const users = [
{
username: "peer",
name: "Peer Richelsen",
},
{
username: "bailey",
name: "Bailey Pumfleet",
},
];
const response = await page.goto(`http://i.cal.com/${users[0].username}+${users[1].username}`);
expect(response?.status()).toBe(200);
expect(await page.locator('[data-testid="event-title"]').textContent()).toBe("Dynamic");
expect(await page.locator('[data-testid="event-meta"]').textContent()).toContain(users[0].name);
expect(await page.locator('[data-testid="event-meta"]').textContent()).toContain(users[1].name);
// 2 users and 1 for the organization(2+1)
expect((await page.locator('[data-testid="event-meta"] [data-testid="avatar"]').all()).length).toBe(3);
});
});
});
// This ensures that the route is actually mapped to a page that is using withEmbedSsr

View File

@ -48,17 +48,21 @@ Here is the full architecture:
### Email Router
To expose the AI app, run `ngrok http 3005` (or the AI app's port number) in a new terminal. You may need to install [nGrok](https://ngrok.com/).
To expose the AI app, you can use either [Tunnelmole](https://github.com/robbie-cahill/tunnelmole-client), an open source tunnelling tool; or [nGrok](https://ngrok.com/), a popular closed source tunnelling tool.
For Tunnelmole, run `tmole 3005` (or the AI app's port number) in a new terminal. Please replace `3005` with the port number if it is different. In the output, you'll see two URLs, one http and a https (we recommend using the https url for privacy and security). To install Tunnelmole, use `curl -O https://install.tunnelmole.com/8dPBw/install && sudo bash install`. (On Windows, download [tmole.exe](https://tunnelmole.com/downloads/tmole.exe))
For nGrok, run `ngrok http 3005` (or the AI app's port number) in a new terminal. You may need to install nGrok first.
To forward incoming emails to the serverless function at `/agent`, we use [SendGrid's Inbound Parse](https://docs.sendgrid.com/for-developers/parsing-email/setting-up-the-inbound-parse-webhook).
1. Ensure you have a [SendGrid account](https://signup.sendgrid.com/)
2. Ensure you have an authenticated domain. Go to Settings > Sender Authentication > Authenticate. For DNS host, select `I'm not sure`. Click Next and add your domain, eg. `example.com`. Choose Manual Setup. You'll be given three CNAME records to add to your DNS settings, eg. in [Vercel Domains](https://vercel.com/dashboard/domains). After adding those records, click Verify. To troubleshoot, see the [full instructions](https://docs.sendgrid.com/ui/account-and-settings/how-to-set-up-domain-authentication).
3. Authorize your domain for email with MX records: one with name `[your domain].com` and value `mx.sendgrid.net.`, and another with name `bounces.[your domain].com` and value `feedback-smtp.us-east-1.amazonses.com`, both with priority `10` if prompted.
3. Authorize your domain for email with MX records: one with name `[your domain].com` and value `mx.sendgrid.net.`, and another with name `bounces.[your domain].com` and value `feedback-smtp.us-east-1.amazonses.com`. Set the priority to `10` if prompted.
4. Go to Settings > [Inbound Parse](https://app.sendgrid.com/settings/parse) > Add Host & URL. Choose your authenticated domain.
5. In the Destination URL field, use the nGrok URL from above along with the path, `/api/receive`, and one param, `parseKey`, which lives in [this app's .env](/apps/ai/.env.example) under `PARSE_KEY`. The full URL should look like `https://abc.ngrok.io/api/receive?parseKey=ABC-123`.
5. In the Destination URL field, use the Tunnelmole or ngrok URL from above along with the path, `/api/receive`, and one param, `parseKey`, which lives in [this app's .env](/apps/ai/.env.example) under `PARSE_KEY`. The full URL should look like `https://abc.tunnelmole.net/api/receive?parseKey=ABC-123` or `https://abc.ngrok.io/api/receive?parseKey=ABC-123`.
6. Activate "POST the raw, full MIME message".
7. Send an email to `[anyUsername]@example.com`. You should see a ping on the nGrok listener and server.
7. Send an email to `[anyUsername]@example.com`. You should see a ping on the Tunnelmole or ngrok listener and server.
8. Adjust the logic in [receive/route.ts](/apps/ai/src/app/api/receive/route.ts), save to hot-reload, and send another email to test the behaviour.
Please feel free to improve any part of this architecture!

View File

@ -92,7 +92,7 @@ export const schemaUserBaseBodyParams = User.pick({
// Here we can both require or not (adding optional or nullish) and also rewrite validations for any value
// for example making weekStart only accept weekdays as input
const schemaUserEditParams = z.object({
email: z.string().email(),
email: z.string().email().toLowerCase(),
username: usernameSchema,
weekStart: z.nativeEnum(weekdays).optional(),
brandColor: z.string().min(4).max(9).regex(/^#/).optional(),
@ -114,7 +114,7 @@ const schemaUserEditParams = z.object({
// merging both BaseBodyParams with RequiredParams, and omiting whatever we want at the end.
const schemaUserCreateParams = z.object({
email: z.string().email(),
email: z.string().email().toLowerCase(),
username: usernameSchema,
weekStart: z.nativeEnum(weekdays).optional(),
brandColor: z.string().min(4).max(9).regex(/^#/).optional(),

View File

@ -1,6 +1,8 @@
const { withAxiom } = require("next-axiom");
const { withSentryConfig } = require("@sentry/nextjs");
module.exports = withAxiom({
const plugins = [withAxiom];
const nextConfig = {
transpilePackages: [
"@calcom/app-store",
"@calcom/core",
@ -66,4 +68,15 @@ module.exports = withAxiom({
],
};
},
});
};
if (!!process.env.NEXT_PUBLIC_SENTRY_DSN) {
nextConfig["sentry"] = {
autoInstrumentServerFunctions: true,
hideSourceMaps: true,
};
plugins.push(withSentryConfig);
}
module.exports = () => plugins.reduce((acc, next) => next(acc), nextConfig);

View File

@ -6,18 +6,44 @@ import { schemaQueryIdParseInt } from "~/lib/validations/shared/queryIdTransform
async function authMiddleware(req: NextApiRequest) {
const { userId, prisma, isAdmin, query } = req;
if (isAdmin) {
return;
}
const { id } = schemaQueryIdParseInt.parse(query);
const userWithBookings = await prisma.user.findUnique({
const userWithBookingsAndTeamIds = await prisma.user.findUnique({
where: { id: userId },
include: { bookings: true },
include: {
bookings: true,
teams: {
select: {
teamId: true,
},
},
},
});
if (!userWithBookings) throw new HttpError({ statusCode: 404, message: "User not found" });
if (!userWithBookingsAndTeamIds) throw new HttpError({ statusCode: 404, message: "User not found" });
const userBookingIds = userWithBookings.bookings.map((booking) => booking.id);
const userBookingIds = userWithBookingsAndTeamIds.bookings.map((booking) => booking.id);
if (!isAdmin && !userBookingIds.includes(id)) {
throw new HttpError({ statusCode: 401, message: "You are not authorized" });
if (!userBookingIds.includes(id)) {
const teamBookings = await prisma.booking.findUnique({
where: {
id: id,
eventType: {
team: {
id: {
in: userWithBookingsAndTeamIds.teams.map((team) => team.teamId),
},
},
},
},
});
if (!teamBookings) {
throw new HttpError({ statusCode: 401, message: "You are not authorized" });
}
}
}

View File

@ -33,7 +33,7 @@ import { schemaQueryIdParseInt } from "~/lib/validations/shared/queryIdTransform
* type: boolean
* description: Delete all remaining bookings
* - in: query
* name: reason
* name: cancellationReason
* required: false
* schema:
* type: string

View File

@ -3,8 +3,10 @@ import type { NextApiRequest } from "next";
import { HttpError } from "@calcom/lib/http-error";
import { defaultResponder } from "@calcom/lib/server";
import { MembershipRole } from "@calcom/prisma/client";
import { schemaEventTypeCreateBodyParams, schemaEventTypeReadPublic } from "~/lib/validations/event-type";
import { canUserAccessTeamWithRole } from "~/pages/api/teams/[teamId]/_auth-middleware";
import checkParentEventOwnership from "./_utils/checkParentEventOwnership";
import checkTeamEventEditPermission from "./_utils/checkTeamEventEditPermission";
@ -316,7 +318,13 @@ async function checkPermissions(req: NextApiRequest) {
statusCode: 401,
message: "ADMIN required for `userId`",
});
if (!isAdmin && body.teamId)
if (
body.teamId &&
!isAdmin &&
!(await canUserAccessTeamWithRole(req.prisma, req.userId, isAdmin, body.teamId, {
in: [MembershipRole.OWNER, MembershipRole.ADMIN],
}))
)
throw new HttpError({
statusCode: 401,
message: "ADMIN required for `teamId`",

View File

@ -1,5 +1,9 @@
import timezone from "dayjs/plugin/timezone";
import utc from "dayjs/plugin/utc";
import type { NextApiRequest, NextApiResponse } from "next";
import dayjs from "@calcom/dayjs";
import { isSupportedTimeZone } from "@calcom/lib/date-fns";
import { HttpError } from "@calcom/lib/http-error";
import { defaultResponder } from "@calcom/lib/server";
import { createContext } from "@calcom/trpc/server/createContext";
@ -9,10 +13,34 @@ import { getAvailableSlots } from "@calcom/trpc/server/routers/viewer/slots/util
import { TRPCError } from "@trpc/server";
import { getHTTPStatusCodeFromError } from "@trpc/server/http";
// Apply plugins
dayjs.extend(utc);
dayjs.extend(timezone);
async function handler(req: NextApiRequest, res: NextApiResponse) {
try {
const input = getScheduleSchema.parse(req.query);
return await getAvailableSlots({ ctx: await createContext({ req, res }), input });
const { usernameList, ...rest } = req.query;
let slugs = usernameList;
if (!Array.isArray(usernameList)) {
slugs = usernameList ? [usernameList] : [];
}
const input = getScheduleSchema.parse({ usernameList: slugs, ...rest });
const timeZoneSupported = input.timeZone ? isSupportedTimeZone(input.timeZone) : false;
const availableSlots = await getAvailableSlots({ ctx: await createContext({ req, res }), input });
const slotsInProvidedTimeZone = timeZoneSupported
? Object.keys(availableSlots.slots).reduce(
(acc: Record<string, { time: string; attendees?: number; bookingUid?: string }[]>, date) => {
acc[date] = availableSlots.slots[date].map((slot) => ({
...slot,
time: dayjs(slot.time).tz(input.timeZone).format(),
}));
return acc;
},
{}
)
: availableSlots;
return slotsInProvidedTimeZone;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
} catch (cause) {
if (cause instanceof TRPCError) {

View File

@ -27,6 +27,16 @@ export async function checkPermissions(
version: req.query.version,
apiKey: req.query.apiKey,
});
return canUserAccessTeamWithRole(prisma, userId, isAdmin, teamId, role);
}
export async function canUserAccessTeamWithRole(
prisma: NextApiRequest["prisma"],
userId: number,
isAdmin: boolean,
teamId: number,
role: Prisma.MembershipWhereInput["role"] = MembershipRole.OWNER
) {
const args: Prisma.TeamFindFirstArgs = { where: { id: teamId } };
/** If not ADMIN then we check if the actual user belongs to team and matches the required role */
if (!isAdmin) args.where = { ...args.where, members: { some: { userId, role } } };

View File

@ -58,12 +58,44 @@ export async function patchHandler(req: NextApiRequest) {
const { prisma, body, userId } = req;
const data = schemaTeamUpdateBodyParams.parse(body);
const { teamId } = schemaQueryTeamId.parse(req.query);
/** Only OWNERS and ADMINS can edit teams */
const _team = await prisma.team.findFirst({
include: { members: true },
where: { id: teamId, members: { some: { userId, role: { in: ["OWNER", "ADMIN"] } } } },
});
if (!_team) throw new HttpError({ statusCode: 401, message: "Unauthorized: OWNER or ADMIN required" });
const slugAlreadyExists = await prisma.team.findFirst({
where: {
slug: {
mode: "insensitive",
equals: data.slug,
},
},
});
if (slugAlreadyExists && data.slug !== _team.slug)
throw new HttpError({ statusCode: 409, message: "Team slug already exists" });
// Check if parentId is related to this user
if (data.parentId && data.parentId === teamId) {
throw new HttpError({
statusCode: 400,
message: "Bad request: Parent id cannot be the same as the team id.",
});
}
if (data.parentId) {
const parentTeam = await prisma.team.findFirst({
where: { id: data.parentId, members: { some: { userId, role: { in: ["OWNER", "ADMIN"] } } } },
});
if (!parentTeam)
throw new HttpError({
statusCode: 401,
message: "Unauthorized: Invalid parent id. You can only use parent id of your own teams.",
});
}
let paymentUrl;
if (_team.slug === null && data.slug) {
data.metadata = {

View File

@ -68,6 +68,18 @@ async function postHandler(req: NextApiRequest) {
}
}
// Check if parentId is related to this user
if (data.parentId) {
const parentTeam = await prisma.team.findFirst({
where: { id: data.parentId, members: { some: { userId, role: { in: ["OWNER", "ADMIN"] } } } },
});
if (!parentTeam)
throw new HttpError({
statusCode: 401,
message: "Unauthorized: Invalid parent id. You can only use parent id of your own teams.",
});
}
// TODO: Perhaps there is a better fix for this?
const cloneData: typeof data & {
metadata: NonNullable<typeof data.metadata> | undefined;

View File

@ -69,7 +69,12 @@ import { schemaWebhookEditBodyParams, schemaWebhookReadPublic } from "~/lib/vali
export async function patchHandler(req: NextApiRequest) {
const { prisma, query, userId, isAdmin } = req;
const { id } = schemaQueryIdAsString.parse(query);
const { eventTypeId, userId: bodyUserId, ...data } = schemaWebhookEditBodyParams.parse(req.body);
const {
eventTypeId,
userId: bodyUserId,
eventTriggers,
...data
} = schemaWebhookEditBodyParams.parse(req.body);
const args: Prisma.WebhookUpdateArgs = { where: { id }, data };
if (eventTypeId) {
@ -87,6 +92,11 @@ export async function patchHandler(req: NextApiRequest) {
args.data.userId = bodyUserId;
}
if (args.data.eventTriggers) {
const eventTriggersSet = new Set(eventTriggers);
args.data.eventTriggers = Array.from(eventTriggersSet);
}
const result = await prisma.webhook.update(args);
return { webhook: schemaWebhookReadPublic.parse(result) };
}

View File

@ -66,7 +66,12 @@ import { schemaWebhookCreateBodyParams, schemaWebhookReadPublic } from "~/lib/va
*/
async function postHandler(req: NextApiRequest) {
const { userId, isAdmin, prisma } = req;
const { eventTypeId, userId: bodyUserId, ...body } = schemaWebhookCreateBodyParams.parse(req.body);
const {
eventTypeId,
userId: bodyUserId,
eventTriggers,
...body
} = schemaWebhookCreateBodyParams.parse(req.body);
const args: Prisma.WebhookCreateArgs = { data: { id: uuidv4(), ...body } };
// If no event type, we assume is for the current user. If admin we run more checks below...
@ -87,6 +92,11 @@ async function postHandler(req: NextApiRequest) {
args.data.userId = bodyUserId;
}
if (args.data.eventTriggers) {
const eventTriggersSet = new Set(eventTriggers);
args.data.eventTriggers = Array.from(eventTriggersSet);
}
const data = await prisma.webhook.create(args);
return {

View File

@ -0,0 +1 @@
export {};

View File

@ -0,0 +1,5 @@
import * as Sentry from "@sentry/nextjs";
Sentry.init({
dsn: process.env.NEXT_PUBLIC_SENTRY_DSN,
});

View File

@ -0,0 +1,6 @@
import * as Sentry from "@sentry/nextjs";
Sentry.init({
dsn: process.env.NEXT_PUBLIC_SENTRY_DSN,
tracesSampleRate: 1.0,
});

View File

@ -8,7 +8,9 @@ pnpm-debug.log*
lerna-debug.log*
node_modules
storybook-static
storybook-static/*
!storybook-static/favicon.ico
!storybook-static/sb-cover.jpg
dist
dist-ssr
*.local

View File

@ -1,14 +1,16 @@
import { dirname, join } from "path";
import type { StorybookConfig } from "@storybook/nextjs";
import path, { dirname, join } from "path";
const path = require("path");
module.exports = {
const config: StorybookConfig = {
stories: [
"../intro.stories.mdx",
"../../../packages/ui/components/**/*.stories.mdx",
"../../../packages/atoms/**/*.stories.mdx",
"../../../packages/features/**/*.stories.mdx",
"../../../packages/ui/components/**/*.stories.mdx", // legacy SB6 stories
"../../../packages/ui/components/**/*.stories.@(js|jsx|ts|tsx)",
"../../../packages/ui/components/**/*.docs.mdx",
"../../../packages/features/**/*.stories.@(js|jsx|ts|tsx)",
"../../../packages/features/**/*.docs.mdx",
"../../../packages/atoms/**/*.stories.@(js|jsx|ts|tsx)",
"../../../packages/atoms/**/*.docs.mdx",
],
addons: [
@ -17,23 +19,23 @@ module.exports = {
getAbsolutePath("@storybook/addon-interactions"),
getAbsolutePath("storybook-addon-rtl-direction"),
getAbsolutePath("storybook-react-i18next"),
getAbsolutePath("@storybook/addon-mdx-gfm"),
],
framework: {
name: getAbsolutePath("@storybook/nextjs"),
name: getAbsolutePath("@storybook/nextjs") as "@storybook/nextjs",
options: {
builder: {
fsCache: true,
lazyCompilation: true,
},
// builder: {
// fsCache: true,
// lazyCompilation: true,
// },
},
},
staticDirs: ["../public"],
webpackFinal: async (config, { configType }) => {
config.resolve = config.resolve || {};
config.resolve.fallback = {
fs: false,
assert: false,
@ -61,6 +63,8 @@ module.exports = {
zlib: false,
};
config.module = config.module || {};
config.module.rules = config.module.rules || [];
config.module.rules.push({
test: /\.css$/,
use: [
@ -85,6 +89,8 @@ module.exports = {
},
};
export default config;
function getAbsolutePath(value) {
return dirname(require.resolve(join(value, "package.json")));
}

View File

@ -1,44 +0,0 @@
import { I18nextProvider } from "react-i18next";
import "../styles/globals.css";
import "../styles/storybook-styles.css";
import i18n from "./i18next";
export const parameters = {
actions: { argTypesRegex: "^on[A-Z].*" },
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/,
},
},
globals: {
locale: "en",
locales: {
en: "English",
fr: "Français",
},
},
i18n,
};
const withI18next = (Story) => (
<I18nextProvider i18n={i18n}>
<div style={{ margin: "2rem" }}>
<Story />
</div>
</I18nextProvider>
);
export const decorators = [withI18next];
window.getEmbedNamespace = () => {
const url = new URL(document.URL);
const namespace = url.searchParams.get("embed");
return namespace;
};
window.getEmbedTheme = () => {
return "auto";
};

View File

@ -0,0 +1,73 @@
// adds tooltip context to all stories
import { TooltipProvider } from "@radix-ui/react-tooltip";
import type { Preview } from "@storybook/react";
import React from "react";
import { I18nextProvider } from "react-i18next";
import type { EmbedThemeConfig } from "@calcom/embed-core/src/types";
// adds trpc context to all stories (esp. booker)
import { StorybookTrpcProvider } from "@calcom/ui";
import "../styles/globals.css";
import "../styles/storybook-styles.css";
import i18n from "./i18next";
const preview: Preview = {
parameters: {
actions: { argTypesRegex: "^on[A-Z].*" },
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/,
},
},
globals: {
locale: "en",
locales: {
en: "English",
fr: "Français",
},
},
i18n,
nextjs: {
appDirectory: true,
},
},
decorators: [
(Story) => (
<StorybookTrpcProvider>
<TooltipProvider>
<I18nextProvider i18n={i18n}>
<div style={{ margin: "2rem" }}>
<Story />
</div>
</I18nextProvider>
</TooltipProvider>
</StorybookTrpcProvider>
),
],
};
export default preview;
declare global {
interface Window {
getEmbedNamespace: () => string | null;
getEmbedTheme: () => EmbedThemeConfig | null;
}
}
window.getEmbedNamespace = () => {
const url = new URL(document.URL);
const namespace = url.searchParams.get("embed");
return namespace;
};
window.getEmbedTheme = () => {
return "auto";
};

View File

@ -1,6 +1,6 @@
import { ArgsTable } from "@storybook/addon-docs";
import { SortType } from "@storybook/components";
import { PropDescriptor } from "@storybook/store";
import type { SortType } from "@storybook/blocks";
import type { PropDescriptor } from "@storybook/preview-api";
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- ignore storybook addon types component as any so we have to do
type Component = any;

View File

@ -20,7 +20,10 @@
"@radix-ui/react-slider": "^1.0.0",
"@radix-ui/react-switch": "^1.0.0",
"@radix-ui/react-tooltip": "^1.0.0",
"@storybook/addon-docs": "^7.6.3",
"@storybook/blocks": "^7.6.3",
"@storybook/nextjs": "^7.6.3",
"@storybook/preview-api": "^7.6.3",
"next": "^13.4.6",
"react": "^18.2.0",
"react-dom": "^18.2.0",
@ -33,7 +36,6 @@
"@storybook/addon-essentials": "^7.6.3",
"@storybook/addon-interactions": "^7.6.3",
"@storybook/addon-links": "^7.6.3",
"@storybook/addon-mdx-gfm": "^7.6.3",
"@storybook/nextjs": "^7.6.3",
"@storybook/react": "^7.6.3",
"@storybook/testing-library": "^0.2.2",

View File

@ -197,88 +197,91 @@
@layer {
:root {
/* background */
--cal-bg-emphasis: #e5e7eb;
--cal-bg: white;
--cal-bg-subtle: #f3f4f6;
--cal-bg-muted: #f9fafb;
--cal-bg-inverted: #111827;
--cal-bg-emphasis: hsla(220,13%,91%,1);
--cal-bg: hsla(0,0%,100%,1);
--cal-bg-subtle: hsla(220, 14%, 96%,1);
--cal-bg-muted: hsla(210,20%,98%,1);
--cal-bg-inverted: hsla(0,0%,6%,1);
/* background -> components*/
--cal-bg-info: #dee9fc;
--cal-bg-success: #e2fbe8;
--cal-bg-attention: #fceed8;
--cal-bg-error: #f9e3e2;
--cal-bg-dark-error: #752522;
--cal-bg-info: hsla(218,83%,98%,1);
--cal-bg-success: hsla(134,76%,94%,1);
--cal-bg-attention: hsla(37, 86%, 92%, 1);
--cal-bg-error: hsla(3,66,93,1);
--cal-bg-dark-error: hsla(2, 55%, 30%, 1);
/* Borders */
--cal-border-emphasis: #9ca3af;
--cal-border: #d1d5db;
--cal-border-subtle: #e5e7eb;
--cal-border-muted: #f3f4f6;
--cal-border-error: #aa2e26;
--cal-border-emphasis: hsla(218, 11%, 65%, 1);
--cal-border: hsla(216, 12%, 84%, 1);
--cal-border-subtle: hsla(220, 13%, 91%, 1);
--cal-border-booker: #e5e7eb;
--cal-border-muted: hsla(220, 14%, 96%, 1);
--cal-border-error: hsla(4, 63%, 41%, 1);
/* Content/Text */
--cal-text-emphasis: #111827;
--cal-text: #374151;
--cal-text-subtle: #6b7280;
--cal-text-muted: #9ca3af;
--cal-text-inverted: white;
--cal-text-emphasis: hsla(217, 19%, 27%, 1);
--cal-text: hsla(217, 19%, 27%, 1);
--cal-text-subtle: hsla(220, 9%, 46%, 1);
--cal-text-muted: hsla(218, 11%, 65%, 1);
--cal-text-inverted: hsla(0, 0%, 100%, 1);
/* Content/Text -> components */
--cal-text-info: #253985;
--cal-text-success: #285231;
--cal-text-attention: #73321b;
--cal-text-error: #752522;
--cal-text-info: hsla(228, 56%, 33%, 1);
--cal-text-success: hsla(133, 34%, 24%, 1);
--cal-text-attention: hsla(16, 62%, 28%, 1);
--cal-text-error: hsla(2, 55%, 30%, 1);
/* Brand shinanigans
-> These will be computed for the users theme at runtime.
*/
--cal-brand: #111827;
--cal-brand-emphasis: #101010;
--cal-brand-text: white;
-> These will be computed for the users theme at runtime.
*/
--cal-brand: hsla(221, 39%, 11%, 1);
--cal-brand-emphasis: hsla(0, 0%, 6%, 1);
--cal-brand-text: hsla(0, 0%, 100%, 1);
}
.dark {
/* background */
--cal-bg-emphasis: #2b2b2b;
--cal-bg: #101010;
--cal-bg-subtle: #2b2b2b;
--cal-bg-muted: #1c1c1c;
--cal-bg-inverted: #f3f4f6;
--cal-bg-emphasis: hsla(0, 0%, 32%, 1);
--cal-bg: hsla(0, 0%, 10%, 1);
--cal-bg-subtle: hsla(0, 0%, 18%, 1);
--cal-bg-muted: hsla(0, 0%, 12%, 1);
--cal-bg-inverted: hsla(220, 14%, 96%, 1);
/* background -> components*/
--cal-bg-info: #263fa9;
--cal-bg-success: #306339;
--cal-bg-attention: #8e3b1f;
--cal-bg-error: #8c2822;
--cal-bg-dark-error: #752522;
--cal-bg-info: hsla(228, 56%, 33%, 1);
--cal-bg-success: hsla(133, 34%, 24%, 1);
--cal-bg-attention: hsla(16, 62%, 28%, 1);
--cal-bg-error: hsla(2, 55%, 30%, 1);
--cal-bg-dark-error: hsla(2, 55%, 30%, 1);
/* Borders */
--cal-border-emphasis: #575757;
--cal-border: #444444;
--cal-border-subtle: #2b2b2b;
--cal-border-muted: #1c1c1c;
--cal-border-error: #aa2e26;
--cal-border-emphasis: hsla(0, 0%, 46%, 1);
--cal-border: hsla(0, 0%, 34%, 1);
--cal-border-subtle: hsla(0, 0%, 22%, 1);
--cal-border-booker: hsla(0, 0%, 22%, 1);
--cal-border-muted: hsla(0, 0%, 18%, 1);
--cal-border-error: hsla(4, 63%, 41%, 1);
/* Content/Text */
--cal-text-emphasis: #f3f4f6;
--cal-text: #d6d6d6;
--cal-text-subtle: #757575;
--cal-text-muted: #575757;
--cal-text-inverted: #101010;
--cal-text-emphasis: hsla(240, 20%, 99%, 1);
--cal-text: hsla(0, 0%, 84%, 1);
--cal-text-subtle: hsla(0, 0%, 65%, 1);
--cal-text-muted: hsla(0, 0%, 34%, 1);
--cal-text-inverted: hsla(0, 0%, 10%, 1);
/* Content/Text -> components */
--cal-text-info: #dee9fc;
--cal-text-success: #e2fbe8;
--cal-text-attention: #fceed8;
--cal-text-error: #f9e3e2;
--cal-text-info: hsla(218, 83%, 93%, 1);
--cal-text-success: hsla(134, 76%, 94%, 1);
--cal-text-attention: hsla(37, 86%, 92%, 1);
--cal-text-error: hsla(3, 66%, 93%, 1);
/* Brand shenanigans
-> These will be computed for the users theme at runtime.
*/
--cal-brand: white;
--cal-brand-emphasis: #e1e1e1;
--cal-brand-text: black;
-> These will be computed for the users theme at runtime.
*/
--cal-brand: hsla(0, 0%, 100%, 1);
--cal-brand-emphasis: hsla(218, 11%, 65%, 1);
--cal-brand-text: hsla(0, 0%, 0%,1);
}
}

View File

@ -6,6 +6,18 @@ import z from "zod";
const ROUTES: [URLPattern, boolean][] = [
["/event-types", process.env.APP_ROUTER_EVENT_TYPES_ENABLED === "1"] as const,
["/settings/admin/:path*", process.env.APP_ROUTER_SETTINGS_ADMIN_ENABLED === "1"] as const,
["/apps/installed/:category", process.env.APP_ROUTER_APPS_INSTALLED_CATEGORY_ENABLED === "1"] as const,
["/apps/:slug", process.env.APP_ROUTER_APPS_SLUG_ENABLED === "1"] as const,
["/apps/:slug/setup", process.env.APP_ROUTER_APPS_SLUG_SETUP_ENABLED === "1"] as const,
["/apps/categories", process.env.APP_ROUTER_APPS_CATEGORIES_ENABLED === "1"] as const,
["/apps/categories/:category", process.env.APP_ROUTER_APPS_CATEGORIES_CATEGORY_ENABLED === "1"] as const,
["/workflows/:path*", process.env.APP_ROUTER_WORKFLOWS_ENABLED === "1"] as const,
["/settings/teams/:path*", process.env.APP_ROUTER_SETTINGS_TEAMS_ENABLED === "1"] as const,
["/getting-started/:step", process.env.APP_ROUTER_GETTING_STARTED_STEP_ENABLED === "1"] as const,
["/apps", process.env.APP_ROUTER_APPS_ENABLED === "1"] as const,
["/bookings/:status", process.env.APP_ROUTER_BOOKINGS_STATUS_ENABLED === "1"] as const,
["/video/:path*", process.env.APP_ROUTER_VIDEO_ENABLED === "1"] as const,
["/teams", process.env.APP_ROUTER_TEAMS_ENABLED === "1"] as const,
].map(([pathname, enabled]) => [
new URLPattern({
pathname,

View File

@ -0,0 +1,21 @@
import type { GetServerSideProps, GetServerSidePropsContext } from "next";
import { notFound, redirect } from "next/navigation";
export const withAppDir =
<T extends Record<string, any>>(getServerSideProps: GetServerSideProps<T>) =>
async (context: GetServerSidePropsContext): Promise<T> => {
const ssrResponse = await getServerSideProps(context);
if ("redirect" in ssrResponse) {
redirect(ssrResponse.redirect.destination);
}
if ("notFound" in ssrResponse) {
notFound();
}
return {
...ssrResponse.props,
// includes dehydratedState required for future page trpcPropvider
...("trpcState" in ssrResponse.props && { dehydratedState: ssrResponse.props.trpcState }),
};
};

View File

@ -0,0 +1,57 @@
import type { GetServerSidePropsContext } from "next";
import { isNotFoundError } from "next/dist/client/components/not-found";
import { getURLFromRedirectError, isRedirectError } from "next/dist/client/components/redirect";
import { notFound, redirect } from "next/navigation";
import { WEBAPP_URL } from "@calcom/lib/constants";
export type EmbedProps = {
isEmbed?: boolean;
};
export default function withEmbedSsrAppDir<T extends Record<string, any>>(
getData: (context: GetServerSidePropsContext) => Promise<T>
) {
return async (context: GetServerSidePropsContext): Promise<T> => {
const { embed, layout } = context.query;
try {
const props = await getData(context);
return {
...props,
isEmbed: true,
};
} catch (e) {
if (isRedirectError(e)) {
const destinationUrl = getURLFromRedirectError(e);
let urlPrefix = "";
// Get the URL parsed from URL so that we can reliably read pathname and searchParams from it.
const destinationUrlObj = new URL(destinationUrl, WEBAPP_URL);
// If it's a complete URL, use the origin as the prefix to ensure we redirect to the same domain.
if (destinationUrl.search(/^(http:|https:).*/) !== -1) {
urlPrefix = destinationUrlObj.origin;
} else {
// Don't use any prefix for relative URLs to ensure we stay on the same domain
urlPrefix = "";
}
const destinationQueryStr = destinationUrlObj.searchParams.toString();
// Make sure that redirect happens to /embed page and pass on embed query param as is for preserving Cal JS API namespace
const newDestinationUrl = `${urlPrefix}${destinationUrlObj.pathname}/embed?${
destinationQueryStr ? `${destinationQueryStr}&` : ""
}layout=${layout}&embed=${embed}`;
redirect(newDestinationUrl);
}
if (isNotFoundError(e)) {
notFound();
}
throw e;
}
};
}

View File

@ -1,3 +1,14 @@
export type Params = {
[param: string]: string | string[] | undefined;
};
export type SearchParams = {
[param: string]: string | string[] | undefined;
};
export type PageProps = {
params: Params;
searchParams: SearchParams;
};
export type LayoutProps = { params: Params; children: React.ReactElement };

View File

@ -1,20 +0,0 @@
import { headers } from "next/headers";
import { type ReactElement } from "react";
import PageWrapper from "@components/PageWrapperAppDir";
import { getLayout } from "@components/auth/layouts/AdminLayoutAppDir";
type WrapperWithLayoutProps = {
children: ReactElement;
};
export default async function WrapperWithLayout({ children }: WrapperWithLayoutProps) {
const h = headers();
const nonce = h.get("x-nonce") ?? undefined;
return (
<PageWrapper getLayout={getLayout} requiresLicense={false} nonce={nonce} themeBasis={null}>
{children}
</PageWrapper>
);
}

View File

@ -1,22 +0,0 @@
// pages without layout (e.g., /availability/index.tsx) are supposed to go under (layout) folder
import { headers } from "next/headers";
import { type ReactElement } from "react";
import { getLayout } from "@calcom/features/MainLayoutAppDir";
import PageWrapper from "@components/PageWrapperAppDir";
type WrapperWithLayoutProps = {
children: ReactElement;
};
export default async function WrapperWithLayout({ children }: WrapperWithLayoutProps) {
const h = headers();
const nonce = h.get("x-nonce") ?? undefined;
return (
<PageWrapper getLayout={getLayout} requiresLicense={false} nonce={nonce} themeBasis={null}>
{children}
</PageWrapper>
);
}

View File

@ -1,20 +0,0 @@
// pages containing layout (e.g., /availability/[schedule].tsx) are supposed to go under (no-layout) folder
import { headers } from "next/headers";
import { type ReactElement } from "react";
import PageWrapper from "@components/PageWrapperAppDir";
type WrapperWithoutLayoutProps = {
children: ReactElement;
};
export default async function WrapperWithoutLayout({ children }: WrapperWithoutLayoutProps) {
const h = headers();
const nonce = h.get("x-nonce") ?? undefined;
return (
<PageWrapper getLayout={null} requiresLicense={false} nonce={nonce} themeBasis={null}>
{children}
</PageWrapper>
);
}

View File

@ -1,21 +0,0 @@
import { headers } from "next/headers";
import { type ReactElement } from "react";
import { getLayout } from "@calcom/features/settings/layouts/SettingsLayoutAppDir";
import PageWrapper from "@components/PageWrapperAppDir";
type WrapperWithLayoutProps = {
children: ReactElement;
};
export default async function WrapperWithLayout({ children }: WrapperWithLayoutProps) {
const h = headers();
const nonce = h.get("x-nonce") ?? undefined;
return (
<PageWrapper getLayout={getLayout} requiresLicense={false} nonce={nonce} themeBasis={null}>
{children}
</PageWrapper>
);
}

View File

@ -0,0 +1,3 @@
import { WithLayout } from "app/layoutHOC";
export default WithLayout({ getLayout: null })<"L">;

View File

@ -0,0 +1,126 @@
import AppPage from "@pages/apps/[slug]/index";
import { Prisma } from "@prisma/client";
import { _generateMetadata } from "app/_utils";
import fs from "fs";
import matter from "gray-matter";
import { notFound } from "next/navigation";
import path from "path";
import { z } from "zod";
import { getAppWithMetadata } from "@calcom/app-store/_appRegistry";
import { getAppAssetFullPath } from "@calcom/app-store/getAppAssetFullPath";
import { APP_NAME, IS_PRODUCTION } from "@calcom/lib/constants";
import prisma from "@calcom/prisma";
const sourceSchema = z.object({
content: z.string(),
data: z.object({
description: z.string().optional(),
items: z
.array(
z.union([
z.string(),
z.object({
iframe: z.object({ src: z.string() }),
}),
])
)
.optional(),
}),
});
export const generateMetadata = async ({ params }: { params: Record<string, string | string[]> }) => {
const { data } = await getPageProps({ params });
return await _generateMetadata(
() => `${data.name} | ${APP_NAME}`,
() => data.description
);
};
export const generateStaticParams = async () => {
try {
const appStore = await prisma.app.findMany({ select: { slug: true } });
return appStore.map(({ slug }) => ({ slug }));
} catch (e: unknown) {
if (e instanceof Prisma.PrismaClientInitializationError) {
// Database is not available at build time, but that's ok we fall back to resolving paths on demand
} else {
throw e;
}
}
return [];
};
const getPageProps = async ({ params }: { params: Record<string, string | string[]> }) => {
if (typeof params?.slug !== "string") {
notFound();
}
const appMeta = await getAppWithMetadata({
slug: params?.slug,
});
const appFromDb = await prisma.app.findUnique({
where: { slug: params.slug.toLowerCase() },
});
const isAppAvailableInFileSystem = appMeta;
const isAppDisabled = isAppAvailableInFileSystem && (!appFromDb || !appFromDb.enabled);
if (!IS_PRODUCTION && isAppDisabled) {
return {
isAppDisabled: true as const,
data: {
...appMeta,
},
};
}
if (!appFromDb || !appMeta || isAppDisabled) {
notFound();
}
const isTemplate = appMeta.isTemplate;
const appDirname = path.join(isTemplate ? "templates" : "", appFromDb.dirName);
const README_PATH = path.join(process.cwd(), "..", "..", `packages/app-store/${appDirname}/DESCRIPTION.md`);
const postFilePath = path.join(README_PATH);
let source = "";
try {
source = fs.readFileSync(postFilePath).toString();
source = source.replace(/{DESCRIPTION}/g, appMeta.description);
} catch (error) {
/* If the app doesn't have a README we fallback to the package description */
console.log(`No DESCRIPTION.md provided for: ${appDirname}`);
source = appMeta.description;
}
const result = matter(source);
const { content, data } = sourceSchema.parse({ content: result.content, data: result.data });
if (data.items) {
data.items = data.items.map((item) => {
if (typeof item === "string") {
return getAppAssetFullPath(item, {
dirName: appMeta.dirName,
isTemplate: appMeta.isTemplate,
});
}
return item;
});
}
return {
isAppDisabled: false as const,
source: { content, data },
data: appMeta,
};
};
export default async function Page({ params }: { params: Record<string, string | string[]> }) {
const pageProps = await getPageProps({ params });
return <AppPage {...pageProps} />;
}
export const dynamic = "force-static";

View File

@ -0,0 +1,36 @@
import SetupPage from "@pages/apps/[slug]/setup";
import { _generateMetadata } from "app/_utils";
import type { GetServerSidePropsContext } from "next";
import { cookies, headers } from "next/headers";
import { notFound, redirect } from "next/navigation";
import { getServerSideProps } from "@calcom/app-store/_pages/setup/_getServerSideProps";
import { APP_NAME } from "@calcom/lib/constants";
export const generateMetadata = async ({ params }: { params: Record<string, string | string[]> }) => {
return await _generateMetadata(
() => `${params.slug} | ${APP_NAME}`,
() => ""
);
};
const getPageProps = async ({ params }: { params: Record<string, string | string[]> }) => {
const req = { headers: headers(), cookies: cookies() };
const result = await getServerSideProps({ params, req } as unknown as GetServerSidePropsContext);
if (!result || "notFound" in result) {
notFound();
}
if ("redirect" in result) {
redirect(result.redirect.destination);
}
return result.props;
};
export default async function Page({ params }: { params: Record<string, string | string[]> }) {
const pageProps = await getPageProps({ params });
return <SetupPage {...pageProps} />;
}

View File

@ -0,0 +1,71 @@
import CategoryPage from "@pages/apps/categories/[category]";
import { Prisma } from "@prisma/client";
import { _generateMetadata } from "app/_utils";
import { WithLayout } from "app/layoutHOC";
import { notFound } from "next/navigation";
import z from "zod";
import { getAppRegistry } from "@calcom/app-store/_appRegistry";
import { APP_NAME } from "@calcom/lib/constants";
import prisma from "@calcom/prisma";
import { AppCategories } from "@calcom/prisma/enums";
export const generateMetadata = async () => {
return await _generateMetadata(
() => `${APP_NAME} | ${APP_NAME}`,
() => ""
);
};
export const generateStaticParams = async () => {
const paths = Object.keys(AppCategories);
try {
await prisma.$queryRaw`SELECT 1`;
} catch (e: unknown) {
if (e instanceof Prisma.PrismaClientInitializationError) {
// Database is not available at build time. Make sure we fall back to building these pages on demand
return [];
} else {
throw e;
}
}
return paths.map((category) => ({ category }));
};
const querySchema = z.object({
category: z.nativeEnum(AppCategories),
});
const getPageProps = async ({ params }: { params: Record<string, string | string[]> }) => {
const p = querySchema.safeParse(params);
if (!p.success) {
return notFound();
}
const appQuery = await prisma.app.findMany({
where: {
categories: {
has: p.data.category,
},
},
select: {
slug: true,
},
});
const dbAppsSlugs = appQuery.map((category) => category.slug);
const appStore = await getAppRegistry();
const apps = appStore.filter((app) => dbAppsSlugs.includes(app.slug));
return {
apps,
};
};
// @ts-expect-error getData arg
export default WithLayout({ getData: getPageProps, Page: CategoryPage })<"P">;
export const dynamic = "force-static";

View File

@ -0,0 +1,44 @@
import LegacyPage from "@pages/apps/categories/index";
import { _generateMetadata } from "app/_utils";
import { WithLayout } from "app/layoutHOC";
import type { GetServerSidePropsContext } from "next";
import { getAppRegistry, getAppRegistryWithCredentials } from "@calcom/app-store/_appRegistry";
import { getServerSession } from "@calcom/features/auth/lib/getServerSession";
import { APP_NAME } from "@calcom/lib/constants";
import { ssrInit } from "@server/lib/ssr";
export const generateMetadata = async () => {
return await _generateMetadata(
() => `Categories | ${APP_NAME}`,
() => ""
);
};
const getData = async (ctx: GetServerSidePropsContext) => {
const ssr = await ssrInit(ctx);
const session = await getServerSession({ req: ctx.req });
let appStore;
if (session?.user?.id) {
appStore = await getAppRegistryWithCredentials(session.user.id);
} else {
appStore = await getAppRegistry();
}
const categories = appStore.reduce((c, app) => {
for (const category of app.categories) {
c[category] = c[category] ? c[category] + 1 : 1;
}
return c;
}, {} as Record<string, number>);
return {
categories: Object.entries(categories).map(([name, count]) => ({ name, count })),
dehydratedState: ssr.dehydrate(),
};
};
export default WithLayout({ getData, Page: LegacyPage, getLayout: null })<"P">;

View File

@ -0,0 +1,3 @@
import { WithLayout } from "app/layoutHOC";
export default WithLayout({ getLayout: null })<"L">;

View File

@ -0,0 +1,36 @@
import LegacyPage from "@pages/apps/installed/[category]";
import { _generateMetadata } from "app/_utils";
import { notFound } from "next/navigation";
import { z } from "zod";
import { APP_NAME } from "@calcom/lib/constants";
import { AppCategories } from "@calcom/prisma/enums";
const querySchema = z.object({
category: z.nativeEnum(AppCategories),
});
export const generateMetadata = async () => {
return await _generateMetadata(
(t) => `${t("installed_apps")} | ${APP_NAME}`,
(t) => t("manage_your_connected_apps")
);
};
const getPageProps = async ({ params }: { params: Record<string, string | string[]> }) => {
const p = querySchema.safeParse(params);
if (!p.success) {
return notFound();
}
return {
category: p.data.category,
};
};
export default async function Page({ params }: { params: Record<string, string | string[]> }) {
await getPageProps({ params });
return <LegacyPage />;
}

View File

@ -0,0 +1,63 @@
import AppsPage from "@pages/apps";
import { _generateMetadata } from "app/_utils";
import { WithLayout } from "app/layoutHOC";
import type { GetServerSidePropsContext } from "next";
import { getAppRegistry, getAppRegistryWithCredentials } from "@calcom/app-store/_appRegistry";
import { getLayout } from "@calcom/features/MainLayoutAppDir";
import { getServerSession } from "@calcom/features/auth/lib/getServerSession";
import type { UserAdminTeams } from "@calcom/features/ee/teams/lib/getUserAdminTeams";
import getUserAdminTeams from "@calcom/features/ee/teams/lib/getUserAdminTeams";
import { APP_NAME } from "@calcom/lib/constants";
import type { AppCategories } from "@calcom/prisma/enums";
import { ssrInit } from "@server/lib/ssr";
export const generateMetadata = async () => {
return await _generateMetadata(
() => `Apps | ${APP_NAME}`,
() => ""
);
};
const getData = async (ctx: GetServerSidePropsContext) => {
const ssr = await ssrInit(ctx);
const session = await getServerSession({ req: ctx.req });
let appStore, userAdminTeams: UserAdminTeams;
if (session?.user?.id) {
userAdminTeams = await getUserAdminTeams({ userId: session.user.id, getUserInfo: true });
appStore = await getAppRegistryWithCredentials(session.user.id, userAdminTeams);
} else {
appStore = await getAppRegistry();
userAdminTeams = [];
}
const categoryQuery = appStore.map(({ categories }) => ({
categories: categories || [],
}));
const categories = categoryQuery.reduce((c, app) => {
for (const category of app.categories) {
c[category] = c[category] ? c[category] + 1 : 1;
}
return c;
}, {} as Record<string, number>);
return {
categories: Object.entries(categories)
.map(([name, count]): { name: AppCategories; count: number } => ({
name: name as AppCategories,
count,
}))
.sort(function (a, b) {
return b.count - a.count;
}),
appStore,
userAdminTeams,
dehydratedState: ssr.dehydrate(),
};
};
export default WithLayout({ getLayout, getData, Page: AppsPage });

View File

@ -0,0 +1,10 @@
import OldPage from "@pages/booking/[uid]";
import withEmbedSsrAppDir from "app/WithEmbedSSR";
import { WithLayout } from "app/layoutHOC";
import { getData } from "../page";
const getEmbedData = withEmbedSsrAppDir(getData);
// @ts-expect-error Type '(context: GetServerSidePropsContext) => Promise<any>' is not assignable to type '(arg: {
export default WithLayout({ getLayout: null, getData: getEmbedData, Page: OldPage });

View File

@ -0,0 +1,204 @@
import OldPage from "@pages/booking/[uid]";
import { _generateMetadata } from "app/_utils";
import { WithLayout } from "app/layoutHOC";
import type { GetServerSidePropsContext } from "next";
import { notFound } from "next/navigation";
import { z } from "zod";
import { getServerSession } from "@calcom/features/auth/lib/getServerSession";
import { getBookingWithResponses } from "@calcom/features/bookings/lib/get-booking";
import { parseRecurringEvent } from "@calcom/lib";
import { getDefaultEvent } from "@calcom/lib/defaultEvents";
import { maybeGetBookingUidFromSeat } from "@calcom/lib/server/maybeGetBookingUidFromSeat";
import prisma from "@calcom/prisma";
import { customInputSchema, EventTypeMetaDataSchema } from "@calcom/prisma/zod-utils";
import { getRecurringBookings, handleSeatsEventTypeOnBooking, getEventTypesFromDB } from "@lib/booking";
import { ssrInit } from "@server/lib/ssr";
const stringToBoolean = z
.string()
.optional()
.transform((val) => val === "true");
const querySchema = z.object({
uid: z.string(),
email: z.string().optional(),
eventTypeSlug: z.string().optional(),
cancel: stringToBoolean,
allRemainingBookings: stringToBoolean,
changes: stringToBoolean,
reschedule: stringToBoolean,
isSuccessBookingPage: stringToBoolean,
formerTime: z.string().optional(),
seatReferenceUid: z.string().optional(),
});
export const generateMetadata = async () =>
await _generateMetadata(
() => "",
() => ""
);
export const getData = async (context: GetServerSidePropsContext) => {
const ssr = await ssrInit(context);
const session = await getServerSession(context);
let tz: string | null = null;
let userTimeFormat: number | null = null;
let requiresLoginToUpdate = false;
if (session) {
const user = await ssr.viewer.me.fetch();
tz = user.timeZone;
userTimeFormat = user.timeFormat;
}
const parsedQuery = querySchema.safeParse(context.query);
if (!parsedQuery.success) {
notFound();
}
const { uid, eventTypeSlug, seatReferenceUid } = parsedQuery.data;
const { uid: maybeUid } = await maybeGetBookingUidFromSeat(prisma, uid);
const bookingInfoRaw = await prisma.booking.findFirst({
where: {
uid: maybeUid,
},
select: {
title: true,
id: true,
uid: true,
description: true,
customInputs: true,
smsReminderNumber: true,
recurringEventId: true,
startTime: true,
endTime: true,
location: true,
status: true,
metadata: true,
cancellationReason: true,
responses: true,
rejectionReason: true,
user: {
select: {
id: true,
name: true,
email: true,
username: true,
timeZone: true,
},
},
attendees: {
select: {
name: true,
email: true,
timeZone: true,
},
},
eventTypeId: true,
eventType: {
select: {
eventName: true,
slug: true,
timeZone: true,
},
},
seatsReferences: {
select: {
referenceUid: true,
},
},
},
});
if (!bookingInfoRaw) {
notFound();
}
const eventTypeRaw = !bookingInfoRaw.eventTypeId
? getDefaultEvent(eventTypeSlug || "")
: await getEventTypesFromDB(bookingInfoRaw.eventTypeId);
if (!eventTypeRaw) {
notFound();
}
if (eventTypeRaw.seatsPerTimeSlot && !seatReferenceUid && !session) {
requiresLoginToUpdate = true;
}
const bookingInfo = getBookingWithResponses(bookingInfoRaw);
// @NOTE: had to do this because Server side cant return [Object objects]
// probably fixable with json.stringify -> json.parse
bookingInfo["startTime"] = (bookingInfo?.startTime as Date)?.toISOString() as unknown as Date;
bookingInfo["endTime"] = (bookingInfo?.endTime as Date)?.toISOString() as unknown as Date;
eventTypeRaw.users = !!eventTypeRaw.hosts?.length
? eventTypeRaw.hosts.map((host) => host.user)
: eventTypeRaw.users;
if (!eventTypeRaw.users.length) {
if (!eventTypeRaw.owner) {
notFound();
}
eventTypeRaw.users.push({
...eventTypeRaw.owner,
});
}
const eventType = {
...eventTypeRaw,
periodStartDate: eventTypeRaw.periodStartDate?.toString() ?? null,
periodEndDate: eventTypeRaw.periodEndDate?.toString() ?? null,
metadata: EventTypeMetaDataSchema.parse(eventTypeRaw.metadata),
recurringEvent: parseRecurringEvent(eventTypeRaw.recurringEvent),
customInputs: customInputSchema.array().parse(eventTypeRaw.customInputs),
};
const profile = {
name: eventType.team?.name || eventType.users[0]?.name || null,
email: eventType.team ? null : eventType.users[0].email || null,
theme: (!eventType.team?.name && eventType.users[0]?.theme) || null,
brandColor: eventType.team ? null : eventType.users[0].brandColor || null,
darkBrandColor: eventType.team ? null : eventType.users[0].darkBrandColor || null,
slug: eventType.team?.slug || eventType.users[0]?.username || null,
};
if (bookingInfo !== null && eventType.seatsPerTimeSlot) {
await handleSeatsEventTypeOnBooking(eventType, bookingInfo, seatReferenceUid, session?.user.id);
}
const payment = await prisma.payment.findFirst({
where: {
bookingId: bookingInfo.id,
},
select: {
success: true,
refunded: true,
currency: true,
amount: true,
paymentOption: true,
},
});
return {
themeBasis: eventType.team ? eventType.team.slug : eventType.users[0]?.username,
hideBranding: eventType.team ? eventType.team.hideBranding : eventType.users[0].hideBranding,
profile,
eventType,
recurringBookings: await getRecurringBookings(bookingInfo.recurringEventId),
dehydratedState: ssr.dehydrate(),
dynamicEventName: bookingInfo?.eventType?.eventName || "",
bookingInfo,
paymentStatus: payment,
...(tz && { tz }),
userTimeFormat,
requiresLoginToUpdate,
};
};
// @ts-expect-error Argument of type '{ req: { headers: ReadonlyHeaders; cookies: ReadonlyRequestCookies; }; }' is not assignable to parameter of type 'GetServerSidePropsContext'.
export default WithLayout({ getLayout: null, getData, Page: OldPage });

View File

@ -0,0 +1,45 @@
import { _generateMetadata } from "app/_utils";
import { WithLayout } from "app/layoutHOC";
import type { GetServerSidePropsContext } from "next";
import { notFound } from "next/navigation";
import { z } from "zod";
import { getLayout } from "@calcom/features/MainLayoutAppDir";
import { APP_NAME } from "@calcom/lib/constants";
import { ssgInit } from "@server/lib/ssg";
const validStatuses = ["upcoming", "recurring", "past", "cancelled", "unconfirmed"] as const;
const querySchema = z.object({
status: z.enum(validStatuses),
});
export const generateMetadata = async () =>
await _generateMetadata(
(t) => `${APP_NAME} | ${t("bookings")}`,
() => ""
);
export const generateStaticParams = async () => {
return validStatuses.map((status) => ({ status }));
};
const getData = async (ctx: GetServerSidePropsContext) => {
const parsedParams = querySchema.safeParse(ctx.params);
if (!parsedParams.success) {
notFound();
}
const ssg = await ssgInit(ctx);
return {
status: parsedParams.data.status,
dehydratedState: ssg.dehydrate(),
};
};
export default WithLayout({ getLayout, getData })<"L">;
export const dynamic = "force-static";

View File

@ -0,0 +1 @@
export { default } from "@pages/bookings/[status]";

View File

@ -0,0 +1,132 @@
import LegacyPage, { type PageProps } from "@pages/d/[link]/[slug]";
import { withAppDir } from "app/AppDirSSRHOC";
import { _generateMetadata } from "app/_utils";
import { WithLayout } from "app/layoutHOC";
import type { GetServerSidePropsContext } from "next";
import { cookies, headers } from "next/headers";
import { notFound } from "next/navigation";
import { z } from "zod";
import { getServerSession } from "@calcom/features/auth/lib/getServerSession";
import { getBookingForReschedule, getMultipleDurationValue } from "@calcom/features/bookings/lib/get-booking";
import type { GetBookingType } from "@calcom/features/bookings/lib/get-booking";
import { orgDomainConfig } from "@calcom/features/ee/organizations/lib/orgDomains";
import slugify from "@calcom/lib/slugify";
import prisma from "@calcom/prisma";
import { buildLegacyCtx } from "@lib/buildLegacyCtx";
import { ssrInit } from "@server/lib/ssr";
export const generateMetadata = async ({ params }: { params: Record<string, string | string[]> }) => {
const pageProps = await getPageProps(
buildLegacyCtx(headers(), cookies(), params) as unknown as GetServerSidePropsContext
);
const { entity, booking, user, slug, isTeamEvent } = pageProps;
const rescheduleUid = booking?.uid;
const { trpc } = await import("@calcom/trpc");
const { data: event } = trpc.viewer.public.event.useQuery(
{ username: user ?? "", eventSlug: slug ?? "", isTeamEvent, org: entity.orgSlug ?? null },
{ refetchOnWindowFocus: false }
);
const profileName = event?.profile?.name ?? "";
const title = event?.title ?? "";
return await _generateMetadata(
(t) => `${rescheduleUid && !!booking ? t("reschedule") : ""} ${title} | ${profileName}`,
(t) => `${rescheduleUid ? t("reschedule") : ""} ${title}`
);
};
async function getPageProps(context: GetServerSidePropsContext) {
const session = await getServerSession({ req: context.req });
const { link, slug } = paramsSchema.parse(context.params);
const { rescheduleUid, duration: queryDuration } = context.query;
const { currentOrgDomain, isValidOrgDomain } = orgDomainConfig(context.req);
const org = isValidOrgDomain ? currentOrgDomain : null;
const hashedLink = await prisma.hashedLink.findUnique({
where: {
link,
},
select: {
eventTypeId: true,
eventType: {
select: {
users: {
select: {
username: true,
},
},
team: {
select: {
id: true,
},
},
},
},
},
});
const username = hashedLink?.eventType.users[0]?.username;
if (!hashedLink || !username) {
return notFound();
}
const user = await prisma.user.findFirst({
where: {
username,
organization: isValidOrgDomain
? {
slug: currentOrgDomain,
}
: null,
},
select: {
away: true,
hideBranding: true,
},
});
if (!user) {
return notFound();
}
let booking: GetBookingType | null = null;
if (rescheduleUid) {
booking = await getBookingForReschedule(`${rescheduleUid}`, session?.user?.id);
}
const isTeamEvent = !!hashedLink.eventType?.team?.id;
const ssr = await ssrInit(context);
// We use this to both prefetch the query on the server,
// as well as to check if the event exist, so we c an show a 404 otherwise.
const eventData = await ssr.viewer.public.event.fetch({ username, eventSlug: slug, isTeamEvent, org });
if (!eventData) {
return notFound();
}
return {
entity: eventData.entity,
duration: getMultipleDurationValue(eventData.metadata?.multipleDuration, queryDuration, eventData.length),
booking,
away: user?.away,
user: username,
slug,
dehydratedState: ssr.dehydrate(),
isBrandingHidden: user?.hideBranding,
// Sending the team event from the server, because this template file
// is reused for both team and user events.
isTeamEvent,
hashedLink: link,
};
}
const paramsSchema = z.object({ link: z.string(), slug: z.string().transform((s) => slugify(s)) });
// @ts-expect-error arg
const getData = withAppDir<PageProps>(getPageProps);
export default WithLayout({ getLayout: null, Page: LegacyPage, getData })<"P">;

View File

@ -0,0 +1,5 @@
import { WithLayout } from "app/layoutHOC";
import { getLayout } from "@calcom/features/MainLayoutAppDir";
export default WithLayout({ getLayout })<"L">;

View File

@ -0,0 +1,11 @@
import { _generateMetadata } from "app/_utils";
import EnterprisePage from "@components/EnterprisePage";
export const generateMetadata = async () =>
await _generateMetadata(
(t) => t("create_your_org"),
(t) => t("create_your_org_description")
);
export default EnterprisePage;

View File

@ -0,0 +1,5 @@
import { WithLayout } from "app/layoutHOC";
import { getLayout } from "@calcom/features/MainLayoutAppDir";
export default WithLayout({ getLayout })<"L">;

View File

@ -0,0 +1,57 @@
import LegacyPage from "@pages/getting-started/[[...step]]";
import { WithLayout } from "app/layoutHOC";
import { type GetServerSidePropsContext } from "next";
import { redirect } from "next/navigation";
import { getServerSession } from "@calcom/features/auth/lib/getServerSession";
import prisma from "@calcom/prisma";
import { ssrInit } from "@server/lib/ssr";
const getData = async (ctx: GetServerSidePropsContext) => {
const session = await getServerSession({ req: ctx.req });
if (!session?.user?.id) {
return redirect("/auth/login");
}
const ssr = await ssrInit(ctx);
await ssr.viewer.me.prefetch();
const user = await prisma.user.findUnique({
where: {
id: session.user.id,
},
select: {
completedOnboarding: true,
teams: {
select: {
accepted: true,
team: {
select: {
id: true,
name: true,
logo: true,
},
},
},
},
},
});
if (!user) {
throw new Error("User from session not found");
}
if (user.completedOnboarding) {
redirect("/event-types");
}
return {
dehydratedState: ssr.dehydrate(),
hasPendingInvites: user.teams.find((team) => team.accepted === false) ?? false,
requiresLicense: false,
themeBasis: null,
};
};
export default WithLayout({ getLayout: null, getData, Page: LegacyPage });

View File

@ -0,0 +1,26 @@
import LegacyPage from "@pages/insights/index";
import { _generateMetadata } from "app/_utils";
import { WithLayout } from "app/layoutHOC";
import { notFound } from "next/navigation";
import { getLayout } from "@calcom/features/MainLayoutAppDir";
import { getFeatureFlagMap } from "@calcom/features/flags/server/utils";
export const generateMetadata = async () =>
await _generateMetadata(
() => "Insights",
(t) => t("insights_subtitle")
);
async function getData() {
const prisma = await import("@calcom/prisma").then((mod) => mod.default);
const flags = await getFeatureFlagMap(prisma);
if (flags.insights === false) {
return notFound();
}
return {};
}
export default WithLayout({ getLayout, getData, Page: LegacyPage });

View File

@ -0,0 +1,13 @@
import LegacyPage from "@pages/maintenance";
import { _generateMetadata } from "app/_utils";
import { WithLayout } from "app/layoutHOC";
import { APP_NAME } from "@calcom/lib/constants";
export const generateMetadata = async () =>
await _generateMetadata(
(t) => `${t("under_maintenance")} | ${APP_NAME}`,
(t) => t("under_maintenance_description", { appName: APP_NAME })
);
export default WithLayout({ getLayout: null, Page: LegacyPage })<"P">;

View File

@ -0,0 +1,4 @@
import Page from "@pages/more";
import { WithLayout } from "app/layoutHOC";
export default WithLayout({ getLayout: null, Page })<"P">;

View File

@ -0,0 +1,167 @@
import { _generateMetadata } from "app/_utils";
import { WithLayout } from "app/layoutHOC";
import { type GetServerSidePropsContext } from "next";
import { redirect, notFound } from "next/navigation";
import { z } from "zod";
import { getServerSession } from "@calcom/features/auth/lib/getServerSession";
import PaymentPage from "@calcom/features/ee/payments/components/PaymentPage";
import { getClientSecretFromPayment } from "@calcom/features/ee/payments/pages/getClientSecretFromPayment";
import { APP_NAME } from "@calcom/lib/constants";
import prisma from "@calcom/prisma";
import { BookingStatus } from "@calcom/prisma/enums";
import { EventTypeMetaDataSchema } from "@calcom/prisma/zod-utils";
import { ssrInit } from "@server/lib/ssr";
export const generateMetadata = async () =>
await _generateMetadata(
// the title does not contain the eventName as in the legacy page
(t) => `${t("payment")} | ${APP_NAME}`,
() => ""
);
const querySchema = z.object({
uid: z.string(),
});
async function getData(context: GetServerSidePropsContext) {
const session = await getServerSession({ req: context.req });
if (!session?.user?.id) {
return redirect("/auth/login");
}
const ssr = await ssrInit(context);
await ssr.viewer.me.prefetch();
const { uid } = querySchema.parse(context.params);
const rawPayment = await prisma.payment.findFirst({
where: {
uid,
},
select: {
data: true,
success: true,
uid: true,
refunded: true,
bookingId: true,
appId: true,
amount: true,
currency: true,
paymentOption: true,
booking: {
select: {
id: true,
uid: true,
description: true,
title: true,
startTime: true,
endTime: true,
attendees: {
select: {
email: true,
name: true,
},
},
eventTypeId: true,
location: true,
status: true,
rejectionReason: true,
cancellationReason: true,
eventType: {
select: {
id: true,
title: true,
description: true,
length: true,
eventName: true,
requiresConfirmation: true,
userId: true,
metadata: true,
users: {
select: {
name: true,
username: true,
hideBranding: true,
theme: true,
},
},
team: {
select: {
name: true,
hideBranding: true,
},
},
price: true,
currency: true,
successRedirectUrl: true,
},
},
},
},
},
});
if (!rawPayment) {
return notFound();
}
const { data, booking: _booking, ...restPayment } = rawPayment;
const payment = {
...restPayment,
data: data as Record<string, unknown>,
};
if (!_booking) {
return notFound();
}
const { startTime, endTime, eventType, ...restBooking } = _booking;
const booking = {
...restBooking,
startTime: startTime.toString(),
endTime: endTime.toString(),
};
if (!eventType) {
return notFound();
}
if (eventType.users.length === 0 && !!!eventType.team) {
return notFound();
}
const [user] = eventType?.users.length
? eventType.users
: [{ name: null, theme: null, hideBranding: null, username: null }];
const profile = {
name: eventType.team?.name || user?.name || null,
theme: (!eventType.team?.name && user?.theme) || null,
hideBranding: eventType.team?.hideBranding || user?.hideBranding || null,
};
if (
([BookingStatus.CANCELLED, BookingStatus.REJECTED] as BookingStatus[]).includes(
booking.status as BookingStatus
)
) {
return redirect(`/booking/${booking.uid}`);
}
return {
user,
eventType: {
...eventType,
metadata: EventTypeMetaDataSchema.parse(eventType.metadata),
},
booking,
dehydratedState: ssr.dehydrate(),
payment,
clientSecret: getClientSecretFromPayment(payment),
profile,
};
}
export default WithLayout({ getLayout: null, getData, Page: PaymentPage });

View File

@ -0,0 +1,21 @@
import { getServerSideProps } from "@pages/reschedule/[uid]";
import { withAppDir } from "app/AppDirSSRHOC";
import type { Params } from "next/dist/shared/lib/router/utils/route-matcher";
import { cookies, headers } from "next/headers";
import { buildLegacyCtx } from "@lib/buildLegacyCtx";
import withEmbedSsr from "@lib/withEmbedSsr";
type PageProps = Readonly<{
params: Params;
}>;
const Page = async ({ params }: PageProps) => {
const legacyCtx = buildLegacyCtx(headers(), cookies(), params);
// @ts-expect-error Argument of type '{ query: Params; params: Params; req: { headers: ReadonlyHeaders; cookies: ReadonlyRequestCookies; }; }'
await withAppDir(withEmbedSsr(getServerSideProps))(legacyCtx);
return null;
};
export default Page;

View File

@ -0,0 +1,30 @@
import OldPage, { getServerSideProps as _getServerSideProps } from "@pages/reschedule/[uid]";
import { withAppDir } from "app/AppDirSSRHOC";
import { _generateMetadata } from "app/_utils";
import type { Params } from "next/dist/shared/lib/router/utils/route-matcher";
import { headers, cookies } from "next/headers";
import { buildLegacyCtx } from "@lib/buildLegacyCtx";
export const generateMetadata = async () =>
await _generateMetadata(
() => "",
() => ""
);
type PageProps = Readonly<{
params: Params;
}>;
const getData = withAppDir(_getServerSideProps);
const Page = async ({ params }: PageProps) => {
const legacyCtx = buildLegacyCtx(headers(), cookies(), params);
// @ts-expect-error Argument of type '{ query: Params; params: Params; req: { headers: ReadonlyHeaders; cookies: ReadonlyRequestCookies; }; }'
await getData(legacyCtx);
return <OldPage />;
};
export default Page;

View File

@ -0,0 +1,5 @@
import { WithLayout } from "app/layoutHOC";
import { getLayout } from "@components/auth/layouts/AdminLayoutAppDir";
export default WithLayout({ getLayout })<"L">;

View File

@ -0,0 +1,5 @@
import { WithLayout } from "app/layoutHOC";
import { getLayout } from "@components/auth/layouts/AdminLayoutAppDir";
export default WithLayout({ getLayout })<"L">;

View File

@ -0,0 +1,5 @@
import { WithLayout } from "app/layoutHOC";
import { getLayout } from "@components/auth/layouts/AdminLayoutAppDir";
export default WithLayout({ getLayout })<"L">;

View File

@ -0,0 +1,3 @@
import { WithLayout } from "app/layoutHOC";
export default WithLayout({ getLayout: null })<"L">;

View File

@ -0,0 +1,13 @@
import LegacyPage from "@pages/settings/admin/oAuth/index";
import { _generateMetadata } from "app/_utils";
import { WithLayout } from "app/layoutHOC";
import { getLayout } from "@components/auth/layouts/AdminLayoutAppDir";
export const generateMetadata = async () =>
await _generateMetadata(
() => "OAuth",
() => "Add new OAuth Clients"
);
export default WithLayout({ getLayout, Page: LegacyPage })<"P">;

View File

@ -0,0 +1,5 @@
import { WithLayout } from "app/layoutHOC";
import { getLayout } from "@calcom/features/settings/layouts/SettingsLayoutAppDir";
export default WithLayout({ getLayout })<"L">;

View File

@ -0,0 +1,13 @@
import LegacyPage from "@pages/settings/admin/index";
import { _generateMetadata } from "app/_utils";
import { WithLayout } from "app/layoutHOC";
import { getLayout } from "@components/auth/layouts/AdminLayoutAppDir";
export const generateMetadata = async () =>
await _generateMetadata(
() => "Admin",
() => "admin_description"
);
export default WithLayout({ getLayout, Page: LegacyPage })<"P">;

View File

@ -0,0 +1,5 @@
import { WithLayout } from "app/layoutHOC";
import { getLayout } from "@calcom/features/settings/layouts/SettingsLayoutAppDir";
export default WithLayout({ getLayout })<"L">;

View File

@ -0,0 +1,5 @@
import { WithLayout } from "app/layoutHOC";
import { getLayout } from "@calcom/features/settings/layouts/SettingsLayoutAppDir";
export default WithLayout({ getLayout });

View File

@ -0,0 +1,10 @@
import Page from "@pages/settings/my-account/appearance";
import { _generateMetadata } from "app/_utils";
export const generateMetadata = async () =>
await _generateMetadata(
(t) => t("appearance"),
(t) => t("appearance_description")
);
export default Page;

Some files were not shown because too many files have changed in this diff Show More