Move trust center profile onto the page

Store website, email, and headquarters on the trust center so
public and admin surfaces read branding from one place. Drop the
trust API organization type and wire console, MCP, CLI, and apps
through the updated schema.

Signed-off-by: Bryan Frimin <bryan@probo.com>
This commit is contained in:
Bryan Frimin
2026-07-13 14:17:22 +02:00
parent ec80798243
commit ba53c94bdc
36 changed files with 167 additions and 155 deletions

View File

@@ -61,6 +61,7 @@ func TestTrustCenter_UpdateProfile(t *testing.T) {
updateTrustCenter(input: $input) {
trustCenter {
id
title
description
websiteUrl
email
@@ -74,6 +75,7 @@ func TestTrustCenter_UpdateProfile(t *testing.T) {
UpdateTrustCenter struct {
TrustCenter struct {
ID string `json:"id"`
Title string `json:"title"`
Description *string `json:"description"`
WebsiteURL *string `json:"websiteUrl"`
Email *string `json:"email"`
@@ -85,6 +87,7 @@ func TestTrustCenter_UpdateProfile(t *testing.T) {
err = owner.Execute(updateMutation, map[string]any{
"input": map[string]any{
"trustCenterId": trustCenterID,
"title": "Acme Security",
"description": "We keep your data safe.",
"websiteUrl": "https://example.com",
"email": "security@example.com",
@@ -95,6 +98,7 @@ func TestTrustCenter_UpdateProfile(t *testing.T) {
tc := result.UpdateTrustCenter.TrustCenter
assert.Equal(t, trustCenterID, tc.ID)
assert.Equal(t, "Acme Security", tc.Title)
require.NotNil(t, tc.Description)
assert.Equal(t, "We keep your data safe.", *tc.Description)
require.NotNil(t, tc.WebsiteURL)

View File

@@ -36,8 +36,7 @@ type mcpFile struct {
type trustCenter struct {
ID string `json:"id"`
CompanyName string `json:"companyName"`
PageTitle string `json:"pageTitle"`
Title string `json:"title"`
TrustCenterVisible bool `json:"trustCenterVisible"`
Logo *mcpFile `json:"logo,omitempty"`
}
@@ -176,6 +175,7 @@ func TestMCP_UpdateTrustCenter(t *testing.T) {
var updateResult struct {
TrustCenter struct {
ID string `json:"id"`
Title string `json:"title"`
Description *string `json:"description"`
WebsiteURL *string `json:"website_url"`
Email *string `json:"email"`
@@ -184,6 +184,7 @@ func TestMCP_UpdateTrustCenter(t *testing.T) {
}
mc.CallToolInto("updateTrustCenter", map[string]any{
"trust_center_id": getResult.TrustCenter.ID,
"title": "Acme Security",
"description": "We keep your data safe.",
"website_url": "https://example.com",
"email": "security@example.com",
@@ -191,6 +192,7 @@ func TestMCP_UpdateTrustCenter(t *testing.T) {
}, &updateResult)
assert.Equal(t, getResult.TrustCenter.ID, updateResult.TrustCenter.ID)
assert.Equal(t, "Acme Security", updateResult.TrustCenter.Title)
require.NotNil(t, updateResult.TrustCenter.Description)
assert.Equal(t, "We keep your data safe.", *updateResult.TrustCenter.Description)
require.NotNil(t, updateResult.TrustCenter.WebsiteURL)