Files
agentic-dev/packages/core-dsr/src/data-export.interface.ts
Danijel Martinek e378c950a9 feat(core-dsr): scaffold package + GDPR DSR interfaces and types
- Add pnpm turbo gen core-package dsr generator template and register
  dsr in CORE_PACKAGE_GENERATORS / choices list
- Run generator to produce packages/core-dsr/ shell
- Define IDataExport (Art. 15/20), IDataDelete (Art. 17),
  IDataRectify (Art. 16), IProcessingRestriction (Art. 18) interfaces
- Add UserDataBundle and DeletionCertificate types in dsr-types.ts
- Ship core-dsr/contexts/user-data.jsonld schema.org JSON-LD @context
- Wire @repo/core-dsr into transpilePackages (web-next)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-19 19:32:03 +00:00

23 lines
763 B
TypeScript

import type { DsrFormat, UserDataBundle } from "./dsr-types";
/**
* GDPR Art. 15 (right of access) + Art. 20 (right to data portability).
*
* Implementations walk all Payload collections with `custom.subject` linkage,
* segment rows by role (self/owner vs reference), and filter to fields marked
* `exportable: true` in `custom.pii`.
*/
export interface IDataExport {
/**
* Export all personal data held for the given subject.
*
* @param subjectId - The subject's canonical ID (e.g. users.id).
* @param format - "json" for a plain JSON bundle; "json-ld" attaches the
* @context from `contexts/user-data.jsonld`.
*/
exportSubjectData(
subjectId: string,
format: DsrFormat,
): Promise<UserDataBundle>;
}