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:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user