Conversation
WalkthroughThe GetTeamMembershipsInput class in apps/api/v2/src/modules/teams/memberships/inputs/get-team-memberships.input.ts now extends SkipTakePagination instead of GetUsersInput. The import for GetUsersInput was removed, and an import for SkipTakePagination from @calcom/platform-types was added. Existing validation and API property decorators for the emails field remain unchanged. Possibly related PRs
Pre-merge checks and finishing touches✅ Passed checks (5 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Disabled knowledge base sources:
📒 Files selected for processing (1)
🧰 Additional context used📓 Path-based instructions (3)**/*.ts📄 CodeRabbit inference engine (.cursor/rules/review.mdc)
Files:
**/*.{ts,tsx}📄 CodeRabbit inference engine (.cursor/rules/review.mdc)
Files:
**/*.{ts,tsx,js,jsx}⚙️ CodeRabbit configuration file
Files:
🧬 Code graph analysis (1)apps/api/v2/src/modules/teams/memberships/inputs/get-team-memberships.input.ts (1)
🔇 Additional comments (1)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
apps/api/v2/src/modules/users/inputs/get-users.input.ts (1)
23-33: Critical: Runtime behavior doesn't match the OpenAPI schema default.Same issue as the
takeproperty—thedefault: DEFAULT_SKIPin the ApiProperty decorator (line 27) declares a default in the OpenAPI schema, but the Transform decorator (line 29) returnsundefinedwhen no value is provided.Apply this diff to provide the actual runtime default:
- @Transform(({ value }: { value: string }) => value && parseInt(value)) + @Transform(({ value }: { value: string }) => (value ? parseInt(value) : DEFAULT_SKIP))Additionally, consider using
@ApiPropertyOptionalfor consistency:- @ApiProperty({ - required: false, + @ApiPropertyOptional({ description: "The number of items to skip", example: 0, default: DEFAULT_SKIP, })
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (2)
apps/api/v2/src/modules/users/inputs/get-users.input.ts(1 hunks)packages/platform/types/pagination/pagination.input.ts(1 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
**/*.ts
📄 CodeRabbit inference engine (.cursor/rules/review.mdc)
**/*.ts: For Prisma queries, only select data you need; never useinclude, always useselect
Ensure thecredential.keyfield is never returned from tRPC endpoints or APIs
Files:
packages/platform/types/pagination/pagination.input.tsapps/api/v2/src/modules/users/inputs/get-users.input.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:
packages/platform/types/pagination/pagination.input.tsapps/api/v2/src/modules/users/inputs/get-users.input.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:
packages/platform/types/pagination/pagination.input.tsapps/api/v2/src/modules/users/inputs/get-users.input.ts
🧬 Code graph analysis (1)
apps/api/v2/src/modules/users/inputs/get-users.input.ts (1)
packages/platform/types/pagination/pagination.input.ts (2)
DEFAULT_TAKE(23-23)DEFAULT_SKIP(24-24)
⏰ 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 (2)
packages/platform/types/pagination/pagination.input.ts (1)
23-24: LGTM!Exporting these constants enables consistent pagination defaults across modules while maintaining DRY principles.
apps/api/v2/src/modules/users/inputs/get-users.input.ts (1)
5-6: LGTM!Clean import of the newly exported pagination constants.
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
| export class GetTeamMembershipsInput extends GetUsersInput { | ||
| import { SkipTakePagination } from "@calcom/platform-types"; | ||
|
|
||
| export class GetTeamMembershipsInput extends SkipTakePagination { |
There was a problem hiding this comment.
GetUsersInput consists of emails, skip and take and we process emails differently in GetTeamMembershipsInput and need previous skip and take so we just extend SkipTakePagination instead of GetUsersInput
E2E results are ready! |
Fixes #24444