Surface regulation and country code enums across API layers
Add proper enum types for Regulation and CountryCode in GraphQL (with @goModel/@goEnum directives) and MCP (as standalone reusable schemas with $ref). Update CLI, console UI, and n8n to include the new fields. Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
@@ -32,6 +32,70 @@ enum CookieConsentAction
|
||||
)
|
||||
}
|
||||
|
||||
enum Regulation
|
||||
@goModel(model: "go.probo.inc/probo/pkg/coredata.Regulation") {
|
||||
NONE
|
||||
@goEnum(
|
||||
value: "go.probo.inc/probo/pkg/coredata.RegulationNone"
|
||||
)
|
||||
GDPR
|
||||
@goEnum(
|
||||
value: "go.probo.inc/probo/pkg/coredata.RegulationGDPR"
|
||||
)
|
||||
UK_GDPR
|
||||
@goEnum(
|
||||
value: "go.probo.inc/probo/pkg/coredata.RegulationUKGDPR"
|
||||
)
|
||||
FADP
|
||||
@goEnum(
|
||||
value: "go.probo.inc/probo/pkg/coredata.RegulationFADP"
|
||||
)
|
||||
CCPA
|
||||
@goEnum(
|
||||
value: "go.probo.inc/probo/pkg/coredata.RegulationCCPA"
|
||||
)
|
||||
PIPEDA
|
||||
@goEnum(
|
||||
value: "go.probo.inc/probo/pkg/coredata.RegulationPIPEDA"
|
||||
)
|
||||
LGPD
|
||||
@goEnum(
|
||||
value: "go.probo.inc/probo/pkg/coredata.RegulationLGPD"
|
||||
)
|
||||
LFPDPPP
|
||||
@goEnum(
|
||||
value: "go.probo.inc/probo/pkg/coredata.RegulationLFPDPPP"
|
||||
)
|
||||
POPIA
|
||||
@goEnum(
|
||||
value: "go.probo.inc/probo/pkg/coredata.RegulationPOPIA"
|
||||
)
|
||||
PDPA
|
||||
@goEnum(
|
||||
value: "go.probo.inc/probo/pkg/coredata.RegulationPDPA"
|
||||
)
|
||||
PIPL
|
||||
@goEnum(
|
||||
value: "go.probo.inc/probo/pkg/coredata.RegulationPIPL"
|
||||
)
|
||||
PIPA
|
||||
@goEnum(
|
||||
value: "go.probo.inc/probo/pkg/coredata.RegulationPIPA"
|
||||
)
|
||||
APPI
|
||||
@goEnum(
|
||||
value: "go.probo.inc/probo/pkg/coredata.RegulationAPPI"
|
||||
)
|
||||
DPDP
|
||||
@goEnum(
|
||||
value: "go.probo.inc/probo/pkg/coredata.RegulationDPDP"
|
||||
)
|
||||
PDPL
|
||||
@goEnum(
|
||||
value: "go.probo.inc/probo/pkg/coredata.RegulationPDPL"
|
||||
)
|
||||
}
|
||||
|
||||
enum CookieConsentRecordOrderField
|
||||
@goModel(
|
||||
model: "go.probo.inc/probo/pkg/coredata.CookieConsentRecordOrderField"
|
||||
@@ -66,7 +130,8 @@ type CookieConsentRecord implements Node {
|
||||
consentData: String!
|
||||
action: CookieConsentAction!
|
||||
sdkVersion: String!
|
||||
regulation: String!
|
||||
regulation: Regulation!
|
||||
countryCode: CountryCode!
|
||||
createdAt: Datetime!
|
||||
}
|
||||
|
||||
|
||||
@@ -81,7 +81,8 @@ func NewCookieConsentRecord(r *coredata.CookieConsentRecord) *CookieConsentRecor
|
||||
ConsentData: string(r.ConsentData),
|
||||
Action: r.Action,
|
||||
SdkVersion: r.SdkVersion,
|
||||
Regulation: r.Regulation.String(),
|
||||
Regulation: r.Regulation,
|
||||
CountryCode: r.CountryCode,
|
||||
CreatedAt: r.CreatedAt,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user