* Revert "Revert "chore: rename DWD to DelegationCredential (#19703)" (#19734)"
This reverts commit 340b5ab061.
* chore: fix schema and types for now
* fix: domainWideDelegationCredentialId error type
* 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>
* feat(appStore): add isOAuth config
* refactor(appStore): EventTypeAppSettngsInterface
* refactor(qr_code): split EventTypeAppCardInterface and EventTypeAppSettingsInterface
* feat(appStore): redirect to onboarding for stripe and basecam
* fix(ui/ScrollableArea): overflow indicator not working
* feat(apps): new install app flow
* fix(configureStep): get disabled props for settings
* fix: getAppInstallsBySlug now use teamIds
* chore: Alby to AppSettingsInterface
* chore: Giphy to appsettings interface
* chore: GTM migration
* chore: GT4 - migration
* chore: fathom migration
* chore: paypal
* feat: basecamp migration
* feat: metapixel migration
* feat:plausable
* feat:stripe
* fix merge issues
* fix merge issues in new app install flow steps
* wip: callback to onboarding
* fix: imports
* fix: more imports
* feat: use redirect to onboarding on install flow
* fix: redirect to event-type after oauth flow
* When clicking on install new app button, only redirect to the new app install flow if it is an oAuth app or an app that extends the EventType feature in it's config
* code refactor, skip event-type step
* removed extra consoles
* so that no one can change the eventTypeId in url
* theme support enabled
* only pass eventTypeId instead of whole evetType obj to OmniInstallAppButton
* fix: clicking on event-type gives error and redirects to /apps
* saved appOnboardingRedirectUrl to OAuth State
* fix: a user having no team breaks the onboarding flow
* add optional chaining to appMetadata.extendsFeature and appMetadata.isOAuth;
* encode appOnboardingRedirectUrl
* fix: dark theme ui issues
* skip configure step if no-event types
if user/team does not have event-type then skip configure step and goto apps/installed/[category]
* exclude calendars from apps- onboarding flow
* Update getAppOnboardingRedirectUrl.ts
* fix: On configure step, inputs aren't showing errors
* change route from `apps/onboarding` to `apps/installation`
* fix: flow not correctly working for teams
* should only allow team ADMIN or OWER to install an app to team
* Prevent two payment apps to be enabled
* removed loading state
* Fix type error
* undo new-app-flow from OmniInstallAppButton
* remove OAuth Step, handle step numbering
* fix: redirect url
* getAppOnboardingRedirectUrl refactor
* for debugging
* Revert "for debugging"
This reverts commit b9362c1a8f47f2280e684c213d7ec08d04a8ac4c.
* fix: added toaster
* feat: added support to select multiple events (almost)
* hide button
* Move inner form outside outer form using portal
Due to limitations with nested forms in React Hook Form, moved the inner form outside the outer form using a portal to ensure proper form handling.
* submit buttons refs madness
* removed configure step
we had to use query params to manage selected event-types, between routes which was causing 2 issues:
* each time we selected or unselected an event the whole page was reloaded including getserversideprops being called again and again
* the form was reloaded causing more issues
* removed extra unwanted code
* small fix
* fix: type error
* fix: types
* implemented suggested changes
* removed step footer
* fixed error.message
* removed commented styles
* removed step footer
* fix: Display team event types instead of user's on event types step when team selected
* fix: typo
* removed shouldLockDisableProps
* refactor setUpdatedEventTypesStatus, fix type
* removed extra code
* can't delete while saving
* added translations
* fix: loading in select account step, fix handle onSelect params type
* Fix typo
* feat: add skip button to event-types step
* use set-up-later button in tests
* added skip button to configure step as well
* feat: add test for analytics apps using the new app install flow
* feat: add test for stripe 1
* feat: add test for stripe 2
* Fix: Redirect only those apps that extend 'EventType' to the new app install flow (#14527)
* fix: type errors
* fix: failing tests
* fix: tests
* fix test flakiness
* better naming and code refactor for analytics apps tests
* run tests parallelly
* removed network idle, giving error
* another shot at test flakiness
* Fix: can't install apps without team selector dropdown on main app store page.
* fix: test flakiness
* fix: account select loading issue
* removed getPaymentCredential (unused)
* fix: only redirect after the app has been added to all the event-types
* remove overflowIndicatorStyles
* fixed failing test
* fix: exclude org team events
* undo some random merge changes
---------
Co-authored-by: Morgan Vernay <morgan@cal.com>
Co-authored-by: sean-brydon <sean@cal.com>
Co-authored-by: Keith Williams <keithwillcode@gmail.com>
Co-authored-by: Joe Au-Yeung <j.auyeung419@gmail.com>
Co-authored-by: Joe Au-Yeung <65426560+joeauyeung@users.noreply.github.com>
Co-authored-by: Omar López <zomars@me.com>
* feat(appStore): add isOAuth config
* refactor(appStore): EventTypeAppSettngsInterface
* refactor(qr_code): split EventTypeAppCardInterface and EventTypeAppSettingsInterface
* feat(appStore): redirect to onboarding for stripe and basecam
* fix(ui/ScrollableArea): overflow indicator not working
* feat(apps): new install app flow
* fix(configureStep): get disabled props for settings
* fix: getAppInstallsBySlug now use teamIds
* chore: Alby to AppSettingsInterface
* chore: Giphy to appsettings interface
* chore: GTM migration
* chore: GT4 - migration
* chore: fathom migration
* chore: paypal
* feat: basecamp migration
* feat: metapixel migration
* feat:plausable
* feat:stripe
* fix merge issues
* fix merge issues in new app install flow steps
* wip: callback to onboarding
* fix: imports
* fix: more imports
* feat: use redirect to onboarding on install flow
* feat: New app install flow 2 (#14077)
* fix: redirect to event-type after oauth flow
* When clicking on install new app button, only redirect to the new app install flow if it is an oAuth app or an app that extends the EventType feature in it's config
* code refactor, skip event-type step
* removed extra consoles
* so that no one can change the eventTypeId in url
* theme support enabled
* only pass eventTypeId instead of whole evetType obj to OmniInstallAppButton
* fix: clicking on event-type gives error and redirects to /apps
* saved appOnboardingRedirectUrl to OAuth State
* fix: a user having no team breaks the onboarding flow
* add optional chaining to appMetadata.extendsFeature and appMetadata.isOAuth;
* encode appOnboardingRedirectUrl
* fix: dark theme ui issues
* skip configure step if no-event types
if user/team does not have event-type then skip configure step and goto apps/installed/[category]
* exclude calendars from apps- onboarding flow
* Update getAppOnboardingRedirectUrl.ts
* fix: On configure step, inputs aren't showing errors
* change route from `apps/onboarding` to `apps/installation`
* fix: flow not correctly working for teams
* should only allow team ADMIN or OWER to install an app to team
* Prevent two payment apps to be enabled
* removed loading state
* Fix type error
* undo new-app-flow from OmniInstallAppButton
* remove OAuth Step, handle step numbering
* fix: redirect url
* getAppOnboardingRedirectUrl refactor
* for debugging
* Revert "for debugging"
This reverts commit b9362c1a8f47f2280e684c213d7ec08d04a8ac4c.
* fix: added toaster
* feat: added support to select multiple events (almost)
* hide button
* Move inner form outside outer form using portal
Due to limitations with nested forms in React Hook Form, moved the inner form outside the outer form using a portal to ensure proper form handling.
* submit buttons refs madness
* removed configure step
we had to use query params to manage selected event-types, between routes which was causing 2 issues:
* each time we selected or unselected an event the whole page was reloaded including getserversideprops being called again and again
* the form was reloaded causing more issues
* removed extra unwanted code
* small fix
* fix: type error
* fix: types
* implemented suggested changes
* removed step footer
* fixed error.message
* removed commented styles
* removed step footer
* fix: Display team event types instead of user's on event types step when team selected
* fix: typo
* removed shouldLockDisableProps
* refactor setUpdatedEventTypesStatus, fix type
* removed extra code
* can't delete while saving
* added translations
* fix: loading in select account step, fix handle onSelect params type
* Fix typo
---------
Co-authored-by: Joe Au-Yeung <j.auyeung419@gmail.com>
* fix: type errors
* fix: failing tests
---------
Co-authored-by: sean-brydon <sean@cal.com>
Co-authored-by: Keith Williams <keithwillcode@gmail.com>
Co-authored-by: Joe Au-Yeung <j.auyeung419@gmail.com>
Co-authored-by: Somay Chauhan <somaychauhan98@gmail.com>
* Abstract app category navigation
* Send key schema to frontend
Co-authored-by: Omar López <zomars@users.noreply.github.com>
* Render keys for apps on admin
* Add enabled col for apps
* Save app keys to DB
* Add checks for admin role
* Abstract setup components
* Add AdminAppsList to setup wizard
* Migrate to v10 tRPC
* Default hide keys
* Display enabled apps
* Merge branch 'main' into admin-apps-ui
* Toggle calendars
* WIP
* Add params and include AppCategoryNavigation
* Refactor getEnabledApps
* Add warning for disabling apps
* Fallback to cal video when a video app is disabled
* WIP send disabled email
* Send email to all users of event types with payment app
* Disable Stripe when app is disabled
* Disable apps in event types
* Send email to users on disabled apps
* Send email based on what app was disabled
* WIP type fix
* Disable navigation to apps list if already setup
* UI import fixes
* Waits for session data before redirecting
* Updates admin seeded password
To comply with admin password requirements
* Update yarn.lock
* Flex fixes
* Adds admin middleware
* Clean up
* WIP
* WIP
* NTS
* Add dirName to app metadata
* Upsert app if not in db
* Upsert app if not in db
* Add dirName to app metadata
* Add keys to app packages w/ keys
* Merge with main
* Toggle show keys & on enable
* Fix empty keys
* Fix lark calendar metadata
* Fix some type errors
* Fix Lark metadata & check for category when upserting
* More type fixes
* Fix types & add keys to google cal
* WIP
* WIP
* WIP
* More type fixes
* Fix type errors
* Fix type errors
* More type fixes
* More type fixes
* More type fixes
* Feedback
* Fixes default value
* Feedback
* Migrate credential invalid col default value "false"
* Upsert app on saving keys
* Clean up
* Validate app keys on frontend
* Add nonempty to app keys schemas
* Add web3
* Listlocale filter on categories / category
* Grab app metadata via category or categories
* Show empty screen if no apps are enabled
* Fix type checks
* Fix type checks
* Fix type checks
* Fix type checks
* Fix type checks
* Fix type checks
* Replace .nonempty() w/ .min(1)
* Fix type error
* Address feedback
* Added migration to keep current apps enabled
* Update apps.tsx
* Fix bug
* Add keys schema to Plausible app
* Add appKeysSchema to zod.ts template
* Update AdminAppsList.tsx
Co-authored-by: Omar López <zomars@users.noreply.github.com>
Co-authored-by: Peer Richelsen <peeroke@gmail.com>
Co-authored-by: zomars <zomars@me.com>
Co-authored-by: sean-brydon <55134778+sean-brydon@users.noreply.github.com>