Skip to content

[W1 — do not merge] API contract v1 - #1

Merged
andreacw5 merged 2 commits into
developfrom
claude/api-contract-v1-c42c21
Oct 27, 2026
Merged

andreacw5 merged 2 commits into
developfrom
claude/api-contract-v1-c42c21

Conversation

@andreacw5

Copy link
Copy Markdown
Contributor

Gatherly part of wave W1, plan docs/platform/plans/02-api-contract-cutover.md. Do not merge — merged only at the W4 cutover together with fileharbor, articuno and @heyatom/client 1.0.0.

Changes

  • GET /tags/:tagId/events: raw eventTag rows [{ eventId, tagId, event: {…, translations} }] → paginated { data: EventWithCountResponseDto[], meta } (page/limit), same DTO and ordering as GET /events?tagId= (reuses EventService.getEventsByClient).
  • GET /admin/webhooks/deliveries and GET /admin/clients/:id/webhook-deliveries: { data: WebhookDelivery[] } capped at 100 → { data, meta } with page/limit; status now validated against the enum (invalid → 400 instead of a Prisma error).
  • TaggedEventDto / TagEventResponseDto removed.
  • Decorators were already on @heyatom/nest-common 0.4.0 (a7a2659 on develop), no local api-data.ts left.
  • openapi.json generated with pnpm openapi:dump and committed (first time).

OpenAPI diff vs develop

Only those three paths change: page/limit query params, meta: PageMetaDto in the response. The admin deliveries status query param goes from (wrongly) required to optional with its enum. Schemas TagEventResponseDto and TaggedEventDto removed. Nothing else.

Checks

pnpm build, pnpm lint, unit specs (clients/admin/events), pnpm test:e2e pass.

🤖 Generated with Claude Code

andreacw5 and others added 2 commits October 24, 2026 22:43
Trivy flags body-parser < 2.4.0 / 1.20.9 (CVE-2026-111181) and
multer < 2.5.0 (CVE-2026-113872). @nestjs/platform-express pins
multer exact, so it needs a pnpm override until Nest bumps it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- GET /tags/:tagId/events: was raw eventTag rows ({eventId, tagId, event});
  now PageParams + paginate() → {data, meta} of EventWithCountResponseDto,
  via EventService.getEventsByClient with tagId (same as GET /events?tagId=).
- Webhook deliveries (/admin/webhooks/deliveries,
  /admin/clients/:id/webhook-deliveries): was take: 100; now
  WebhookDeliveriesQueryDto (PageParams + validated status enum) + paginate().
- Drop TaggedEventDto / TagEventResponseDto.
- Commit generated openapi.json for @heyatom/client.

BREAKING CHANGE: both lists now answer {data, meta}; W1 of plan 02, merge
only at the W4 cutover.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@andreacw5
andreacw5 marked this pull request as ready for review October 27, 2026 13:48
@andreacw5
andreacw5 merged commit 8a27ff1 into develop Oct 27, 2026
2 of 3 checks passed
@andreacw5
andreacw5 deleted the claude/api-contract-v1-c42c21 branch October 27, 2026 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant