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

@@ -79,10 +79,10 @@ export function UserCard({ name }: UserCardProps) {
```tsx
// Good — destructure in body when parameter-level destructuring would exceed the line-length limit
export function VendorComplianceOverviewPanel(
props: VendorComplianceOverviewPanelProps,
export function ThirdPartyComplianceOverviewPanel(
props: ThirdPartyComplianceOverviewPanelProps,
) {
const { className, vendorKey, onStatusChange } = props;
const { className, thirdPartyKey, onStatusChange } = props;
// …
}
```
@@ -139,11 +139,11 @@ export function Thing({ label }: ThingProps) {
```tsx
// Good — rare exception: route entry default export (names still clear in module)
type VendorsPageProps = {
queryRef: PreloadedQuery<VendorsQuery>;
type ThirdPartiesPageProps = {
queryRef: PreloadedQuery<ThirdPartiesQuery>;
};
export default function VendorsPage({ queryRef }: VendorsPageProps) {
export default function ThirdPartiesPage({ queryRef }: ThirdPartiesPageProps) {
// …
}
```
@@ -204,7 +204,7 @@ Use props for:
### Hooks for data and URL-derived identity
- **Fetched data:** Colocate Relay fragments and queries per [`contrib/claude/relay.md`](relay.md) (`useFragment`, `useLazyLoadQuery`, `usePreloadedQuery`, etc.) in the component that needs the data.
- **Route parameters:** Call `useParams()` (or a small `useOrganizationId()`-style hook) **inside** the component that needs the id — avoid drilling `organizationId` / `vendorId` from a parent that only read the URL to pass them down.
- **Route parameters:** Call `useParams()` (or a small `useOrganizationId()`-style hook) **inside** the component that needs the id — avoid drilling `organizationId` / `thirdPartyId` from a parent that only read the URL to pass them down.
### Relay: framework wiring is not “business data props”
@@ -214,36 +214,36 @@ Relay sometimes requires **opaque handles** on props: e.g. **`queryRef`** for `u
```tsx
// Bad — parent only needed the param to pass it down
function VendorLayout() {
const { vendorId } = useParams();
function ThirdPartyLayout() {
const { thirdPartyId } = useParams();
return (
<main>
<VendorSummary vendorId={vendorId!} />
<ThirdPartySummary thirdPartyId={thirdPartyId!} />
</main>
);
}
function VendorSummary({ vendorId }: { vendorId: string }) {
function ThirdPartySummary({ thirdPartyId }: { thirdPartyId: string }) {
return <div>{/* … */}</div>;
}
```
```tsx
// Good — component that needs the id reads it (or uses a dedicated hook)
function VendorLayout() {
function ThirdPartyLayout() {
return (
<main>
<VendorSummary />
<ThirdPartySummary />
</main>
);
}
function VendorSummary() {
const { vendorId } = useParams();
if (vendorId == null) {
function ThirdPartySummary() {
const { thirdPartyId } = useParams();
if (thirdPartyId == null) {
return null;
}
return <div>{/* use vendorId in a hook / query … */}</div>;
return <div>{/* use thirdPartyId in a hook / query … */}</div>;
}
```
@@ -251,13 +251,13 @@ function VendorSummary() {
```tsx
// Bad — parent loaded data and passes fields as props
function VendorPage() {
const vendor = useLazyLoadQuery(/* … */);
function ThirdPartyPage() {
const thirdParty = useLazyLoadQuery(/* … */);
return (
<VendorHeader
name={vendor.name}
riskScore={vendor.riskScore}
updatedAt={vendor.updatedAt}
<ThirdPartyHeader
name={thirdParty.name}
riskScore={thirdParty.riskScore}
updatedAt={thirdParty.updatedAt}
/>
);
}
@@ -265,24 +265,24 @@ function VendorPage() {
```tsx
// Good — header colocates its fragment and reads via useFragment
const vendorHeaderFragment = graphql`
fragment VendorHeader_vendor on Vendor {
const thirdPartyHeaderFragment = graphql`
fragment ThirdPartyHeader_thirdParty on ThirdParty {
name
riskScore
updatedAt
}
`;
interface VendorHeaderProps {
interface ThirdPartyHeaderProps {
className?: string;
vendorKey: VendorHeader_vendor$key;
thirdPartyKey: ThirdPartyHeader_thirdParty$key;
}
export function VendorHeader({ className, vendorKey }: VendorHeaderProps) {
const vendor = useFragment(vendorHeaderFragment, vendorKey);
export function ThirdPartyHeader({ className, thirdPartyKey }: ThirdPartyHeaderProps) {
const thirdParty = useFragment(thirdPartyHeaderFragment, thirdPartyKey);
return (
<header className={className}>
{/* render from vendor … */}
{/* render from thirdParty … */}
</header>
);
}