Extract shared types and add Regulation type with parsing methods
Move cookie banner types (CookieItem, Category, Regulation, BannerConfig, etc.) into a dedicated types.ts file. Add a coredata.Regulation type with parsing, JSON marshaling, and database scanning methods. Hardcode the geoloc-import data directory since the submodule path is fixed. Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
@@ -66,6 +66,7 @@ type CookieConsentRecord implements Node {
|
||||
consentData: String!
|
||||
action: CookieConsentAction!
|
||||
sdkVersion: String!
|
||||
regulation: String!
|
||||
createdAt: Datetime!
|
||||
}
|
||||
|
||||
|
||||
@@ -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,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user