Generate tracker policy document from banner snapshot

Add a markdown "Cookie and Tracking Technologies Policy" template in
the policy-writer tone that covers cookies and other tracking
technologies, with GDPR, UK GDPR, FADP, and CCPA/CPRA privacy-rights
framing. Convert it to ProseMirror JSON and add PublishTrackerPolicy,
which builds the document from a banner's latest published version
snapshot and its tracker third parties. The document is GENERATED and
private in the trust center, linked to the banner via
policy_document_id.

Add CookieItem.HumanizedDuration so server-rendered lifetimes match the
banner's humanizeDuration helper, and reword the publish trigger and
backfill comment to reflect the broader tracker scope.

Signed-off-by: Émile Ré <emile@probo.com>
This commit is contained in:
Émile Ré
2026-06-01 18:20:13 +02:00
parent f6eeeb675f
commit d68df53a6d
6 changed files with 451 additions and 2 deletions

View File

@@ -966,7 +966,7 @@ func (s *Service) PublishCookieBannerVersion(
banner := coredata.CookieBanner{ID: bannerID}
if err := banner.SetPolicyGenerationRequested(ctx, tx); err != nil {
return fmt.Errorf("cannot request cookie policy generation: %w", err)
return fmt.Errorf("cannot request tracker policy generation: %w", err)
}
return nil