c7c8564b63d5def87607a4e2b67fe338e839f44e
307
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
6923b97cd2 |
feat: upgrade Prisma to 6.16.0 with no-rust engine (#23816)
* feat: upgrade Prisma to 6.16.0 with no-rust engine - Update Prisma packages to 6.16.0 - Add PostgreSQL adapter dependency - Configure engineType: 'client' and provider: 'prisma-client' in schema - Update Prisma client instantiation with PostgreSQL adapter - Remove binaryTargets from generators (not needed with library engine) - Fix schema view issue by removing @id decorator from BookingTimeStatusDenormalized - Fix ESLint warning by removing non-null assertion Co-Authored-By: keith@cal.com <keithwillcode@gmail.com> * Web app running but types wrecked * web app running but build and type issues * Removed the connection pool * Fixed zod type issue * Fixed types in booking reference extension * Fixed test issues * Type checks passing it seems * Using cjs as moduleFormat * Fixing Prisma undefined * fix: update prismock initialization for Prisma 6.16 compatibility - Add @prisma/internals dependency for getDMMF() - Restructure prismock initialization to use createPrismock() with DMMF - Create Proxy that's returned from mock factory for proper spy support - Fixes 89 failing unit tests with 'Cannot read properties of undefined (reading datamodel)' error - Based on workaround from prismock issue #1482 All unit tests now pass (375 test files, 3323 tests passed) Co-Authored-By: keith@cal.com <keithwillcode@gmail.com> * fix: cast serviceAccountKey to Prisma.InputJsonValue in bookingScenario.ts - Apply type cast at lines 2493 and 2535 - Fixes type errors from Prisma 6.16 upgrade - Follows established pattern from delegationCredential.ts - Add eslint-disable for pre-existing any types - Rename unused appStoreLookupKey parameter to satisfy lint - All 3323 tests passing Co-Authored-By: keith@cal.com <keithwillcode@gmail.com> * chore: remove whitespace-only lines from bookingScenario.ts - Remove blank lines where eslint-disable comments were replaced - Cleanup from pre-commit hook formatting Co-Authored-By: keith@cal.com <keithwillcode@gmail.com> * Update is-prisma-available-check.ts * fix: remove datasources config when using Prisma Driver Adapters - Update customPrisma to create new adapter when datasources URL is provided - Remove datasources config from API v2 Prisma services (already in adapter) - Fixes 'Custom datasource configuration is not compatible with Prisma Driver Adapters' error Co-Authored-By: keith@cal.com <keithwillcode@gmail.com> * fix: use Pool instances for PrismaPg adapters in index.ts - Create Pool instance before passing to PrismaPg adapter - Update customPrisma to create Pool for custom connection strings - Matches working pattern from API v2 services - Fixes 'Invalid `prisma.$queryRawUnsafe()` invocation' error Co-Authored-By: keith@cal.com <keithwillcode@gmail.com> * Not using queryRawUnsafe * Trying anything at this point * Make sure the DB is ready first * Don't auto run migrations in CI mode * Revert "Make sure the DB is ready first" This reverts commit 2b20bd45c974f3d7e07d8b904bc7fcdae37cce03. * Dynamic import of prisma * Commenting where it seems to break * Backwards compatability for API v2 * fix: add explicit type annotations for map callbacks in API v2 - Add type annotation for map parameter in memberships.repository.ts - Add type annotation for map parameter in stripe.service.ts - Fixes implicit 'any' type errors from stricter Prisma 6.16.0 type inference Co-Authored-By: keith@cal.com <keithwillcode@gmail.com> * fix: add explicit type annotations for API v2 map callbacks - users.repository.ts:292: add Profile & { user: User } type - memberships.service.ts:19-20: add Membership type to filter callbacks Co-Authored-By: keith@cal.com <keithwillcode@gmail.com> * fix: add explicit type annotation for attributeToUser in organizations-users.repository.ts - organizations-users.repository.ts:63: add AttributeToUser with nested relations type Co-Authored-By: keith@cal.com <keithwillcode@gmail.com> * fix: add explicit Membership type annotations in teams.repository.ts Co-Authored-By: keith@cal.com <keithwillcode@gmail.com> * fix: use API v2 dedicated Prisma client to support adapter in PrismaClientOptions Co-Authored-By: keith@cal.com <keithwillcode@gmail.com> * Running API v2 build commands together so they all get the space size var * Fixing Maximum call depth exceeded error * fixed type issues * Trying to make the seed more stable * Revert "Trying to make the seed more stable" This reverts commit 1fd4495e6af7acd7981cda7dedec3168979b0e9d. * Fixed path to prisma client * Fixed type check * Fix eslint warnings * fix: externalize @prisma/adapter-pg and pg in platform-libraries Vite config - Add @prisma/adapter-pg and pg to external dependencies list - Add corresponding globals for these packages - Fix Prisma client aliases to point to packages/prisma/client instead of node_modules - Add Node.js resolve conditions to prefer Node.js exports - Keep commonjsOptions.include for proper CommonJS transformation - Add eslint-disable for __dirname in Vite config file - Remove problematic prettier/prettier eslint comment This fixes the 'Extensions.defineExtension is unable to run in this browser environment' error when running yarn generate-swagger in apps/api/v2 after upgrading to Prisma v6.16 with the no-rust engine approach. Co-Authored-By: keith@cal.com <keithwillcode@gmail.com> * fix: update Prisma imports in API v2 services to use package path - Change imports from '../../../generated/prisma/client' to '@calcom/prisma/client' - Fixes CI error: Cannot find module '../../../../../packages/prisma/generated/prisma/client.ts' - Aligns with backwards compatibility re-export structure after Prisma v6.16 upgrade Co-Authored-By: keith@cal.com <keithwillcode@gmail.com> * fix: remove .ts extension from Prisma client path mapping in tsconfig - Remove file extension from @calcom/prisma/client path mapping - Fixes runtime error: Cannot find module '../../../../../packages/prisma/generated/prisma/client.ts' - TypeScript path mappings should not include file extensions per best practices - Allows Node.js to correctly resolve to .js files at runtime Co-Authored-By: keith@cal.com <keithwillcode@gmail.com> * fix: resolve Prisma 6.16.0 type incompatibilities in bookingScenario tests - Changed InputPayment.data type from PaymentData to Prisma.InputJsonValue - Changed createCredentials key parameter from JsonValue to InputJsonValue - Removed unused PaymentData type definition - Resolves type errors at lines 709 and 1088 without using 'as any' casts Co-Authored-By: keith@cal.com <keithwillcode@gmail.com> * fix: remove non-existent Watchlist fields from test fixtures - Remove createdById from isLockedOrBlocked.test.ts (lines 15, 20) - Remove severity and createdById from _post.test.ts (line 110) - These fields don't exist in Watchlist model schema after Prisma 6.16.0 upgrade - Resolves TS2353 errors without using 'as any' casts Relates to PR #23816 Co-Authored-By: keith@cal.com <keithwillcode@gmail.com> * fix: api v2 imports generated prisma and platform libraries * fix: resolve type errors from Prisma 6.16 upgrade - Add missing markdownToSafeHTML import in AppCard.tsx - Fix organizationId null handling in fresh-booking.test.ts - Remove non-existent createdById field from Watchlist test utils Co-Authored-By: keith@cal.com <keithwillcode@gmail.com> * Put back some external rollups * Added back the resolve conditions * Stop using Pool directly * chore: remove prisma bookingReferenceExtension and update calls * fix: organizations-admin-not-team-member-event-types.e2e-spec.ts * chore: bring back POOL in api v2 prisma clients * chore: remove Pool but await connect * fixup! chore: remove Pool but await connect * chore: bring back Pool on all clients * chore: end pool manually * chore: test with pool max 1 * chore: e2e test prisma max pool of 1 connection * chore: give more control over pool for prisma module with env * remove pool from base prisma client * chore: prisma client in libraries use pool * Fixed types * chore: log pool events and improve pooling * Fixing some types and tests * Changing the parsing of USE_POOL * fix: ensure Prisma client is connected before seeding to prevent transaction errors Co-Authored-By: keith@cal.com <keithwillcode@gmail.com> * chore: adjust pools * chore: add process.env.USE_POOL to libraries vite config * fix: v1 _patch reference check bookingRef on the booking find * fix: v1 get references deleted null for system admin * test: add integration tests for bookingReference soft-delete behavior - Add bookingReference.integration-test.ts to test repository methods - Add handleDeleteCredential.integration-test.ts to test credential deletion cascade - Add booking-references.integration-test.ts for API v1 integration tests - All tests verify soft-delete behavior without using mocks - Tests use real database operations to ensure soft-deleted records persist - Cover scenarios: replacing references, credential deletion, querying with filters Co-Authored-By: keith@cal.com <keithwillcode@gmail.com> * refactor: convert booking-references test to actual API endpoint testing - Modified _get.ts to export handler function for testing - Refactored integration test to call API handler instead of directly testing Prisma - Added timestamps to test data to avoid conflicts - Tests now verify API layer correctly filters soft-deleted references - All 4 tests passing Co-Authored-By: keith@cal.com <keithwillcode@gmail.com> * fix: add explicit prisma.$connect() call to seed-insights script With Prisma 6.16 and the PostgreSQL adapter, scripts need to explicitly call $connect() before running database operations to ensure the connection pool is properly initialized. This prevents 'Transaction already closed' errors. Co-Authored-By: keith@cal.com <keithwillcode@gmail.com> * fix: add $connect() to main() execution in seed-insights Both main() and createPerformanceData() entry points need explicit prisma.$connect() calls with the Prisma 6.16 PostgreSQL adapter. Co-Authored-By: keith@cal.com <keithwillcode@gmail.com> * fix: always use connection pool for Prisma PostgreSQL adapter Enable connection pooling by default for the Prisma adapter to prevent transaction state issues during seed operations. Without a pool, each operation creates a new connection which can lead to 'Transaction already closed' errors during heavy database operations like seeding. Co-Authored-By: keith@cal.com <keithwillcode@gmail.com> * Revert "fix: always use connection pool for Prisma PostgreSQL adapter" This reverts commit 6724bb08e42bc0a94846069de83b04db0aeb8e8b. * fix: enable connection pool for db-seed in cache-db action Set USE_POOL=true when running yarn db-seed to use connection pooling with the Prisma PostgreSQL adapter. This prevents 'Transaction already closed' errors during seeding by maintaining stable database connections. Co-Authored-By: keith@cal.com <keithwillcode@gmail.com> * fix: add safety check for undefined ownerForEvent in seed script Prevent 'Cannot read properties of undefined' error when orgMembersInDBWithProfileId is empty. This can happen if organization members fail to create or when there's a duplicate constraint violation causing early return. Co-Authored-By: keith@cal.com <keithwillcode@gmail.com> * fix: v1 _patch reference check bookingRef * fix: increase pool size and add timeout settings to prevent transaction errors - Increase max connections from 5 to 10 - Add connectionTimeoutMillis: 30000 (30 seconds) - Add statement_timeout: 60000 (60 seconds) These settings help prevent 'Unknown transaction status' errors during heavy database operations like seeding by giving transactions more time to complete and allowing more concurrent connections. Co-Authored-By: keith@cal.com <keithwillcode@gmail.com> * Revert "fix: increase pool size and add timeout settings to prevent transaction errors" This reverts commit 148264f1f1861dfb09a082937a3e2b49e78fc41a. * fix: remove standalone execution in seed-app-store to prevent premature disconnect The seed-app-store.ts file had a standalone main() call at the bottom that would execute immediately when imported, including a prisma.$disconnect() in its .finally() block. This caused issues because: 1. seed.ts imports and calls mainAppStore() 2. The import triggers the standalone main() execution 3. This standalone execution disconnects prisma after completion 4. seed.ts then tries to call mainHugeEventTypesSeed() but prisma is disconnected 5. This leads to 'Unknown transaction status' errors Fixed by removing the standalone execution since mainAppStore() is already called programmatically from seed.ts which manages the connection lifecycle. Co-Authored-By: keith@cal.com <keithwillcode@gmail.com> * fix: use require.main check to prevent premature disconnect when imported Added require.main === module check so seed-app-store.ts: - Runs standalone with proper connection management when executed directly via 'yarn seed-app-store' or 'ts-node seed-app-store.ts' - Does NOT run standalone when imported as a module by seed.ts, preventing premature prisma disconnect This fixes 'Unknown transaction status' errors while maintaining backward compatibility for direct execution. Co-Authored-By: keith@cal.com <keithwillcode@gmail.com> * fix: seed apps before creating users to prevent foreign key constraint violation Reordered seeding operations to call mainAppStore() before main() because: - main() creates users with credentials that reference apps via appId foreign key - mainAppStore() seeds the App table with app records - Apps must exist before credentials can reference them This fixes the 'Foreign key constraint violated on Credential_appId_fkey' error that occurred when creating credentials before the apps they reference existed. Co-Authored-By: keith@cal.com <keithwillcode@gmail.com> * Apply suggestion from @cubic-dev-ai[bot] Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com> * Removing functional changes of deleted: null * Apply suggestion from @keithwillcode * refactor: move seedAppData call to bottom of main() in seed.ts Moved seedAppData() call from seed-app-store.ts to the bottom of main() in seed.ts to ensure the 'pro' user is created before attempting to create routing form data for them. Changes: - Exported seedAppData function from seed-app-store.ts - Removed seedAppData() call from the main() export in seed-app-store.ts - Added seedAppData() call at the bottom of main() in seed.ts - Updated standalone execution in seed-app-store.ts to still call seedAppData() when run directly via 'yarn seed-app-store' This ensures proper ordering: apps seeded → users created → routing form data created for existing users. Co-Authored-By: keith@cal.com <keithwillcode@gmail.com> * refactor: move routing form seeding from seed-app-store.ts to seed.ts Moved the routing form seeding logic (previously in seedAppData function) from seed-app-store.ts to be inline at the bottom of main() in seed.ts. This ensures the 'pro' user is created before attempting to create routing form data for them. Changes: - Removed seedAppData function and seededForm export from seed-app-store.ts - Removed import of seedAppData from seed.ts - Added routing form seeding logic inline at bottom of main() in seed.ts Seeding order: apps → users (including 'pro') → routing forms Co-Authored-By: keith@cal.com <keithwillcode@gmail.com> * fix: add deleted: null filter to bookingReference update operations - Add deleted: null filter to API v1 PATCH endpoint to prevent updating soft-deleted booking references - Add deleted: null filter to DailyVideo updateMeetingTokenIfExpired and setEnableRecordingUIAndUserIdForOrganizer - Add comprehensive test coverage for PATCH endpoint soft-delete behavior - Tests verify that soft-deleted booking references cannot be updated - Tests verify that only active booking references can be updated successfully Co-Authored-By: keith@cal.com <keithwillcode@gmail.com> * revert: remove deleted: null filters to preserve existing functionality Per @keithwillcode's feedback, reverting the soft-delete filtering changes to preserve existing functionality in this PR. This PR should focus only on the Prisma upgrade itself. - Reverted API v1 PATCH endpoint change - Reverted DailyVideo adapter changes (updateMeetingTokenIfExpired and setEnableRecordingUIAndUserIdForOrganizer) - Removed test file that was added for soft-delete behavior testing Addresses comments: - https://github.com/calcom/cal.com/pull/23816#discussion_r2448854197 - https://github.com/calcom/cal.com/pull/23816#discussion_r2448860594 - https://github.com/calcom/cal.com/pull/23816#discussion_r2448860833 Co-Authored-By: keith@cal.com <keithwillcode@gmail.com> * test: restore and update booking reference tests to match existing functionality Updated tests to verify existing behavior where PATCH endpoint can update booking references regardless of their deleted status. This matches the current implementation after reverting the deleted: null filters. Changes: - Restored test file that was previously deleted - Updated PATCH tests to expect successful updates of soft-deleted references - Renamed test suite to 'Existing functionality' to clarify intent - Tests now verify that the PATCH endpoint preserves existing behavior Co-Authored-By: keith@cal.com <keithwillcode@gmail.com> * test: rename booking-references test to integration-test The test requires a database connection and should run in the integration test job, not the unit test job. Renamed from .test.ts to .integration-test.ts to match the repository's testing conventions. Co-Authored-By: keith@cal.com <keithwillcode@gmail.com> --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: cal.com <morgan@cal.com> Co-authored-by: Morgan <33722304+ThyMinimalDev@users.noreply.github.com> Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com> |
||
|
|
4303fb8726 |
feat: Salesforce - add urql/retry-exchange (#24302)
* Add .env variables * Add `urql/exchange-retry` * Add retry mechanic to graphql client * Only add retries if .env variables are set * Remove console.log |
||
|
|
7799b191ec |
feat: botid enabled on api/book/event api route (#24207)
* wip * WIP * restore event * testing without instrument client * Add conditional for botID init * Bump BotID version + pass in header * botID yarn lock changes * feat: Add feature flag checks + tidy up into service * rely on env var also * use eventType repo instead of passing in prisma * remove slug from audit * rename botId feature to botid * add unit tests for bot service |
||
|
|
e6b2116a2b |
feat: Calendar Cache and Sync (#23876)
* feat: calendar cache and sync - wip * Add env.example * refactor on CalendarCacheEventService * remove test console.log * Fix type checks errors * chore: remove pt comment * add route.ts * chore: fix tests * Improve cache impl * chore: update recurring event id * chore: small improvements * calendar cache improvements * Fix remove dynamic imports * Add cleanup stale cache * Fix tests * add event update * type fixes * feat: add comprehensive tests for new calendar subscription API routes - Add tests for /api/cron/calendar-subscriptions-cleanup route (9 tests) - Add tests for /api/cron/calendar-subscriptions route (10 tests) - Add tests for /api/webhooks/calendar-subscription/[provider] route (11 tests) - Add missing feature flags for calendar-subscription-cache and calendar-subscription-sync - All 30 tests pass with comprehensive coverage of authentication, feature flags, error handling, and service instantiation Tests cover: - Authentication scenarios (API key validation, Bearer tokens, query parameters) - Feature flag combinations (cache/sync enabled/disabled states) - Success and error handling (including non-Error exceptions) - Service instantiation with proper dependency injection - Provider validation for webhook endpoints Co-Authored-By: Volnei Munhoz <volnei.munhoz@gmail.com> * feat: add comprehensive tests for calendar subscription services, repositories, and adapters - Add unit tests for CalendarSubscriptionService with subscription, webhook, and event processing - Add unit tests for CalendarCacheEventService with cache operations and cleanup - Add unit tests for CalendarSyncService with Cal.com event filtering and booking operations - Add unit tests for CalendarCacheEventRepository with CRUD operations - Add unit tests for SelectedCalendarRepository with calendar selection management - Add unit tests for GoogleCalendarSubscriptionAdapter with subscription and event fetching - Add unit tests for Office365CalendarSubscriptionAdapter with placeholder implementation - Add unit tests for AdaptersFactory with provider management and adapter creation - Fix lint issues by removing explicit 'any' type casting and unused variables - All tests follow Cal.com conventions using Vitest framework with proper mocking Co-Authored-By: Volnei Munhoz <volnei.munhoz@gmail.com> * fix: improve calendar-subscriptions-cleanup test performance by adding missing mocks - Add comprehensive mocks for defaultResponderForAppDir, logger, performance monitoring, and Sentry - Fix slow test execution (933ms -> <100ms) caused by missing dependency mocks - Ensure consistent test performance across different environments Co-Authored-By: Volnei Munhoz <volnei.munhoz@gmail.com> * Fix tests * Fix tests * type fix * Fix coderabbit comments * Fix types * Fix test * Update apps/web/app/api/cron/calendar-subscriptions/route.ts Co-authored-by: Alex van Andel <me@alexvanandel.com> * Fixes by first review * feat: add database migrations for calendar cache and sync fields - Add CalendarCacheEventStatus enum with confirmed, tentative, cancelled values - Add new fields to SelectedCalendar: channelId, channelKind, channelResourceId, channelResourceUri, channelExpiration, syncSubscribedAt, syncToken, syncedAt, syncErrorAt, syncErrorCount - Create CalendarCacheEvent table with foreign key to SelectedCalendar - Add necessary indexes and constraints for performance and data integrity Fixes database schema issues causing e2e test failures with 'column does not exist' errors. Co-Authored-By: Volnei Munhoz <volnei.munhoz@gmail.com> * only google-calendar for now * docs: add Calendar Cache and Sync feature documentation - Add comprehensive feature overview and motivation - Document feature flags with SQL examples - Include SQL examples for enabling features for users and teams - Reference technical documentation files Addresses PR #23876 documentation requirements Co-Authored-By: Volnei Munhoz <volnei.munhoz@gmail.com> * docs: update calendar subscription README with comprehensive documentation - Undo incorrect changes to main README.md - Update packages/features/calendar-subscription/README.md with: - Feature overview and motivation - Environment variables section - Complete feature flags documentation with SQL examples - SQL examples for enabling features for users and teams - Detailed architecture documentation Addresses PR #23876 documentation requirements Co-Authored-By: Volnei Munhoz <volnei.munhoz@gmail.com> * fix docs * Fix test to available calendars * Fix test to available calendars * add migration and sync boilerplate * fix typo * remove double log * sync boilerplate --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: Alex van Andel <me@alexvanandel.com> Co-authored-by: Keith Williams <keithwillcode@gmail.com> |
||
|
|
c5b7da8ffd | disable tui (#24076) | ||
|
|
2ed0380e4f |
feat: adds user plan info in useHasPaidPlan for intercom (#23790)
* feat: adds user plan info in `useHasPaidPlan` for intercom * add to support api route * Update constants.ts * sql migration to backfill plans and create/change plans on upgrade/downgrade/create of teams and orgs * fix: breaking unit tests * test: add comprehensive tests for billing plan service and team/org flows - Add unit tests for BillingPlanService.getUserPlanByMemberships() covering all plan determination scenarios - Add tests for team creation handler verifying TEAMS vs ORGANIZATIONS plan assignment - Add tests for hasTeamPlan handler integration with BillingPlanService - Add tests for MembershipRepository.findAllMembershipsByUserIdForBilling() data fetching - Add tests for InternalTeamBilling upgrade/downgrade flows with proper mocking - All tests follow existing vitest patterns with proper Prisma and service mocking - Covers both self-serve and platform billing scenarios with comprehensive edge cases Co-Authored-By: amit@cal.com <samit91848@gmail.com> * Revert "test: add comprehensive tests for billing plan service and team/org flows" This reverts commit 58e511f15caf8757c3ec45f6d026caf96ee1a75e. * fix: make `BillingPlanService` instantiable and use `TeamRepository` * Revert "fix: make `BillingPlanService` instantiable and use `TeamRepository`" This reverts commit ae1ff8f15b725566b828864a217d8d0e308b520f. * revert to runtime calculations. review fixes * remove uneccessary changes and logs * review fixes * review fixes * fix: type check --------- Co-authored-by: Keith Williams <keithwillcode@gmail.com> Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> |
||
|
|
96855ea391 |
chore: upgrade eslint 9 (#24002)
* add eslint package * upgrade lint * remove linting for generated files from trpc * ts imports * add missing features lint script * enable turbo ui * reference workspace deps correctly * fixes * Fix eslint test * Fix eslint test * npm run all back * fix e2e * fix e2e * fix e2e --------- Co-authored-by: Alex van Andel <me@alexvanandel.com> |
||
|
|
4689775a1f |
chore: Skip static file copy if not required (#23903)
* chore: Skip static file copy if not required * feat: Replace MD5 hash checks with Turborepo caching for static file copying - Add copy-app-store-static Turborepo task with proper inputs/outputs - Remove manual MD5 hash calculation logic that was causing performance issues - Update package.json scripts to use Turborepo task - Addresses Keith's feedback about using Turborepo cache instead of manual checks Co-Authored-By: alex@cal.com <me@alexvanandel.com> * fix: Add copy-app-store-static script to package.json for Turborepo task execution - Add missing script definition in apps/web/package.json - Enables Turborepo to properly execute the static file copying task - Fixes 'No tasks were executed' issue by providing the command to run Co-Authored-By: alex@cal.com <me@alexvanandel.com> * fix: Remove skipped jobs from required check failure condition - Allow conditional E2E jobs to be skipped without failing the required check - Maintain failure detection for actual job failures and cancellations - Apply fix consistently to both pr.yml and all-checks.yml workflows Co-Authored-By: alex@cal.com <me@alexvanandel.com> * Revert "fix: Remove skipped jobs from required check failure condition" This reverts commit 429f0506d009eaae7fa88be6db077681d5124f2a. * Only write new logs --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: Keith Williams <keithwillcode@gmail.com> |
||
|
|
39917ebfa6 |
fix: Alternate reschedule behaviour for past bookings - Don't allow new booking (#23736)
* fix: Past booking redirect * fix: rename ENV_PAST_BOOKING_RESCHEDULE_CHANGE to ENV_PAST_BOOKING_RESCHEDULE_CHANGE_TEAM_IDS for clarity - Renamed environment variable to better reflect that it contains comma-separated team IDs - Updated all references in constants.ts, implementation file, tests, and turbo.json - Addresses PR comment feedback about misleading variable name Co-Authored-By: hariom@cal.com <hariombalhara@gmail.com> --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> |
||
|
|
eaa1ad6578 |
feat: e2e tests for Connect atoms (#23433)
* e2e tests for apple connect atom * update globalEnv for turbo.json * update pages for tests * update playwright config so we can use env variables inside tests * update packages * update variable names * update playwright config * fix: import variables from env instead of separate files * update env variables for atoms e2e yml |
||
|
|
2be388373f |
fix: adjust free monthly credits for orgs (#23798)
* add org monthly credits env variable * use fallback for env variable * remove comment --------- Co-authored-by: CarinaWolli <wollencarina@gmail.com> |
||
|
|
c28eb90928 |
chore: Upgrade prisma to 6.7.0 (#21264)
* chore: Upgrade prisma to 6.7.0 * Build fixes * type fixes Signed-off-by: Omar López <zomars@me.com> * Update schema.prisma * Patching * Revert "Update schema.prisma" This reverts commit 47d8618bf89ef4d007b30084df766f17281e21a1. * Revert "Patching" This reverts commit a1d2e3040e71690a44d4324db95d73b4d68c6adb. * Revert schema changes Signed-off-by: Omar López <zomars@me.com> * WIP Signed-off-by: Omar López <zomars@me.com> * Update getPublicEvent.ts * Update imports Signed-off-by: Omar López <zomars@me.com> * Update gitignore Signed-off-by: Omar López <zomars@me.com> * update remaining imports Signed-off-by: Omar López <zomars@me.com> * Delete .cursor/config.json * Discard changes to packages/features/eventtypes/lib/getPublicEvent.ts * Update _get.ts * Update user.ts * Update .gitignore * update * Update WorkflowStepContainer.tsx * Update next-auth-custom-adapter.ts * Update getPublicEvent.ts * Update workflow.ts * Update next-auth-custom-adapter.ts * Update next-auth-options.ts * Update bookingScenario.ts * fix missing imports * upgrades prismock Signed-off-by: Omar López <zomars@me.com> * patches prismock Signed-off-by: Omar López <zomars@me.com> * Update reschedule.test.ts * Update prisma.ts * patch prismock Signed-off-by: Omar López <zomars@me.com> * fix enums imports Signed-off-by: Omar López <zomars@me.com> * Revert "Update prisma.ts" This reverts commit 64edcf8db54171ff4456c209d563b5d431d99619. * Revert "patch prismock" This reverts commit e95819113dc9d88e7130947aa120cd42710977c8. * fix patch * Fix test that overrun the boundary, it shouldn't test too much * Move prisma import to changeSMSLockState * Bring back broken test without illegal imports * Merge with main and fix filter hosts by same round robin host * Fixed buildDryRunBooking fn tests * Fix and move ooo create or update handler test * Fix packages/features/eventtypes/lib/isCurrentlyAvailable.test.ts * Fix packages/trpc/server/routers/viewer/organizations/listMembers.handler.test.ts * Mock @calcom/prisma * Fix: verify-email.test.ts * fix: Moved WebhookService test and fixed default import mock * Fix: Added missing prisma mock, handleNewBooking uses that of course * We're not testing createContext here * fix: Prisma mock fix for listMembers.test.ts * More fixes to broken testcases * Forgot to remove borked test * Prevent the need to mock a lot of dependencies by moving out buildBaseWhereCondition to its own file * Temporarily skip getCalendarEvents, needs a rewrite * Fix: turns out you can access protected in testcases * fix further mocks * Added packages/features/insights/server/buildBaseWhereCondition.ts, types * Always great to have a mock and then not use it * And one less again. * fix: confirm.handler.test, didn't mock prisma * fix: Address minor nit by @eunjae & fix ImpersonationProvider test * Updated isPrismaAvailableCheck that doesn't crash on import * fix: Get Prisma directly from the client, it usually involves the Validator and does not need 'local' inclusion * Add zod-prisma-types without the generator enabled (commented out) * Uncomment and see what happens * Change method of import as imports did not work in Input Schemas * Remove custom 'zod' booking model, it does not belong with Prisma * Fix all other global Model imports * Rewrite most schema includes AND remove barrel file * Add bookingCreateBodySchema to features/bookings * Flurry of type fixes for compatibility with new zod gen * Refactor out the custom prisma type createEventTypeInput * Work around nullable eventTypeLocations * HandlePayment type fix * More fixes, final fix remaining is CompleteEventType * Should fix a bunch more booking related type errors * Missed one * Some props missing from BookingCreateBodySchema * Fix location type in handleChildrenEventTypes * Little bit hacky imo but it works * Final type error \o/ * Forgot to include Prisma * Do not include zod-utils in booker/types * Oops, was already including Booker/types * Fix membership type, also disallow updating createdAt/updatedAt, make part of patch/post * Fix api v1 type errors * Fix EventTypeDescription typings * Remove getParserWithGeneric, use userBodySchema with UserSchema * use centralized timeZoneSchema * Implement feedback by @zomars * Couple of WIP pushes * Fix tests * Type fixes in `handleChildrenEventTypes` test * Try and parse metadata before use * Change zod-prisma-types configuration for optimal performance * Fix prisma validator error in `prisma/selects/credential` * Disable seperate relations model, hits a bug * Import absolute - this makes rollup work in @platform/libraries * Attempt at removing resolutions override * Refactor using `Prisma.validator` to `satisfies` * Build atoms using @calcom/prisma/client * Build atoms using @calcom/prisma/client * fixes * Update eventTypeSelect.ts * Adjust `eventTypeMetaDataSchemaWithUntypedApps` from `unknown` to `record(any)` * `EventTypeDescription` rely on `descriptionAsSafeHTML` instead of `description` * Add `seatsPerTimeSlot` to event type public select * Fix typing in `users-public-view` getServerSide props * Add missing `schedulingType` to prop * chore: bump platform libraries * Function return type is illegal, not sure how this passed eslint (#21567) * Merged with main * Update updateTokenObject.ts * Update handleResponse.ts * Update index.ts * Update handleChildrenEventTypes.ts * Update booking-idempotency-key.ts * Update WebhookService.test.ts * Update events.test.ts * Update queued-response.test.ts * Update events.test.ts * Update getRoutedUrl.test.ts * fix: type checks Signed-off-by: Omar López <zomars@me.com> * fixes Signed-off-by: Omar López <zomars@me.com> * chore: bump platform libraries * Update yarn.lock * more fixes Signed-off-by: Omar López <zomars@me.com> * fixes Signed-off-by: Omar López <zomars@me.com> * biuld fixes * chore: bump platform libraries * Update conferencing.repository.ts * Update conferencing.repository.ts * Update getCalendarsEvents.test.ts * Update vite.config.js * chore: bump platform libraries * Update users.ts * Discard changes to docs/api-reference/v2/openapi.json * Update vite.config.ts * updated platform libraries * Update get.handler.test.ts * Update get.handler.test.ts * Update schema.prisma * Discard changes to docs/api-reference/v2/openapi.json * Update next-auth-custom-adapter.ts * Update team.ts * Flurry of type fixes * Fix majority of insight related type errors * Type fixes for unlink of account * Make user nullable again * Fixed a bunch of unit tests and one type error * Attempted mock fix * Attempted fix for Attribute type * Ensure default import becomes prisma, but not direct usage * Import default as prisma in prisma.module * Add attributeOption to attribute type * Fix calcom/prisma mock * Refactor Prisma client imports to @calcom/prisma/client Updated all imports from '@prisma/client' to '@calcom/prisma/client' across tests and repository files for consistency and to use the correct Prisma client package. This change improves maintainability and ensures the correct client is referenced throughout the codebase. * Undo removal of max-warnings=0 to get main to merge * Remove unit tests for e2e fixtures, provide new prisma mock * Mock @calcom/prisma in event manager * Mock @calcom/prisma in event manager * Add correct format even with --no-verify * Mock prisma in CalendarManager * Add mock for permission-check.service * Better injection in PrismaApiKeyRepository imports * More mock fixes :) * Fix listMembers.handler.test * Fix User import * Appropriately adjust all types to be imported as types, there were a lot of types imported as normal deps * Why was this a thing? * Strictly speaking; Not using prismock anymore * Ditched patch file for prismock * Fix output.service.ts platform type imports, need concrete for plainToClass * Better typing and tests for unlinkConnectedAccount.handler * Small type fix * Disable calendar cache tests as they are dependent on prismock * chore: bump platform lib * getRoutedUrl test remove of unused import * Extract select to external const on getEventTypesFromDB * Direct select of userSelect from selects/user * fix type error from merging 23653 * Fixed integration tests by removing hardcoded values that were possible due to mocking, but as its now directly hitting the db no longer * fix: vite config atoms prisma client type location * revert: example app prisma client * revert: example app prisma client * bump platform libs * fix: use class instead of type for DI of PlatformBookingsService * update platform libs * remove unused variable * chore: generate prisma client for api v2 * fix: api v2 e2e * fix: atoms e2e * fix: atoms e2e * fix: atoms e2e * fix: api v2 e2e * fix: tsconfig apiv2 enums * publish libraries * Simplify check for existence teamId --------- Signed-off-by: Omar López <zomars@me.com> Co-authored-by: Alex van Andel <me@alexvanandel.com> Co-authored-by: Joe Au-Yeung <j.auyeung419@gmail.com> Co-authored-by: supalarry <laurisskraucis@gmail.com> Co-authored-by: cal.com <morgan@cal.com> Co-authored-by: Morgan <33722304+ThyMinimalDev@users.noreply.github.com> Co-authored-by: Benny Joo <sldisek783@gmail.com> |
||
|
|
2cc8b1c2af |
fix: Use db-deploy instead of db-migrate for yarn dx in non-interactive environments (#23253)
Fixes the issue where 'yarn dx' fails in non-interactive environments (CI/CD, Docker, automated scripts) by changing Turbo dependencies: - @calcom/prisma#db-seed: db-migrate → db-deploy - @calcom/prisma#dx: db-migrate → db-up This ensures that non-interactive 'prisma migrate deploy' is used instead of interactive 'prisma migrate dev', allowing yarn dx to work correctly in automated environments. Resolves: Cal.com App Store performance optimization - yarn dx failure Co-authored-by: Anik Dhabal Babu <81948346+anikdhabal@users.noreply.github.com> |
||
|
|
20b7ac8c0d |
feat: implement tiered Intercom chat system replacing Plain (#23285)
* feat: implement tiered Intercom chat system replacing Plain - Add TieredIntercomChat component with customer tier detection - Add IntercomContactForm for free users using Intercom API - Add /api/intercom-conversation endpoint for free user support - Update UserDropdown to use tiered chat logic - Replace Plain chat with Intercom in app providers - Remove all Plain chat components and related files - Use useHasPaidPlan hook for customer tier detection Paying customers see Intercom widget, free users see contact form that creates conversations via Intercom API. Co-Authored-By: peer@cal.com <peer@cal.com> * fix: add missing environment variables to turbo.json globalEnv - Add NEXT_PUBLIC_WEBAPP_URL, NEXT_PUBLIC_WEBSITE_URL, NEXT_PUBLIC_STRIPE_PUBLIC_KEY - Add NEXT_PUBLIC_IS_E2E, NEXT_PUBLIC_STRIPE_PREMIUM_PLAN_PRICE_MONTHLY - Add NEXT_PUBLIC_BOOKER_NUMBER_OF_DAYS_TO_LOAD, NEXT_PUBLIC_STRIPE_CREDITS_PRICE_ID - Resolves turbo/no-undeclared-env-vars ESLint errors blocking commits Co-Authored-By: peer@cal.com <peer@cal.com> * fix: resolve linting errors in platform examples base package - Fix prettier/prettier formatting (quotes and comma) - Add underscore prefix to unused variables - Resolves CI failure in @calcom/base#lint check Co-Authored-By: peer@cal.com <peer@cal.com> * remove plain usage * placement fixes * fix: pop closing immediately issue * stuff * proper error and additional user info * add key to .env.example and remove unused plain route * fix conversation route * refactor intercom dynamic provider * code rabbit fixes * feat: introduce tiered support feature flag * fix: type check * Apply suggestion from @coderabbitai[bot] Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: Amit Sharma <74371312+Amit91848@users.noreply.github.com> Co-authored-by: sean-brydon <55134778+sean-brydon@users.noreply.github.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> |
||
|
|
c42e803cfa |
chore: local testing retell (#23577)
Co-authored-by: Peer Richelsen <peeroke@gmail.com> |
||
|
|
e1def884f3 |
perf: fix Turborepo caching for app-store CLI build (#23515)
* feat: fix Turborepo caching for app-store CLI build - Fix incorrect output paths from app-store/ to packages/app-store/ - Fix incorrect input paths to match actual file locations - Remove cache: false to enable caching - Add all 11 generated files to outputs array - Add NEXT_PUBLIC_IS_E2E env var for proper cache invalidation - Add specific input patterns to avoid cache invalidation from generated files - Improves local dev experience with cache hits vs ~3.1s cache misses Performance improvement: builds go from ~3.1 seconds (cache miss) to instant cache hits when inputs haven't changed. Co-Authored-By: keith@cal.com <keithwillcode@gmail.com> * Use new turbo command so it uses cache * Made the output more flexible * Added back a .tsx output * fixed file path * Removed global IS_E2E var that Devin added --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> |
||
|
+1 |
0bcb81bedd |
feat: to enable optimized slots (#16579)
* feature to enable optimized slots * type check (was not caught running locally) * update for typechecks * update for type checks * initialize form * update slots test for showOptimizedSlots * added some more tests * handled edge case * added test for edge case * generalized condition * refactored instead of ternary and added comments * update condition * Update apps/web/public/static/locales/en/common.json Co-authored-by: Carina Wollendorfer <30310907+CarinaWolli@users.noreply.github.com> * moved showOptimizedSlots setting to advanced tab * updated to always move to next 15min if not possible to next interval * correct after merge * chore * fix typecheck after latest merges * remove workinghours when dateRanges input * refactor: extract to fn * chore * remove unrelated changes * remove unrealted change * updated tests * unrelated format changes no-verify * unrelated format changes no-verify * handle current day booking cases, to show roundedoff minutes * remove unrelated format changes in openapi.json * add test for new condition * remove unrelated auto-format changes * remove unrelated auto-format changes * update after merge * For current day bookings, normalizing the seconds to zero to avoid issues with time calculations * Update packages/platform/atoms/event-types/hooks/useEventTypeForm.ts Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * update for typecheck due to latest changes * resolve merge conflicts * Smaller description * Minor style change to prefer early return --------- Co-authored-by: Carina Wollendorfer <30310907+CarinaWolli@users.noreply.github.com> Co-authored-by: Anik Dhabal Babu <81948346+anikdhabal@users.noreply.github.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: CarinaWolli <wollencarina@gmail.com> Co-authored-by: Devanshu Sharma <devanshusharma658@gmail.com> Co-authored-by: Volnei Munhoz <volnei.munhoz@gmail.com> Co-authored-by: Keith Williams <keithwillcode@gmail.com> Co-authored-by: Alex van Andel <me@alexvanandel.com> |
||
|
|
d4bff9d6b1 |
feat: Cal.ai Self Serve #2 (#22995)
* feat: Cal.ai Self Serve #2 * chore: fix import and remove logs * fix: update checkout session * fix: type errors and test * fix: imports * fix: type err * fix: type error * fix: tests * chore: save progress * fix: workflow flow * fix: workflow update bug * tests: add unit tests for retell ai webhoo * fix: status code * fix: test and delete bug * fix: add dynamic variables * fix: type err * chore: update unit test * fix: type error * chore: update default prompt * fix: type errors * fix: workflow permissions * fix: workflow page * fix: translations * feat: add call duration * chore: add booking uid * fix: button positioning * chore: update tests * chore: improvements * chore: some more improvements * refactor: improvements * refactor: code feedback * refactor: improvements * feat: enable credits for orgs (#23077) * Show credits UI for orgs * fix stripe callback url when buying credits * give orgs 20% credits * add test for calulating credits --------- Co-authored-by: CarinaWolli <wollencarina@gmail.com> Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com> * fix: types * fix: types * chore: error * fix: type error * fix: type error * chore: mock env * feat: add idempotency key to prevent double charging * chore: add userId and teamId * fix: skip inbound calls * chore: update tests * feat: add feature flag for voice agent * feat: finish test call and other improvements * chore: add alert * chore: update .env.example * chore: improvements * fix: update tests * refactor: remove un necessary * feat: add setup badge * chore: improvements * fix: use referene id * chore: improvements * fix: type error * fix: type * refactor: change pricing logic * refactor: update tests * fix: conflicts * fix: billing link for orgs * fix: types * refactor: move feature flag up * fix: alert and test call credit check * fix: update unit tests * fix: feedback * refactor: improvements * refactor: move handlers to separate files * fix: types * fix: missing import * fix: type * refactor: change general tools functions handling * refactor: use repository * refactor: improvements * fix: types * fix: type errorr * fix: auth check * feat: add creditFor * fix: update defualt prompt * fix: throw error on frontend * fix: update unit tests * fix: use deleteAllWorkflowReminders * refactor: add connect phone number * refactor: improvements * chore: translation * chore: update message * chore: translation * design improvements buy number dialog * add translation for error message * use translation key in error message * refactor: improve connect phone number tab * feat: support un saved workflow to tests * chore: remove un used * fix: remove un used * fix: remove un used * refactor: similify billing --------- Co-authored-by: Carina Wollendorfer <30310907+CarinaWolli@users.noreply.github.com> Co-authored-by: CarinaWolli <wollencarina@gmail.com> Co-authored-by: Peer Richelsen <peeroke@gmail.com> Co-authored-by: Keith Williams <keithwillcode@gmail.com> |
||
|
|
520e711ca6 |
perf: optimize analytics app imports to avoid loading entire app store (#23372)
* perf: optimize analytics app imports to avoid loading entire app store - Add analytics service generation to app-store-cli build process - Generate analytics.services.generated.ts with only analytics apps (dub) - Update getAnalytics.ts to use AnalyticsServiceMap instead of full appStore - Add NEXT_PUBLIC_IS_E2E to turbo.json globalEnv for generated files - Reduces import footprint from 100+ apps to only analytics apps with AnalyticsService - Follows same pattern as calendar services optimization from PR #22450 Co-Authored-By: keith@cal.com <keithwillcode@gmail.com> * Reorder cli output * fix: follow getCalendar pattern in getAnalytics and maintain alphabetical order in turbo.json - Remove unnecessary object wrapping in getAnalytics.ts to match getCalendar.ts pattern - Move NEXT_PUBLIC_IS_E2E to correct alphabetical position in turbo.json globalEnv - Address PR feedback from keithwillcode Co-Authored-By: keith@cal.com <keithwillcode@gmail.com> * chore: update yarn.lock after analytics optimization changes Co-Authored-By: keith@cal.com <keithwillcode@gmail.com> --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> |
||
|
|
d2f8076c70 |
perf: Improve memory cache on build (#23286)
* Improve memory cache on build * Improve memory cache on build |
||
|
|
d72e15649f | chore: Remove maintenance mode middleware (#23251) | ||
|
|
e18b790ccd |
chore: Upgrade Turborepo from 1 to 2.5 (#23101)
* upgrade turborepo from 1 to 2.5 * Fix tsconfig.json paths path * chore: fix root path on tsconfig.paths * chore: add baseUrl to tsconfig.json * chore: tsconfig.json issue * try: CI without tsconfig paths * chore: add only local paths on tsconfig.json * chore: Fix docs * Fix missing env var on turbo.json |
||
|
|
8d5a7b4e10 | fix: atoms e2e env variables to turbo.json (#23039) | ||
|
|
b71d8baccc |
chore: Implement short-lived redis cache for slots (#22787)
* chore: Implement short-lived redis cache for slots * chore: adapt apiv2 redis service to match with upstash redis * chore: safer redis service and ms ttl * fixup! chore: safer redis service and ms ttl * Wrap with timeout, currently doesn't work yet * Updated @upstash/redis for better signal support * Fix type errors, remove ts value * Inject NoopRedisService for NODE_ENV test * chore: bump platform libs * chore: bump platform libs * Upstash Redis upgrade no longer resulted in expected hard crash on init, so updated factory and our Upstash Redis Adapter to mimick old behaviour * Add SLOTS_CACHE_TTL variable for configurable ttl on slots cache * Update parseInt to use right types * chore: bump platform libs * chore: bump platform libs * chore: bump platform libs * update e2e api v2 action * set SLOTS_CACHE_TTL env var api v2 e2e --------- Co-authored-by: cal.com <morgan@cal.com> |
||
|
|
52f16604c1 | feat: Use a separate project for Client Sentry (#22183) | ||
|
|
3437c4331d |
fix: changesets atoms size (#22134)
* fix: changesets atoms npm package size * test changesets entry |
||
|
|
2f1f989266 |
feat: allow setting DAILY VIDEO region via env (#21939)
* feat: allow setting DAILY VIDEO region via env * add comments * Cleaner approach to Daily video region type assertion --------- Co-authored-by: Alex van Andel <me@alexvanandel.com> |
||
|
|
14592de6c4 |
fix: Anonymize host email in ics (#21544)
* add virta check for anonymizing host * move to env var * move env var to constants * fix: filter empty string * fix test * fix test --------- Co-authored-by: Udit Takkar <udit222001@gmail.com> |
||
|
|
d9df9b3d01 |
feat: recording url with 6 months expiry time (#18707)
* feat: store cal video recording on s3 * feat: create new route to fetch download link * tests: add unit test * fix: unit test * fix: type error * chore: add env var * fix: open in new tab * fix: type err * chore: update test * fix: import * chore: use cal video recording token secret --------- Co-authored-by: Syed Ali Shahbaz <52925846+alishaz-polymath@users.noreply.github.com> |
||
|
|
3e8f0b125d |
fix: WhatsApp workflows are not working (#21421)
* fix: whatsapp template * update * fixes for sending whatsapp messages * add message service id when scheduling * add timezone to startTime variable --------- Co-authored-by: CarinaWolli <wollencarina@gmail.com> |
||
|
|
f50be6c08b | chore: Lower number of errors sent to Sentry (#21300) | ||
|
|
fadfba8830 |
feat: Credit System (SMS) (#20126)
* 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> |
||
|
+28 |
558140fdd6 |
fix: sentry builds (#20310)
* fix: sentry builds
* Update yarn.lock
* Upgrade Sentry
* Breaking changes
* Discard changes to apps/web/modules/connect-and-join/connect-and-join-view.tsx
* Discard changes to apps/web/modules/signup-view.tsx
* Discard changes to packages/app-store/make/pages/setup/index.tsx
* Discard changes to packages/app-store/zapier/pages/setup/index.tsx
* Discard changes to packages/emails/src/templates/AdminOrganizationNotificationEmail.tsx
* Discard changes to packages/features/eventtypes/components/tabs/apps/EventAppsTab.tsx
* Discard changes to packages/features/eventtypes/components/tabs/assignment/EventTeamAssignmentTab.tsx
* Discard changes to packages/features/eventtypes/components/tabs/webhooks/EventWebhooksTab.tsx
* Discard changes to packages/features/eventtypes/components/tabs/advanced/DisableAllEmailsSetting.tsx
* Discard changes to packages/emails/src/templates/BrokenIntegrationEmail.tsx
* Discard changes to packages/emails/src/templates/OrganizationCreationEmail.tsx
* Discard changes to packages/emails/src/templates/SlugReplacementEmail.tsx
* Discard changes to packages/emails/src/templates/TeamInviteEmail.tsx
* Discard changes to packages/features/bookings/Booker/components/BookEventForm/BookEventForm.tsx
* Discard changes to packages/features/bookings/Booker/components/OutOfOfficeInSlots.tsx
* Discard changes to packages/features/ee/teams/components/MemberInvitationModal.tsx
* Discard changes to packages/features/eventtypes/components/EditWeightsForAllTeamMembers.tsx
* Discard changes to packages/features/eventtypes/components/Locations.tsx
* Discard changes to packages/features/eventtypes/components/dialogs/ManagedEventDialog.tsx
* Discard changes to packages/features/eventtypes/components/tabs/advanced/RequiresConfirmationController.tsx
* Discard changes to packages/features/eventtypes/components/tabs/workflows/EventWorkfowsTab.tsx
* Discard changes to packages/features/settings/BookerLayoutSelector.tsx
* Discard changes to packages/features/settings/outOfOffice/OutOfOfficeEntriesList.tsx
* chore: upgrade dependencies and improve Sentry configuration
- Upgrade @sentry/nextjs to 9.13.0
- Upgrade next.js to 15.3.0
- Upgrade sharp to 0.34.1
- Update Sentry configuration files
- Add Sentry example files for testing
* chore: upgrade dependencies
- Upgrade next.js to 15.3.0
- Upgrade sharp to 0.34.1
* Update next.config.js
* Discard changes to packages/platform/atoms/connect/apple/AppleConnect.tsx
* build(apps/web): enabled Sentry source maps uploading.
* Create sentry-sourcemaps.yml
* fix: buggy skeleton rendering for month view (#20744)
* fix: trigger lingo.dev by removing duplicate value
* fix: buggy skeleton monthly view
* fix: Wrong schedule ID set for child managed event (#20745)
* fix: wrong schule id set for managed event
* Update handleChildrenEventTypes.ts
* feat: v2 book team events using teamSlug & eventTypeSlug (#20585)
* feat: v2 book team events using teamSlug & eventTypeSlug
* fix: tests
* fix: failing e2e test (#20751)
* feat: filter users by assigned attribute options (#20659)
* feat: assigned attributes options base
* feat: assigned attributes options base e2e
* feat: filter assigned options by other assigned options
* feat: filter assigned options by other assigned options
* fixup! feat: filter assigned options by other assigned options
* feat: get org users by assigned attributes
* adding missing input file
* push generated docs
* feat: add filter org users by teamIds
* feat: add filter assigned attribute options by teamIds
* chore; update doc
* chore: remove console log
* chore: minor e2e fix
* chore: minor e2e fix
* chore: improve docs
* fix: assigned options by teamIds + optionIds
* fix: Admin/owner unable to confirm managed bookings (#20743)
* fix: Admin/owner can't confirm managed booking
* Update confirm.handler.ts
* fix: v2 automatic round robin reassign error message (#20755)
* fix: return react fragment from all layout.tsx
* feat: add guards to stripe teams controller (#20540)
* feat: add guards to stripe teams controller
* remove logs and comments
* fix return type status
* refactor: move PlatformSubscription to a dedicated module
* reroute to `organizations/stripe/save` for teams
* fix: type errors
* feat: fixed it for conferencing apps
* feat: Add error handling and fallback URL support in Stripe callback
* Refactor OAuth callback handling and move token validation to service layer
* Add documentation for OAuth callback proxying in conferencing and stripe controllers
* Move OAuthCallbackState type from organizations to stripe service module
* chore: release v5.2.2
* perf: slim down middleware matcher (#20735)
* wip
* wip
* refactor
* add pathname
* fix
* fix: manually construct pathname for metadata functions
Co-Authored-By: benny@cal.com <benny@cal.com>
* fix: add pathname parameter to all metadata functions
Co-Authored-By: benny@cal.com <benny@cal.com>
* fix: add pathname parameter to remaining metadata functions
Co-Authored-By: benny@cal.com <benny@cal.com>
* fix
* fix
* fix type checks
* Refactor
* fix
* fix
---------
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: benny@cal.com <benny@cal.com>
* Skip flakey tests (#20761)
* Write UTM params to Salesforce (#20759)
* chore: Add consent message when SMS workflows are related (#20741)
* Add consent message
* Add consent message if using SMS workflow
* Skip flakey tests
* Revert "Skip flakey tests"
This reverts commit 3bd6f3fd71469df4dbd67b69b8e17011657df9d8.
* chore: Remove verbose logging (#20732)
* fix: offer seats broken (#20758)
* Remove trailing } from utm param (#20763)
* fix: only managed users assignable to managed team event (#20754)
* fix: only managed users assignable to managed team event
* chore: bump platform libraries
* feat: make skeleton for booking embed accurate (#20765)
* fix: trigger lingo.dev by removing duplicate value
* feat: make skeleton for booking embed accurate
* fix: calendar connect atoms (#20766)
* fix: header overlaps in month view on short viewport (#20749)
* fix: header overlaps in month view on short viewport
* refactor: Merge classes into same condition
* fix: Remove booker margin top if isEmbed
---------
Co-authored-by: Anik Dhabal Babu <81948346+anikdhabal@users.noreply.github.com>
Co-authored-by: Tushar Bhatt <95581504+TusharBhatt1@users.noreply.github.com>
Co-authored-by: amrit <iamamrit27@gmail.com>
* fx 404 for embed (#20120)
* Update rateLimit.ts (#20785)
* fix: v2 Sentry errors (#20788)
* fix: Only Team Event Types are supported for Instant Meeting
* refactor: Cannot read properties of undefined (reading 'timeZone')
* fix: Cannot read properties of undefined (reading 'map')
* refactor: rearrange function order
* refactor: booking_seats_full_error
* fix: invalid_round_robin_host
* refactor: booking_time_out_of_bounds_error
* refactor: Attempting to book a meeting in the past.
* fix: obj.phoneNumber.trim is not a function
* fix: Cannot use 'in' operator to search for 'disabled' in 1
* fix: Org onboarding handle error due to platform team being moved to regular org (#20786)
* Add better error logs and handle platform team
* Add better error logs and handle platform team
* fix: Wrong text EmbedTheme -> Theme (#20790)
* refactor: replace timeZone string validation with timeZoneSchema (#20719)
* refactor: replace timeZone string validation with timeZoneSchema - Replace all instances of timeZone: z.string() with timeZoneSchema - Preserve modifiers (.optional(), .default(), .nullish()) where present - Fix VideoApiAdapter to use organizer's timezone value - Remove redundant isSupportedTimeZone import from booking.ts - Add timeZoneSchema import where needed
* Update index.ts
* fix: conflicts
Signed-off-by: Omar López <zomars@me.com>
* Update yarn.lock
* Discard changes to yarn.lock
* Update booking.ts
* Discard changes to packages/platform/types/me.ts
* Discard changes to packages/platform/types/me/outputs/me.ts
* Discard changes to packages/platform/types/schedules/schedules-2024-04-15/schedules.ts
* Discard changes to packages/features/ee/cal-ai-phone/zod-utils.ts
---------
Signed-off-by: Omar López <zomars@me.com>
* fix: improved 'use-identity-login' error message for users trying to signInn using different provider (#20582)
* improved 'use-identity-login' error message for users trying to signin using different provider
* passing original identity provider as query parameter
* Update packages/features/auth/lib/next-auth-options.ts
* passed different error names for different types of error
---------
Co-authored-by: romit <romitgabani1@gmail.com>
Co-authored-by: Anik Dhabal Babu <81948346+anikdhabal@users.noreply.github.com>
Co-authored-by: Hariom Balhara <hariombalhara@gmail.com>
Co-authored-by: Tushar Bhatt <95581504+TusharBhatt1@users.noreply.github.com>
* fix: Location not changing when rescheduling (#20404)
* fix: location not chnging
* update
* update
* Update EventManager.ts
* update
* update
* Update reschedule.test.ts
---------
Co-authored-by: Tushar Bhatt <95581504+TusharBhatt1@users.noreply.github.com>
Co-authored-by: sean-brydon <55134778+sean-brydon@users.noreply.github.com>
Co-authored-by: Peer Richelsen <peeroke@gmail.com>
* fix: sms workflow api v2 (#20795)
* fix: sms workflow api v2
* fixup! fix: sms workflow api v2
* fix: semi-colon in the bottom of layout UI (#20799)
* chore: Add layout.tsx to Foundation team CODEOWNERS (#20802)
* chore: remove swagger app and its dependencies (#20798)
* chore: release v5.2.3
* fix: Convert an error in webhook to info (#20806)
* Convert error to info
* Convert error to info
* feat: add "React (Atom)" to embed generator and rename rest (#20618)
* fix: trigger lingo.dev by removing duplicate value
* feat: add support for React Atom embed options
* fix: update locator for React code tab in embed code generator E2E tests
* fix: update embed tab names to clarify iframe usage
* fix failing test
* fix: indentation and installation commands for atoms
* fix: add note about iframe usage in Preview tab
* refactor: replace Cal component with BookerEmbed in EmbedCodes
* fix: Add EmbedConfig type import in Embed.tsx
- Added missing EmbedConfig type to the existing types import
- Resolves TypeScript error "Cannot find name 'EmbedConfig'"
* fix: update BookerEmbed usage in EmbedCodes component
* fix: enhance BookerEmbed implementation and update installation instructions in EmbedTabs
* fix: improve comments in EmbedCodes for clarity on layout options and styling references
* fix: streamline BookerEmbed usage in EmbedCodes with improved class handling and layout options
* fix: embed type selection
* fix: update layout selection in EmbedCodes to use dynamic configuration
* fix: update embed configuration to use theme instead of layout
* fix: conditionally render embed options based on if we are selecting atom
* fix: use simple props instead of embed specific logic to fix the active embed bug
* Fix double tabs activeness
* Revert isCurrent change
---------
Co-authored-by: Hariom Balhara <hariombalhara@gmail.com>
* refactor: remove iframe usage note from Preview tab in EmbedTabs component (#20810)
* fix: trigger lingo.dev by removing duplicate value
* refactor: remove iframe usage note from Preview tab in EmbedTabs component
* fix: api v2 license check (#20813)
* fix: api v2 license check
* update cache key to avoid conflicts
* chore: Add more Foundation and Consumer team CODEOWNERS configuration (#20816)
* refactor: forbidden 403 v2 guard messages (#20794)
* refactor: delete unused proxy guard
* refactor: roles.guard.ts
* refactor: is-org.guard.ts
* refactor: permissions.guard.ts
* refactor: oauth-client-guard.ts
* refactor: is-user-event-type-webhook-guard.ts
* refactor: platform-plan.guard.ts
* refactor: roles.guard.ts
* refactor: cache guard result if canAccess=true
* refactor: is-admin-api-enabled.guard.ts
* refactor: is-team-in-org.guard.ts
* refactor: platform-plan.guard.ts
* refactor: is-webhook-in-org.guard.ts
* refactor: is-user-in-org.guard.ts
* refactor: is-user-webhook-guard.ts
* refactor: is-user-in-org-team.guard.ts
* refactor: is-membership-in-org.guard.ts
* refactor: is-oauth-client-webhook-guard.ts
* refactor: is-routing-form-in-team.guard.ts
* refactor: is-managed-org-in-manager-org.guard.ts
* fill the gaps
* refactor: api-auth.strategy.ts
* fix: test
* implement feedback
* fix: tests
* fix: refactor
* fix: test
* feat: update DeleteSegmentDialog to use ConfirmationDialogContent CAL-5399 (#20820)
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: eunjae@cal.com <eunjae@cal.com>
* feat: open dropdown right after adding a filter (#20819)
* feat: open dropdown right after adding a filter
* clean up timeout
* fix: remove window usage in not-found client (#20822)
* remove window usage in not-found client
* fix
* fix: user is already part of a team (#20774)
* better error message
* redirect to login if no user session
* fixup
* remove callback url since the same function is used by org and platform both
* remove extra exclamation mark
* implement PR feedback
* refactor: Remove kysely as its unused (#20817)
* perf: Fetch data server-side for Api Keys page (#20677)
* server-side fetching for api keys page
* refactor billing page
* fix
* simplify metadata in /availability/[schedule] route (#20827)
* feat: Optout of SMS workflows (#20769)
* Do not call dub if API key isn't present
* Add `WorkflowOptOutContact` table
* Add `sendTo` column to `WorkflowReminder`
* Add `workflowOptOutContactRepository`
* Add `WorkflowReminderRepository`
* Write `sendTo` number when scheduling SMS messages
* Add `p-limit` package
* Add `determineOptOutType` to `TwilioProvider`
* Add `deleteMultipleScheduledSMS`
* Create `WorkflowOptOutService`
* Add endpoint handler for Twilio SMS responses
* Add `isOptedOut` method to `workflowOptOutContactRepository`
* Verify phone number is not opted out before scheduling SMS
* Use `smsReminderNumber` instead of `sendTo`
* Type fix
* Add .env variable if opt out is available
* Add opt out message to SMS
* Import `pLimit` directly in method
* Address select comment
* Guard against undefined phone number from form
* Add early return to `deleteWorkflowReminders`
* Add request validation from Twilio
* Add fallback message as i18N string
* Only delete SMS attendee scheduled reminders
* chore: release v5.2.4
* fix: caching for sprite.svg (#20832)
* update cache-control header for sprite.svg
* updated regex
* fix: platform org members cannot access their public booking page (#20821)
* fix: platform member event pages
* chore: update slots docs
* refactor: user repository call
* refactor: remove newline
* refactor: Returns 400 error for ZodErrors (#20831)
* fix: eventType filter on /insights (#20823)
* fix: eventType filter on /insights
* remove log
* feat: custom reply To Email (#20771)
Co-authored-by: Joe Au-Yeung <j.auyeung419@gmail.com>
* feat(insights): add progress indicator to download button on /insights and /insights/routing (CAL-5408) (#20631)
* feat(insights): add progress indicator to routing form responses download button (CAL-5408)
Co-Authored-By: eunjae@cal.com <eunjae@cal.com>
* fix: address PR feedback - remove initial progress update and ensure no decimal parts in percentage
Co-Authored-By: eunjae@cal.com <eunjae@cal.com>
* feat(insights): add progress indicator to Download component
Co-Authored-By: eunjae@cal.com <eunjae@cal.com>
* feat: paginate rawData endpoint and implement batch fetching in Download component
Co-Authored-By: eunjae@cal.com <eunjae@cal.com>
* refactor: simplify pagination logic in trpc-router.ts
Co-Authored-By: eunjae@cal.com <eunjae@cal.com>
* show progress on tooltip
* fix download for /insights
* fix download when there is no data
* feat: replace tooltip progress indicator with toast notification
Co-Authored-By: eunjae@cal.com <eunjae@cal.com>
* fix: remove duplicate ProgressToast component from showToast.tsx
Co-Authored-By: eunjae@cal.com <eunjae@cal.com>
* fix: export ProgressToast component from index.ts
Co-Authored-By: eunjae@cal.com <eunjae@cal.com>
* fix: add missing translation for downloading_data
Co-Authored-By: eunjae@cal.com <eunjae@cal.com>
* update progress toast implementation
* fix error
---------
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: eunjae@cal.com <eunjae@cal.com>
Co-authored-by: Eunjae Lee <hey@eunjae.dev>
* perf: SSR for /teams (#20824)
* finish
* improve
* refactor
* add revalidations
* /settings/teams is not needed
* refactor
* rename
* redundant type casting
* perf: SSR - /availablilty/[schedule] (#20829)
* ssr for schedule page
* improve skeleton
* improve skeleton
* improve skeleton
* fix: getBookings max 1 month in the past when no date filters specified (#20911)
* fix: getBookings max 1 month in the past
* bump platform libraries
* Pass customReplyTo as a managed event type prop (#20909)
Co-authored-by: Anik Dhabal Babu <81948346+anikdhabal@users.noreply.github.com>
* chore: release v5.2.5
* fix: Docs for deleting reserved slot (#20922)
* feat: ability to hide organizer email (#20782)
* feat: hide orgainzer email
* fix type error
* update
* update
* Update schema.prisma
* perf: Slim down trpc queries in Settings Layout (#20918)
* slim down settings layout by removing server queries
* add check method
* fix type check
* refactor
* perf: remove next.redirect by going straight to event-types (#20920)
* perf: ssr for /settings/organizations/teams/other (#20927)
* refactor: v2 automatic team slugs (#20897)
* refactor: automatic team slugs
* refactor: automatic organizations team slugs
* refactor: automatic managed organizations slugs
* docs
* refactor: test
* feat: add loading component for /apps main page (#20924)
* perf: server-side fetching for /availability (#20804)
* availability
* refactor
* add loader
* improve
* update
* fix loader
* rename
* satisfying types
* refactor
* remove log
* add CTA to skeleton
* refactor
* fix revalidations
* refactor
* update
* finish
* fix: Include ordered attendees in booking select query (#20935)
* fix: correct ordering
* another
* docs: global platform event types and custom booking flows (#20940)
* docs: global event types
* docs: custom booking flow
* chore: release v5.2.6
* fix: v2 sentry errors (#20902)
* refactor: no_available_users_found_error for team event
* fix: hosts_unavailable_for_booking
* fix: Cannot read properties of undefined (reading 'replace')
* fix: Cannot read properties of undefined (reading 'phoneNumber')
* fix: No SelectedCalendar found.
* fix: Cannot read properties of undefined (reading 'length')
* refactor: add bookings errors service
* feat: add membership creation date to Organization Member List table (CAL-5406) (#20595)
* feat: add membership creation date to Organization Member List table (CAL-5406)
Co-Authored-By: keith@cal.com <keith@cal.com>
* feat: add migration for membership creation date (CAL-5406)
Co-Authored-By: keith@cal.com <keith@cal.com>
* feat: make createdAt and updatedAt nullable (CAL-5406)
Co-Authored-By: keith@cal.com <keith@cal.com>
* feat: add updatedAt column to Organization Member List table (CAL-5406)
Co-Authored-By: keith@cal.com <keith@cal.com>
* fix: use type assertion to access createdAt and updatedAt fields (CAL-5406)
Co-Authored-By: keith@cal.com <keith@cal.com>
* fix: display N/A for null date values (CAL-5406)
Co-Authored-By: keith@cal.com <keith@cal.com>
* fix: use proper type assertions for createdAt and updatedAt fields (CAL-5406)
Co-Authored-By: keith@cal.com <keith@cal.com>
* fix: add createdAt and updatedAt to UserTableUser mock in test (CAL-5406)
Co-Authored-By: keith@cal.com <keith@cal.com>
* feat: add PostgreSQL trigger for membership timestamps (CAL-5406)
Co-Authored-By: keith@cal.com <keith@cal.com>
* fix: use empty string instead of N/A and add translations for column headers (CAL-5406)
Co-Authored-By: keith@cal.com <keith@cal.com>
* add i18n text
* clean up type issue
* feat: add translation keys for column headers (CAL-5406)
Co-Authored-By: keith@cal.com <keith@cal.com>
* disable sort
* remove duplicated i18n texts
* feat: add filters for lastActiveAt, createdAt, and updatedAt (CAL-5406)
Co-Authored-By: keith@cal.com <keith@cal.com>
* support date range filter
* fix date range for end date
* hide columns by default
* revert wrong change
* add missing selects
* fix e2e test
* fix: remove PostgreSQL trigger and let application handle timestamps (CAL-5406)
Co-Authored-By: keith@cal.com <keith@cal.com>
* feat: add application-level timestamp handling for Membership model (CAL-5406)
Co-Authored-By: keith@cal.com <keith@cal.com>
* add more timestamp handling
* refactor: use Prisma's built-in decorators for Membership timestamps (CAL-5406)
Co-Authored-By: keith@cal.com <keith@cal.com>
* refactor: remove application-level timestamp handling in favor of Prisma decorators (CAL-5406)
Co-Authored-By: keith@cal.com <keith@cal.com>
* refactor: remove more application-level timestamp handling in favor of Prisma decorators (CAL-5406)
Co-Authored-By: keith@cal.com <keith@cal.com>
* fix e2e test
---------
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: keith@cal.com <keith@cal.com>
Co-authored-by: Anik Dhabal Babu <81948346+anikdhabal@users.noreply.github.com>
Co-authored-by: Eunjae Lee <hey@eunjae.dev>
* fix: Offset is required but not passed everywhere, default to zero. (#20917)
* fix: exclude email from replyTo (#20953)
* fix: exclude email from replyTo
* update
* Update scheduleEmailReminders.ts
* fix: added order by (#20959)
* fix: double end-date parsing when saving availability (#20963)
* fix: double end-date parsing when saving availablity
Signed-off-by: Omar López <zomars@me.com>
* fix: cache hits in current and next month
* Update CalendarService.test.ts
---------
Signed-off-by: Omar López <zomars@me.com>
* fix: Don't delete Cal video room upon requesting reschedule (#20969)
* Update requestReschedule.handler.ts
* Update requestReschedule.handler.ts
* chore: leverage error.tsx in app router (#20955)
* chore: better code - migrate getServerSideProps file directly to RSC for /apps (#20926)
* migrate getServerSideProps file directly to RSC for /apps
* fix
* fix: dont persist last booking response, temporarily (#20975)
* dont persist last booking response
* remove dead code to fix ts error
* perf: Improve performance of period limits (#20974)
* perf: Improve performance of period limits
* Type fixes
* Fixed correct check for instanceof -> isDayjs
* revert: "feat: add membership creation date to Organization Member List table (CAL-5406) (#20595)" (#20978)
This reverts commit
|
||
|
|
54c4b0b65e | chore: Remove Sentry replay integration (#21211) | ||
|
|
71e7300830 |
build(apps/web): enabled client code Sentry source maps uploading. (#21108)
Co-authored-by: Omar López <zomars@me.com> |
||
|
|
50173658f8 |
refactor: Use Iffy for workflow body scanning (#21170)
* Add Iffy API key variable * WIP using Iffy to scan comments * Use Iffy for workflow body scanning * Update entity * Clean up * Update test * Fix client id * Fix test |
||
|
|
6bbf263981 |
feat: Optout of SMS workflows (#20769)
* Do not call dub if API key isn't present * Add `WorkflowOptOutContact` table * Add `sendTo` column to `WorkflowReminder` * Add `workflowOptOutContactRepository` * Add `WorkflowReminderRepository` * Write `sendTo` number when scheduling SMS messages * Add `p-limit` package * Add `determineOptOutType` to `TwilioProvider` * Add `deleteMultipleScheduledSMS` * Create `WorkflowOptOutService` * Add endpoint handler for Twilio SMS responses * Add `isOptedOut` method to `workflowOptOutContactRepository` * Verify phone number is not opted out before scheduling SMS * Use `smsReminderNumber` instead of `sendTo` * Type fix * Add .env variable if opt out is available * Add opt out message to SMS * Import `pLimit` directly in method * Address select comment * Guard against undefined phone number from form * Add early return to `deleteWorkflowReminders` * Add request validation from Twilio * Add fallback message as i18N string * Only delete SMS attendee scheduled reminders |
||
|
|
5bfb6fc148 |
refactor: SCIM - handleGroupEvents (#20537)
* Add logging to `handleGroupEvents` * `createUsersAndConnectOrg` skipDuplicates when creating new users * `ProfileRepository.createMany` to get username from `orgAutoAcceptEmail` * Refactor `createUsersAndConnectToOrg` to use `createMany` instead of individual db calls * Add error logging to `sendSignupToOrganizationEmail` * Move `sendSignupToOrganizationEmail` to a `Promise.allSettled` * Add `createManyForExistingUsers` and `createManyPromise` * Move creating existing users profiles to `ProfileRepository.createManyForExistingUsers` * Move `sendExistingUserTeamInviteEmails` to a `Promise.allSettled` * Refactor `createUsersAndConnectToOrg` to use `ProfileRepository.createManyPromise` * Type fix * Create `generateNewChildEventTypeDataForDB` * Create `addNewMembersToEventTypes` * Type fix * Type fix * Type fix * `createMany` new workflowsOnEventTypes * Introduce `DATABASE_CHUNK_SIZE` * Batch connect children event types * Batch connect profiles to existing users |
||
|
|
8c9eb18463 |
chore: Add spam checking for workflow bodies (#18822)
* Add akismet package to tasker * Create scanWorkflowBody task * Schedule workflow body scan * Add AKISMET_API_KEY .env * Auto lock user if spam is detected * Uncommit key * Add safe param to workflow step * Migration for safe field * Do not process workflow steps is `safe` is false * Update migration to set previous records to true * Address comments * Refactor `scheduleWorkflowNotifications` to accept an object * If new steps or editing old ones send to tasker * Call `scheduleWorkflowNotifications` in task * Fix `IS_SELF_HOSTED` * Remove unused function * Make `safe` optional in schema * Type fix * Revert "Make `safe` optional in schema" This reverts commit d0964702affa87c35562300301473d25635c565b. * Revert "Type fix" This reverts commit d9a031303269a2994ae46f576ab2a3d31e4d977b. * Type fixes * Type fixes * Address comments * Fix tests * Add tests * Update tests * Typo fix * Update `safe` to `verifiedAt` * feat: Compare workflow reminder bodies to default template (#19060) * Add `getTemplateForAction` function * Use `getTemplateForAction` when creating a new step * Use `getTemplateForAction` when action changes * Have `emailReminderTemplate` accept an object as a param * Rename `getTemplateForAction` to `getTemplateBodyForAction` * Simplify changing body when changing templates * Create `compareReminderBodyToTemplate` * In task, compare if reminderBody is a template * Linting * Add tests * refactor: `emailReminderTemplate` to accept object as param (#19288) * Add `getTemplateForAction` function * Use `getTemplateForAction` when creating a new step * Use `getTemplateForAction` when action changes * Have `emailReminderTemplate` accept an object as a param * Rename `getTemplateForAction` to `getTemplateBodyForAction` * Simplify changing body when changing templates * Create `compareReminderBodyToTemplate` * In task, compare if reminderBody is a template * Linting * Add tests * Refactor `scheduleEmailReminders` * Refactor `create.handler` for new workflows * Refactor `emailReminderManager` * Refactor `getEmailTemplateText` * Fix typo * Type fix - whatsapp plain text template imports * Type fix - no template found * Type fix - add `isBrandingDisabled` to `emailReminderTemplate` * Add workflow and user to prisma mock * Fix imports for akismet dependencies * Record user lock reason * Undo linting changes * Fix tests * New workflow, at verify created step * Handle if `SCANNING_WORKFLOW_STEPS` is toggled * Move `verifiedAt` checks to specific schedule functions - `scheduleWhatsappReminder` - `scheduleEmailReminder` - `scheduleSMSReminder` * Update logic * Do not fallback verifiedAt * Add comment to next.config.js |
||
|
|
3456477012 | chore: Upgrade lingo.dev (#20430) | ||
|
|
099c534daa |
feat: dub refer embed (#20258)
* feat: dub refer embed * review fix * review fix * @dub/embed-core seems not needed * @dub/embed-core can stay in web * move refer page out of main-nav * update yarn lock * use loading.tsx --------- Co-authored-by: Peer Richelsen <peeroke@gmail.com> Co-authored-by: hbjORbj <sldisek783@gmail.com> |
||
|
|
9b952fd922 | chore: Set daily video testing meeting link to env var (#20359) | ||
|
|
8ad442f2be |
feat: Upgrade to Next 15 (#18834)
* wip * update layoutHOC * wip * remove app router related code no longer used * remove more * await cookies, headers, params, serachparams * update yarn.lock * await cookies, headers, params, serachparams more * update yarn lock again * downgrade next-auth to 4.22.1 * update yarn lock * fix * update yarn lock * fix type checks * update yarn lock * await headers and cookies * restore pages folder * restore yarn.lock * update yarn.lock * await headers and cookies * remove * await params in API routes * updates * restore next.config.js * remove i18n from next.config.js * Fixed tests * Fixed types * Removed duplicate favicon.ico * Fixing more types * ImageResponse moved to next/og * Fixed prisma import issues * dynamic import for @ewsjs/xhr * remove deasync dep * dynamic import for @tryvital/vital-node * fix type checks * add back turbopack command * Type fix * Removed unneeded file * fix turbopack relative path errors * add comments * remove unneeded code * Fixed build errors * await apis * use Promise<Params> type in defaultResponderForAppDir util * refactor scim api route * fix type checks * separate app-routing.config into client-config and server-config * wip * refactor routing forms components * revert unneeded changes for easier review * fix * fix * use CustomTrans * fix type * fix unit tests * fix type error * fix build error * fix build error * fix build error * fix warnings * fix warnings * upgrade @tremor/react and tailwindcss * numCols -> numItems * fix forgot-password e2e test * fix 1 more e2e test * fix login e2e test * fix e2e tests * fix e2e tests * clean up * remove error * use tremor/react 2.11.0 * fix * rename CustomTrans to ServerTrans * address comment * fix test * fix ServerTrans * fix * fix type * fix ServerTrans usages 1 * fix translations * fix type checks * fix type checks * link styling * fix --------- Co-authored-by: Keith Williams <keithwillcode@gmail.com> Co-authored-by: Anik Dhabal Babu <81948346+anikdhabal@users.noreply.github.com> |
||
|
|
587af33179 |
perf: Use built types for appRouter (#20083)
* perf: Use built types for appRouter * Got it working just for server * Added dependency to turbo.json |
||
|
|
0e5a0bfa7b |
feat: store cal video recording on s3 (#17050)
* feat: store cal video recording on s3 * fix: type error * chore: update name and add condition |
||
|
|
837349e3d3 |
feat: Organization onboarding improvement - Payment before creation of org but onboarding doesn't require payment (#18990)
* create seed for org upgrade * migrate about/new pages * pages refactor + use persistant zustand store * invited members view + confirm button * add check to org slug * check reserved subdomain * remove quotes from subdomain env var * intro to creation + billing * create price * fix types * createWithPaymentIntent + permission check on teams * open stripe link in popup * intro to tests * organization price and seat override tests * move permissions to a new permission service * update env and permission check * intro to paid invoice trigger * dont use subId * wip * Get e2e working with migration of teams and members * fix ts errors * Get flow working again * Fix various issues and refactor * Some more fixes * Fix wrong page route link * Platform onboarding fix and moving members of team to org rix * Platform onboarding fix and moving members of team to org rix * Fix tests, found a bug * Get custom price flow working * Get admin impersonation flow working for a non-existent user * Fix unit test * Admin onboarding handover * fix admin onboarding tests * fix ts error * Get updateQuantity working * More fixes * fix test * fix schema name * Add tests * Add missing file * More tests * Add more tests * fix mt-2 moving down input into overflow * fix handover layout removing HOC * Update PR_TODO.md * fix ts error due to merge conflict --------- Co-authored-by: Hariom Balhara <hariombalhara@gmgmail.com> Co-authored-by: Hariom <hariombalhara@gmail.com> Co-authored-by: Omar López <zomars@me.com> |
||
|
|
be77ac133c |
feat: Domain-wide delegation for Google Calendar and Google Meet (#16622)
* Add endpoints for testing the flow * Add MVP * new route * Fixes * Fixes * Remove enable toggle support from domainWideDelegation * Fixes * Revert "Remove enable toggle support from domainWideDelegation" This reverts commit c29e729206cd1fa063f9c9ce0cf148ef1577d60b. * Revert yarn.lock * More fixes * Fix new workspace platform add * refactor: improvements * refactor: bug fixes and improvements * fix: type errors * fix: conflicts * chore: update test * fix: logic * chore: improvements * fix: toglle * fix: bugs * fix: type err * chore: check number type * fix: after conflicts * chore: fix type err * fix: type errors and tests * fix: tets * test * chore: remove unused * fix: google meet url on booking page and secondary calendar * fix: add property * fix: type err * fix: re assingment bug * fix: use getAllCredentials * chore: fix import * fix: installed count * fix: pass event type * fix: import * fix: [Stacked PR] Review fixes (#17958) * Review fixes * fix: destination calendar bug --------- Co-authored-by: Udit Takkar <udit222001@gmail.com> * refactor: use repository * chore: remove duplicate * fix: More review fixes for domain wide delegation (#17969) * Reuse buildCredentialPayloadForCalendar * fixes --------- Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com> * fix ts error * Fix getSchedule not using dwd credentials (#17995) * fix: Remove direct DWD table access from google-calendar and remove delegatedToId column from Credential (#18015) * Remove fn rename to reduce number of files changed * chore: check feature globally * test: add unit tests * chore: move function * test: add booking test * wip * Remove domain-wide-delegation team feature flag * Make sure duplicate calendars are not shown due to DWD. Show DWD when there is conflict * Fix tests and their ts errors * Fix more tests * Move findUsersForAvailabilityCheck to separate file as it has AppStore dependency causing problem with Routing Forms. Build crashes * fix: Multiple calendar connections from Google not showing up in apps/installed * DestinationCalendar must have either credentialId or domainWideDeelgationId. Also handle the case when DWD is disabled and there was a non-dwd credential that could be used * Disable deletetion of DWD as it is destructive and prefer disabling instead * Show DWD credential calendars at the top * Fixed tests * Calendar Cache DWD support * Self-Review: Verify email required and add more selectedCalendar tests * Self Review: shorten names * Self ReviewL Dead code removal * Revert "Calendar Cache DWD support" This reverts commit 009f236470fa21eba5986117d4f6e4d4c5e38c34. * Some misc fixes * fixes * Performance improvememt in slots loading and booking * More cases for handling dwd credentials * simplify the logic. Ensure that EventManager and the modules below it in the flow have CredentialForCalendarService available * Fix tests * Fix installed/conferencing not showing gogole meet * Shorten name * Fix ApI v2 tests * Add some more tests * add getSchedule tests * Improve tests * Make Google Meet default when DWD for google is enabled * Enable feature flagging for DWD * chore: bump libraries * Encrypt serviceaccount private key * Fix ts errors * bump platform libraries * org add dwd * org add dwd * bump platform libraries * fix selected calendars * fix remove selected dwd calendar * remove oauthclient id aliad in authedCalendar * remove oauthclient id aliad in authedCalendar * refactor: OrganizationsDwdController * chore: export toggleDwdEnabled from platform-libraries * feat: v2 update (enable / disable) dwd * refactor: SelectedCalendarsController check if user belongs to dwd org & for not dwd use previous logic * wip: DestinationCalendar send domainWideDelegationCredentialId from frontend to api * try fix set destination calendar api v2 * fixup! try fix set destination calendar api v2 * setting google meet as default location working for dwd * bump platform libraries version * allow office 365 workspace slug * allow office 365 workspace slug * chore: v2 create dwd MS and Google service keys input * fix: CreateDwdInput serviceAccountKey * fix: CredentialForCalendarService type * fix: check workspace slug * feat: update serviceAccessKey of DWD * testing * fixup! testing * fix: getAuthUtl bug * fix: unit tests * fix: type err and unit test * fix: e2e test * fix: credentials bug and failing unit tests * Update CalendarService.ts * chore: refactor office365 calendar service and add testDomainWideDelegationSetup * fix: office365Calendar use correct clientId/Secret for DWD * fix: office365Calendar dwd no need refresh token * test: add unit test for outlook dwd and setup * feat: added dwd support for office365 calendar * feat: added dwd support for office365 video * test: finish test for outlook dwd * fix: create dialog bug * chore: remove console logs * fix: refreshToken bug * bump version libraries * refactor: fetch dwd credentials only in findQualifiedHosts * fixup! refactor: fetch dwd credentials only in findQualifiedHosts * fix: type err * fix: type err * fix: getUserDisplayName * fix: unit test * chore: bump platform lib --------- Co-authored-by: Syed Ali Shahbaz <52925846+alishaz-polymath@users.noreply.github.com> Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com> Co-authored-by: Udit Takkar <udit222001@gmail.com> Co-authored-by: Morgan Vernay <morgan@cal.com> Co-authored-by: supalarry <laurisskraucis@gmail.com> Co-authored-by: Somay Chauhan <somaychauhan98@gmail.com> Co-authored-by: Morgan <33722304+ThyMinimalDev@users.noreply.github.com> |
||
|
|
0ad5770bb9 |
fix: Valid timeslot marked 'slot no longer available' (#19590)
* Handle date mismatch b/w schedule key and slot * Add feature ollout support |
||
|
|
07789ba697 |
feat: Introduce a 'slot no longer available' message (#18935)
* feat: Don't allow unavailable slot's booking form to be visible - Send back to slots listing * Improvements * feat: Add env variables and strategies to prevent booking failures - Added new environment variables for configuring slot reservation and availability checks - Implemented strategies to handle concurrent bookings and slot availability - Updated Booker component and related files to support new reservation and slot checking mechanisms - Added README with detailed explanation of booking prevention strategies - Configured dynamic intervals for slot and reservation queries * docs: Update Booker README with detailed slot reservation and availability explanation - Clarified slot reservation behavior when multiple users access the same booking page - Added details about `getSchedule` refetching strategies and timing - Explained how slot availability is detected and communicated to users * Support for skip confirmation form flow * feat: Enhance slot availability and reservation mechanism - Refactored slot availability checking to support multiple slots - Added tentative selected timeslots to improve booking UX - Updated trpc handler to check availability for multiple slots - Introduced new store methods for managing tentative slot selections - Improved slot reservation and availability status tracking * refactor: Improve slot availability quick check mechanism - Renamed and restructured slot availability check parameters - Extracted quick availability checks into a separate hook - Updated type definitions for slot status and availability checks - Simplified slot availability logic in Booker and related components - Maintained cached state for quick availability checks * Support minimu booking check too * change data-testid * Rneame * Fix race condition with uid cookie not set * fix tests * Remove unsded variable --------- Co-authored-by: Hariom Balhara <hariombalhara@gmgmail.com> Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com> |
||
|
|
578f5dc16b |
feat: implement mintlify AI search into CMD+K (#18749)
Co-authored-by: Tushar Bhatt <95581504+TusharBhatt1@users.noreply.github.com> |