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:
@@ -187,6 +187,280 @@ components:
|
||||
- INACTIVE
|
||||
go.probo.inc/mcpgen/type: go.probo.inc/probo/pkg/coredata.ProfileState
|
||||
|
||||
Regulation:
|
||||
type: string
|
||||
enum:
|
||||
- NONE
|
||||
- GDPR
|
||||
- UK_GDPR
|
||||
- FADP
|
||||
- CCPA
|
||||
- PIPEDA
|
||||
- LGPD
|
||||
- LFPDPPP
|
||||
- POPIA
|
||||
- PDPA
|
||||
- PIPL
|
||||
- PIPA
|
||||
- APPI
|
||||
- DPDP
|
||||
- PDPL
|
||||
go.probo.inc/mcpgen/type: go.probo.inc/probo/pkg/coredata.Regulation
|
||||
|
||||
CountryCode:
|
||||
type: string
|
||||
enum:
|
||||
- AD
|
||||
- AE
|
||||
- AF
|
||||
- AG
|
||||
- AI
|
||||
- AL
|
||||
- AM
|
||||
- AO
|
||||
- AQ
|
||||
- AR
|
||||
- AS
|
||||
- AT
|
||||
- AU
|
||||
- AW
|
||||
- AX
|
||||
- AZ
|
||||
- BA
|
||||
- BB
|
||||
- BD
|
||||
- BE
|
||||
- BF
|
||||
- BG
|
||||
- BH
|
||||
- BI
|
||||
- BJ
|
||||
- BL
|
||||
- BM
|
||||
- BN
|
||||
- BO
|
||||
- BQ
|
||||
- BR
|
||||
- BS
|
||||
- BT
|
||||
- BV
|
||||
- BW
|
||||
- BY
|
||||
- BZ
|
||||
- CA
|
||||
- CC
|
||||
- CD
|
||||
- CF
|
||||
- CG
|
||||
- CH
|
||||
- CI
|
||||
- CK
|
||||
- CL
|
||||
- CM
|
||||
- CN
|
||||
- CO
|
||||
- CR
|
||||
- CU
|
||||
- CV
|
||||
- CW
|
||||
- CX
|
||||
- CY
|
||||
- CZ
|
||||
- DE
|
||||
- DJ
|
||||
- DK
|
||||
- DM
|
||||
- DO
|
||||
- DZ
|
||||
- EC
|
||||
- EE
|
||||
- EG
|
||||
- EH
|
||||
- ER
|
||||
- ES
|
||||
- ET
|
||||
- EU
|
||||
- FI
|
||||
- FJ
|
||||
- FK
|
||||
- FM
|
||||
- FO
|
||||
- FR
|
||||
- GA
|
||||
- GB
|
||||
- GD
|
||||
- GE
|
||||
- GF
|
||||
- GG
|
||||
- GH
|
||||
- GI
|
||||
- GL
|
||||
- GM
|
||||
- GN
|
||||
- GP
|
||||
- GQ
|
||||
- GR
|
||||
- GT
|
||||
- GU
|
||||
- GW
|
||||
- GY
|
||||
- HK
|
||||
- HM
|
||||
- HN
|
||||
- HR
|
||||
- HT
|
||||
- HU
|
||||
- ID
|
||||
- IE
|
||||
- IL
|
||||
- IM
|
||||
- IN
|
||||
- IO
|
||||
- IQ
|
||||
- IR
|
||||
- IS
|
||||
- IT
|
||||
- JE
|
||||
- JM
|
||||
- JO
|
||||
- JP
|
||||
- KE
|
||||
- KG
|
||||
- KH
|
||||
- KI
|
||||
- KM
|
||||
- KN
|
||||
- KP
|
||||
- KR
|
||||
- KW
|
||||
- KY
|
||||
- KZ
|
||||
- LA
|
||||
- LB
|
||||
- LC
|
||||
- LI
|
||||
- LK
|
||||
- LR
|
||||
- LS
|
||||
- LT
|
||||
- LU
|
||||
- LV
|
||||
- LY
|
||||
- MA
|
||||
- MC
|
||||
- MD
|
||||
- ME
|
||||
- MF
|
||||
- MG
|
||||
- MH
|
||||
- MK
|
||||
- ML
|
||||
- MM
|
||||
- MN
|
||||
- MO
|
||||
- MP
|
||||
- MQ
|
||||
- MR
|
||||
- MS
|
||||
- MT
|
||||
- MU
|
||||
- MV
|
||||
- MW
|
||||
- MX
|
||||
- MY
|
||||
- MZ
|
||||
- NA
|
||||
- NC
|
||||
- NE
|
||||
- NF
|
||||
- NG
|
||||
- NI
|
||||
- NL
|
||||
- NO
|
||||
- NP
|
||||
- NR
|
||||
- NU
|
||||
- NZ
|
||||
- OM
|
||||
- PA
|
||||
- PE
|
||||
- PF
|
||||
- PG
|
||||
- PH
|
||||
- PK
|
||||
- PL
|
||||
- PM
|
||||
- PN
|
||||
- PR
|
||||
- PS
|
||||
- PT
|
||||
- PW
|
||||
- PY
|
||||
- QA
|
||||
- RE
|
||||
- RO
|
||||
- RS
|
||||
- RU
|
||||
- RW
|
||||
- SA
|
||||
- SB
|
||||
- SC
|
||||
- SD
|
||||
- SE
|
||||
- SG
|
||||
- SH
|
||||
- SI
|
||||
- SJ
|
||||
- SK
|
||||
- SL
|
||||
- SM
|
||||
- SN
|
||||
- SO
|
||||
- SR
|
||||
- SS
|
||||
- ST
|
||||
- SV
|
||||
- SX
|
||||
- SY
|
||||
- SZ
|
||||
- TC
|
||||
- TD
|
||||
- TF
|
||||
- TG
|
||||
- TH
|
||||
- TJ
|
||||
- TK
|
||||
- TL
|
||||
- TM
|
||||
- TN
|
||||
- TO
|
||||
- TR
|
||||
- TT
|
||||
- TV
|
||||
- TW
|
||||
- TZ
|
||||
- UA
|
||||
- UG
|
||||
- UM
|
||||
- US
|
||||
- UY
|
||||
- UZ
|
||||
- VA
|
||||
- VC
|
||||
- VE
|
||||
- VG
|
||||
- VI
|
||||
- VN
|
||||
- VU
|
||||
- WF
|
||||
- WS
|
||||
- YE
|
||||
- YT
|
||||
- ZA
|
||||
- ZM
|
||||
- ZW
|
||||
go.probo.inc/mcpgen/type: go.probo.inc/probo/pkg/coredata.CountryCode
|
||||
|
||||
Profile:
|
||||
type: object
|
||||
required:
|
||||
@@ -9291,6 +9565,8 @@ components:
|
||||
- consent_data
|
||||
- action
|
||||
- sdk_version
|
||||
- regulation
|
||||
- country_code
|
||||
- created_at
|
||||
properties:
|
||||
id:
|
||||
@@ -9325,6 +9601,12 @@ components:
|
||||
sdk_version:
|
||||
type: string
|
||||
description: SDK version
|
||||
regulation:
|
||||
$ref: "#/components/schemas/Regulation"
|
||||
description: Applicable regulation
|
||||
country_code:
|
||||
$ref: "#/components/schemas/CountryCode"
|
||||
description: Visitor country code (ISO 3166-1 alpha-2)
|
||||
created_at:
|
||||
type: string
|
||||
format: date-time
|
||||
|
||||
@@ -35,6 +35,8 @@ func NewCookieConsentRecord(r *coredata.CookieConsentRecord) *CookieConsentRecor
|
||||
ConsentData: consentData,
|
||||
Action: CookieConsentRecordAction(r.Action),
|
||||
SdkVersion: r.SdkVersion,
|
||||
Regulation: r.Regulation,
|
||||
CountryCode: r.CountryCode,
|
||||
CreatedAt: r.CreatedAt,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user