* app initialization
* btcpay-calcom payment
* include logo and images
* resolve comments
* include USD and webhook cleaning
* currency display
* fix type error
* payment service create error
* type error fix
* icon update
* bot feedback update
* Remove console
* Remove currency suffix in price
* fix coderRabbit comment
* resolve extra comments
* Use repositories and declarative installation ocode for app
* use PrismaBookingPaymentRepository as well as fix UI view
* Avoid fetching booking just for title which is already passed to create fn in handlePayment
* fix type issues
* return 200 if payment is already processed
---------
Co-authored-by: Anik Dhabal Babu <81948346+anikdhabal@users.noreply.github.com>
Co-authored-by: Hariom Balhara <hariombalhara@gmail.com>
Co-authored-by: Omar López <zomars@me.com>
* Middleware only logic to add CSP header as Next.js App Router doesnt allow setting header in server component
* add tests
* Remove nonce from Page Router and fix ts issues
* Add checkly test
* chore: DI available slots service repositories
* remove configService from worker module
* register scheduleRepo in availableSlotsModule
* chore: bump platform libs
* remove useless comment from prisma module
* fix: availableSlotsModule to class deps
* fix: repositoriesModule deps
* chore: container pattern
* refactor: move modules in DI folder
* fixup! refactor: move modules in DI folder
* refactor: GetAvailableSlotsService
* chore: add todo comments where DI is needed
* chore: bump platform libs
* chore: fix unit tests
* fix: only instantiate AvailableSlotsService once per service
* Update packages/trpc/server/routers/viewer/slots/util.ts
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
* fix: bind this on all functions with reporting
---------
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
* fix: status code or router embed rate limiting
* fix: type err
* fix: handle api v2
* fix: status code
* chore: remove unused
* chore: update unit test
* chore: unit test
* refactor: make res required
* chore: remove unused
* chore: add a wrapper in getserversideprops
* chore: remlove log
* Add ratelLimiting unit test
---------
Co-authored-by: Hariom <hariombalhara@gmail.com>
* fix creating user balance
* fix org check if teamId is given
* adjust hasAvailableCredits function
* improve comments
* fix creditBalance.create
* adjust test
---------
Co-authored-by: CarinaWolli <wollencarina@gmail.com>
* add smsSegments to creditExpenseLog
* add download button
* download only data from selected month
* improvements
* improve design
* use repository function
* add tests for credit repository
* fix type error
* fix unit test
* fix type error
* fix unit test
* code clean up
* fix skeleton loader
* remove empty mt
* code clean up
* move csv headers out of function
---------
Co-authored-by: CarinaWolli <wollencarina@gmail.com>
Co-authored-by: Benny Joo <sldisek783@gmail.com>
* move away from merging twice
* move to use loggedIn Router directly
* fix router outputs types
* fix mocks in create button with teasm tests
---------
Co-authored-by: Alex van Andel <me@alexvanandel.com>
* charge free users for SMS to CA an US
* allow custom template for free users
* fix backend + some UI fixes
* make text editable
* rename back to needsTeamsUpgrade
* add twilio webhook handler tests
---------
Co-authored-by: CarinaWolli <wollencarina@gmail.com>
2025-05-22 19:09:49 +01:00
sean-brydonGitHubDevin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
* inital pbac setup
* fix tests
* docs intro
* more docs
* add comments in docs
* revert pr_todo
* update to use action + custom as defaults
* use enums
* move to change user role + multi check
* add beforeEach import
* docs: add PERMISSIONS.md documenting team/organization role usages
Co-Authored-By: sean@cal.com <sean@cal.com>
* docs: add permission string alternatives for helper functions
Co-Authored-By: sean@cal.com <sean@cal.com>
* feat: enhance permission registry and default role permissions
Co-Authored-By: sean@cal.com <sean@cal.com>
* add routers
* add hooks + rsc. Also adjsuted test to use prismock
* make hooks type safe + add some tests
* add a permission context - trpc router to populate context
* update docs
* explore global and default roles member,admin,owner
* fix tests
* use kysley and abstract uril
* tidy up
* update trpc to use pbac route in endpoint + distinct on teamId
* make transform util
* remove role service dependancy from permission check class
* checkTeamId fall back to orgId if team is parent
* todos
* remove manual migrations to launch softly
* address feedback
* move permission checks to a repo
* move role service database calls to repo. improve mocks
* update tests to have describe import
* fix types
* remove router that is not used to pass build
---------
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
* Add credits section to billing
* create seperate router for credits
* add stripe checkout session
* schema changes + code improvements
* rename to creditBalance
* custom quantify input with error message
* add checkout session completed webhook endpoint
* fix typo
* UI fixes
* add payCredits handler
* add error toast message
* allow scheduling sms up as close to 15 minutes in the future
* schedule at most 2 hours in advance
* webhook to pay for sent sms
* continued work on twilio callback
* code clean up
* further implementation for credit handling
* add migration
* object as param for scheduleSMS
* object as param for sendSMS
* fix TrpcSessionUser imports
* fix imports
* add db changes
* add cron job for price setting
* twilio status callback to create expense log
* remove unused code
* set up low credit balance email
* fixes for buying credits
* fixes in api/twilio/webhook
* add test to save credits to credits balance
* fix typos
* add new helper function chargeCredits
* expand twilioProvider
* fix type errors
* adjust tests
* type errors
* clean up
* clean up
* fix subscription active check
* remove some user/org related code
* more changes to remove user/org support
* send emails seperatly to admins
* fixes for team billing page
* fix stripe success url
* fixes to creating expense log
* email imrovements and more
* get monthly team price from stripe
* fix import
* fix monthly credits calculation
* finsih low credit balance warning email
* credit balance limit reached email
* create CreditService
* cancel SMS and send as email instead
* add messageDispatcher
* fix type error
* fix type error
* fix type error
* fix import
* fix unit test
* clean up twilioProvider
* clean up chckSmsPrices/route
* add missing translations
* add skeleton loader
* add admin check to get handler
* code clean up + fixes
* improve scheduling with fallback
* fix type error
* add bookingUid to handleSendingSMS
* add unit tests for creditService
* add more tests to credit-service.test.ts
* add test for cancelScheduledMessagesAndScheduleEmails
* fix test and type error
* add back resolve
* fix empty resolve
* adjust limitReachedAt logic
* address mrge comment on styling
* add getAdminMembership to repository
* twilio/webhook clean up (feedback)
* feedback - clean up
* remove todo comment
* clean up twilio/webhook
* code clean up
* add use client
* add createOneTimeCheckout to stripe service
* refactor repository pattern
* small fixes + clean up
* fix type error
* add missing import
* fix hasAvailableCredits for user
* force-dynamic
* rename credits to creditBalance
* fix stripe import
* remove not needed code
* fix e2e tests
* improve low balance warning email
* dynamic-import CreditService
* index.ts
* add user logic checkSmsPrices endpoint
* fix e2e tests
* remove dynamic import CreditService
* Revert "remove dynamic import CreditService"
This reverts commit e272978a7ff3fc5a04139e656c9f8d2c84a40dda.
* no need to dynamic-import credit service
* Revert "no need to dynamic-import credit service"
This reverts commit ba5ae488d08979a65fb47b5d0722cda9f45d6ea0.
* fix twilio webhook
* add userId support in checkout.session.completed
* clean up code
* only select id in getAdminMembership
* revert billing/package.json
* fix type checks
* fix type checks
* adjust hasAvailableCredits function
* fixes for checkout sessioned completed
* add UI for user
* fix type errors
* adds requires credits badge
* remove team check from update.handler
* clean up inlcude statements
* fix credit-service tests
* add tests
* fix type errors
* fix type errors
* fix and add tests
* imrove badge
* code clean up
* add reminderScheduler test
* add additional credits as title
* fixes for warningSentAt and limitReachedAt
* mock stripe
---------
Co-authored-by: CarinaWolli <wollencarina@gmail.com>
Co-authored-by: hbjORbj <sldisek783@gmail.com>
Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com>
Co-authored-by: Peer Richelsen <peeroke@gmail.com>
* Add credits section to billing
* create seperate router for credits
* add stripe checkout session
* schema changes + code improvements
* rename to creditBalance
* custom quantify input with error message
* add checkout session completed webhook endpoint
* fix typo
* UI fixes
* add payCredits handler
* add error toast message
* allow scheduling sms up as close to 15 minutes in the future
* schedule at most 2 hours in advance
* webhook to pay for sent sms
* continued work on twilio callback
* code clean up
* further implementation for credit handling
* add migration
* object as param for scheduleSMS
* object as param for sendSMS
* fix TrpcSessionUser imports
* fix imports
* add db changes
* add cron job for price setting
* twilio status callback to create expense log
* remove unused code
* set up low credit balance email
* fixes for buying credits
* fixes in api/twilio/webhook
* add test to save credits to credits balance
* fix typos
* add new helper function chargeCredits
* expand twilioProvider
* fix type errors
* adjust tests
* type errors
* clean up
* clean up
* fix subscription active check
* remove some user/org related code
* more changes to remove user/org support
* send emails seperatly to admins
* fixes for team billing page
* fix stripe success url
* fixes to creating expense log
* email imrovements and more
* get monthly team price from stripe
* fix import
* fix monthly credits calculation
* finsih low credit balance warning email
* credit balance limit reached email
* create CreditService
* cancel SMS and send as email instead
* add messageDispatcher
* fix type error
* fix type error
* fix type error
* fix import
* fix unit test
* clean up twilioProvider
* clean up chckSmsPrices/route
* add missing translations
* add skeleton loader
* add admin check to get handler
* code clean up + fixes
* improve scheduling with fallback
* fix type error
* add bookingUid to handleSendingSMS
* add unit tests for creditService
* add more tests to credit-service.test.ts
* add test for cancelScheduledMessagesAndScheduleEmails
* fix test and type error
* add back resolve
* fix empty resolve
* adjust limitReachedAt logic
* address mrge comment on styling
* add getAdminMembership to repository
* twilio/webhook clean up (feedback)
* feedback - clean up
* remove todo comment
* clean up twilio/webhook
* code clean up
* add use client
* add createOneTimeCheckout to stripe service
* refactor repository pattern
* small fixes + clean up
* fix type error
* add missing import
* fix hasAvailableCredits for user
* force-dynamic
* rename credits to creditBalance
* fix stripe import
* remove not needed code
* fix e2e tests
* improve low balance warning email
* dynamic-import CreditService
* index.ts
* fix e2e tests
* remove dynamic import CreditService
* Revert "remove dynamic import CreditService"
This reverts commit e272978a7ff3fc5a04139e656c9f8d2c84a40dda.
* no need to dynamic-import credit service
* Revert "no need to dynamic-import credit service"
This reverts commit ba5ae488d08979a65fb47b5d0722cda9f45d6ea0.
* only select id in getAdminMembership
* revert billing/package.json
* fix type checks
* fix type checks
---------
Co-authored-by: CarinaWolli <wollencarina@gmail.com>
Co-authored-by: hbjORbj <sldisek783@gmail.com>
Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com>
Co-authored-by: Peer Richelsen <peeroke@gmail.com>
* mvp done
* wip
* fix ts errors and other code improvements
* fix ts errors
* ensure mobile layout support
* Make skeleton responsive on screen resize
* refactor
* Add test for EmbedElement
* make skeleton closer to pixel perfect
* Address PR feedback
* Router-preloading
## What does this PR do?
<!-- Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change. -->
- Fixes #XXXX (GitHub issue number)
- Fixes CAL-XXXX (Linear issue number - should be visible at the bottom of the GitHub issue description)
## Visual Demo (For contributors especially)
A visual demonstration is strongly recommended, for both the original and new change **(video / image - any one)**.
#### Video Demo (if applicable):
- Show screen recordings of the issue or feature.
- Demonstrate how to reproduce the issue, the behavior before and after the change.
#### Image Demo (if applicable):
- Add side-by-side screenshots of the original and updated change.
- Highlight any significant change(s).
## Mandatory Tasks (DO NOT REMOVE)
- [ ] I have self-reviewed the code (A decent size PR without self-review might be rejected).
- [ ] I have updated the developer docs in /docs if this PR makes changes that would require a [documentation change](https://cal.com/docs). If N/A, write N/A here and check the checkbox.
- [ ] I confirm automated tests are in place that prove my fix is effective or that my feature works.
## How should this be tested?
<!-- Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration. Write details that help to start the tests -->
- Are there environment variables that should be set?
- What are the minimal test data to have?
- What is expected (happy path) to have (input and output)?
- Any other important info that could help to test that PR
## Checklist
<!-- Remove bullet points below that don't apply to you -->
- I haven't read the [contributing guide](https://github.com/calcom/cal.com/blob/main/CONTRIBUTING.md)
- My code doesn't follow the style guidelines of this project
- I haven't commented my code, particularly in hard-to-understand areas
- I haven't checked if my changes generate no new warnings
* wip\
* wip
* fix mrge.io feedback
* wip
* Add README and lifecycle
* Add README and lifecycle
* Update routing form-seed and some other fixes
* remove linkFailed fix from the branch
* self-review
* self-review-2
* self-review-3
* Handle soft connect\
* Update README and fix a bug with query parmas
* Add one more case in routing-html playground
---------
Co-authored-by: Benny Joo <sldisek783@gmail.com>
Co-authored-by: amrit <iamamrit27@gmail.com>
* perf: Slim down loggedInViewer some more
* Move locationOptions to apps router
* Moved calVideo related handlers to separate router
* Moved calendar related handlers to separate router
* Rename
* Moved deleteCredential to new router
* Moved updateProfile to me router
* fix unit test
* fix e2e test
* tweak
* missing
---------
Co-authored-by: Anik Dhabal Babu <81948346+anikdhabal@users.noreply.github.com>
Co-authored-by: unknown <adhabal2002@gmail.com>
* extract NextRequest
* update api and tests
* booking limits tests
* fix more tests to use new approach
* update more tests with new format
* extract getOrgDomainConfig to not use req
* extract req from loadNewUsers and pass in hostname/forcedSlug
* fix instant meeting types and hostname fixes
* fix handleNewBookingReq
* fix type errors in tests
* make hostName and forcedSlug optional
* fix type err
* Revert "fix type err"
This reverts commit 9d5de9019d9dafe348c97b876baaa1d0675967e5.
* wip fix e2e
* fix: add missing headers
* migrate handle recurring event and also create tests specific to fn
* platform recurringbooking
* fix type
* hard code types on request object
* bump libraries
* fixup! bump libraries
* fix: accessing host if headers not passed
* fix: v2 recurring booking
* fix: accessing host if headers not passed
* chore: bump platform libraries
* fix tests
* push
* chore: bump libraries
* push lock changes
* bump libraries
---------
Co-authored-by: amrit <iamamrit27@gmail.com>
Co-authored-by: Morgan <33722304+ThyMinimalDev@users.noreply.github.com>
Co-authored-by: Morgan Vernay <morgan@cal.com>
Co-authored-by: supalarry <laurisskraucis@gmail.com>
Co-authored-by: Lauris Skraucis <lauris.skraucis@gmail.com>
* add more methods to billingService
* update profile handler
* stripe customer handler
* verify email
* move imports + move generic methods to billing service
* move to strip ebilling service class
* push changes to mocks
* fix enum
* fix typo
* correctly update customer metadata
* fix userId type to number
* fix types on billing services
* fix type errors due to return methods differing
* fix return types
* perf: Slim down loggedInViewer tRPC router
* Fixed trpc client calls for new routes
* Moved bookingUnconfirmedCount
* Moved getUserTopBanners to me router
* Moved shouldVerifyEmail to me router
* Moved i18n from public to its own router
* fix ssrInit
* fix ssrInit usage
* fix type check
* better naming
* fix
* fix
* Fix types
* Removed used of importHandler
---------
Co-authored-by: hbjORbj <sldisek783@gmail.com>
* version and verify-booking-token
* username route
* api/me
* logo route
* render email in dev
* link route
* future
* nope and geo location
* referal link and daily
* intercom route and dynamic variables
* intercom route and dynamic variables
* scim 2.0 and helpscout route
* app credentials
* api/book events
* fix daily import path in tests
* fix buildLegacyRequest generation
* fix type errors
* migrate the /teams/ routes
* move cron jobs
* fix daily import path in tests
* fix buildLegacyRequest generation
* fix type errors
* migrate the /teams/ routes
* move cron jobs
* Revert "api/book events"
This reverts commit 607a32fb5b754cad090c2d0cbf64a68f990e220e.
* mock next server NextResponse to fix daily video
* add default responder to teams api
* fix search params
* uses nextUrl.searchParams instead of new url
* uses nextUrl.searchParams instead of new url
* remove outdated api config
* remove app dir version of inbound dynamic variables
* restore pages version of inbound variables
* fix missing code from stupid cursor
---------
Co-authored-by: Benny Joo <sldisek783@gmail.com>
* Revert "Revert "chore: rename DWD to DelegationCredential (#19703)" (#19734)"
This reverts commit 340b5ab061.
* chore: fix schema and types for now
* fix: domainWideDelegationCredentialId error type
* remove barrel export for client
* fix more imports
* remove server barrel
* remove more barrel exporst and fix tssconfig
* fix types
* fix imports for removed barrels
* fig ssg createserverside helpers
* restore lock
* new yarn lock
* remove barel exports
* remove barrel
* replace client with react in tsconfig
* fix yarn lock
* Update exports for trpc to not be types
* add ENDPOINTS export to the correct location
* other exports fixes lost due to barrel
* fix client error export
* more imports
---------
Co-authored-by: hbjORbj <sldisek783@gmail.com>
Co-authored-by: Keith Williams <keithwillcode@gmail.com>
* Add endpoints for testing the flow
* Add MVP
* new route
* Fixes
* Fixes
* Remove enable toggle support from domainWideDelegation
* Fixes
* Revert "Remove enable toggle support from domainWideDelegation"
This reverts commit c29e729206cd1fa063f9c9ce0cf148ef1577d60b.
* Revert yarn.lock
* More fixes
* Fix new workspace platform add
* refactor: improvements
* refactor: bug fixes and improvements
* fix: type errors
* fix: conflicts
* chore: update test
* fix: logic
* chore: improvements
* fix: toglle
* fix: bugs
* fix: type err
* chore: check number type
* fix: after conflicts
* chore: fix type err
* fix: type errors and tests
* fix: tets
* test
* chore: remove unused
* fix: google meet url on booking page and secondary calendar
* fix: add property
* fix: type err
* fix: re assingment bug
* fix: use getAllCredentials
* chore: fix import
* fix: installed count
* fix: pass event type
* fix: import
* fix: [Stacked PR] Review fixes (#17958)
* Review fixes
* fix: destination calendar bug
---------
Co-authored-by: Udit Takkar <udit222001@gmail.com>
* refactor: use repository
* chore: remove duplicate
* fix: More review fixes for domain wide delegation (#17969)
* Reuse buildCredentialPayloadForCalendar
* fixes
---------
Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com>
* fix ts error
* Fix getSchedule not using dwd credentials (#17995)
* fix: Remove direct DWD table access from google-calendar and remove delegatedToId column from Credential (#18015)
* Remove fn rename to reduce number of files changed
* chore: check feature globally
* test: add unit tests
* chore: move function
* test: add booking test
* wip
* Remove domain-wide-delegation team feature flag
* Make sure duplicate calendars are not shown due to DWD. Show DWD when there is conflict
* Fix tests and their ts errors
* Fix more tests
* Move findUsersForAvailabilityCheck to separate file as it has AppStore dependency causing problem with Routing Forms. Build crashes
* fix: Multiple calendar connections from Google not showing up in apps/installed
* DestinationCalendar must have either credentialId or domainWideDeelgationId. Also handle the case when DWD is disabled and there was a non-dwd credential that could be used
* Disable deletetion of DWD as it is destructive and prefer disabling instead
* Show DWD credential calendars at the top
* Fixed tests
* Calendar Cache DWD support
* Self-Review: Verify email required and add more selectedCalendar tests
* Self Review: shorten names
* Self ReviewL Dead code removal
* Revert "Calendar Cache DWD support"
This reverts commit 009f236470fa21eba5986117d4f6e4d4c5e38c34.
* Some misc fixes
* fixes
* Performance improvememt in slots loading and booking
* More cases for handling dwd credentials
* simplify the logic. Ensure that EventManager and the modules below it in the flow have CredentialForCalendarService available
* Fix tests
* Fix installed/conferencing not showing gogole meet
* Shorten name
* Fix ApI v2 tests
* Add some more tests
* add getSchedule tests
* Improve tests
* Make Google Meet default when DWD for google is enabled
* Enable feature flagging for DWD
* chore: bump libraries
* Encrypt serviceaccount private key
* Fix ts errors
* bump platform libraries
* org add dwd
* org add dwd
* bump platform libraries
* fix selected calendars
* fix remove selected dwd calendar
* remove oauthclient id aliad in authedCalendar
* remove oauthclient id aliad in authedCalendar
* refactor: OrganizationsDwdController
* chore: export toggleDwdEnabled from platform-libraries
* feat: v2 update (enable / disable) dwd
* refactor: SelectedCalendarsController check if user belongs to dwd org & for not dwd use previous logic
* wip: DestinationCalendar send domainWideDelegationCredentialId from frontend to api
* try fix set destination calendar api v2
* fixup! try fix set destination calendar api v2
* setting google meet as default location working for dwd
* bump platform libraries version
* allow office 365 workspace slug
* allow office 365 workspace slug
* chore: v2 create dwd MS and Google service keys input
* fix: CreateDwdInput serviceAccountKey
* fix: CredentialForCalendarService type
* fix: check workspace slug
* feat: update serviceAccessKey of DWD
* testing
* fixup! testing
* fix: getAuthUtl bug
* fix: unit tests
* fix: type err and unit test
* fix: e2e test
* fix: credentials bug and failing unit tests
* Update CalendarService.ts
* chore: refactor office365 calendar service and add testDomainWideDelegationSetup
* fix: office365Calendar use correct clientId/Secret for DWD
* fix: office365Calendar dwd no need refresh token
* test: add unit test for outlook dwd and setup
* feat: added dwd support for office365 calendar
* feat: added dwd support for office365 video
* test: finish test for outlook dwd
* fix: create dialog bug
* chore: remove console logs
* fix: refreshToken bug
* bump version libraries
* refactor: fetch dwd credentials only in findQualifiedHosts
* fixup! refactor: fetch dwd credentials only in findQualifiedHosts
* fix: type err
* fix: type err
* fix: getUserDisplayName
* fix: unit test
* chore: bump platform lib
---------
Co-authored-by: Syed Ali Shahbaz <52925846+alishaz-polymath@users.noreply.github.com>
Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com>
Co-authored-by: Udit Takkar <udit222001@gmail.com>
Co-authored-by: Morgan Vernay <morgan@cal.com>
Co-authored-by: supalarry <laurisskraucis@gmail.com>
Co-authored-by: Somay Chauhan <somaychauhan98@gmail.com>
Co-authored-by: Morgan <33722304+ThyMinimalDev@users.noreply.github.com>
* add user pages to config.matcher in middleware
* add app router user booking pages
* remove HeadSeo from users-public-view component
* remove pages router user booking pages
* fix type check
* fix embed
* fix test
* chore: remove BookerSEO from users-type-public-view
* fix
* migrate all /user embed pages to app router
* remove /future routes
* fix prefill not working with preload
* move to (booking-page-wrapper) route group
---------
Co-authored-by: Hariom Balhara <hariombalhara@gmail.com>