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:
Émile Ré
2026-05-07 14:38:10 +04:00
parent b4d8bd8de2
commit 806bd672ed
11 changed files with 386 additions and 9 deletions

View File

@@ -36,6 +36,8 @@ query($id: ID!) {
consentData
action
sdkVersion
regulation
countryCode
createdAt
}
}
@@ -52,6 +54,8 @@ type viewResponse struct {
ConsentData string `json:"consentData"`
Action string `json:"action"`
SdkVersion string `json:"sdkVersion"`
Regulation string `json:"regulation"`
CountryCode string `json:"countryCode"`
CreatedAt string `json:"createdAt"`
} `json:"node"`
}
@@ -115,6 +119,8 @@ func NewCmdView(f *cmdutil.Factory) *cobra.Command {
_, _ = fmt.Fprintf(out, "%s%s\n", label.Render("Visitor ID:"), v.VisitorID)
_, _ = fmt.Fprintf(out, "%s%s\n", label.Render("Action:"), v.Action)
_, _ = fmt.Fprintf(out, "%s%s\n", label.Render("SDK Version:"), v.SdkVersion)
_, _ = fmt.Fprintf(out, "%s%s\n", label.Render("Regulation:"), v.Regulation)
_, _ = fmt.Fprintf(out, "%s%s\n", label.Render("Country Code:"), v.CountryCode)
if v.IPAddress != nil && *v.IPAddress != "" {
_, _ = fmt.Fprintf(out, "%s%s\n", label.Render("IP Address:"), *v.IPAddress)
}