Store cookie durations as max_age_seconds

Replace the free-form duration TEXT column with a nullable
max_age_seconds INTEGER on both cookies and cookie_patterns
tables. The SDK detector now sends raw seconds instead of
humanized strings, eliminating locale-dependent comparisons
in the pattern merge worker. Humanization happens at display
time in the widget and console UI.

Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
Émile Ré
2026-04-29 18:54:36 +04:00
parent b8ff3c66e1
commit 5cdaddf8b1
21 changed files with 308 additions and 151 deletions

View File

@@ -200,7 +200,7 @@ type CookiePattern implements Node {
pattern: String!
matchType: CookiePatternMatchType!
displayName: String!
duration: String!
maxAgeSeconds: Int
description: String!
source: CookieSource!
cookieCount: Int! @goField(forceResolver: true)
@@ -243,7 +243,7 @@ type CookieBannerVersionCategory {
type CookieBannerVersionCookie {
name: String!
duration: String!
maxAgeSeconds: Int
description: String!
}
@@ -434,14 +434,14 @@ input CreateCookiePatternInput {
pattern: String!
matchType: CookiePatternMatchType!
displayName: String!
duration: String!
maxAgeSeconds: Int
description: String!
}
input UpdateCookiePatternInput {
cookiePatternId: ID!
displayName: String
duration: String
maxAgeSeconds: Int @goField(omittable: true)
description: String
}