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>
This commit is contained in:
25
packages/core-dsr/src/processing-restriction.interface.ts
Normal file
25
packages/core-dsr/src/processing-restriction.interface.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
/**
|
||||
* GDPR Art. 18 (right to restriction of processing).
|
||||
*
|
||||
* Toggles and reads the `processingRestrictedAt` flag on the subject's user
|
||||
* record. When restricted, downstream use cases should call `isRestricted`
|
||||
* before processing personal data and short-circuit if true.
|
||||
*
|
||||
* Emits RESTRICT / UNRESTRICT audit entries on every state change.
|
||||
*/
|
||||
export interface IProcessingRestriction {
|
||||
/**
|
||||
* Grant or revoke processing restriction for the given subject.
|
||||
*
|
||||
* @param subjectId - The subject's canonical ID.
|
||||
* @param granted - true to restrict processing; false to lift restriction.
|
||||
*/
|
||||
setRestriction(subjectId: string, granted: boolean): Promise<void>;
|
||||
|
||||
/**
|
||||
* Return whether processing is currently restricted for the given subject.
|
||||
*
|
||||
* @param subjectId - The subject's canonical ID.
|
||||
*/
|
||||
isRestricted(subjectId: string): Promise<boolean>;
|
||||
}
|
||||
Reference in New Issue
Block a user