Repository navigation
feat(inbound-webhooks): project API read of one submission - #260
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
BenAbdou1001
commented
Nov 5, 2026
BenAbdou1001
left a comment
Collaborator
Author
There was a problem hiding this comment.
Review of #260 (issue #240, EP-03)
Acceptance criteria
- Own submission is returned with the list fields only (
id,payload,receivedAt,origin;ipAddress/userAgentare not leaked):getSubmissionForProjectunit spec, controller spec, e2e asserts the exact key set. - Other project / unknown id is 404, never saying which: the webhook ownership check runs before the lookup, and
findSubmissionfilters onwebhookId, so a foreign submission under an own webhook is 404 too. Covered in unit and e2e specs (own webhook + foreign sub, foreign webhook, unknown UUID). - Read is audited (
submissions.read,viaApiKey: true, not audited on 404), same as the list endpoint. - Documented, OpenAPI regenerated:
reading-submissions.mdxsection added,pnpm docs:apigives no diff. - 401/403/429 from
ApiKeyGuard,@RequireScope('read_inbound_submissions')and the class-levelProjectThrottlerGuard; non-UUID submission id is 400 viaParseUUIDPipe.
Issue found and fixed
- CI
lint-and-testfailed:apps/cli/src/generated/api.d.tswas not regenerated after the OpenAPI change. Fixed in f0bb160 (pnpm --filter mcid-cli generate:api-types).
Validation (local)
jest src/modules/inbound-webhooks: 15 suites, 230 tests passturbo run typecheck lint --filter=@mcid/api: pass, no lint fixespnpm docs:api: no diff; docs vitest: 716 pass- CLI typecheck and vitest: 311 pass
- Not run locally: API e2e (Docker not running). The new e2e cases run in CI once
lint-and-testis green.
Non-blocking
ProjectServerQueryDtoduplicates theserverIdfield ofListProjectSubmissionsDto; the list DTO could extend it. Left as is.Closes #240will not auto-close the issue since the base isdev; close it manually after merge.
Verdict: COMMENT (own PR, GitHub refuses self-approval). Ready once CI is green.
12 tasks
This branch was previously deployed
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.
Closes #240
What and why
Adds
GET /api/project/inbound-webhooks/:id/submissions/:submissionIdunderApiKeyGuardwith theread_inbound_submissionsscope, so the Event Platform can re-read one submission of its own webhook without paging. Returns the same fields as a list item (id,payload,receivedAt,origin). Another project's webhook, another webhook's submission and an unknown id are all 404; a non-UUID submission id is 400.Acceptance criteria
getSubmissionForProjectunit spec, controller spec, e2e specsubmissions.read, not audited on 404): unit and e2e specspnpm docs:api,reading-submissions.mdxHow it was checked
pnpm --filter @mcid/api exec jest: 111 suites, 1423 tests passpnpm turbo run lint typecheck --filter=@mcid/api: passpnpm --filter @mcid/web exec vitest run tests/features/docs tests/app/docs-routes.test.tsx: passtest/inbound-webhook-project-submissions.e2e-spec.tsand run in CI.