Rename vendors to third parties

Renames the user-facing 'vendor' concept to 'third party' across the
entire codebase. The shared common_third_parties reference table is
unchanged.

Migration. Renames the vendor_category enum, the vendors and
vendor_<entity> tables (contacts, services, compliance_reports,
business_associate_agreements, data_privacy_agreements,
risk_assessments) and their vendor_id columns, the asset_vendors /
data_vendors / processing_activity_vendors junction tables,
generated_documents.vendors_document_id, the webhook_event_type
'vendor:<verb>' values, and the snapshots_type 'VENDORS' value.

Backend. Renames coredata models and SQL queries, probo services,
GraphQL / MCP API surface, console / trust / webhook resolvers and
types, the CLI (prb vendor* -> prb third-party*; pkg/cmd/vendormgmt
-> pkg/cmd/thirdpartymgmt), the document generator, vetting agent
prompts, and the common-third-parties-import command.

Frontend, packages, n8n, e2e. Renames apps/console pages, components,
hooks, routes, dialogs, and tabs; the shared @probo/vendors package
(now @probo/third-parties); the @probo/ui Vendors atoms (now
ThirdParties, VendorLogo -> ThirdPartyLogo); the n8n community node
actions/vendor folder (now actions/thirdParty); and the e2e Go test
suite (console and MCP). Filesystem and URL paths use kebab-case
(third-parties), GraphQL fields and TypeScript identifiers use
camelCase (thirdParty / thirdParties), Go types use PascalCase
(ThirdParty), and human-facing text uses 'third party' with a space.

Co-authored-by: Bryan Frimin <bryan@getprobo.com>
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
This commit is contained in:
Sacha Al Himdani
2026-05-13 16:15:33 +02:00
parent 9eed0d71c8
commit eecbe4c46c
281 changed files with 8491 additions and 8425 deletions

View File

