Skip to content

ENG-3303: Generate TS types for correspondence API contract#8159

Merged
JadeCara merged 14 commits into
mainfrom
ENG-3303/codegen-ts-types
May 15, 2026
Merged

ENG-3303: Generate TS types for correspondence API contract#8159
JadeCara merged 14 commits into
mainfrom
ENG-3303/codegen-ts-types

Conversation

@JadeCara
Copy link
Copy Markdown
Contributor

@JadeCara JadeCara commented May 11, 2026

Summary

Generate frontend TypeScript types for the correspondence and notification schemas defined in fidesplus#3554, so FE development can start in parallel with MSW mocks.

Dependency: Requires fides#8158 (ENG-3302: hook skeleton) to be merged first.

Code Changes

  • New types: CorrespondenceDeliveryStatus (enum), NotificationResponse, UnreadCountResponse, Page_NotificationResponse_
  • Updated: CommentResponse — 6 new optional fields (delivery_status, parent_id, sender_email, recipient_email, bounce_reason, reply_to_address)
  • Updated: index.ts — added exports for all new types

Steps to Confirm

  1. Verify CommentResponse.ts includes the 6 new optional fields
  2. Verify CorrespondenceDeliveryStatus.ts has 5 enum values (pending, sent, delivered, bounced, failed)
  3. Verify NotificationResponse.ts has 9 fields (id, notification_type, title, body, resource_type, resource_id, is_read, read_at, created_at)
  4. Verify UnreadCountResponse.ts has count: number
  5. Verify all new types are exported from index.ts

Pre-Merge Checklist

  • All CI Pipelines Succeeded
  • Issue Requirements are Met

🤖 Generated with Claude Code

JadeCara and others added 9 commits May 11, 2026 14:41
Create two new service packages following the established Jira polling
pattern. Each provides a module-level register function, a Celery task
with Redis lock, and APScheduler wiring — all no-ops until Fidesplus
registers an implementation.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The notify task is now the primary delivery path — called directly by
DSR lifecycle code with a privacy_request_id and event_type. The
sweep_notifications task runs on a scheduled interval as a catch-all
for missed or failed notifications.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add "set once at startup" comments on module-level hook variables
- Add exception propagation tests for all registered service functions
- Clarify relationship to messaging/ package in __init__.py docstrings

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Rename notify → send_dsr_notification for clarity in Celery logs/queues
- Document fork vs thread propagation constraint on hook registration
- Document why send_dsr_notification intentionally has no Redis lock

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add frontend type definitions for the correspondence and notification
schemas so FE development can start in parallel with MSW mocks.

New types: CorrespondenceDeliveryStatus, NotificationResponse,
UnreadCountResponse, Page_NotificationResponse_
Updated: CommentResponse (6 new optional fields), index.ts exports

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented May 11, 2026

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

Project Deployment Actions Updated (UTC)
fides-plus-nightly Ready Ready Preview, Comment May 15, 2026 11:18pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
fides-privacy-center Ignored Ignored May 15, 2026 11:18pm

Request Review

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 11, 2026

Title Lines Statements Branches Functions
admin-ui Coverage: 9%
6.89% (3150/45708) 6.26% (1655/26434) 4.78% (647/13523)
fides-js Coverage: 78%
79.17% (1977/2497) 66.25% (1249/1885) 73.31% (349/476)
privacy-center Coverage: 85%
82.53% (364/441) 79.74% (189/237) 74.07% (60/81)

New types: MarkAllReadResponse, NotificationType enum,
NotificationResourceType enum, ErrorResponse,
Body_send_correspondence (multipart FormData shape).

Updated: NotificationResponse now uses typed enums instead of
plain strings for notification_type and resource_type.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Base automatically changed from ENG-3302/hook-skeleton-polling-notifications to main May 13, 2026 20:40
JadeCara and others added 2 commits May 15, 2026 10:01
Add lazy="selectin" so listing comments batches metadata loading
into a single IN query instead of one query per comment.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Matches the read_at: datetime | None field added to the Pydantic
schema in fidesplus PR #3554.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@JadeCara JadeCara marked this pull request as ready for review May 15, 2026 16:19
@JadeCara JadeCara requested review from a team as code owners May 15, 2026 16:19
@JadeCara JadeCara requested review from gilluminate, lucanovera and vcruces and removed request for a team and lucanovera May 15, 2026 16:19
@codecov
Copy link
Copy Markdown

codecov Bot commented May 15, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.61%. Comparing base (dc05748) to head (c4ca283).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #8159   +/-   ##
=======================================
  Coverage   85.61%   85.61%           
=======================================
  Files         658      658           
  Lines       42858    42858           
  Branches     5016     5016           
=======================================
  Hits        36691    36691           
  Misses       5063     5063           
  Partials     1104     1104           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@JadeCara JadeCara added this pull request to the merge queue May 15, 2026
Merged via the queue into main with commit 7d5ba2c May 15, 2026
4 checks passed
@JadeCara JadeCara deleted the ENG-3303/codegen-ts-types branch May 15, 2026 23:26
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.

2 participants