Update GraphQL, MCP, and CLI for the portal

Rewire the console and visitor resolvers onto the management and visitor
services with compliance-portal authorization. Rename the GraphQL and MCP
ComplianceExternalURL type to ComplianceCustomLink, expose trust center
profile fields, default and custom domains, public URL, and the managed
flag, and drop the profile fields from the organization surface.

Signed-off-by: Bryan Frimin <bryan@probo.com>
This commit is contained in:
Bryan Frimin
2026-07-10 15:15:09 +02:00
parent 860dafeaf2
commit ce1b64b529
43 changed files with 921 additions and 1459 deletions

View File

@@ -584,7 +584,7 @@ func (s *Service) fetchThirdParties(
},
)
result, err := s.ListThirdPartiesForOrganizationID(ctx, scope, orgID, cursor)
result, err := s.ListThirdPartiesForOrganizationID(ctx, scope, orgID, cursor, nil)
if err != nil {
return nil, fmt.Errorf("cannot list thirdParties: %w", err)
}

View File

@@ -60,15 +60,18 @@ func (s *Service) ListThirdPartiesForOrganizationID(
scope coredata.Scoper,
organizationID gid.GID,
cursor *page.Cursor[coredata.ThirdPartyOrderField],
filter *coredata.ThirdPartyFilter,
) (*page.Page[*coredata.ThirdParty, coredata.ThirdPartyOrderField], error) {
if filter == nil {
showOnTrustCenter := true
filter = coredata.NewThirdPartyFilter(&showOnTrustCenter, nil, nil, nil, nil)
}
var thirdParties coredata.ThirdParties
err := s.pg.WithConn(
ctx,
func(ctx context.Context, conn pg.Querier) error {
showOnTrustCenter := true
filter := coredata.NewThirdPartyFilter(&showOnTrustCenter, nil, nil, nil, nil)
err := thirdParties.LoadByOrganizationID(ctx, conn, scope, organizationID, cursor, filter)
if err != nil {
return fmt.Errorf("cannot load thirdParties: %w", err)
@@ -146,7 +149,13 @@ func (s *Service) CountThirdPartiesForPortalID(
ctx context.Context,
scope coredata.Scoper,
trustCenterID gid.GID,
filter *coredata.ThirdPartyFilter,
) (int, error) {
if filter == nil {
showOnTrustCenter := true
filter = coredata.NewThirdPartyFilter(&showOnTrustCenter, nil, nil, nil, nil)
}
var count int
err := s.pg.WithConn(
@@ -158,8 +167,6 @@ func (s *Service) CountThirdPartiesForPortalID(
}
thirdParties := &coredata.ThirdParties{}
showOnTrustCenter := true
filter := coredata.NewThirdPartyFilter(&showOnTrustCenter, nil, nil, nil, nil)
count, err = thirdParties.CountByOrganizationID(ctx, conn, scope, trustCenter.OrganizationID, filter)
if err != nil {