@@ -66,7 +66,7 @@ type (
Frameworks []compliancePageFramework
Documents []compliancePageDocument
Audits []compliancePageAudit
Vendors []compliancePageVendor
ThirdParties []compliancePageThirdParty
References []compliancePageReference
ExternalLinks []compliancePageExternalLink
}
@@ -93,7 +93,7 @@ type (
ValidUntil string
}
compliancePageVendor struct {
compliancePageThirdParty struct {
Name string
Category string
Countries string
@@ -158,9 +158,9 @@ func (s *Service) RenderCompliancePageMarkdown(
return fmt.Errorf("cannot fetch audits: %w", err)
}
data.Vendors, err = s.fetchVendors(ctx, tenantSvc, org.ID)
data.ThirdParties, err = s.fetchThirdParties(ctx, tenantSvc, org.ID)
if err != nil {
return fmt.Errorf("cannot fetch vendors: %w", err)
return fmt.Errorf("cannot fetch thirdParties: %w", err)
}
data.References, err = s.fetchReferences(ctx, tenantSvc, trustCenterID)
@@ -429,8 +429,8 @@ func (s *Service) fetchAudits(ctx context.Context, tenantSvc *TenantService, org
return audits, nil
}
func (s *Service) fetchVendors(ctx context.Context, tenantSvc *TenantService, orgID gid.GID) ([]compliancePageVendor, error) {
var vendors []compliancePageVendor
func (s *Service) fetchThirdParties(ctx context.Context, tenantSvc *TenantService, orgID gid.GID) ([]compliancePageThirdParty, error) {
var thirdParties []compliancePageThirdParty
var cursorKey *page.CursorKey
for {
@@ -438,15 +438,15 @@ func (s *Service) fetchVendors(ctx context.Context, tenantSvc *TenantService, or
page.MaxCursorSize,
cursorKey,
page.Head,
page.OrderBy[coredata.VendorOrderField]{
Field: coredata.VendorOrderFieldName,
page.OrderBy[coredata.ThirdPartyOrderField]{
Field: coredata.ThirdPartyOrderFieldName,
Direction: page.OrderDirectionAsc,
},
)
result, err := tenantSvc.Vendors.ListForOrganizationId(ctx, orgID, cursor)
result, err := tenantSvc.ThirdParties.ListForOrganizationId(ctx, orgID, cursor)
if err != nil {
return nil, fmt.Errorf("cannot list vendors: %w", err)
return nil, fmt.Errorf("cannot list thirdParties: %w", err)
}
for _, v := range result.Data {
@@ -455,9 +455,9 @@ func (s *Service) fetchVendors(ctx context.Context, tenantSvc *TenantService, or
countries = append(countries, c.String())
}
vendors = append(
vendors,
compliancePageVendor{
thirdParties = append(
thirdParties,
compliancePageThirdParty{
Name: v.Name,
Category: v.Category.String(),
Countries: strings.Join(countries, ", "),
@@ -471,11 +471,11 @@ func (s *Service) fetchVendors(ctx context.Context, tenantSvc *TenantService, or
}
last := result.Data[len(result.Data)-1]
ck := last.CursorKey(coredata.VendorOrderFieldName)
ck := last.CursorKey(coredata.ThirdPartyOrderFieldName)
cursorKey = &ck
}
return vendors, nil
return thirdParties, nil
}
func (s *Service) fetchReferences(ctx context.Context, tenantSvc *TenantService, trustCenterID gid.GID) ([]compliancePageReference, error) {

View File

@@ -65,7 +65,7 @@ type (
TrustCenters *TrustCenterService
Documents *DocumentService
Audits *AuditService
Vendors *VendorService
ThirdParties *ThirdPartyService
Frameworks *FrameworkService
ComplianceFrameworks *ComplianceFrameworkService
TrustCenterAccesses *TrustCenterAccessService
@@ -124,7 +124,7 @@ func (s *Service) WithTenant(tenantID gid.TenantID) *TenantService {
tenantService.TrustCenters = &TrustCenterService{svc: tenantService}
tenantService.Documents = &DocumentService{svc: tenantService, html2pdfConverter: s.html2pdfConverter}
tenantService.Audits = &AuditService{svc: tenantService}
tenantService.Vendors = &VendorService{svc: tenantService}
tenantService.ThirdParties = &ThirdPartyService{svc: tenantService}
tenantService.Frameworks = &FrameworkService{svc: tenantService}
tenantService.ComplianceFrameworks = &ComplianceFrameworkService{svc: tenantService}
tenantService.TrustCenterAccesses = &TrustCenterAccessService{svc: tenantService, iamSvc: s.iam, logger: s.logger}

View File

@@ -24,22 +24,22 @@ import (
"go.probo.inc/probo/pkg/page"
)
type VendorService struct {
type ThirdPartyService struct {
svc *TenantService
}
func (s VendorService) Get(
func (s ThirdPartyService) Get(
ctx context.Context,
vendorID gid.GID,
) (*coredata.Vendor, error) {
vendor := &coredata.Vendor{}
thirdPartyID gid.GID,
) (*coredata.ThirdParty, error) {
thirdParty := &coredata.ThirdParty{}
err := s.svc.pg.WithConn(
ctx,
func(ctx context.Context, conn pg.Querier) error {
err := vendor.LoadByID(ctx, conn, s.svc.scope, vendorID)
err := thirdParty.LoadByID(ctx, conn, s.svc.scope, thirdPartyID)
if err != nil {
return fmt.Errorf("cannot load vendor: %w", err)
return fmt.Errorf("cannot load thirdParty: %w", err)
}
return nil
@@ -50,25 +50,25 @@ func (s VendorService) Get(
return nil, err
}
return vendor, nil
return thirdParty, nil
}
func (s VendorService) ListForOrganizationId(
func (s ThirdPartyService) ListForOrganizationId(
ctx context.Context,
organizationID gid.GID,
cursor *page.Cursor[coredata.VendorOrderField],
) (*page.Page[*coredata.Vendor, coredata.VendorOrderField], error) {
var vendors coredata.Vendors
cursor *page.Cursor[coredata.ThirdPartyOrderField],
) (*page.Page[*coredata.ThirdParty, coredata.ThirdPartyOrderField], error) {
var thirdParties coredata.ThirdParties
err := s.svc.pg.WithConn(
ctx,
func(ctx context.Context, conn pg.Querier) error {
showOnTrustCenter := true
filter := coredata.NewVendorFilter(&showOnTrustCenter)
filter := coredata.NewThirdPartyFilter(&showOnTrustCenter)
err := vendors.LoadByOrganizationID(ctx, conn, s.svc.scope, organizationID, cursor, filter)
err := thirdParties.LoadByOrganizationID(ctx, conn, s.svc.scope, organizationID, cursor, filter)
if err != nil {
return fmt.Errorf("cannot load vendors: %w", err)
return fmt.Errorf("cannot load thirdParties: %w", err)
}
return nil
@@ -79,10 +79,10 @@ func (s VendorService) ListForOrganizationId(
return nil, err
}
return page.NewPage(vendors, cursor), nil
return page.NewPage(thirdParties, cursor), nil
}
func (s VendorService) CountForTrustCenterId(
func (s ThirdPartyService) CountForTrustCenterId(
ctx context.Context,
trustCenterID gid.GID,
) (int, error) {
@@ -96,12 +96,12 @@ func (s VendorService) CountForTrustCenterId(
return fmt.Errorf("cannot load trust center: %w", err)
}
vendors := &coredata.Vendors{}
thirdParties := &coredata.ThirdParties{}
showOnTrustCenter := true
filter := coredata.NewVendorFilter(&showOnTrustCenter)
count, err = vendors.CountByOrganizationID(ctx, conn, s.svc.scope, trustCenter.OrganizationID, filter)
filter := coredata.NewThirdPartyFilter(&showOnTrustCenter)
count, err = thirdParties.CountByOrganizationID(ctx, conn, s.svc.scope, trustCenter.OrganizationID, filter)
if err != nil {
return fmt.Errorf("cannot count vendors: %w", err)
return fmt.Errorf("cannot count thirdParties: %w", err)
}
return nil