Conversation
… 805 support - Add ConsentType enum (MEDIA_ITEM, MESSAGE_ITEM, EXTERNAL_DATA_PROCESSING, BOTS_AI, CUSTOM) - Add ConsentStatus enum (PENDING, GRANTED, PROVISIONAL, RETRACTED) - Extend UserConsent entity with target_user_id for HB 805 pairwise consents (O(n²)) - Add basis_document_url/hash fields for off-platform consent references - Create ConsentGrant entity for GNAP-like grant negotiation (RFC 9635) - Add consent-grants routes for interactive consent negotiation flow - Update consent routes to support item_id and target_user_id filtering - Add UNKNOWN_CONSENT and UNKNOWN_CONSENT_GRANT errors to Constants - Add PostgreSQL migration for new consent fields and consent_grants table Co-authored-by: Erkin Alp Güney <erkinalp9035@gmail.com>
Author
Original prompt from Erkin |
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements a comprehensive consents API that supports both GDPR compliance and North Carolina HB 805 requirements for multi-person content consent. The API provides:
consent_type,status,item_id,target_user_id(for HB 805 pairwise consents),basis_document_url/hash(for off-platform consent references), andextra_datafor extensibility/users/@me/consent-grants/) for interactive consent negotiation: request, approve, deny, continue, and cancel operationsitem_idandtarget_user_idto support per-item pairwise consent modelKey design decisions:
extra_datafield name instead ofmetadatato avoid TypeORM BaseClass property conflictReview & Testing Checklist for Human
(user_id, service_id)to(user_id, service_id, consent_type, item_id, target_user_id)with nullable fieldsConsentGrantRequestSchema,UserConsentGrantSchema, etc.) that may need to be created insrc/schemas/for proper validationRecommended test plan:
target_user_idfor HB 805 pairwise modelNotes