diff --git a/apps/console/src/pages/organizations/cookie-banners/configuration/consent-records/CookieBannerConsentRecordPage.tsx b/apps/console/src/pages/organizations/cookie-banners/configuration/consent-records/CookieBannerConsentRecordPage.tsx index f426cd04b..1aa7cdd7b 100644 --- a/apps/console/src/pages/organizations/cookie-banners/configuration/consent-records/CookieBannerConsentRecordPage.tsx +++ b/apps/console/src/pages/organizations/cookie-banners/configuration/consent-records/CookieBannerConsentRecordPage.tsx @@ -57,6 +57,7 @@ export const cookieBannerConsentRecordPageQuery = graphql` ipAddress userAgent sdkVersion + regulation consentData createdAt } @@ -152,6 +153,11 @@ export default function CookieBannerConsentRecordPage({ {record.sdkVersion} + + + {record.regulation || "-"} + + {formatDate(record.createdAt)} diff --git a/apps/console/src/pages/organizations/cookie-banners/configuration/consent-records/CookieBannerConsentRecordsPage.tsx b/apps/console/src/pages/organizations/cookie-banners/configuration/consent-records/CookieBannerConsentRecordsPage.tsx index 4e95866fe..029c37418 100644 --- a/apps/console/src/pages/organizations/cookie-banners/configuration/consent-records/CookieBannerConsentRecordsPage.tsx +++ b/apps/console/src/pages/organizations/cookie-banners/configuration/consent-records/CookieBannerConsentRecordsPage.tsx @@ -216,6 +216,7 @@ export default function CookieBannerConsentRecordsPage({ {__("Banner Version")} {__("IP Address")} {__("SDK Version")} + {__("Regulation")} {__("Date")} diff --git a/apps/console/src/pages/organizations/cookie-banners/configuration/consent-records/_components/ConsentRecordRow.tsx b/apps/console/src/pages/organizations/cookie-banners/configuration/consent-records/_components/ConsentRecordRow.tsx index 87a10211c..6399156e3 100644 --- a/apps/console/src/pages/organizations/cookie-banners/configuration/consent-records/_components/ConsentRecordRow.tsx +++ b/apps/console/src/pages/organizations/cookie-banners/configuration/consent-records/_components/ConsentRecordRow.tsx @@ -35,6 +35,7 @@ const consentRecordFragment = graphql` } ipAddress sdkVersion + regulation createdAt } `; @@ -74,6 +75,11 @@ export function ConsentRecordRow({ recordKey }: ConsentRecordRowProps) { {record.sdkVersion} + + + {record.regulation || "-"} + + {formatDate(record.createdAt)} diff --git a/cmd/geoloc-import/main.go b/cmd/geoloc-import/main.go index 449dd1fd5..3987b3e86 100644 --- a/cmd/geoloc-import/main.go +++ b/cmd/geoloc-import/main.go @@ -35,10 +35,9 @@ func main() { } func run() error { - var ( - pgDSN string - dataDir string - ) + const dataDir = "pkg/geoloc/data/country-ip-blocks" + + var pgDSN string flag.StringVar( &pgDSN, @@ -46,12 +45,6 @@ func run() error { os.Getenv("DATABASE_URL"), "PostgreSQL connection URL (default: DATABASE_URL env)", ) - flag.StringVar( - &dataDir, - "data-dir", - "pkg/geoloc/data/country-ip-blocks", - "path to ipverse country-ip-blocks checkout", - ) flag.Parse() if pgDSN == "" { diff --git a/packages/cookie-banner/src/client.ts b/packages/cookie-banner/src/client.ts index 91b4fb4d3..786749b79 100644 --- a/packages/cookie-banner/src/client.ts +++ b/packages/cookie-banner/src/client.ts @@ -20,82 +20,30 @@ import { COOKIE_NAME, getConsentCookie, setConsentCookie } from "./cookie"; import { CookieDetector } from "./detector"; import { NotFoundError } from "./errors"; import { fetchJSON } from "./http"; -import type { BannerTexts } from "./i18n"; import { detectLanguage } from "./i18n"; import type { ConsentIntegration } from "./integrations"; import { createDefaultIntegrations } from "./integrations"; import { enqueue, flush } from "./queue"; +import type { + BannerConfig, + ConsentAction, + ConsentRecord, + CookieBannerClientOptions, + Regulation, + VisitorConsent, +} from "./types"; import { getOrCreateVisitorId } from "./visitor"; -export interface CookieItem { - name: string; - max_age_seconds: number | null; - description: string; -} - -export interface Category { - name: string; - slug: string; - description: string; - kind: string; - cookies: CookieItem[]; - gcm_consent_types: string[]; - posthog_consent: boolean; -} - -export type Regulation = - | "GDPR" - | "UK_GDPR" - | "FADP" - | "CCPA" - | "PIPEDA" - | "LGPD" - | "LFPDPPP" - | "POPIA" - | "PDPA" - | "PIPL" - | "PIPA" - | "APPI" - | "DPDP" - | "PDPL"; - -export interface BannerConfig { - banner_id: string; - version: number; - language: string; - default_language: string; - privacy_policy_url?: string; - cookie_policy_url: string; - consent_expiry_days: number; - consent_mode: "OPT_IN" | "OPT_OUT"; - regulation: Regulation | null; - show_branding: boolean; - categories: Category[]; - texts: BannerTexts; -} - -export type ConsentAction = "ACCEPT_ALL" | "REJECT_ALL" | "CUSTOMIZE" | "GPC"; - -export interface VisitorConsent { - visitor_id: string; - version: number; - action: ConsentAction; - consent_data: Record; - created_at: string; -} - -export interface ConsentRecord { - id: string; - visitor_id: string; - action: string; - created_at: string; -} - -export interface CookieBannerClientOptions { - bannerId: string; - baseUrl: string; - lang?: string; -} +export type { + BannerConfig, + Category, + ConsentAction, + ConsentRecord, + CookieBannerClientOptions, + CookieItem, + Regulation, + VisitorConsent, +} from "./types"; export class CookieBannerClient { private readonly baseUrl: URL; diff --git a/packages/cookie-banner/src/components/base.ts b/packages/cookie-banner/src/components/base.ts index e84072eeb..ef0ae5983 100644 --- a/packages/cookie-banner/src/components/base.ts +++ b/packages/cookie-banner/src/components/base.ts @@ -12,7 +12,8 @@ // OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR // PERFORMANCE OF THIS SOFTWARE. -import type { CookieBannerClient, BannerConfig } from "../client"; +import type { CookieBannerClient } from "../client"; +import type { BannerConfig } from "../types"; export type ProboState = "loading" | "banner" | "panel" | "hidden"; diff --git a/packages/cookie-banner/src/components/category-list.ts b/packages/cookie-banner/src/components/category-list.ts index eb7005506..cee13274a 100644 --- a/packages/cookie-banner/src/components/category-list.ts +++ b/packages/cookie-banner/src/components/category-list.ts @@ -12,7 +12,7 @@ // OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR // PERFORMANCE OF THIS SOFTWARE. -import type { Category } from "../client"; +import type { Category } from "../types"; import { ProboElement } from "./base"; import type { ProboRootElement } from "./base"; import type { ProboCookieBannerRoot } from "./cookie-banner-root"; diff --git a/packages/cookie-banner/src/components/category.ts b/packages/cookie-banner/src/components/category.ts index d15505053..40bb6e5b8 100644 --- a/packages/cookie-banner/src/components/category.ts +++ b/packages/cookie-banner/src/components/category.ts @@ -12,7 +12,7 @@ // OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR // PERFORMANCE OF THIS SOFTWARE. -import type { CookieItem } from "../client"; +import type { CookieItem } from "../types"; import { ProboElement } from "./base"; export class ProboCategory extends ProboElement { diff --git a/packages/cookie-banner/src/components/cookie-banner-root.ts b/packages/cookie-banner/src/components/cookie-banner-root.ts index 409abe29a..75826c2c2 100644 --- a/packages/cookie-banner/src/components/cookie-banner-root.ts +++ b/packages/cookie-banner/src/components/cookie-banner-root.ts @@ -13,7 +13,7 @@ // PERFORMANCE OF THIS SOFTWARE. import { CookieBannerClient } from "../client"; -import type { BannerConfig } from "../client"; +import type { BannerConfig } from "../types"; import { ProboElement } from "./base"; import type { ProboState, ProboRootElement, ConsentDraft } from "./base"; diff --git a/packages/cookie-banner/src/components/cookie-list.ts b/packages/cookie-banner/src/components/cookie-list.ts index c1df41848..c04d75d55 100644 --- a/packages/cookie-banner/src/components/cookie-list.ts +++ b/packages/cookie-banner/src/components/cookie-list.ts @@ -12,7 +12,7 @@ // OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR // PERFORMANCE OF THIS SOFTWARE. -import type { CookieItem } from "../client"; +import type { CookieItem } from "../types"; import { humanizeDuration } from "../cookie-utils"; import { getCookieDetailLabels } from "../i18n"; import { ProboElement } from "./base"; diff --git a/packages/cookie-banner/src/cookie.ts b/packages/cookie-banner/src/cookie.ts index ac73fcdcc..76d66bc89 100644 --- a/packages/cookie-banner/src/cookie.ts +++ b/packages/cookie-banner/src/cookie.ts @@ -12,7 +12,7 @@ // OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR // PERFORMANCE OF THIS SOFTWARE. -import type { ConsentAction } from "./client"; +import type { ConsentAction } from "./types"; export const COOKIE_NAME = "probo_consent"; const SECONDS_PER_DAY = 86400; diff --git a/packages/cookie-banner/src/integrations/gcm.ts b/packages/cookie-banner/src/integrations/gcm.ts index 0530fb91d..6d8e3fdae 100644 --- a/packages/cookie-banner/src/integrations/gcm.ts +++ b/packages/cookie-banner/src/integrations/gcm.ts @@ -12,7 +12,7 @@ // OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR // PERFORMANCE OF THIS SOFTWARE. -import type { Category } from "../client"; +import type { Category } from "../types"; import type { ConsentIntegration } from "./integration"; export class GoogleConsentModeIntegration implements ConsentIntegration { diff --git a/packages/cookie-banner/src/integrations/integration.ts b/packages/cookie-banner/src/integrations/integration.ts index 583077f40..6e773601f 100644 --- a/packages/cookie-banner/src/integrations/integration.ts +++ b/packages/cookie-banner/src/integrations/integration.ts @@ -12,7 +12,7 @@ // OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR // PERFORMANCE OF THIS SOFTWARE. -import type { Category } from "../client"; +import type { Category } from "../types"; export interface ConsentIntegration { /** Called once after config is loaded, before any consent is applied. */ diff --git a/packages/cookie-banner/src/integrations/posthog.ts b/packages/cookie-banner/src/integrations/posthog.ts index b45109261..f12b1dd1d 100644 --- a/packages/cookie-banner/src/integrations/posthog.ts +++ b/packages/cookie-banner/src/integrations/posthog.ts @@ -12,7 +12,7 @@ // OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR // PERFORMANCE OF THIS SOFTWARE. -import type { Category } from "../client"; +import type { Category } from "../types"; import type { ConsentIntegration } from "./integration"; interface PostHogInstance { diff --git a/packages/cookie-banner/src/themed-banner/themed-banner.ts b/packages/cookie-banner/src/themed-banner/themed-banner.ts index e695c5dd3..cdbcdf523 100644 --- a/packages/cookie-banner/src/themed-banner/themed-banner.ts +++ b/packages/cookie-banner/src/themed-banner/themed-banner.ts @@ -14,7 +14,7 @@ import { registerHeadlessComponents } from "../components"; import type { ProboCookieBannerRoot } from "../components/cookie-banner-root"; -import type { BannerConfig } from "../client"; +import type { BannerConfig } from "../types"; import { getGpcLabel, interpolate } from "../i18n"; import { BRANDING, CHEVRON_DOWN, CLOSE_ICON } from "../html"; import { THEMED_STYLES } from "./styles"; diff --git a/packages/cookie-banner/src/types.ts b/packages/cookie-banner/src/types.ts new file mode 100644 index 000000000..1004df86d --- /dev/null +++ b/packages/cookie-banner/src/types.ts @@ -0,0 +1,85 @@ +// Copyright (c) 2026 Probo Inc . +// +// Permission to use, copy, modify, and/or distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +// REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +// AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +// INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +// LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +// OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +// PERFORMANCE OF THIS SOFTWARE. + +import type { BannerTexts } from "./i18n"; + +export interface CookieItem { + name: string; + max_age_seconds: number | null; + description: string; +} + +export interface Category { + name: string; + slug: string; + description: string; + kind: string; + cookies: CookieItem[]; + gcm_consent_types: string[]; + posthog_consent: boolean; +} + +export type Regulation = + | "GDPR" + | "UK_GDPR" + | "FADP" + | "CCPA" + | "PIPEDA" + | "LGPD" + | "LFPDPPP" + | "POPIA" + | "PDPA" + | "PIPL" + | "PIPA" + | "APPI" + | "DPDP" + | "PDPL"; + +export interface BannerConfig { + banner_id: string; + version: number; + language: string; + default_language: string; + privacy_policy_url?: string; + cookie_policy_url: string; + consent_expiry_days: number; + consent_mode: "OPT_IN" | "OPT_OUT"; + regulation: Regulation | null; + show_branding: boolean; + categories: Category[]; + texts: BannerTexts; +} + +export type ConsentAction = "ACCEPT_ALL" | "REJECT_ALL" | "CUSTOMIZE" | "GPC"; + +export interface VisitorConsent { + visitor_id: string; + version: number; + action: ConsentAction; + consent_data: Record; + created_at: string; +} + +export interface ConsentRecord { + id: string; + visitor_id: string; + action: string; + created_at: string; +} + +export interface CookieBannerClientOptions { + bannerId: string; + baseUrl: string; + lang?: string; +} diff --git a/pkg/cookiebanner/regulation.go b/pkg/cookiebanner/regulation.go index 94eb4096d..562166b6d 100644 --- a/pkg/cookiebanner/regulation.go +++ b/pkg/cookiebanner/regulation.go @@ -16,24 +16,24 @@ package cookiebanner import "go.probo.inc/probo/pkg/coredata" -type Regulation string +type Regulation = coredata.Regulation const ( - RegulationNone Regulation = "" - RegulationGDPR Regulation = "GDPR" - RegulationUKGDPR Regulation = "UK_GDPR" - RegulationFADP Regulation = "FADP" - RegulationCCPA Regulation = "CCPA" - RegulationPIPEDA Regulation = "PIPEDA" - RegulationLGPD Regulation = "LGPD" - RegulationLFPDPPP Regulation = "LFPDPPP" - RegulationPOPIA Regulation = "POPIA" - RegulationPDPA Regulation = "PDPA" - RegulationPIPL Regulation = "PIPL" - RegulationPIPA Regulation = "PIPA" - RegulationAPPI Regulation = "APPI" - RegulationDPDP Regulation = "DPDP" - RegulationPDPL Regulation = "PDPL" + RegulationNone = coredata.RegulationNone + RegulationGDPR = coredata.RegulationGDPR + RegulationUKGDPR = coredata.RegulationUKGDPR + RegulationFADP = coredata.RegulationFADP + RegulationCCPA = coredata.RegulationCCPA + RegulationPIPEDA = coredata.RegulationPIPEDA + RegulationLGPD = coredata.RegulationLGPD + RegulationLFPDPPP = coredata.RegulationLFPDPPP + RegulationPOPIA = coredata.RegulationPOPIA + RegulationPDPA = coredata.RegulationPDPA + RegulationPIPL = coredata.RegulationPIPL + RegulationPIPA = coredata.RegulationPIPA + RegulationAPPI = coredata.RegulationAPPI + RegulationDPDP = coredata.RegulationDPDP + RegulationPDPL = coredata.RegulationPDPL ) const ( diff --git a/pkg/cookiebanner/service.go b/pkg/cookiebanner/service.go index 8c56baef9..71bc6c853 100644 --- a/pkg/cookiebanner/service.go +++ b/pkg/cookiebanner/service.go @@ -1856,7 +1856,7 @@ func (s *Service) RecordConsent( ConsentData: req.ConsentData, Action: req.Action, SdkVersion: req.SdkVersion, - Regulation: string(req.Regulation), + Regulation: req.Regulation, CreatedAt: time.Now(), } diff --git a/pkg/coredata/cookie_consent_record.go b/pkg/coredata/cookie_consent_record.go index 9714e0d3d..5de68d586 100644 --- a/pkg/coredata/cookie_consent_record.go +++ b/pkg/coredata/cookie_consent_record.go @@ -40,7 +40,7 @@ type ( ConsentData json.RawMessage `db:"consent_data"` Action CookieConsentAction `db:"action"` SdkVersion string `db:"sdk_version"` - Regulation string `db:"regulation"` + Regulation Regulation `db:"regulation"` CreatedAt time.Time `db:"created_at"` } diff --git a/pkg/coredata/regulation.go b/pkg/coredata/regulation.go new file mode 100644 index 000000000..5fa483d9d --- /dev/null +++ b/pkg/coredata/regulation.go @@ -0,0 +1,152 @@ +// Copyright (c) 2026 Probo Inc . +// +// Permission to use, copy, modify, and/or distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +// REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +// AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +// INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +// LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +// OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +// PERFORMANCE OF THIS SOFTWARE. + +package coredata + +import ( + "database/sql/driver" + "encoding/json" + "fmt" +) + +type Regulation string + +const ( + RegulationNone Regulation = "" + RegulationGDPR Regulation = "GDPR" + RegulationUKGDPR Regulation = "UK_GDPR" + RegulationFADP Regulation = "FADP" + RegulationCCPA Regulation = "CCPA" + RegulationPIPEDA Regulation = "PIPEDA" + RegulationLGPD Regulation = "LGPD" + RegulationLFPDPPP Regulation = "LFPDPPP" + RegulationPOPIA Regulation = "POPIA" + RegulationPDPA Regulation = "PDPA" + RegulationPIPL Regulation = "PIPL" + RegulationPIPA Regulation = "PIPA" + RegulationAPPI Regulation = "APPI" + RegulationDPDP Regulation = "DPDP" + RegulationPDPL Regulation = "PDPL" +) + +func Regulations() []Regulation { + return []Regulation{ + RegulationGDPR, + RegulationUKGDPR, + RegulationFADP, + RegulationCCPA, + RegulationPIPEDA, + RegulationLGPD, + RegulationLFPDPPP, + RegulationPOPIA, + RegulationPDPA, + RegulationPIPL, + RegulationPIPA, + RegulationAPPI, + RegulationDPDP, + RegulationPDPL, + } +} + +func ParseRegulation(s string) (Regulation, error) { + switch Regulation(s) { + case RegulationNone: + return RegulationNone, nil + case RegulationGDPR: + return RegulationGDPR, nil + case RegulationUKGDPR: + return RegulationUKGDPR, nil + case RegulationFADP: + return RegulationFADP, nil + case RegulationCCPA: + return RegulationCCPA, nil + case RegulationPIPEDA: + return RegulationPIPEDA, nil + case RegulationLGPD: + return RegulationLGPD, nil + case RegulationLFPDPPP: + return RegulationLFPDPPP, nil + case RegulationPOPIA: + return RegulationPOPIA, nil + case RegulationPDPA: + return RegulationPDPA, nil + case RegulationPIPL: + return RegulationPIPL, nil + case RegulationPIPA: + return RegulationPIPA, nil + case RegulationAPPI: + return RegulationAPPI, nil + case RegulationDPDP: + return RegulationDPDP, nil + case RegulationPDPL: + return RegulationPDPL, nil + default: + return "", fmt.Errorf("invalid Regulation value: %q", s) + } +} + +func (r Regulation) String() string { + return string(r) +} + +func (r *Regulation) Scan(value any) error { + var v string + switch val := value.(type) { + case string: + v = val + case []byte: + v = string(val) + default: + return fmt.Errorf("unsupported type for Regulation: %T", value) + } + + parsed, err := ParseRegulation(v) + if err != nil { + return err + } + + *r = parsed + return nil +} + +func (r Regulation) Value() (driver.Value, error) { + if r == RegulationNone { + return "", nil + } + + if _, err := ParseRegulation(string(r)); err != nil { + return nil, fmt.Errorf("invalid Regulation: %s", r) + } + + return string(r), nil +} + +func (r Regulation) MarshalJSON() ([]byte, error) { + return json.Marshal(string(r)) +} + +func (r *Regulation) UnmarshalJSON(data []byte) error { + var s string + if err := json.Unmarshal(data, &s); err != nil { + return fmt.Errorf("cannot unmarshal Regulation: %w", err) + } + + parsed, err := ParseRegulation(s) + if err != nil { + return err + } + + *r = parsed + return nil +} diff --git a/pkg/geoloc/service.go b/pkg/geoloc/service.go index 191cee279..80458001a 100644 --- a/pkg/geoloc/service.go +++ b/pkg/geoloc/service.go @@ -100,9 +100,9 @@ func (s *Service) LookupCountry(ctx context.Context, ip string) (coredata.Countr err := s.pgClient.WithConn( ctx, func(ctx context.Context, conn pg.Querier) error { - var lookupErr error - cc, lookupErr = coredata.LookupCountryByIP(ctx, conn, ip) - return lookupErr + var err error + cc, err = coredata.LookupCountryByIP(ctx, conn, ip) + return err }, ) if err != nil { @@ -118,9 +118,9 @@ func (s *Service) IsPopulated(ctx context.Context) (bool, error) { err := s.pgClient.WithConn( ctx, func(ctx context.Context, conn pg.Querier) error { - var lookupErr error - populated, lookupErr = coredata.IsIPCountryBlocksPopulated(ctx, conn) - return lookupErr + var err error + populated, err = coredata.IsIPCountryBlocksPopulated(ctx, conn) + return err }, ) if err != nil { diff --git a/pkg/server/api/console/v1/graphql/cookie_consent_record.graphql b/pkg/server/api/console/v1/graphql/cookie_consent_record.graphql index 4cc558455..11b584c29 100644 --- a/pkg/server/api/console/v1/graphql/cookie_consent_record.graphql +++ b/pkg/server/api/console/v1/graphql/cookie_consent_record.graphql @@ -66,6 +66,7 @@ type CookieConsentRecord implements Node { consentData: String! action: CookieConsentAction! sdkVersion: String! + regulation: String! createdAt: Datetime! } diff --git a/pkg/server/api/console/v1/types/cookie_consent_record.go b/pkg/server/api/console/v1/types/cookie_consent_record.go index 09b1e01e5..8dc0170a5 100644 --- a/pkg/server/api/console/v1/types/cookie_consent_record.go +++ b/pkg/server/api/console/v1/types/cookie_consent_record.go @@ -81,6 +81,7 @@ func NewCookieConsentRecord(r *coredata.CookieConsentRecord) *CookieConsentRecor ConsentData: string(r.ConsentData), Action: r.Action, SdkVersion: r.SdkVersion, + Regulation: r.Regulation.String(), CreatedAt: r.CreatedAt, } }