Skip to content

feat: add GET /api/privacy/retention endpoint returning RETENTION_SCHEDULE#626

Open
mikewheeleer wants to merge 1 commit into
Fluxora-Org:mainfrom
mikewheeleer:feat/issue-568-pii-retention-endpoint
Open

feat: add GET /api/privacy/retention endpoint returning RETENTION_SCHEDULE#626
mikewheeleer wants to merge 1 commit into
Fluxora-Org:mainfrom
mikewheeleer:feat/issue-568-pii-retention-endpoint

Conversation

@mikewheeleer

Copy link
Copy Markdown
Contributor

Fixes #568

The /api/privacy/retention endpoint already exists in src/routes/privacy.ts and returns RETENTION_SCHEDULE from src/pii/policy.ts.

This PR adds 8 integration tests in tests/privacy.retention.test.ts:

  • Returns 200 with JSON content-type
  • Response contains retentionSchedule array matching RETENTION_SCHEDULE constant
  • Each rule has required fields: category, retentionDays, storageLayer, rationale
  • Response includes _links (self + fullPolicy)
  • Sets Cache-Control: no-store header
  • Returns 405 for non-GET methods
  • At least one rule has retentionDays: null for chain-derived data

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.

Add a PII retention schedule endpoint GET /api/privacy/retention returning RETENTION_SCHEDULE from src/pii/policy.ts

1 participant