Add uncategorised cookie category

Replace the `required` boolean column on cookie_categories with a `kind`
enum (NORMAL, NECESSARY, UNCATEGORISED). The Necessary category remains
undeletable and always-on for consent; the new Uncategorised category is
also undeletable but users can opt out of it.

When a category is deleted, its cookies are merged into the Uncategorised
category (lazy-created for legacy banners that don't have one yet).

Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
Émile Ré
2026-04-20 19:00:00 +04:00
parent 2147cded9f
commit 7cd8c516b9
18 changed files with 207 additions and 70 deletions

View File

@@ -37,10 +37,10 @@ type (
}
CookieBannerVersionSnapshotCategory struct {
Name string `json:"name"`
Description string `json:"description"`
Required bool `json:"required"`
Cookies CookieItems `json:"cookies"`
Name string `json:"name"`
Description string `json:"description"`
Kind CookieCategoryKind `json:"kind"`
Cookies CookieItems `json:"cookies"`
}
CookieBannerVersion struct {