Add trackerType to GraphQL schema and detection UI

- Add TrackerType enum to GraphQL schema with all 6 values
- Add trackerType field to CookiePattern type (nullable source)
- Add optional trackerType to CreateCookiePatternInput
- Add Type column to detection page table
- Add NewTrackerPattern helper in types package
- Regenerate gqlgen + Relay artifacts

Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
Émile Ré
2026-05-05 15:54:42 +04:00
parent 2275558d82
commit c853d59fe5
4 changed files with 81 additions and 4 deletions

View File

@@ -34,6 +34,34 @@ enum CookieSource
)
}
enum TrackerType
@goModel(model: "go.probo.inc/probo/pkg/coredata.TrackerType") {
COOKIE
@goEnum(
value: "go.probo.inc/probo/pkg/coredata.TrackerTypeCookie"
)
LOCAL_STORAGE
@goEnum(
value: "go.probo.inc/probo/pkg/coredata.TrackerTypeLocalStorage"
)
SESSION_STORAGE
@goEnum(
value: "go.probo.inc/probo/pkg/coredata.TrackerTypeSessionStorage"
)
INDEXED_DB
@goEnum(
value: "go.probo.inc/probo/pkg/coredata.TrackerTypeIndexedDB"
)
SCRIPT
@goEnum(
value: "go.probo.inc/probo/pkg/coredata.TrackerTypeScript"
)
IFRAME
@goEnum(
value: "go.probo.inc/probo/pkg/coredata.TrackerTypeIframe"
)
}
enum CookieBannerOrderField
@goModel(
model: "go.probo.inc/probo/pkg/coredata.CookieBannerOrderField"
@@ -227,12 +255,13 @@ input CookiePatternFilter {
type CookiePattern implements Node {
id: ID!
cookieCategory: CookieCategory @goField(forceResolver: true)
trackerType: TrackerType!
pattern: String!
matchType: CookiePatternMatchType!
displayName: String!
maxAgeSeconds: Int
description: String!
source: CookieSource!
source: CookieSource
excluded: Boolean!
cookieCount: Int! @goField(forceResolver: true)
lastMatchedAt: Datetime
@@ -463,6 +492,7 @@ type ReorderCookieCategoryPayload {
input CreateCookiePatternInput {
cookieCategoryId: ID!
trackerType: TrackerType
pattern: String!
matchType: CookiePatternMatchType!
displayName: String!