Skip to content

fix: Update prisma enums to platform libs#23604

Merged
emrysal merged 4 commits intomainfrom
bugfix/update-prisma-enums-to-platform-libs
Sep 4, 2025
Merged

fix: Update prisma enums to platform libs#23604
emrysal merged 4 commits intomainfrom
bugfix/update-prisma-enums-to-platform-libs

Conversation

@emrysal
Copy link
Contributor

@emrysal emrysal commented Sep 4, 2025

What does this PR do?

Updates @calcom/prisma/enums paths to @calcom/platform-libraries for prisma enums

@emrysal emrysal requested a review from a team September 4, 2025 22:21
@emrysal emrysal requested a review from a team as a code owner September 4, 2025 22:21
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Sep 4, 2025

Walkthrough

Bumps apps/api/v2 dependency @calcom/platform-libraries 0.0.338 → 0.0.340. Replaces many enum imports (MembershipRole, CreationSource, SchedulingType, AttributeType, TimeUnit, WebhookTriggerEvents, WorkflowTriggerEvents, WorkflowActions, WorkflowTemplates) from @calcom/prisma/enums (and @calcom/prisma/client in one file) to @calcom/platform-libraries. Updates packages/platform/libraries/index.ts to consolidate and re-export those enums. Adds an assertion to an event-types e2e test verifying hidden flag update. Removes two unused imports in oauth-clients.controller.ts. Extends exported UserWithProfile with an optional profiles? array.

Possibly related PRs


📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 6b02cae and 34f2ba8.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (2)
  • apps/api/v2/package.json (1 hunks)
  • packages/platform/libraries/index.ts (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • apps/api/v2/package.json
  • packages/platform/libraries/index.ts
⏰ Context from checks skipped due to timeout of 180000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Install dependencies / Yarn install & cache
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch bugfix/update-prisma-enums-to-platform-libs

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore or @coderabbit ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@keithwillcode keithwillcode added core area: core, team members only foundation labels Sep 4, 2025
@dosubot dosubot bot added the platform Anything related to our platform plan label Sep 4, 2025
@keithwillcode keithwillcode added this to the v5.7 milestone Sep 4, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (4)
apps/api/v2/src/modules/workflows/inputs/workflow-trigger.input.ts (1)

101-104: Bug: @isin used with nested array — validation will always fail.

@IsIn([WORKFLOW_TRIGGER_TYPES]) wraps the allowed values array in another array. Use the array directly.

Apply:

-  @IsIn([WORKFLOW_TRIGGER_TYPES])
+  @IsIn(WORKFLOW_TRIGGER_TYPES)
apps/api/v2/src/modules/workflows/inputs/workflow-step.input.ts (1)

59-66: Fix inverted entry in TEMPLATES_TO_ENUM (REMINDER).

The first mapping is reversed versus the others and likely wrong at runtime. Align all keys to template strings and values to enum members.

 export const TEMPLATES_TO_ENUM = {
-  [WorkflowTemplates.REMINDER]: REMINDER,
-  [CUSTOM]: WorkflowTemplates.CUSTOM,
-  [RESCHEDULED]: WorkflowTemplates.RESCHEDULED,
-  [CANCELLED]: WorkflowTemplates.CANCELLED,
-  [COMPLETED]: WorkflowTemplates.COMPLETED,
-  [RATING]: WorkflowTemplates.RATING,
+  [REMINDER]: WorkflowTemplates.REMINDER,
+  [CUSTOM]: WorkflowTemplates.CUSTOM,
+  [RESCHEDULED]: WorkflowTemplates.RESCHEDULED,
+  [CANCELLED]: WorkflowTemplates.CANCELLED,
+  [COMPLETED]: WorkflowTemplates.COMPLETED,
+  [RATING]: WorkflowTemplates.RATING,
 } as const;
apps/api/v2/src/modules/webhooks/outputs/webhook.output.ts (1)

52-55: Fix DTO type/decorator mismatch for DeleteManyWebhooksOutputResponseDto.data.

data is typed as string but decorated as a nested WebhookOutputDto — this will confuse Swagger and may break validation.

Apply one of the following; Option A aligns with current string type:

 export class DeleteManyWebhooksOutputResponseDto {
   @ApiProperty({ example: SUCCESS_STATUS, enum: [SUCCESS_STATUS, ERROR_STATUS] })
   @IsEnum([SUCCESS_STATUS, ERROR_STATUS])
   @Expose()
   status!: typeof SUCCESS_STATUS | typeof ERROR_STATUS;

-  @Expose()
-  @ValidateNested()
-  @Type(() => WebhookOutputDto)
-  data!: string;
+  @Expose()
+  data!: string;
 }

If data should be a DTO (or array), change the type instead:

-  data!: string;
+  @ValidateNested({ each: true })
+  @Type(() => WebhookOutputDto)
+  data!: WebhookOutputDto[]; // or WebhookOutputDto
apps/api/v2/src/ee/event-types/event-types_2024_06_14/controllers/event-types.controller.e2e-spec.ts (1)

2193-2196: Syntax error: stray "+" before expect

There's a leading "+" causing a test compile failure.

Apply this diff:

-        const responseBody: ApiSuccessResponse<EventTypeOutput_2024_06_14> = response.body;
-        const updatedEventType = responseBody.data;
-        +expect(updatedEventType.hidden).toBe(false);
+        const responseBody: ApiSuccessResponse<EventTypeOutput_2024_06_14> = response.body;
+        const updatedEventType = responseBody.data;
+        expect(updatedEventType.hidden).toBe(false);
🧹 Nitpick comments (17)
apps/api/v2/src/modules/workflows/inputs/workflow-trigger.input.ts (1)

132-165: Consistency: add validators to constant-typed trigger DTOs.

Several DTOs (Rejected/Requested/PaymentInitiated/Paid/NoShowUpdated) lack @IsString() and @IsIn([...]), unlike others. Add for uniform validation.

Example for one DTO (repeat similarly for the others):

 export class OnRejectedTriggerDto {
   @ApiProperty({
     description: "Trigger type for the workflow",
   })
+  @IsString()
+  @IsIn([BOOKING_REJECTED])
   type: typeof BOOKING_REJECTED = BOOKING_REJECTED;
 }
apps/api/v2/src/modules/organizations/memberships/inputs/create-organization-membership.input.ts (1)

16-21: Avoid enum drift in Swagger docs.

Hard-coding string literals can desync from MembershipRole. Reference the enum directly.

-  @ApiProperty({
-    enum: ["MEMBER", "OWNER", "ADMIN"],
-    description: "If you are platform customer then managed users should only have MEMBER role.",
-  })
+  @ApiProperty({
+    enum: MembershipRole,
+    description: "If you are platform customer then managed users should only have MEMBER role.",
+  })
apps/api/v2/src/modules/auth/guards/organization-roles/organization-roles.guard.ts (1)

66-67: Minor: simplify empty-roles check.

Object.keys(allowedRoles)?.length is redundant for arrays.

-    if (!allowedRoles?.length || !Object.keys(allowedRoles)?.length) {
+    if (!allowedRoles?.length) {
       return true;
     }
apps/api/v2/src/modules/memberships/memberships.repository.ts (1)

10-21: Prefer select to limit payloads in read paths.

To align with our Prisma guideline (“only select data you need”), consider adding select where full objects aren’t required (e.g., findMembershipByTeamId, findOrgUserMembership, getUserAdminOrOwnerTeamMembership).

Example for findMembershipByTeamId:

   async findMembershipByTeamId(teamId: number, userId: number) {
-    const membership = await this.dbRead.prisma.membership.findUnique({
+    const membership = await this.dbRead.prisma.membership.findUnique({
       where: {
         userId_teamId: {
           userId: userId,
           teamId: teamId,
         },
       },
+      select: { id: true, userId: true, teamId: true, role: true, accepted: true },
     });

Also applies to: 53-64, 127-138

apps/api/v2/src/modules/organizations/event-types/services/output.service.ts (3)

106-108: Prefer enum comparisons over string literals.

Use SchedulingType.MANAGED and SchedulingType.ROUND_ROBIN for type safety and future-proofing.

-      databaseEventType.schedulingType === "MANAGED"
+      databaseEventType.schedulingType === SchedulingType.MANAGED
         ? await this.getManagedEventTypeHosts(databaseEventType.id)
         : await this.getNonManagedEventTypeHosts(databaseEventType.hosts, databaseEventType.schedulingType);
@@
-      if (schedulingType === "ROUND_ROBIN") {
+      if (schedulingType === SchedulingType.ROUND_ROBIN) {

Also applies to: 175-176


47-47: Duplicate key in Pick list.

"lockTimeZoneToggleOnBookingPage" appears twice. Remove the duplicate.

   | "lockTimeZoneToggleOnBookingPage"
@@
-  | "lockTimeZoneToggleOnBookingPage"

Also applies to: 75-75


147-162: Batch user lookups to avoid N+1 queries in getManagedEventTypeHosts.

Mirror the batching approach used in getNonManagedEventTypeHosts.

-  async getManagedEventTypeHosts(eventTypeId: number) {
-    const children = await this.teamsEventTypesRepository.getEventTypeChildren(eventTypeId);
-    const transformedHosts: TeamEventTypeResponseHost[] = [];
-    for (const child of children) {
-      if (child.userId) {
-        const user = await this.usersRepository.findById(child.userId);
-        transformedHosts.push({
-          userId: child.userId,
-          name: user?.name || "",
-          username: user?.username || "",
-          avatarUrl: user?.avatarUrl,
-        });
-      }
-    }
-    return transformedHosts;
-  }
+  async getManagedEventTypeHosts(eventTypeId: number) {
+    const children = await this.teamsEventTypesRepository.getEventTypeChildren(eventTypeId);
+    const userIds = children.filter(c => !!c.userId).map(c => c.userId!) ;
+    const users = await this.usersRepository.findByIds(userIds);
+    const byId = new Map(users.map(u => [u.id, u]));
+    return children
+      .filter(c => !!c.userId)
+      .map((c) => {
+        const u = byId.get(c.userId!);
+        return {
+          userId: c.userId!,
+          name: u?.name || "",
+          username: u?.username || "",
+          avatarUrl: u?.avatarUrl,
+        } as TeamEventTypeResponseHost;
+      });
+  }
apps/api/v2/src/modules/teams/memberships/outputs/team-membership.output.ts (1)

74-78: Avoid enum drift in Swagger: use MembershipRole values instead of hard-coded strings.

Keeps docs in sync if enum changes upstream.

-  @ApiProperty({ enum: ["MEMBER", "OWNER", "ADMIN"] })
+  @ApiProperty({ enum: Object.values(MembershipRole) })
apps/api/v2/src/modules/organizations/memberships/inputs/update-organization-membership.input.ts (1)

12-15: Keep OpenAPI enum synced with source enum.

Use runtime values from MembershipRole to prevent drift.

-  @ApiPropertyOptional({ enum: ["MEMBER", "OWNER", "ADMIN"] })
+  @ApiPropertyOptional({ enum: Object.values(MembershipRole) })
apps/api/v2/src/modules/teams/memberships/inputs/create-team-membership.input.ts (1)

16-19: De-duplicate enum literals in Swagger.

Derive from MembershipRole to keep docs aligned.

-  @ApiPropertyOptional({ enum: ["MEMBER", "OWNER", "ADMIN"], default: "MEMBER" })
+  @ApiPropertyOptional({ enum: Object.values(MembershipRole), default: MembershipRole.MEMBER })
apps/api/v2/src/modules/teams/memberships/inputs/update-team-membership.input.ts (1)

12-15: Avoid Swagger enum drift by using the source enum.

Use MembershipRole directly instead of a hard-coded string array for docs.

Apply:

-  @ApiPropertyOptional({ enum: ["MEMBER", "OWNER", "ADMIN"] })
+  @ApiPropertyOptional({ enum: MembershipRole })
apps/api/v2/src/ee/bookings/2024-04-15/controllers/bookings.controller.ts (1)

512-542: Possible unused helper — consider cleanup.

createNextApiRecurringBookingRequest appears unused within this controller; if not referenced elsewhere, remove to reduce maintenance surface.

apps/api/v2/src/modules/workflows/workflows.repository.ts (1)

22-33: Prefer Prisma select over include to limit payloads.

Multiple queries expand relations with include (steps, activeOn). To align with the repo guideline (“never use include; always select”), switch to select and enumerate only necessary fields (including top-level fields you actually need).

I can draft select shapes (e.g., activeOn: { select: { eventTypeId: true } } and minimal fields for Workflow/WorkflowStep) if you share which fields are consumed downstream.

Also applies to: 37-48, 54-63

apps/api/v2/src/modules/users/users.repository.ts (2)

73-87: Align Prisma queries with select to avoid overfetching and accidental PII exposure.

Several lookups use include on user, profiles, calendars, etc. Prefer select and define a reusable userSafeSelect to consistently whitelist fields returned from repositories.

Example pattern for findByIdWithProfile:

- return this.dbRead.prisma.user.findUnique({
-   where: { id: userId },
-   include: {
-     movedToProfile: { include: { organization: { select: { isPlatform: true, name: true, slug: true, id: true } } } },
-     profiles: { include: { organization: { select: { isPlatform: true, name: true, slug: true, id: true } } } },
-   },
- });
+ const userSafeSelect = {
+   id: true,
+   email: true,
+   username: true,
+   locale: true,
+   defaultScheduleId: true,
+   movedToProfile: {
+     select: { organization: { select: { isPlatform: true, name: true, slug: true, id: true } } },
+   },
+   profiles: {
+     select: { organization: { select: { isPlatform: true, name: true, slug: true, id: true } }, username: true, id: true },
+   },
+ } as const;
+ return this.dbRead.prisma.user.findUnique({
+   where: { id: userId },
+   select: userSafeSelect,
+ });

If helpful, I can propagate this refactor across the repository queries in this file.

Also applies to: 89-108, 153-167, 283-293, 133-143


260-264: No-op setter — remove or implement intended normalization.

formatInput reassigns the same value; either implement the intended transformation (e.g., normalize weekStart) or drop the method.

-  formatInput(userInput: CreateManagedUserInput | UpdateManagedUserInput) {
-    if (userInput.weekStart) {
-      userInput.weekStart = userInput.weekStart;
-    }
-  }
+  // formatInput reserved for future normalization; currently unused.
apps/api/v2/src/modules/organizations/teams/index/outputs/organization-team.output.ts (1)

14-19: Optional: use enum directly in Swagger/class-validator decorators

Using the enum object avoids duplicating allowed values and keeps it future-proof if new roles are added.

Apply this diff:

-  @ApiProperty({
-    example: MembershipRole.MEMBER,
-    enum: [MembershipRole.ADMIN, MembershipRole.OWNER, MembershipRole.MEMBER],
-  })
-  @IsEnum([MembershipRole.ADMIN, MembershipRole.OWNER, MembershipRole.MEMBER])
+  @ApiProperty({ example: MembershipRole.MEMBER, enum: MembershipRole })
+  @IsEnum(MembershipRole)
apps/api/v2/src/modules/oauth-clients/controllers/oauth-clients/oauth-clients.controller.ts (1)

72-75: Avoid logging full request bodies

Body may contain sensitive/PII. Prefer allowlisting fields in logs.

Apply this diff:

-    this.logger.log(
-      `For organisation ${organizationId} creating OAuth Client with data: ${JSON.stringify(body)}`
-    );
+    this.logger.log(
+      `For organisation ${organizationId} creating OAuth Client with data: ${JSON.stringify({
+        name: body?.name,
+        redirectUris: body?.redirectUris?.length,
+        permissions: body?.permissions,
+      })}`
+    );
-    this.logger.log(`For client ${clientId} updating OAuth Client with data: ${JSON.stringify(body)}`);
+    this.logger.log(
+      `For client ${clientId} updating OAuth Client with data: ${JSON.stringify({
+        name: body?.name,
+        redirectUris: body?.redirectUris?.length,
+        permissions: body?.permissions,
+      })}`
+    );

Also applies to: 143-144

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 6f05142 and 0d3a357.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (34)
  • apps/api/v2/package.json (1 hunks)
  • apps/api/v2/src/ee/bookings/2024-04-15/controllers/bookings.controller.ts (1 hunks)
  • apps/api/v2/src/ee/bookings/2024-08-13/services/input.service.ts (1 hunks)
  • apps/api/v2/src/ee/event-types/event-types_2024_06_14/controllers/event-types.controller.e2e-spec.ts (1 hunks)
  • apps/api/v2/src/lib/roles/constants.ts (1 hunks)
  • apps/api/v2/src/modules/auth/decorators/roles/membership-roles.decorator.ts (1 hunks)
  • apps/api/v2/src/modules/auth/guards/organization-roles/organization-roles.guard.ts (1 hunks)
  • apps/api/v2/src/modules/memberships/memberships.repository.ts (1 hunks)
  • apps/api/v2/src/modules/oauth-clients/controllers/oauth-client-users/oauth-client-users.controller.ts (1 hunks)
  • apps/api/v2/src/modules/oauth-clients/controllers/oauth-client-webhooks/oauth-client-webhooks.controller.ts (1 hunks)
  • apps/api/v2/src/modules/oauth-clients/controllers/oauth-clients/oauth-clients.controller.ts (1 hunks)
  • apps/api/v2/src/modules/oauth-clients/services/oauth-clients-users.service.ts (1 hunks)
  • apps/api/v2/src/modules/organizations/attributes/index/inputs/create-organization-attribute.input.ts (1 hunks)
  • apps/api/v2/src/modules/organizations/attributes/index/inputs/update-organization-attribute.input.ts (1 hunks)
  • apps/api/v2/src/modules/organizations/event-types/organizations-event-types.e2e-spec.ts (1 hunks)
  • apps/api/v2/src/modules/organizations/event-types/services/output.service.ts (1 hunks)
  • apps/api/v2/src/modules/organizations/memberships/inputs/create-organization-membership.input.ts (1 hunks)
  • apps/api/v2/src/modules/organizations/memberships/inputs/update-organization-membership.input.ts (1 hunks)
  • apps/api/v2/src/modules/organizations/teams/index/outputs/organization-team.output.ts (1 hunks)
  • apps/api/v2/src/modules/organizations/teams/memberships/inputs/create-organization-team-membership.input.ts (1 hunks)
  • apps/api/v2/src/modules/organizations/teams/memberships/inputs/update-organization-team-membership.input.ts (1 hunks)
  • apps/api/v2/src/modules/organizations/users/index/inputs/create-organization-user.input.ts (1 hunks)
  • apps/api/v2/src/modules/organizations/users/index/services/organizations-users-service.ts (1 hunks)
  • apps/api/v2/src/modules/teams/memberships/inputs/create-team-membership.input.ts (1 hunks)
  • apps/api/v2/src/modules/teams/memberships/inputs/update-team-membership.input.ts (1 hunks)
  • apps/api/v2/src/modules/teams/memberships/outputs/team-membership.output.ts (1 hunks)
  • apps/api/v2/src/modules/users/users.repository.ts (1 hunks)
  • apps/api/v2/src/modules/webhooks/inputs/webhook.input.ts (1 hunks)
  • apps/api/v2/src/modules/webhooks/outputs/webhook.output.ts (1 hunks)
  • apps/api/v2/src/modules/workflows/inputs/workflow-step.input.ts (1 hunks)
  • apps/api/v2/src/modules/workflows/inputs/workflow-trigger.input.ts (1 hunks)
  • apps/api/v2/src/modules/workflows/workflows.repository.ts (1 hunks)
  • apps/api/v2/test/fixtures/repository/membership.repository.fixture.ts (1 hunks)
  • packages/platform/libraries/index.ts (1 hunks)
🧰 Additional context used
📓 Path-based instructions (4)
**/*.ts

📄 CodeRabbit inference engine (.cursor/rules/review.mdc)

**/*.ts: For Prisma queries, only select data you need; never use include, always use select
Ensure the credential.key field is never returned from tRPC endpoints or APIs

Files:

  • apps/api/v2/src/modules/organizations/memberships/inputs/create-organization-membership.input.ts
  • apps/api/v2/src/modules/oauth-clients/controllers/oauth-client-users/oauth-client-users.controller.ts
  • apps/api/v2/src/modules/workflows/inputs/workflow-trigger.input.ts
  • apps/api/v2/src/modules/teams/memberships/inputs/update-team-membership.input.ts
  • apps/api/v2/src/lib/roles/constants.ts
  • apps/api/v2/src/modules/oauth-clients/controllers/oauth-client-webhooks/oauth-client-webhooks.controller.ts
  • apps/api/v2/src/modules/auth/guards/organization-roles/organization-roles.guard.ts
  • apps/api/v2/src/modules/workflows/inputs/workflow-step.input.ts
  • apps/api/v2/src/modules/organizations/event-types/services/output.service.ts
  • apps/api/v2/src/modules/webhooks/outputs/webhook.output.ts
  • apps/api/v2/src/modules/oauth-clients/services/oauth-clients-users.service.ts
  • apps/api/v2/src/modules/organizations/users/index/services/organizations-users-service.ts
  • apps/api/v2/src/modules/webhooks/inputs/webhook.input.ts
  • apps/api/v2/src/modules/organizations/event-types/organizations-event-types.e2e-spec.ts
  • apps/api/v2/src/modules/organizations/attributes/index/inputs/update-organization-attribute.input.ts
  • apps/api/v2/src/modules/teams/memberships/inputs/create-team-membership.input.ts
  • apps/api/v2/src/ee/bookings/2024-08-13/services/input.service.ts
  • apps/api/v2/test/fixtures/repository/membership.repository.fixture.ts
  • apps/api/v2/src/modules/organizations/teams/memberships/inputs/create-organization-team-membership.input.ts
  • apps/api/v2/src/modules/organizations/memberships/inputs/update-organization-membership.input.ts
  • apps/api/v2/src/ee/event-types/event-types_2024_06_14/controllers/event-types.controller.e2e-spec.ts
  • apps/api/v2/src/modules/auth/decorators/roles/membership-roles.decorator.ts
  • apps/api/v2/src/modules/organizations/users/index/inputs/create-organization-user.input.ts
  • apps/api/v2/src/modules/organizations/attributes/index/inputs/create-organization-attribute.input.ts
  • apps/api/v2/src/modules/workflows/workflows.repository.ts
  • apps/api/v2/src/ee/bookings/2024-04-15/controllers/bookings.controller.ts
  • apps/api/v2/src/modules/memberships/memberships.repository.ts
  • apps/api/v2/src/modules/users/users.repository.ts
  • apps/api/v2/src/modules/organizations/teams/index/outputs/organization-team.output.ts
  • packages/platform/libraries/index.ts
  • apps/api/v2/src/modules/organizations/teams/memberships/inputs/update-organization-team-membership.input.ts
  • apps/api/v2/src/modules/oauth-clients/controllers/oauth-clients/oauth-clients.controller.ts
  • apps/api/v2/src/modules/teams/memberships/outputs/team-membership.output.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/review.mdc)

Flag excessive Day.js use in performance-critical code; prefer native Date or Day.js .utc() in hot paths like loops

Files:

  • apps/api/v2/src/modules/organizations/memberships/inputs/create-organization-membership.input.ts
  • apps/api/v2/src/modules/oauth-clients/controllers/oauth-client-users/oauth-client-users.controller.ts
  • apps/api/v2/src/modules/workflows/inputs/workflow-trigger.input.ts
  • apps/api/v2/src/modules/teams/memberships/inputs/update-team-membership.input.ts
  • apps/api/v2/src/lib/roles/constants.ts
  • apps/api/v2/src/modules/oauth-clients/controllers/oauth-client-webhooks/oauth-client-webhooks.controller.ts
  • apps/api/v2/src/modules/auth/guards/organization-roles/organization-roles.guard.ts
  • apps/api/v2/src/modules/workflows/inputs/workflow-step.input.ts
  • apps/api/v2/src/modules/organizations/event-types/services/output.service.ts
  • apps/api/v2/src/modules/webhooks/outputs/webhook.output.ts
  • apps/api/v2/src/modules/oauth-clients/services/oauth-clients-users.service.ts
  • apps/api/v2/src/modules/organizations/users/index/services/organizations-users-service.ts
  • apps/api/v2/src/modules/webhooks/inputs/webhook.input.ts
  • apps/api/v2/src/modules/organizations/event-types/organizations-event-types.e2e-spec.ts
  • apps/api/v2/src/modules/organizations/attributes/index/inputs/update-organization-attribute.input.ts
  • apps/api/v2/src/modules/teams/memberships/inputs/create-team-membership.input.ts
  • apps/api/v2/src/ee/bookings/2024-08-13/services/input.service.ts
  • apps/api/v2/test/fixtures/repository/membership.repository.fixture.ts
  • apps/api/v2/src/modules/organizations/teams/memberships/inputs/create-organization-team-membership.input.ts
  • apps/api/v2/src/modules/organizations/memberships/inputs/update-organization-membership.input.ts
  • apps/api/v2/src/ee/event-types/event-types_2024_06_14/controllers/event-types.controller.e2e-spec.ts
  • apps/api/v2/src/modules/auth/decorators/roles/membership-roles.decorator.ts
  • apps/api/v2/src/modules/organizations/users/index/inputs/create-organization-user.input.ts
  • apps/api/v2/src/modules/organizations/attributes/index/inputs/create-organization-attribute.input.ts
  • apps/api/v2/src/modules/workflows/workflows.repository.ts
  • apps/api/v2/src/ee/bookings/2024-04-15/controllers/bookings.controller.ts
  • apps/api/v2/src/modules/memberships/memberships.repository.ts
  • apps/api/v2/src/modules/users/users.repository.ts
  • apps/api/v2/src/modules/organizations/teams/index/outputs/organization-team.output.ts
  • packages/platform/libraries/index.ts
  • apps/api/v2/src/modules/organizations/teams/memberships/inputs/update-organization-team-membership.input.ts
  • apps/api/v2/src/modules/oauth-clients/controllers/oauth-clients/oauth-clients.controller.ts
  • apps/api/v2/src/modules/teams/memberships/outputs/team-membership.output.ts
**/*.{ts,tsx,js,jsx}

⚙️ CodeRabbit configuration file

Flag default exports and encourage named exports. Named exports provide better tree-shaking, easier refactoring, and clearer imports. Exempt main components like pages, layouts, and components that serve as the primary export of a module.

Files:

  • apps/api/v2/src/modules/organizations/memberships/inputs/create-organization-membership.input.ts
  • apps/api/v2/src/modules/oauth-clients/controllers/oauth-client-users/oauth-client-users.controller.ts
  • apps/api/v2/src/modules/workflows/inputs/workflow-trigger.input.ts
  • apps/api/v2/src/modules/teams/memberships/inputs/update-team-membership.input.ts
  • apps/api/v2/src/lib/roles/constants.ts
  • apps/api/v2/src/modules/oauth-clients/controllers/oauth-client-webhooks/oauth-client-webhooks.controller.ts
  • apps/api/v2/src/modules/auth/guards/organization-roles/organization-roles.guard.ts
  • apps/api/v2/src/modules/workflows/inputs/workflow-step.input.ts
  • apps/api/v2/src/modules/organizations/event-types/services/output.service.ts
  • apps/api/v2/src/modules/webhooks/outputs/webhook.output.ts
  • apps/api/v2/src/modules/oauth-clients/services/oauth-clients-users.service.ts
  • apps/api/v2/src/modules/organizations/users/index/services/organizations-users-service.ts
  • apps/api/v2/src/modules/webhooks/inputs/webhook.input.ts
  • apps/api/v2/src/modules/organizations/event-types/organizations-event-types.e2e-spec.ts
  • apps/api/v2/src/modules/organizations/attributes/index/inputs/update-organization-attribute.input.ts
  • apps/api/v2/src/modules/teams/memberships/inputs/create-team-membership.input.ts
  • apps/api/v2/src/ee/bookings/2024-08-13/services/input.service.ts
  • apps/api/v2/test/fixtures/repository/membership.repository.fixture.ts
  • apps/api/v2/src/modules/organizations/teams/memberships/inputs/create-organization-team-membership.input.ts
  • apps/api/v2/src/modules/organizations/memberships/inputs/update-organization-membership.input.ts
  • apps/api/v2/src/ee/event-types/event-types_2024_06_14/controllers/event-types.controller.e2e-spec.ts
  • apps/api/v2/src/modules/auth/decorators/roles/membership-roles.decorator.ts
  • apps/api/v2/src/modules/organizations/users/index/inputs/create-organization-user.input.ts
  • apps/api/v2/src/modules/organizations/attributes/index/inputs/create-organization-attribute.input.ts
  • apps/api/v2/src/modules/workflows/workflows.repository.ts
  • apps/api/v2/src/ee/bookings/2024-04-15/controllers/bookings.controller.ts
  • apps/api/v2/src/modules/memberships/memberships.repository.ts
  • apps/api/v2/src/modules/users/users.repository.ts
  • apps/api/v2/src/modules/organizations/teams/index/outputs/organization-team.output.ts
  • packages/platform/libraries/index.ts
  • apps/api/v2/src/modules/organizations/teams/memberships/inputs/update-organization-team-membership.input.ts
  • apps/api/v2/src/modules/oauth-clients/controllers/oauth-clients/oauth-clients.controller.ts
  • apps/api/v2/src/modules/teams/memberships/outputs/team-membership.output.ts
**/*.{service,repository}.ts

📄 CodeRabbit inference engine (.cursor/rules/review.mdc)

Avoid dot-suffixes like .service.ts or .repository.ts for new files; reserve .test.ts, .spec.ts, .types.ts for their specific purposes

Files:

  • apps/api/v2/src/modules/organizations/event-types/services/output.service.ts
  • apps/api/v2/src/modules/oauth-clients/services/oauth-clients-users.service.ts
  • apps/api/v2/src/ee/bookings/2024-08-13/services/input.service.ts
  • apps/api/v2/src/modules/workflows/workflows.repository.ts
  • apps/api/v2/src/modules/memberships/memberships.repository.ts
  • apps/api/v2/src/modules/users/users.repository.ts
🧠 Learnings (5)
📚 Learning: 2025-08-26T20:09:17.089Z
Learnt from: Udit-takkar
PR: calcom/cal.com#22995
File: packages/features/ee/workflows/components/WorkflowStepContainer.tsx:641-649
Timestamp: 2025-08-26T20:09:17.089Z
Learning: In packages/features/ee/workflows/components/WorkflowStepContainer.tsx, Cal.AI actions are intentionally filtered out/hidden for organization workflows when props.isOrganization is true. This restriction is by design per maintainer Udit-takkar in PR #22995, despite the broader goal of enabling Cal.AI self-serve.

Applied to files:

  • apps/api/v2/src/modules/workflows/inputs/workflow-step.input.ts
📚 Learning: 2025-08-27T13:32:46.887Z
Learnt from: supalarry
PR: calcom/cal.com#23364
File: apps/api/v2/src/ee/event-types/event-types_2024_06_14/transformers/internal-to-api/internal-to-api.spec.ts:295-296
Timestamp: 2025-08-27T13:32:46.887Z
Learning: In calcom/cal.com, when transforming booking fields from internal to API format, tests in organizations-event-types.e2e-spec.ts already expect name field label and placeholder to be empty strings ("") rather than undefined. PR changes that set these to explicit empty strings are typically fixing implementation to match existing test expectations rather than breaking changes.

Applied to files:

  • apps/api/v2/src/modules/organizations/event-types/services/output.service.ts
  • apps/api/v2/src/modules/organizations/event-types/organizations-event-types.e2e-spec.ts
  • apps/api/v2/src/ee/bookings/2024-08-13/services/input.service.ts
  • apps/api/v2/src/ee/event-types/event-types_2024_06_14/controllers/event-types.controller.e2e-spec.ts
  • apps/api/v2/src/ee/bookings/2024-04-15/controllers/bookings.controller.ts
📚 Learning: 2025-08-21T13:44:06.805Z
Learnt from: supalarry
PR: calcom/cal.com#23217
File: apps/api/v2/src/ee/event-types/event-types_2024_06_14/services/output-event-types.service.ts:93-94
Timestamp: 2025-08-21T13:44:06.805Z
Learning: In apps/api/v2/src/ee/event-types/event-types_2024_06_14/event-types.repository.ts, repository functions that use explicit Prisma select clauses (like getEventTypeWithSeats) are used for specific purposes and don't need to include all EventType fields like bookingRequiresAuthentication. These methods don't feed into the general OutputEventTypesService_2024_06_14 flow.

Applied to files:

  • apps/api/v2/src/modules/organizations/event-types/services/output.service.ts
  • apps/api/v2/src/ee/event-types/event-types_2024_06_14/controllers/event-types.controller.e2e-spec.ts
📚 Learning: 2025-09-03T11:54:05.409Z
Learnt from: supalarry
PR: calcom/cal.com#23514
File: apps/api/v2/src/ee/bookings/2024-08-13/services/bookings.service.ts:579-582
Timestamp: 2025-09-03T11:54:05.409Z
Learning: In calcom/cal.com bookings repository methods, when Prisma select uses `eventType: true`, all eventType fields including seatsShowAttendees are automatically included in the selection. Explicit field selection is not required when using `true` for nested relations.

Applied to files:

  • apps/api/v2/src/modules/organizations/event-types/services/output.service.ts
📚 Learning: 2025-09-03T11:54:05.409Z
Learnt from: supalarry
PR: calcom/cal.com#23514
File: apps/api/v2/src/ee/bookings/2024-08-13/services/bookings.service.ts:579-582
Timestamp: 2025-09-03T11:54:05.409Z
Learning: In calcom/cal.com bookings repository methods, when Prisma include uses `eventType: true`, all eventType fields including seatsShowAttendees are automatically included in the selection. Explicit field selection is not required when using `true` for nested relations.

Applied to files:

  • apps/api/v2/src/modules/organizations/event-types/services/output.service.ts
⏰ Context from checks skipped due to timeout of 180000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Install dependencies / Yarn install & cache
🔇 Additional comments (31)
apps/api/v2/src/modules/workflows/inputs/workflow-trigger.input.ts (1)

5-5: Import path migration acknowledged.

TimeUnit and WorkflowTriggerEvents moved to platform-libraries; no behavioral change here.

apps/api/v2/src/modules/organizations/memberships/inputs/create-organization-membership.input.ts (1)

4-4: Import path migration looks good.

MembershipRole now sourced from platform-libraries; type/default remain correct.

apps/api/v2/src/modules/auth/guards/organization-roles/organization-roles.guard.ts (1)

9-9: Import path migration looks good.

Type-only use of MembershipRole aligns with platform-libraries export.

apps/api/v2/src/modules/oauth-clients/controllers/oauth-client-webhooks/oauth-client-webhooks.controller.ts (1)

24-24: Import path migration looks good.

MembershipRole now from platform-libraries; role checks remain unchanged.

apps/api/v2/src/modules/webhooks/inputs/webhook.input.ts (1)

4-4: LGTM: import migrated to platform-libraries.

Switching WebhookTriggerEvents to @calcom/platform-libraries aligns with the PR goal; no API surface change in this DTO.

apps/api/v2/src/modules/workflows/inputs/workflow-step.input.ts (1)

5-5: LGTM: enum imports consolidated under platform-libraries.

WorkflowActions and WorkflowTemplates re-exports look consistent with the migration.

apps/api/v2/src/modules/organizations/event-types/organizations-event-types.e2e-spec.ts (1)

27-27: LGTM: SchedulingType import updated.

Tests still exercise both enum and string representations elsewhere; this change is non-functional.

apps/api/v2/src/modules/memberships/memberships.repository.ts (1)

4-4: LGTM: MembershipRole import migrated.

Type-only usage in createMembership remains correct.

apps/api/v2/src/modules/oauth-clients/services/oauth-clients-users.service.ts (1)

14-14: LGTM: CreationSource import switched to platform-libraries.

No behavior change; value CreationSource.API_V2 remains the same.

apps/api/v2/src/modules/oauth-clients/controllers/oauth-client-users/oauth-client-users.controller.ts (1)

38-38: Approve: no lingering enum imports
No imports from "@calcom/prisma/enums" detected in apps/api/v2. MembershipRole import is properly migrated and decorator usage remains consistent.

apps/api/v2/src/modules/webhooks/outputs/webhook.output.ts (1)

6-6: Confirm runtime enum availability
Ensure the export { WebhookTriggerEvents } from "@calcom/prisma/enums" re-export brings in a value-bearing enum (object) at runtime—otherwise class-validator’s IsEnum() won’t work.

apps/api/v2/src/modules/organizations/event-types/services/output.service.ts (1)

15-15: SchedulingType import migrated — looks good.

apps/api/v2/test/fixtures/repository/membership.repository.fixture.ts (1)

6-6: Confirm MembershipRole value compatibility
Ensure the values exposed by MembershipRole (from @calcom/platform-libraries) exactly match the MembershipRole enum in your Prisma schema to prevent type/value mismatches during inserts.

apps/api/v2/src/modules/organizations/attributes/index/inputs/update-organization-attribute.input.ts (1)

4-4: Confirm runtime export of AttributeType
Unable to locate a runtime enum export in @calcom/platform-libraries; ensure AttributeType is re-exported as a runtime enum so IsEnum(AttributeType) validates correctly.

apps/api/v2/src/modules/organizations/attributes/index/inputs/create-organization-attribute.input.ts (1)

14-14: LGTM! Import path successfully updated to platform libraries.

The import source for AttributeType has been correctly updated from @calcom/prisma/enums to @calcom/platform-libraries, aligning with the broader migration strategy in this PR.

apps/api/v2/src/lib/roles/constants.ts (1)

1-1: LGTM! Import path successfully updated to platform libraries.

The import source for MembershipRole has been correctly updated from @calcom/prisma/enums to @calcom/platform-libraries, maintaining consistency with the PR's migration strategy.

apps/api/v2/src/modules/organizations/teams/memberships/inputs/create-organization-team-membership.input.ts (1)

4-4: LGTM! Import path successfully updated to platform libraries.

The import source for MembershipRole has been correctly updated from @calcom/prisma/enums to @calcom/platform-libraries, consistent with the broader enum migration in this PR.

apps/api/v2/package.json (1)

41-41: LGTM! Version bump aligns with the migration.

The dependency @calcom/platform-libraries has been correctly bumped from version 0.0.338 to 0.0.339, which supports the consolidated enum exports that this PR is migrating to.

apps/api/v2/src/modules/organizations/teams/memberships/inputs/update-organization-team-membership.input.ts (1)

4-4: LGTM! Import path successfully updated to platform libraries.

The import source for MembershipRole has been correctly updated from @calcom/prisma/enums to @calcom/platform-libraries, maintaining consistency with the PR's migration strategy.

apps/api/v2/src/modules/auth/decorators/roles/membership-roles.decorator.ts (1)

3-3: LGTM—no remaining @calcom/prisma/enums imports; please manually confirm that MembershipRole is exported by @calcom/platform-libraries

apps/api/v2/src/ee/bookings/2024-08-13/services/input.service.ts (1)

32-32: LGTM: CreationSource import path updated.

Usage of CreationSource.API_V2 below (Lines 125, 129, 264, 545, 549) remains correct.

apps/api/v2/src/modules/teams/memberships/outputs/team-membership.output.ts (1)

5-5: LGTM: MembershipRole import migrated to platform-libraries.

apps/api/v2/src/modules/organizations/memberships/inputs/update-organization-membership.input.ts (1)

4-4: LGTM: MembershipRole import path updated.

apps/api/v2/src/modules/teams/memberships/inputs/create-team-membership.input.ts (1)

4-4: LGTM: MembershipRole import path updated.

apps/api/v2/src/modules/teams/memberships/inputs/update-team-membership.input.ts (1)

4-4: Enum import path migration LGTM.

Matches the platform-libraries consolidation.

apps/api/v2/src/modules/workflows/workflows.repository.ts (1)

6-6: Enum import path migration LGTM.

TimeUnit and WorkflowTriggerEvents from platform-libraries are correct.

apps/api/v2/src/modules/users/users.repository.ts (2)

8-8: Enum import path migration LGTM.

CreationSource from platform-libraries keeps semantics unchanged (API_V2).


10-13: Verify downstream usage of optional profiles
Ensure all callers handle profiles possibly being undefined or null before accessing its properties.

apps/api/v2/src/ee/event-types/event-types_2024_06_14/controllers/event-types.controller.e2e-spec.ts (1)

33-33: Enum import migration looks correct

Importing SchedulingType from @calcom/platform-libraries aligns with the new re-export surface.

apps/api/v2/src/modules/organizations/teams/index/outputs/organization-team.output.ts (1)

6-6: Enum source updated to platform-libraries — good

MembershipRole import now points to @calcom/platform-libraries, consistent with the PR’s goal.

apps/api/v2/src/modules/oauth-clients/controllers/oauth-clients/oauth-clients.controller.ts (1)

40-40: Enum import migration looks correct

MembershipRole now comes from @calcom/platform-libraries; decorators still reference the same values.

getBookingForReschedule,
ErrorCode,
} from "@calcom/platform-libraries";
import { CreationSource } from "@calcom/platform-libraries";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

Enum import path migration LGTM.

CreationSource via @calcom/platform-libraries aligns with the new export surface.

Quick check for any stale CreationSource imports:


🏁 Script executed:

#!/bin/bash
rg -nP 'CreationSource.*from\s+["'\'']@calcom/prisma/enums["'\'']' --type=ts --type=tsx

Length of output: 117


🏁 Script executed:

#!/bin/bash
# Search for stale CreationSource imports from @calcom/prisma/enums
rg -n "CreationSource.*from\s+['\"]@calcom/prisma/enums['\"]" -g '*.ts' -g '*.tsx'

Length of output: 4907


Replace stale CreationSource imports
40 occurrences of

import { CreationSource } from "@calcom/prisma/enums";

remain across the codebase; update each to

import { CreationSource } from "@calcom/platform-libraries";
🤖 Prompt for AI Agents
In apps/api/v2/src/ee/bookings/2024-04-15/controllers/bookings.controller.ts
around line 60, the file imports CreationSource from the stale module
"@calcom/prisma/enums"; replace that import to use the new module
"@calcom/platform-libraries". Update the import statement to import
CreationSource from "@calcom/platform-libraries" and run a quick project-wide
search to replace the remaining occurrences (40 total) of the old import with
the new one.

import { IsString, IsOptional, IsBoolean, IsEnum } from "class-validator";

import { MembershipRole } from "@calcom/prisma/enums";
import { MembershipRole } from "@calcom/platform-libraries";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

Enum import path migration LGTM.

Importing MembershipRole from @calcom/platform-libraries is consistent with the PR’s objective.

Run to confirm no lingering enum imports from @calcom/prisma/enums:


🏁 Script executed:

#!/bin/bash
rg -nP 'from\s+["'\'']@calcom/prisma/enums["'\'']' --type=ts --type=tsx -S

Length of output: 104


🏁 Script executed:

#!/bin/bash
rg -nP 'from\s+["'"'"']@calcom/prisma/enums["'"'"']' -g '*.ts' -g '*.tsx' -n

Length of output: 75021


Migrate all remaining enum imports to @calcom/platform-libraries
The codebase still contains hundreds of imports from @calcom/prisma/enums (e.g. packages/emails/src/templates/OrganizerScheduledEmail.tsx, packages/trpc/server/routers/viewer/teams/changeMemberRole.handler.ts, etc.). Replace every import { … } from "@calcom/prisma/enums" with the corresponding import from @calcom/platform-libraries.

🤖 Prompt for AI Agents
In
apps/api/v2/src/modules/organizations/users/index/inputs/create-organization-user.input.ts
around line 5, replace any import of enums from "@calcom/prisma/enums" with the
corresponding import from "@calcom/platform-libraries"; specifically ensure
MembershipRole is imported from "@calcom/platform-libraries" (remove the old
prisma enums import), update any references if needed, and run a repo-wide
search to swap remaining "@calcom/prisma/enums" imports to
"@calcom/platform-libraries" to complete the migration.

@@ -2,7 +2,7 @@ import { ApiProperty, ApiPropertyOptional } from "@nestjs/swagger";
import { Expose, Transform, Type } from "class-transformer";
import { IsBoolean, IsInt, IsObject, IsOptional, IsString, ValidateNested } from "class-validator";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Fix validator: email is marked @isboolean but typed string.

Use @isemail (and import it) to avoid invalid validation and inaccurate OpenAPI docs.

Apply:

-import { IsBoolean, IsInt, IsObject, IsOptional, IsString, ValidateNested } from "class-validator";
+import { IsBoolean, IsEmail, IsInt, IsObject, IsOptional, IsString, ValidateNested } from "class-validator";
-  @IsBoolean()
+  @IsEmail()
   @Expose()
-  @ApiProperty()
+  @ApiProperty({ format: "email" })
   readonly email!: string;
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
import { IsBoolean, IsInt, IsObject, IsOptional, IsString, ValidateNested } from "class-validator";
// apps/api/v2/src/modules/teams/memberships/outputs/team-membership.output.ts
import { IsBoolean, IsEmail, IsInt, IsObject, IsOptional, IsString, ValidateNested } from "class-validator";
export class TeamMembershipOutput {
// …
@IsEmail()
@Expose()
@ApiProperty({ format: "email" })
readonly email!: string;
// …
}
🤖 Prompt for AI Agents
In apps/api/v2/src/modules/teams/memberships/outputs/team-membership.output.ts
around line 3, the email property is incorrectly validated with @IsBoolean while
its type is string; replace @IsBoolean with @IsEmail and add IsEmail to the
import list from "class-validator" so validation and generated OpenAPI docs
correctly treat the field as an email address.

@vercel
Copy link

vercel bot commented Sep 4, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

2 Skipped Deployments
Project Deployment Preview Comments Updated (UTC)
cal Ignored Ignored Sep 4, 2025 11:07pm
cal-eu Ignored Ignored Sep 4, 2025 11:07pm

@github-actions
Copy link
Contributor

github-actions bot commented Sep 4, 2025

E2E results are ready!

@emrysal emrysal merged commit 0bf95ec into main Sep 4, 2025
62 of 64 checks passed
@emrysal emrysal deleted the bugfix/update-prisma-enums-to-platform-libs branch September 4, 2025 23:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core area: core, team members only foundation platform Anything related to our platform plan ready-for-e2e size/M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants