[CLEAN] Synthetic Benchmark PR #26449 - feat(api): add team event-types webhooks controller#375
Open
tomerqodo wants to merge 1 commit intobase_pr_26449_20260114_1506from
Open
Conversation
|
Hey there and thank you for opening this pull request! 👋🏼 We require pull request titles to follow the Conventional Commits specification and it looks like your proposed title needs to be adjusted. Details: |
|
This PR has been marked as stale due to inactivity. If you're still working on it or need any help, please let us know or update the PR to keep it active. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Benchmark PR calcom#26449
Type: Clean (correct implementation)
Original PR Title: feat(api): add team event-types webhooks controller
Original PR Description: ## What does this PR do?
Adds a new API v2 controller for managing webhooks on team event types, following the existing pattern from
event-types-webhooks.controller.ts.New endpoints at
/v2/teams/:teamId/event-types/:eventTypeId/webhooks:POST /- Create a webhook for a team event typePATCH /:webhookId- Update a webhookGET /:webhookId- Get a specific webhookGET /- List all webhooks (paginated)DELETE /:webhookId- Delete a specific webhookDELETE /- Delete all webhooks for the event typeNew files:
TeamsEventTypesWebhooksController- Main controller with CRUD endpointsIsTeamEventTypeWebhookGuard- Authorization guard validating team admin/owner membership and event type ownershipTeamEventTypeWebhooksService- Business logic layer for webhook operationsteams-event-types-webhooks.controller.e2e-spec.ts- E2E tests covering all endpointsConfiguration change:
unsafeParameterDecoratorsEnabled: trueto biome.json to support NestJS parameter decoratorsUpdates since last revision
IsTeamEventTypeWebhookGuardto only allow team admins or owners to manage webhooks (not regular team members). The guard now usesgetUserAdminOrOwnerTeamMembershipinstead offindMembershipByTeamId.import typestatements in controller, service, and guard files per cubic-dev-ai feedback. Changed to regular imports for services, repositories, and DTOs that require runtime availability for NestJS dependency injection and class-validator/class-transformer.Mandatory Tasks (DO NOT REMOVE)
How should this be tested?
/v2/teams/{teamId}/event-types/{eventTypeId}/webhooksE2E tests can be run with:
TZ=UTC yarn test:e2e --testPathPattern="teams-event-types-webhooks.controller.e2e-spec.ts"Human Review Checklist
getUserAdminOrOwnerTeamMembership)Link to Devin run: https://app.devin.ai/sessions/3afb0c9b900f43f8a86ace48c190c5a0
Requested by: morgan@cal.com (@ThyMinimalDev)
Original PR URL: calcom#26449