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:
@@ -44,20 +44,20 @@ func (r *assetResolver) Owner(ctx context.Context, obj *types.Asset) (*types.Pro
|
||||
return types.NewProfile(owner), nil
|
||||
}
|
||||
|
||||
// Vendors is the resolver for the vendors field.
|
||||
func (r *assetResolver) Vendors(ctx context.Context, obj *types.Asset, first *int, after *page.CursorKey, last *int, before *page.CursorKey, orderBy *types.VendorOrderBy) (*types.VendorConnection, error) {
|
||||
if err := r.authorize(ctx, obj.ID, probo.ActionVendorList); err != nil {
|
||||
// ThirdParties is the resolver for the thirdParties field.
|
||||
func (r *assetResolver) ThirdParties(ctx context.Context, obj *types.Asset, first *int, after *page.CursorKey, last *int, before *page.CursorKey, orderBy *types.ThirdPartyOrderBy) (*types.ThirdPartyConnection, error) {
|
||||
if err := r.authorize(ctx, obj.ID, probo.ActionThirdPartyList); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
prb := r.ProboService(ctx, obj.ID.TenantID())
|
||||
|
||||
pageOrderBy := page.OrderBy[coredata.VendorOrderField]{
|
||||
Field: coredata.VendorOrderFieldCreatedAt,
|
||||
pageOrderBy := page.OrderBy[coredata.ThirdPartyOrderField]{
|
||||
Field: coredata.ThirdPartyOrderFieldCreatedAt,
|
||||
Direction: page.OrderDirectionDesc,
|
||||
}
|
||||
if orderBy != nil {
|
||||
pageOrderBy = page.OrderBy[coredata.VendorOrderField]{
|
||||
pageOrderBy = page.OrderBy[coredata.ThirdPartyOrderField]{
|
||||
Field: orderBy.Field,
|
||||
Direction: orderBy.Direction,
|
||||
}
|
||||
@@ -65,13 +65,13 @@ func (r *assetResolver) Vendors(ctx context.Context, obj *types.Asset, first *in
|
||||
|
||||
cursor := types.NewCursor(first, after, last, before, pageOrderBy)
|
||||
|
||||
page, err := prb.Vendors.ListForAssetID(ctx, obj.ID, cursor)
|
||||
page, err := prb.ThirdParties.ListForAssetID(ctx, obj.ID, cursor)
|
||||
if err != nil {
|
||||
r.logger.ErrorCtx(ctx, "cannot list asset vendors", log.Error(err))
|
||||
r.logger.ErrorCtx(ctx, "cannot list asset thirdParties", log.Error(err))
|
||||
return nil, gqlutils.Internal(ctx)
|
||||
}
|
||||
|
||||
return types.NewVendorConnection(page, r, obj.ID), nil
|
||||
return types.NewThirdPartyConnection(page, r, obj.ID), nil
|
||||
}
|
||||
|
||||
// Organization is the resolver for the organization field.
|
||||
@@ -149,20 +149,20 @@ func (r *datumResolver) Owner(ctx context.Context, obj *types.Datum) (*types.Pro
|
||||
return types.NewProfile(owner), nil
|
||||
}
|
||||
|
||||
// Vendors is the resolver for the vendors field.
|
||||
func (r *datumResolver) Vendors(ctx context.Context, obj *types.Datum, first *int, after *page.CursorKey, last *int, before *page.CursorKey, orderBy *types.VendorOrderBy) (*types.VendorConnection, error) {
|
||||
if err := r.authorize(ctx, obj.ID, probo.ActionVendorList); err != nil {
|
||||
// ThirdParties is the resolver for the thirdParties field.
|
||||
func (r *datumResolver) ThirdParties(ctx context.Context, obj *types.Datum, first *int, after *page.CursorKey, last *int, before *page.CursorKey, orderBy *types.ThirdPartyOrderBy) (*types.ThirdPartyConnection, error) {
|
||||
if err := r.authorize(ctx, obj.ID, probo.ActionThirdPartyList); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
prb := r.ProboService(ctx, obj.ID.TenantID())
|
||||
|
||||
pageOrderBy := page.OrderBy[coredata.VendorOrderField]{
|
||||
Field: coredata.VendorOrderFieldCreatedAt,
|
||||
pageOrderBy := page.OrderBy[coredata.ThirdPartyOrderField]{
|
||||
Field: coredata.ThirdPartyOrderFieldCreatedAt,
|
||||
Direction: page.OrderDirectionDesc,
|
||||
}
|
||||
if orderBy != nil {
|
||||
pageOrderBy = page.OrderBy[coredata.VendorOrderField]{
|
||||
pageOrderBy = page.OrderBy[coredata.ThirdPartyOrderField]{
|
||||
Field: orderBy.Field,
|
||||
Direction: orderBy.Direction,
|
||||
}
|
||||
@@ -170,13 +170,13 @@ func (r *datumResolver) Vendors(ctx context.Context, obj *types.Datum, first *in
|
||||
|
||||
cursor := types.NewCursor(first, after, last, before, pageOrderBy)
|
||||
|
||||
page, err := prb.Data.ListVendors(ctx, obj.ID, cursor)
|
||||
page, err := prb.Data.ListThirdParties(ctx, obj.ID, cursor)
|
||||
if err != nil {
|
||||
r.logger.ErrorCtx(ctx, "cannot list data vendors", log.Error(err))
|
||||
r.logger.ErrorCtx(ctx, "cannot list data thirdParties", log.Error(err))
|
||||
return nil, gqlutils.Internal(ctx)
|
||||
}
|
||||
|
||||
return types.NewVendorConnection(page, r, obj.ID), nil
|
||||
return types.NewThirdPartyConnection(page, r, obj.ID), nil
|
||||
}
|
||||
|
||||
// Organization is the resolver for the organization field.
|
||||
@@ -244,7 +244,7 @@ func (r *mutationResolver) CreateAsset(ctx context.Context, input types.CreateAs
|
||||
OwnerID: input.OwnerID,
|
||||
AssetType: input.AssetType,
|
||||
DataTypesStored: input.DataTypesStored,
|
||||
VendorIDs: input.VendorIds,
|
||||
ThirdPartyIDs: input.ThirdPartyIds,
|
||||
},
|
||||
)
|
||||
|
||||
@@ -278,7 +278,7 @@ func (r *mutationResolver) UpdateAsset(ctx context.Context, input types.UpdateAs
|
||||
OwnerID: input.OwnerID,
|
||||
AssetType: input.AssetType,
|
||||
DataTypesStored: input.DataTypesStored,
|
||||
VendorIDs: input.VendorIds,
|
||||
ThirdPartyIDs: input.ThirdPartyIds,
|
||||
},
|
||||
)
|
||||
if err != nil {
|
||||
@@ -328,7 +328,7 @@ func (r *mutationResolver) CreateDatum(ctx context.Context, input types.CreateDa
|
||||
Name: input.Name,
|
||||
DataClassification: input.DataClassification,
|
||||
OwnerID: input.OwnerID,
|
||||
VendorIDs: input.VendorIds,
|
||||
ThirdPartyIDs: input.ThirdPartyIds,
|
||||
},
|
||||
)
|
||||
|
||||
@@ -360,7 +360,7 @@ func (r *mutationResolver) UpdateDatum(ctx context.Context, input types.UpdateDa
|
||||
Name: input.Name,
|
||||
DataClassification: input.DataClassification,
|
||||
OwnerID: input.OwnerID,
|
||||
VendorIDs: input.VendorIds,
|
||||
ThirdPartyIDs: input.ThirdPartyIds,
|
||||
},
|
||||
)
|
||||
|
||||
|
||||
@@ -39,14 +39,14 @@ func (r *queryResolver) Node(ctx context.Context, id gid.GID) (types.Node, error
|
||||
}
|
||||
return types.NewOrganization(organization), nil
|
||||
}
|
||||
case coredata.VendorEntityType:
|
||||
action = probo.ActionVendorGet
|
||||
case coredata.ThirdPartyEntityType:
|
||||
action = probo.ActionThirdPartyGet
|
||||
loadNode = func(ctx context.Context, id gid.GID) (types.Node, error) {
|
||||
vendor, err := prb.Vendors.Get(ctx, id)
|
||||
thirdParty, err := prb.ThirdParties.Get(ctx, id)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return types.NewVendor(vendor), nil
|
||||
return types.NewThirdParty(thirdParty), nil
|
||||
}
|
||||
case coredata.FrameworkEntityType:
|
||||
action = probo.ActionFrameworkGet
|
||||
@@ -111,32 +111,32 @@ func (r *queryResolver) Node(ctx context.Context, id gid.GID) (types.Node, error
|
||||
}
|
||||
return types.NewRisk(risk), nil
|
||||
}
|
||||
case coredata.VendorComplianceReportEntityType:
|
||||
action = probo.ActionVendorComplianceReportGet
|
||||
case coredata.ThirdPartyComplianceReportEntityType:
|
||||
action = probo.ActionThirdPartyComplianceReportGet
|
||||
loadNode = func(ctx context.Context, id gid.GID) (types.Node, error) {
|
||||
vendorComplianceReport, err := prb.VendorComplianceReports.Get(ctx, id)
|
||||
thirdPartyComplianceReport, err := prb.ThirdPartyComplianceReports.Get(ctx, id)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return types.NewVendorComplianceReport(vendorComplianceReport), nil
|
||||
return types.NewThirdPartyComplianceReport(thirdPartyComplianceReport), nil
|
||||
}
|
||||
case coredata.VendorContactEntityType:
|
||||
action = probo.ActionVendorContactGet
|
||||
case coredata.ThirdPartyContactEntityType:
|
||||
action = probo.ActionThirdPartyContactGet
|
||||
loadNode = func(ctx context.Context, id gid.GID) (types.Node, error) {
|
||||
vendorContact, err := prb.VendorContacts.Get(ctx, id)
|
||||
thirdPartyContact, err := prb.ThirdPartyContacts.Get(ctx, id)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return types.NewVendorContact(vendorContact), nil
|
||||
return types.NewThirdPartyContact(thirdPartyContact), nil
|
||||
}
|
||||
case coredata.VendorServiceEntityType:
|
||||
action = probo.ActionVendorServiceGet
|
||||
case coredata.ThirdPartyServiceEntityType:
|
||||
action = probo.ActionThirdPartyServiceGet
|
||||
loadNode = func(ctx context.Context, id gid.GID) (types.Node, error) {
|
||||
vendorService, err := prb.VendorServices.Get(ctx, id)
|
||||
thirdPartyService, err := prb.ThirdPartyServices.Get(ctx, id)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return types.NewVendorService(vendorService), nil
|
||||
return types.NewThirdPartyService(thirdPartyService), nil
|
||||
}
|
||||
case coredata.DocumentVersionEntityType:
|
||||
action = probo.ActionDocumentVersionList
|
||||
|
||||
@@ -34,7 +34,7 @@ type (
|
||||
Organization *dataloadgen.Loader[gid.GID, *coredata.Organization]
|
||||
Framework *dataloadgen.Loader[gid.GID, *coredata.Framework]
|
||||
Control *dataloadgen.Loader[gid.GID, *coredata.Control]
|
||||
Vendor *dataloadgen.Loader[gid.GID, *coredata.Vendor]
|
||||
ThirdParty *dataloadgen.Loader[gid.GID, *coredata.ThirdParty]
|
||||
Document *dataloadgen.Loader[gid.GID, *coredata.Document]
|
||||
Profile *dataloadgen.Loader[gid.GID, *coredata.MembershipProfile]
|
||||
Risk *dataloadgen.Loader[gid.GID, *coredata.Risk]
|
||||
@@ -77,7 +77,7 @@ func (f *batchFetcher) newLoaders() *Loaders {
|
||||
Organization: dataloadgen.NewMappedLoader(f.fetchOrganizations),
|
||||
Framework: dataloadgen.NewMappedLoader(f.fetchFrameworks),
|
||||
Control: dataloadgen.NewMappedLoader(f.fetchControls),
|
||||
Vendor: dataloadgen.NewMappedLoader(f.fetchVendors),
|
||||
ThirdParty: dataloadgen.NewMappedLoader(f.fetchThirdParties),
|
||||
Document: dataloadgen.NewMappedLoader(f.fetchDocuments),
|
||||
Profile: dataloadgen.NewMappedLoader(f.fetchProfiles),
|
||||
Risk: dataloadgen.NewMappedLoader(f.fetchRisks),
|
||||
@@ -135,16 +135,16 @@ func (f *batchFetcher) fetchControls(ctx context.Context, keys []gid.GID) (map[g
|
||||
return result, nil
|
||||
}
|
||||
|
||||
func (f *batchFetcher) fetchVendors(ctx context.Context, keys []gid.GID) (map[gid.GID]*coredata.Vendor, error) {
|
||||
func (f *batchFetcher) fetchThirdParties(ctx context.Context, keys []gid.GID) (map[gid.GID]*coredata.ThirdParty, error) {
|
||||
tenantSvc := f.probo.WithTenant(keys[0].TenantID())
|
||||
|
||||
vendors, err := tenantSvc.Vendors.GetByIDs(ctx, keys...)
|
||||
thirdParties, err := tenantSvc.ThirdParties.GetByIDs(ctx, keys...)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("cannot batch load vendors: %w", err)
|
||||
return nil, fmt.Errorf("cannot batch load thirdParties: %w", err)
|
||||
}
|
||||
|
||||
result := make(map[gid.GID]*coredata.Vendor, len(vendors))
|
||||
for _, v := range vendors {
|
||||
result := make(map[gid.GID]*coredata.ThirdParty, len(thirdParties))
|
||||
for _, v := range thirdParties {
|
||||
result[v.ID] = v
|
||||
}
|
||||
return result, nil
|
||||
|
||||
@@ -67,13 +67,13 @@ type Asset implements Node {
|
||||
name: String!
|
||||
amount: Int!
|
||||
owner: Profile! @goField(forceResolver: true)
|
||||
vendors(
|
||||
thirdParties(
|
||||
first: Int
|
||||
after: CursorKey
|
||||
last: Int
|
||||
before: CursorKey
|
||||
orderBy: VendorOrder
|
||||
): VendorConnection! @goField(forceResolver: true)
|
||||
orderBy: ThirdPartyOrder
|
||||
): ThirdPartyConnection! @goField(forceResolver: true)
|
||||
assetType: AssetType!
|
||||
dataTypesStored: String!
|
||||
organization: Organization! @goField(forceResolver: true)
|
||||
@@ -91,13 +91,13 @@ type Datum implements Node
|
||||
name: String!
|
||||
dataClassification: DataClassification!
|
||||
owner: Profile! @goField(forceResolver: true)
|
||||
vendors(
|
||||
thirdParties(
|
||||
first: Int
|
||||
after: CursorKey
|
||||
last: Int
|
||||
before: CursorKey
|
||||
orderBy: VendorOrder
|
||||
): VendorConnection! @goField(forceResolver: true)
|
||||
orderBy: ThirdPartyOrder
|
||||
): ThirdPartyConnection! @goField(forceResolver: true)
|
||||
organization: Organization! @goField(forceResolver: true)
|
||||
createdAt: Datetime!
|
||||
updatedAt: Datetime!
|
||||
@@ -155,7 +155,7 @@ input CreateAssetInput {
|
||||
ownerId: ID!
|
||||
assetType: AssetType!
|
||||
dataTypesStored: String!
|
||||
vendorIds: [ID!]
|
||||
thirdPartyIds: [ID!]
|
||||
}
|
||||
|
||||
input UpdateAssetInput {
|
||||
@@ -165,7 +165,7 @@ input UpdateAssetInput {
|
||||
ownerId: ID
|
||||
assetType: AssetType
|
||||
dataTypesStored: String
|
||||
vendorIds: [ID!]
|
||||
thirdPartyIds: [ID!]
|
||||
}
|
||||
|
||||
input DeleteAssetInput {
|
||||
@@ -177,7 +177,7 @@ input CreateDatumInput {
|
||||
name: String!
|
||||
dataClassification: DataClassification!
|
||||
ownerId: ID!
|
||||
vendorIds: [ID!]
|
||||
thirdPartyIds: [ID!]
|
||||
}
|
||||
|
||||
input UpdateDatumInput {
|
||||
@@ -185,7 +185,7 @@ input UpdateDatumInput {
|
||||
name: String
|
||||
dataClassification: DataClassification
|
||||
ownerId: ID
|
||||
vendorIds: [ID!]
|
||||
thirdPartyIds: [ID!]
|
||||
}
|
||||
|
||||
input DeleteDatumInput {
|
||||
|
||||
@@ -18,7 +18,7 @@ type CommonThirdParty
|
||||
) {
|
||||
id: ID!
|
||||
name: String!
|
||||
category: VendorCategory!
|
||||
category: ThirdPartyCategory!
|
||||
websiteUrl: String
|
||||
headquarterAddress: String
|
||||
legalName: String
|
||||
|
||||
@@ -317,15 +317,15 @@ type Organization implements Node {
|
||||
orderBy: CookieBannerOrder
|
||||
): CookieBannerConnection @goField(forceResolver: true)
|
||||
|
||||
vendors(
|
||||
thirdParties(
|
||||
first: Int
|
||||
after: CursorKey
|
||||
last: Int
|
||||
before: CursorKey
|
||||
orderBy: VendorOrder
|
||||
): VendorConnection! @goField(forceResolver: true)
|
||||
orderBy: ThirdPartyOrder
|
||||
): ThirdPartyConnection! @goField(forceResolver: true)
|
||||
|
||||
vendorsDocument: Document @goField(forceResolver: true)
|
||||
thirdPartiesDocument: Document @goField(forceResolver: true)
|
||||
|
||||
webhookSubscriptions(
|
||||
first: Int
|
||||
|
||||
@@ -160,13 +160,13 @@ type ProcessingActivity implements Node {
|
||||
nextReviewDate: Datetime
|
||||
role: ProcessingActivityRole!
|
||||
dataProtectionOfficer: Profile @goField(forceResolver: true)
|
||||
vendors(
|
||||
thirdParties(
|
||||
first: Int
|
||||
after: CursorKey
|
||||
last: Int
|
||||
before: CursorKey
|
||||
orderBy: VendorOrder
|
||||
): VendorConnection! @goField(forceResolver: true)
|
||||
orderBy: ThirdPartyOrder
|
||||
): ThirdPartyConnection! @goField(forceResolver: true)
|
||||
dataProtectionImpactAssessment: DataProtectionImpactAssessment
|
||||
@goField(forceResolver: true)
|
||||
transferImpactAssessment: TransferImpactAssessment
|
||||
@@ -227,7 +227,7 @@ input CreateProcessingActivityInput {
|
||||
nextReviewDate: Datetime
|
||||
role: ProcessingActivityRole!
|
||||
dataProtectionOfficerId: ID
|
||||
vendorIds: [ID!]
|
||||
thirdPartyIds: [ID!]
|
||||
}
|
||||
|
||||
input UpdateProcessingActivityInput {
|
||||
@@ -252,7 +252,7 @@ input UpdateProcessingActivityInput {
|
||||
nextReviewDate: Datetime @goField(omittable: true)
|
||||
role: ProcessingActivityRole
|
||||
dataProtectionOfficerId: ID @goField(omittable: true)
|
||||
vendorIds: [ID!]
|
||||
thirdPartyIds: [ID!]
|
||||
}
|
||||
|
||||
input DeleteProcessingActivityInput {
|
||||
|
||||
711
pkg/server/api/console/v1/graphql/third_party.graphql
Normal file
711
pkg/server/api/console/v1/graphql/third_party.graphql
Normal file
@@ -0,0 +1,711 @@
|
||||
enum ThirdPartyCategory
|
||||
@goModel(model: "go.probo.inc/probo/pkg/coredata.ThirdPartyCategory") {
|
||||
ANALYTICS
|
||||
@goEnum(
|
||||
value: "go.probo.inc/probo/pkg/coredata.ThirdPartyCategoryAnalytics"
|
||||
)
|
||||
CLOUD_MONITORING
|
||||
@goEnum(
|
||||
value: "go.probo.inc/probo/pkg/coredata.ThirdPartyCategoryCloudMonitoring"
|
||||
)
|
||||
CLOUD_PROVIDER
|
||||
@goEnum(
|
||||
value: "go.probo.inc/probo/pkg/coredata.ThirdPartyCategoryCloudProvider"
|
||||
)
|
||||
COLLABORATION
|
||||
@goEnum(
|
||||
value: "go.probo.inc/probo/pkg/coredata.ThirdPartyCategoryCollaboration"
|
||||
)
|
||||
CUSTOMER_SUPPORT
|
||||
@goEnum(
|
||||
value: "go.probo.inc/probo/pkg/coredata.ThirdPartyCategoryCustomerSupport"
|
||||
)
|
||||
DATA_STORAGE_AND_PROCESSING
|
||||
@goEnum(
|
||||
value: "go.probo.inc/probo/pkg/coredata.ThirdPartyCategoryDataStorageAndProcessing"
|
||||
)
|
||||
DOCUMENT_MANAGEMENT
|
||||
@goEnum(
|
||||
value: "go.probo.inc/probo/pkg/coredata.ThirdPartyCategoryDocumentManagement"
|
||||
)
|
||||
EMPLOYEE_MANAGEMENT
|
||||
@goEnum(
|
||||
value: "go.probo.inc/probo/pkg/coredata.ThirdPartyCategoryEmployeeManagement"
|
||||
)
|
||||
ENGINEERING
|
||||
@goEnum(
|
||||
value: "go.probo.inc/probo/pkg/coredata.ThirdPartyCategoryEngineering"
|
||||
)
|
||||
FINANCE
|
||||
@goEnum(value: "go.probo.inc/probo/pkg/coredata.ThirdPartyCategoryFinance")
|
||||
IDENTITY_PROVIDER
|
||||
@goEnum(
|
||||
value: "go.probo.inc/probo/pkg/coredata.ThirdPartyCategoryIdentityProvider"
|
||||
)
|
||||
IT @goEnum(value: "go.probo.inc/probo/pkg/coredata.ThirdPartyCategoryIT")
|
||||
MARKETING
|
||||
@goEnum(
|
||||
value: "go.probo.inc/probo/pkg/coredata.ThirdPartyCategoryMarketing"
|
||||
)
|
||||
OFFICE_OPERATIONS
|
||||
@goEnum(
|
||||
value: "go.probo.inc/probo/pkg/coredata.ThirdPartyCategoryOfficeOperations"
|
||||
)
|
||||
OTHER @goEnum(value: "go.probo.inc/probo/pkg/coredata.ThirdPartyCategoryOther")
|
||||
PASSWORD_MANAGEMENT
|
||||
@goEnum(
|
||||
value: "go.probo.inc/probo/pkg/coredata.ThirdPartyCategoryPasswordManagement"
|
||||
)
|
||||
PRODUCT_AND_DESIGN
|
||||
@goEnum(
|
||||
value: "go.probo.inc/probo/pkg/coredata.ThirdPartyCategoryProductAndDesign"
|
||||
)
|
||||
PROFESSIONAL_SERVICES
|
||||
@goEnum(
|
||||
value: "go.probo.inc/probo/pkg/coredata.ThirdPartyCategoryProfessionalServices"
|
||||
)
|
||||
RECRUITING
|
||||
@goEnum(
|
||||
value: "go.probo.inc/probo/pkg/coredata.ThirdPartyCategoryRecruiting"
|
||||
)
|
||||
SALES @goEnum(value: "go.probo.inc/probo/pkg/coredata.ThirdPartyCategorySales")
|
||||
SECURITY
|
||||
@goEnum(value: "go.probo.inc/probo/pkg/coredata.ThirdPartyCategorySecurity")
|
||||
VERSION_CONTROL
|
||||
@goEnum(
|
||||
value: "go.probo.inc/probo/pkg/coredata.ThirdPartyCategoryVersionControl"
|
||||
)
|
||||
}
|
||||
|
||||
enum DataSensitivity
|
||||
@goModel(model: "go.probo.inc/probo/pkg/coredata.DataSensitivity") {
|
||||
NONE @goEnum(value: "go.probo.inc/probo/pkg/coredata.DataSensitivityNone")
|
||||
LOW @goEnum(value: "go.probo.inc/probo/pkg/coredata.DataSensitivityLow")
|
||||
MEDIUM
|
||||
@goEnum(value: "go.probo.inc/probo/pkg/coredata.DataSensitivityMedium")
|
||||
HIGH @goEnum(value: "go.probo.inc/probo/pkg/coredata.DataSensitivityHigh")
|
||||
CRITICAL
|
||||
@goEnum(
|
||||
value: "go.probo.inc/probo/pkg/coredata.DataSensitivityCritical"
|
||||
)
|
||||
}
|
||||
|
||||
enum BusinessImpact
|
||||
@goModel(model: "go.probo.inc/probo/pkg/coredata.BusinessImpact") {
|
||||
LOW @goEnum(value: "go.probo.inc/probo/pkg/coredata.BusinessImpactLow")
|
||||
MEDIUM
|
||||
@goEnum(value: "go.probo.inc/probo/pkg/coredata.BusinessImpactMedium")
|
||||
HIGH @goEnum(value: "go.probo.inc/probo/pkg/coredata.BusinessImpactHigh")
|
||||
CRITICAL
|
||||
@goEnum(value: "go.probo.inc/probo/pkg/coredata.BusinessImpactCritical")
|
||||
}
|
||||
|
||||
enum ThirdPartyOrderField
|
||||
@goModel(model: "go.probo.inc/probo/pkg/coredata.ThirdPartyOrderField") {
|
||||
NAME @goEnum(value: "go.probo.inc/probo/pkg/coredata.ThirdPartyOrderFieldName")
|
||||
CREATED_AT
|
||||
@goEnum(
|
||||
value: "go.probo.inc/probo/pkg/coredata.ThirdPartyOrderFieldCreatedAt"
|
||||
)
|
||||
UPDATED_AT
|
||||
@goEnum(
|
||||
value: "go.probo.inc/probo/pkg/coredata.ThirdPartyOrderFieldUpdatedAt"
|
||||
)
|
||||
}
|
||||
|
||||
enum ThirdPartyComplianceReportOrderField
|
||||
@goModel(
|
||||
model: "go.probo.inc/probo/pkg/coredata.ThirdPartyComplianceReportOrderField"
|
||||
) {
|
||||
REPORT_DATE
|
||||
@goEnum(
|
||||
value: "go.probo.inc/probo/pkg/coredata.ThirdPartyComplianceReportOrderFieldReportDate"
|
||||
)
|
||||
CREATED_AT
|
||||
@goEnum(
|
||||
value: "go.probo.inc/probo/pkg/coredata.ThirdPartyComplianceReportOrderFieldCreatedAt"
|
||||
)
|
||||
}
|
||||
|
||||
enum ThirdPartyContactOrderField
|
||||
@goModel(model: "go.probo.inc/probo/pkg/coredata.ThirdPartyContactOrderField") {
|
||||
CREATED_AT
|
||||
@goEnum(
|
||||
value: "go.probo.inc/probo/pkg/coredata.ThirdPartyContactOrderFieldCreatedAt"
|
||||
)
|
||||
FULL_NAME
|
||||
@goEnum(
|
||||
value: "go.probo.inc/probo/pkg/coredata.ThirdPartyContactOrderFieldFullName"
|
||||
)
|
||||
EMAIL
|
||||
@goEnum(
|
||||
value: "go.probo.inc/probo/pkg/coredata.ThirdPartyContactOrderFieldEmail"
|
||||
)
|
||||
}
|
||||
|
||||
enum ThirdPartyServiceOrderField
|
||||
@goModel(model: "go.probo.inc/probo/pkg/coredata.ThirdPartyServiceOrderField") {
|
||||
CREATED_AT
|
||||
@goEnum(
|
||||
value: "go.probo.inc/probo/pkg/coredata.ThirdPartyServiceOrderFieldCreatedAt"
|
||||
)
|
||||
NAME
|
||||
@goEnum(
|
||||
value: "go.probo.inc/probo/pkg/coredata.ThirdPartyServiceOrderFieldName"
|
||||
)
|
||||
}
|
||||
|
||||
enum ThirdPartyRiskAssessmentOrderField
|
||||
@goModel(
|
||||
model: "go.probo.inc/probo/pkg/coredata.ThirdPartyRiskAssessmentOrderField"
|
||||
) {
|
||||
CREATED_AT
|
||||
@goEnum(
|
||||
value: "go.probo.inc/probo/pkg/coredata.ThirdPartyRiskAssessmentOrderFieldCreatedAt"
|
||||
)
|
||||
EXPIRES_AT
|
||||
@goEnum(
|
||||
value: "go.probo.inc/probo/pkg/coredata.ThirdPartyRiskAssessmentOrderFieldExpiresAt"
|
||||
)
|
||||
}
|
||||
|
||||
input ThirdPartyOrder
|
||||
@goModel(
|
||||
model: "go.probo.inc/probo/pkg/server/api/console/v1/types.ThirdPartyOrderBy"
|
||||
) {
|
||||
direction: OrderDirection!
|
||||
field: ThirdPartyOrderField!
|
||||
}
|
||||
|
||||
input ThirdPartyComplianceReportOrder
|
||||
@goModel(
|
||||
model: "go.probo.inc/probo/pkg/server/api/console/v1/types.ThirdPartyComplianceReportOrderBy"
|
||||
) {
|
||||
direction: OrderDirection!
|
||||
field: ThirdPartyComplianceReportOrderField!
|
||||
}
|
||||
|
||||
input ThirdPartyContactOrder
|
||||
@goModel(
|
||||
model: "go.probo.inc/probo/pkg/server/api/console/v1/types.ThirdPartyContactOrderBy"
|
||||
) {
|
||||
direction: OrderDirection!
|
||||
field: ThirdPartyContactOrderField!
|
||||
}
|
||||
|
||||
input ThirdPartyServiceOrder
|
||||
@goModel(
|
||||
model: "go.probo.inc/probo/pkg/server/api/console/v1/types.ThirdPartyServiceOrderBy"
|
||||
) {
|
||||
direction: OrderDirection!
|
||||
field: ThirdPartyServiceOrderField!
|
||||
}
|
||||
|
||||
input ThirdPartyRiskAssessmentOrder {
|
||||
field: ThirdPartyRiskAssessmentOrderField!
|
||||
direction: OrderDirection!
|
||||
}
|
||||
|
||||
type ThirdParty implements Node {
|
||||
id: ID!
|
||||
name: String!
|
||||
category: ThirdPartyCategory!
|
||||
description: String
|
||||
|
||||
organization: Organization! @goField(forceResolver: true)
|
||||
|
||||
complianceReports(
|
||||
first: Int
|
||||
after: CursorKey
|
||||
last: Int
|
||||
before: CursorKey
|
||||
orderBy: ThirdPartyComplianceReportOrder
|
||||
): ThirdPartyComplianceReportConnection! @goField(forceResolver: true)
|
||||
|
||||
businessAssociateAgreement: ThirdPartyBusinessAssociateAgreement
|
||||
@goField(forceResolver: true)
|
||||
dataPrivacyAgreement: ThirdPartyDataPrivacyAgreement
|
||||
@goField(forceResolver: true)
|
||||
|
||||
contacts(
|
||||
first: Int
|
||||
after: CursorKey
|
||||
last: Int
|
||||
before: CursorKey
|
||||
orderBy: ThirdPartyContactOrder
|
||||
): ThirdPartyContactConnection! @goField(forceResolver: true)
|
||||
|
||||
services(
|
||||
first: Int
|
||||
after: CursorKey
|
||||
last: Int
|
||||
before: CursorKey
|
||||
orderBy: ThirdPartyServiceOrder
|
||||
): ThirdPartyServiceConnection! @goField(forceResolver: true)
|
||||
|
||||
riskAssessments(
|
||||
first: Int
|
||||
after: CursorKey
|
||||
last: Int
|
||||
before: CursorKey
|
||||
orderBy: ThirdPartyRiskAssessmentOrder
|
||||
): ThirdPartyRiskAssessmentConnection! @goField(forceResolver: true)
|
||||
|
||||
businessOwner: Profile @goField(forceResolver: true)
|
||||
securityOwner: Profile @goField(forceResolver: true)
|
||||
|
||||
statusPageUrl: String
|
||||
termsOfServiceUrl: String
|
||||
privacyPolicyUrl: String
|
||||
serviceLevelAgreementUrl: String
|
||||
dataProcessingAgreementUrl: String
|
||||
businessAssociateAgreementUrl: String
|
||||
subprocessorsListUrl: String
|
||||
certifications: [String!]!
|
||||
countries: [CountryCode!]!
|
||||
securityPageUrl: String
|
||||
trustPageUrl: String
|
||||
headquarterAddress: String
|
||||
legalName: String
|
||||
websiteUrl: String
|
||||
showOnTrustCenter: Boolean!
|
||||
createdAt: Datetime!
|
||||
updatedAt: Datetime!
|
||||
|
||||
permission(action: String!): Boolean! @goField(forceResolver: true)
|
||||
}
|
||||
|
||||
type ThirdPartyComplianceReport implements Node {
|
||||
id: ID!
|
||||
thirdParty: ThirdParty! @goField(forceResolver: true)
|
||||
reportDate: Datetime!
|
||||
validUntil: Datetime
|
||||
reportName: String!
|
||||
file: File @goField(forceResolver: true)
|
||||
createdAt: Datetime!
|
||||
updatedAt: Datetime!
|
||||
|
||||
permission(action: String!): Boolean! @goField(forceResolver: true)
|
||||
}
|
||||
|
||||
type ThirdPartyBusinessAssociateAgreement implements Node {
|
||||
id: ID!
|
||||
thirdParty: ThirdParty! @goField(forceResolver: true)
|
||||
validFrom: Datetime
|
||||
validUntil: Datetime
|
||||
fileName: String!
|
||||
fileUrl: String! @goField(forceResolver: true)
|
||||
fileSize: BigInt!
|
||||
createdAt: Datetime!
|
||||
updatedAt: Datetime!
|
||||
|
||||
permission(action: String!): Boolean! @goField(forceResolver: true)
|
||||
}
|
||||
|
||||
type ThirdPartyContact implements Node {
|
||||
id: ID!
|
||||
thirdParty: ThirdParty! @goField(forceResolver: true)
|
||||
fullName: String
|
||||
email: EmailAddr
|
||||
phone: String
|
||||
role: String
|
||||
createdAt: Datetime!
|
||||
updatedAt: Datetime!
|
||||
|
||||
permission(action: String!): Boolean! @goField(forceResolver: true)
|
||||
}
|
||||
|
||||
type ThirdPartyService implements Node {
|
||||
id: ID!
|
||||
thirdParty: ThirdParty! @goField(forceResolver: true)
|
||||
name: String!
|
||||
description: String
|
||||
createdAt: Datetime!
|
||||
updatedAt: Datetime!
|
||||
|
||||
permission(action: String!): Boolean! @goField(forceResolver: true)
|
||||
}
|
||||
|
||||
type ThirdPartyDataPrivacyAgreement implements Node {
|
||||
id: ID!
|
||||
thirdParty: ThirdParty! @goField(forceResolver: true)
|
||||
validFrom: Datetime
|
||||
validUntil: Datetime
|
||||
fileName: String!
|
||||
fileUrl: String! @goField(forceResolver: true)
|
||||
fileSize: BigInt!
|
||||
createdAt: Datetime!
|
||||
updatedAt: Datetime!
|
||||
|
||||
permission(action: String!): Boolean! @goField(forceResolver: true)
|
||||
}
|
||||
|
||||
type ThirdPartyRiskAssessment implements Node {
|
||||
id: ID!
|
||||
thirdParty: ThirdParty! @goField(forceResolver: true)
|
||||
expiresAt: Datetime!
|
||||
dataSensitivity: DataSensitivity!
|
||||
businessImpact: BusinessImpact!
|
||||
notes: String
|
||||
createdAt: Datetime!
|
||||
updatedAt: Datetime!
|
||||
|
||||
permission(action: String!): Boolean! @goField(forceResolver: true)
|
||||
}
|
||||
|
||||
type ThirdPartyConnection
|
||||
@goModel(
|
||||
model: "go.probo.inc/probo/pkg/server/api/console/v1/types.ThirdPartyConnection"
|
||||
) {
|
||||
totalCount: Int! @goField(forceResolver: true)
|
||||
edges: [ThirdPartyEdge!]!
|
||||
pageInfo: PageInfo!
|
||||
}
|
||||
|
||||
type ThirdPartyEdge {
|
||||
cursor: CursorKey!
|
||||
node: ThirdParty!
|
||||
}
|
||||
|
||||
type ThirdPartyComplianceReportConnection {
|
||||
edges: [ThirdPartyComplianceReportEdge!]!
|
||||
pageInfo: PageInfo!
|
||||
}
|
||||
|
||||
type ThirdPartyComplianceReportEdge {
|
||||
cursor: CursorKey!
|
||||
node: ThirdPartyComplianceReport!
|
||||
}
|
||||
|
||||
type ThirdPartyContactConnection {
|
||||
edges: [ThirdPartyContactEdge!]!
|
||||
pageInfo: PageInfo!
|
||||
}
|
||||
|
||||
type ThirdPartyContactEdge {
|
||||
cursor: CursorKey!
|
||||
node: ThirdPartyContact!
|
||||
}
|
||||
|
||||
type ThirdPartyServiceConnection {
|
||||
edges: [ThirdPartyServiceEdge!]!
|
||||
pageInfo: PageInfo!
|
||||
}
|
||||
|
||||
type ThirdPartyServiceEdge {
|
||||
cursor: CursorKey!
|
||||
node: ThirdPartyService!
|
||||
}
|
||||
|
||||
type ThirdPartyRiskAssessmentConnection {
|
||||
edges: [ThirdPartyRiskAssessmentEdge!]!
|
||||
pageInfo: PageInfo!
|
||||
}
|
||||
|
||||
type ThirdPartyRiskAssessmentEdge {
|
||||
cursor: CursorKey!
|
||||
node: ThirdPartyRiskAssessment!
|
||||
}
|
||||
|
||||
extend type Mutation {
|
||||
createThirdParty(input: CreateThirdPartyInput!): CreateThirdPartyPayload!
|
||||
updateThirdParty(input: UpdateThirdPartyInput!): UpdateThirdPartyPayload!
|
||||
deleteThirdParty(input: DeleteThirdPartyInput!): DeleteThirdPartyPayload!
|
||||
createThirdPartyContact(
|
||||
input: CreateThirdPartyContactInput!
|
||||
): CreateThirdPartyContactPayload!
|
||||
updateThirdPartyContact(
|
||||
input: UpdateThirdPartyContactInput!
|
||||
): UpdateThirdPartyContactPayload!
|
||||
deleteThirdPartyContact(
|
||||
input: DeleteThirdPartyContactInput!
|
||||
): DeleteThirdPartyContactPayload!
|
||||
createThirdPartyService(
|
||||
input: CreateThirdPartyServiceInput!
|
||||
): CreateThirdPartyServicePayload!
|
||||
updateThirdPartyService(
|
||||
input: UpdateThirdPartyServiceInput!
|
||||
): UpdateThirdPartyServicePayload!
|
||||
deleteThirdPartyService(
|
||||
input: DeleteThirdPartyServiceInput!
|
||||
): DeleteThirdPartyServicePayload!
|
||||
uploadThirdPartyComplianceReport(
|
||||
input: UploadThirdPartyComplianceReportInput!
|
||||
): UploadThirdPartyComplianceReportPayload!
|
||||
deleteThirdPartyComplianceReport(
|
||||
input: DeleteThirdPartyComplianceReportInput!
|
||||
): DeleteThirdPartyComplianceReportPayload!
|
||||
uploadThirdPartyBusinessAssociateAgreement(
|
||||
input: UploadThirdPartyBusinessAssociateAgreementInput!
|
||||
): UploadThirdPartyBusinessAssociateAgreementPayload!
|
||||
updateThirdPartyBusinessAssociateAgreement(
|
||||
input: UpdateThirdPartyBusinessAssociateAgreementInput!
|
||||
): UpdateThirdPartyBusinessAssociateAgreementPayload!
|
||||
deleteThirdPartyBusinessAssociateAgreement(
|
||||
input: DeleteThirdPartyBusinessAssociateAgreementInput!
|
||||
): DeleteThirdPartyBusinessAssociateAgreementPayload!
|
||||
uploadThirdPartyDataPrivacyAgreement(
|
||||
input: UploadThirdPartyDataPrivacyAgreementInput!
|
||||
): UploadThirdPartyDataPrivacyAgreementPayload!
|
||||
updateThirdPartyDataPrivacyAgreement(
|
||||
input: UpdateThirdPartyDataPrivacyAgreementInput!
|
||||
): UpdateThirdPartyDataPrivacyAgreementPayload!
|
||||
deleteThirdPartyDataPrivacyAgreement(
|
||||
input: DeleteThirdPartyDataPrivacyAgreementInput!
|
||||
): DeleteThirdPartyDataPrivacyAgreementPayload!
|
||||
createThirdPartyRiskAssessment(
|
||||
input: CreateThirdPartyRiskAssessmentInput!
|
||||
): CreateThirdPartyRiskAssessmentPayload!
|
||||
assessThirdParty(input: AssessThirdPartyInput!): AssessThirdPartyPayload!
|
||||
publishThirdPartyList(
|
||||
input: PublishThirdPartyListInput!
|
||||
): PublishThirdPartyListPayload!
|
||||
}
|
||||
|
||||
input PublishThirdPartyListInput {
|
||||
organizationId: ID!
|
||||
approverIds: [ID!]
|
||||
minor: Boolean!
|
||||
}
|
||||
|
||||
type PublishThirdPartyListPayload {
|
||||
documentEdge: DocumentEdge!
|
||||
documentVersionEdge: DocumentVersionEdge!
|
||||
}
|
||||
|
||||
input CreateThirdPartyInput {
|
||||
organizationId: ID!
|
||||
name: String!
|
||||
description: String
|
||||
headquarterAddress: String
|
||||
legalName: String
|
||||
websiteUrl: String
|
||||
privacyPolicyUrl: String
|
||||
category: ThirdPartyCategory
|
||||
serviceLevelAgreementUrl: String
|
||||
dataProcessingAgreementUrl: String
|
||||
businessAssociateAgreementUrl: String
|
||||
subprocessorsListUrl: String
|
||||
certifications: [String!]
|
||||
countries: [CountryCode!]
|
||||
securityPageUrl: String
|
||||
trustPageUrl: String
|
||||
statusPageUrl: String
|
||||
termsOfServiceUrl: String
|
||||
businessOwnerId: ID
|
||||
securityOwnerId: ID
|
||||
}
|
||||
|
||||
input UpdateThirdPartyInput {
|
||||
id: ID!
|
||||
name: String
|
||||
description: String @goField(omittable: true)
|
||||
statusPageUrl: String @goField(omittable: true)
|
||||
termsOfServiceUrl: String @goField(omittable: true)
|
||||
privacyPolicyUrl: String @goField(omittable: true)
|
||||
serviceLevelAgreementUrl: String @goField(omittable: true)
|
||||
dataProcessingAgreementUrl: String @goField(omittable: true)
|
||||
businessAssociateAgreementUrl: String @goField(omittable: true)
|
||||
subprocessorsListUrl: String @goField(omittable: true)
|
||||
websiteUrl: String @goField(omittable: true)
|
||||
legalName: String @goField(omittable: true)
|
||||
headquarterAddress: String @goField(omittable: true)
|
||||
category: ThirdPartyCategory
|
||||
certifications: [String!]
|
||||
countries: [CountryCode!]
|
||||
securityPageUrl: String @goField(omittable: true)
|
||||
trustPageUrl: String @goField(omittable: true)
|
||||
businessOwnerId: ID @goField(omittable: true)
|
||||
securityOwnerId: ID @goField(omittable: true)
|
||||
showOnTrustCenter: Boolean
|
||||
}
|
||||
|
||||
input DeleteThirdPartyInput {
|
||||
thirdPartyId: ID!
|
||||
}
|
||||
|
||||
input CreateThirdPartyContactInput {
|
||||
thirdPartyId: ID!
|
||||
fullName: String
|
||||
email: EmailAddr
|
||||
phone: String
|
||||
role: String
|
||||
}
|
||||
|
||||
input UpdateThirdPartyContactInput {
|
||||
id: ID!
|
||||
fullName: String @goField(omittable: true)
|
||||
email: EmailAddr @goField(omittable: true)
|
||||
phone: String @goField(omittable: true)
|
||||
role: String @goField(omittable: true)
|
||||
}
|
||||
|
||||
input DeleteThirdPartyContactInput {
|
||||
thirdPartyContactId: ID!
|
||||
}
|
||||
|
||||
input CreateThirdPartyServiceInput {
|
||||
thirdPartyId: ID!
|
||||
name: String!
|
||||
description: String
|
||||
url: String
|
||||
type: String
|
||||
}
|
||||
|
||||
input UpdateThirdPartyServiceInput {
|
||||
id: ID!
|
||||
name: String
|
||||
description: String @goField(omittable: true)
|
||||
url: String
|
||||
type: String
|
||||
}
|
||||
|
||||
input DeleteThirdPartyServiceInput {
|
||||
thirdPartyServiceId: ID!
|
||||
}
|
||||
|
||||
input UploadThirdPartyComplianceReportInput {
|
||||
thirdPartyId: ID!
|
||||
reportDate: Datetime!
|
||||
validUntil: Datetime
|
||||
reportName: String!
|
||||
file: Upload!
|
||||
}
|
||||
|
||||
input DeleteThirdPartyComplianceReportInput {
|
||||
reportId: ID!
|
||||
}
|
||||
|
||||
input UploadThirdPartyBusinessAssociateAgreementInput {
|
||||
thirdPartyId: ID!
|
||||
validFrom: Datetime
|
||||
validUntil: Datetime
|
||||
fileName: String!
|
||||
file: Upload!
|
||||
}
|
||||
|
||||
input UpdateThirdPartyBusinessAssociateAgreementInput {
|
||||
thirdPartyId: ID!
|
||||
validFrom: Datetime @goField(omittable: true)
|
||||
validUntil: Datetime @goField(omittable: true)
|
||||
}
|
||||
|
||||
input DeleteThirdPartyBusinessAssociateAgreementInput {
|
||||
thirdPartyId: ID!
|
||||
}
|
||||
|
||||
input UploadThirdPartyDataPrivacyAgreementInput {
|
||||
thirdPartyId: ID!
|
||||
validFrom: Datetime
|
||||
validUntil: Datetime
|
||||
fileName: String!
|
||||
file: Upload!
|
||||
}
|
||||
|
||||
input UpdateThirdPartyDataPrivacyAgreementInput {
|
||||
thirdPartyId: ID!
|
||||
validFrom: Datetime @goField(omittable: true)
|
||||
validUntil: Datetime @goField(omittable: true)
|
||||
}
|
||||
|
||||
input DeleteThirdPartyDataPrivacyAgreementInput {
|
||||
thirdPartyId: ID!
|
||||
}
|
||||
|
||||
input CreateThirdPartyRiskAssessmentInput {
|
||||
thirdPartyId: ID!
|
||||
expiresAt: Datetime!
|
||||
dataSensitivity: DataSensitivity!
|
||||
businessImpact: BusinessImpact!
|
||||
notes: String
|
||||
}
|
||||
|
||||
input AssessThirdPartyInput {
|
||||
id: ID!
|
||||
websiteUrl: String!
|
||||
procedure: String
|
||||
}
|
||||
|
||||
type ThirdPartySubprocessor {
|
||||
name: String!
|
||||
country: String!
|
||||
purpose: String!
|
||||
}
|
||||
|
||||
type CreateThirdPartyPayload {
|
||||
thirdPartyEdge: ThirdPartyEdge!
|
||||
}
|
||||
|
||||
type UpdateThirdPartyPayload {
|
||||
thirdParty: ThirdParty!
|
||||
}
|
||||
|
||||
type DeleteThirdPartyPayload {
|
||||
deletedThirdPartyId: ID!
|
||||
}
|
||||
|
||||
type CreateThirdPartyContactPayload {
|
||||
thirdPartyContactEdge: ThirdPartyContactEdge!
|
||||
}
|
||||
|
||||
type UpdateThirdPartyContactPayload {
|
||||
thirdPartyContact: ThirdPartyContact!
|
||||
}
|
||||
|
||||
type DeleteThirdPartyContactPayload {
|
||||
deletedThirdPartyContactId: ID!
|
||||
}
|
||||
|
||||
type CreateThirdPartyServicePayload {
|
||||
thirdPartyServiceEdge: ThirdPartyServiceEdge!
|
||||
}
|
||||
|
||||
type UpdateThirdPartyServicePayload {
|
||||
thirdPartyService: ThirdPartyService!
|
||||
}
|
||||
|
||||
type DeleteThirdPartyServicePayload {
|
||||
deletedThirdPartyServiceId: ID!
|
||||
}
|
||||
|
||||
type UploadThirdPartyComplianceReportPayload {
|
||||
thirdPartyComplianceReportEdge: ThirdPartyComplianceReportEdge!
|
||||
}
|
||||
|
||||
type DeleteThirdPartyComplianceReportPayload {
|
||||
deletedThirdPartyComplianceReportId: ID!
|
||||
}
|
||||
|
||||
type UploadThirdPartyBusinessAssociateAgreementPayload {
|
||||
thirdPartyBusinessAssociateAgreement: ThirdPartyBusinessAssociateAgreement!
|
||||
}
|
||||
|
||||
type UpdateThirdPartyBusinessAssociateAgreementPayload {
|
||||
thirdPartyBusinessAssociateAgreement: ThirdPartyBusinessAssociateAgreement!
|
||||
}
|
||||
|
||||
type DeleteThirdPartyBusinessAssociateAgreementPayload {
|
||||
deletedThirdPartyId: ID!
|
||||
}
|
||||
|
||||
type UploadThirdPartyDataPrivacyAgreementPayload {
|
||||
thirdPartyDataPrivacyAgreement: ThirdPartyDataPrivacyAgreement!
|
||||
}
|
||||
|
||||
type UpdateThirdPartyDataPrivacyAgreementPayload {
|
||||
thirdPartyDataPrivacyAgreement: ThirdPartyDataPrivacyAgreement!
|
||||
}
|
||||
|
||||
type DeleteThirdPartyDataPrivacyAgreementPayload {
|
||||
deletedThirdPartyId: ID!
|
||||
}
|
||||
|
||||
type CreateThirdPartyRiskAssessmentPayload {
|
||||
thirdPartyRiskAssessmentEdge: ThirdPartyRiskAssessmentEdge!
|
||||
}
|
||||
|
||||
type AssessThirdPartyPayload {
|
||||
thirdParty: ThirdParty!
|
||||
report: String!
|
||||
subprocessors: [ThirdPartySubprocessor!]!
|
||||
}
|
||||
@@ -1,711 +0,0 @@
|
||||
enum VendorCategory
|
||||
@goModel(model: "go.probo.inc/probo/pkg/coredata.VendorCategory") {
|
||||
ANALYTICS
|
||||
@goEnum(
|
||||
value: "go.probo.inc/probo/pkg/coredata.VendorCategoryAnalytics"
|
||||
)
|
||||
CLOUD_MONITORING
|
||||
@goEnum(
|
||||
value: "go.probo.inc/probo/pkg/coredata.VendorCategoryCloudMonitoring"
|
||||
)
|
||||
CLOUD_PROVIDER
|
||||
@goEnum(
|
||||
value: "go.probo.inc/probo/pkg/coredata.VendorCategoryCloudProvider"
|
||||
)
|
||||
COLLABORATION
|
||||
@goEnum(
|
||||
value: "go.probo.inc/probo/pkg/coredata.VendorCategoryCollaboration"
|
||||
)
|
||||
CUSTOMER_SUPPORT
|
||||
@goEnum(
|
||||
value: "go.probo.inc/probo/pkg/coredata.VendorCategoryCustomerSupport"
|
||||
)
|
||||
DATA_STORAGE_AND_PROCESSING
|
||||
@goEnum(
|
||||
value: "go.probo.inc/probo/pkg/coredata.VendorCategoryDataStorageAndProcessing"
|
||||
)
|
||||
DOCUMENT_MANAGEMENT
|
||||
@goEnum(
|
||||
value: "go.probo.inc/probo/pkg/coredata.VendorCategoryDocumentManagement"
|
||||
)
|
||||
EMPLOYEE_MANAGEMENT
|
||||
@goEnum(
|
||||
value: "go.probo.inc/probo/pkg/coredata.VendorCategoryEmployeeManagement"
|
||||
)
|
||||
ENGINEERING
|
||||
@goEnum(
|
||||
value: "go.probo.inc/probo/pkg/coredata.VendorCategoryEngineering"
|
||||
)
|
||||
FINANCE
|
||||
@goEnum(value: "go.probo.inc/probo/pkg/coredata.VendorCategoryFinance")
|
||||
IDENTITY_PROVIDER
|
||||
@goEnum(
|
||||
value: "go.probo.inc/probo/pkg/coredata.VendorCategoryIdentityProvider"
|
||||
)
|
||||
IT @goEnum(value: "go.probo.inc/probo/pkg/coredata.VendorCategoryIT")
|
||||
MARKETING
|
||||
@goEnum(
|
||||
value: "go.probo.inc/probo/pkg/coredata.VendorCategoryMarketing"
|
||||
)
|
||||
OFFICE_OPERATIONS
|
||||
@goEnum(
|
||||
value: "go.probo.inc/probo/pkg/coredata.VendorCategoryOfficeOperations"
|
||||
)
|
||||
OTHER @goEnum(value: "go.probo.inc/probo/pkg/coredata.VendorCategoryOther")
|
||||
PASSWORD_MANAGEMENT
|
||||
@goEnum(
|
||||
value: "go.probo.inc/probo/pkg/coredata.VendorCategoryPasswordManagement"
|
||||
)
|
||||
PRODUCT_AND_DESIGN
|
||||
@goEnum(
|
||||
value: "go.probo.inc/probo/pkg/coredata.VendorCategoryProductAndDesign"
|
||||
)
|
||||
PROFESSIONAL_SERVICES
|
||||
@goEnum(
|
||||
value: "go.probo.inc/probo/pkg/coredata.VendorCategoryProfessionalServices"
|
||||
)
|
||||
RECRUITING
|
||||
@goEnum(
|
||||
value: "go.probo.inc/probo/pkg/coredata.VendorCategoryRecruiting"
|
||||
)
|
||||
SALES @goEnum(value: "go.probo.inc/probo/pkg/coredata.VendorCategorySales")
|
||||
SECURITY
|
||||
@goEnum(value: "go.probo.inc/probo/pkg/coredata.VendorCategorySecurity")
|
||||
VERSION_CONTROL
|
||||
@goEnum(
|
||||
value: "go.probo.inc/probo/pkg/coredata.VendorCategoryVersionControl"
|
||||
)
|
||||
}
|
||||
|
||||
enum DataSensitivity
|
||||
@goModel(model: "go.probo.inc/probo/pkg/coredata.DataSensitivity") {
|
||||
NONE @goEnum(value: "go.probo.inc/probo/pkg/coredata.DataSensitivityNone")
|
||||
LOW @goEnum(value: "go.probo.inc/probo/pkg/coredata.DataSensitivityLow")
|
||||
MEDIUM
|
||||
@goEnum(value: "go.probo.inc/probo/pkg/coredata.DataSensitivityMedium")
|
||||
HIGH @goEnum(value: "go.probo.inc/probo/pkg/coredata.DataSensitivityHigh")
|
||||
CRITICAL
|
||||
@goEnum(
|
||||
value: "go.probo.inc/probo/pkg/coredata.DataSensitivityCritical"
|
||||
)
|
||||
}
|
||||
|
||||
enum BusinessImpact
|
||||
@goModel(model: "go.probo.inc/probo/pkg/coredata.BusinessImpact") {
|
||||
LOW @goEnum(value: "go.probo.inc/probo/pkg/coredata.BusinessImpactLow")
|
||||
MEDIUM
|
||||
@goEnum(value: "go.probo.inc/probo/pkg/coredata.BusinessImpactMedium")
|
||||
HIGH @goEnum(value: "go.probo.inc/probo/pkg/coredata.BusinessImpactHigh")
|
||||
CRITICAL
|
||||
@goEnum(value: "go.probo.inc/probo/pkg/coredata.BusinessImpactCritical")
|
||||
}
|
||||
|
||||
enum VendorOrderField
|
||||
@goModel(model: "go.probo.inc/probo/pkg/coredata.VendorOrderField") {
|
||||
NAME @goEnum(value: "go.probo.inc/probo/pkg/coredata.VendorOrderFieldName")
|
||||
CREATED_AT
|
||||
@goEnum(
|
||||
value: "go.probo.inc/probo/pkg/coredata.VendorOrderFieldCreatedAt"
|
||||
)
|
||||
UPDATED_AT
|
||||
@goEnum(
|
||||
value: "go.probo.inc/probo/pkg/coredata.VendorOrderFieldUpdatedAt"
|
||||
)
|
||||
}
|
||||
|
||||
enum VendorComplianceReportOrderField
|
||||
@goModel(
|
||||
model: "go.probo.inc/probo/pkg/coredata.VendorComplianceReportOrderField"
|
||||
) {
|
||||
REPORT_DATE
|
||||
@goEnum(
|
||||
value: "go.probo.inc/probo/pkg/coredata.VendorComplianceReportOrderFieldReportDate"
|
||||
)
|
||||
CREATED_AT
|
||||
@goEnum(
|
||||
value: "go.probo.inc/probo/pkg/coredata.VendorComplianceReportOrderFieldCreatedAt"
|
||||
)
|
||||
}
|
||||
|
||||
enum VendorContactOrderField
|
||||
@goModel(model: "go.probo.inc/probo/pkg/coredata.VendorContactOrderField") {
|
||||
CREATED_AT
|
||||
@goEnum(
|
||||
value: "go.probo.inc/probo/pkg/coredata.VendorContactOrderFieldCreatedAt"
|
||||
)
|
||||
FULL_NAME
|
||||
@goEnum(
|
||||
value: "go.probo.inc/probo/pkg/coredata.VendorContactOrderFieldFullName"
|
||||
)
|
||||
EMAIL
|
||||
@goEnum(
|
||||
value: "go.probo.inc/probo/pkg/coredata.VendorContactOrderFieldEmail"
|
||||
)
|
||||
}
|
||||
|
||||
enum VendorServiceOrderField
|
||||
@goModel(model: "go.probo.inc/probo/pkg/coredata.VendorServiceOrderField") {
|
||||
CREATED_AT
|
||||
@goEnum(
|
||||
value: "go.probo.inc/probo/pkg/coredata.VendorServiceOrderFieldCreatedAt"
|
||||
)
|
||||
NAME
|
||||
@goEnum(
|
||||
value: "go.probo.inc/probo/pkg/coredata.VendorServiceOrderFieldName"
|
||||
)
|
||||
}
|
||||
|
||||
enum VendorRiskAssessmentOrderField
|
||||
@goModel(
|
||||
model: "go.probo.inc/probo/pkg/coredata.VendorRiskAssessmentOrderField"
|
||||
) {
|
||||
CREATED_AT
|
||||
@goEnum(
|
||||
value: "go.probo.inc/probo/pkg/coredata.VendorRiskAssessmentOrderFieldCreatedAt"
|
||||
)
|
||||
EXPIRES_AT
|
||||
@goEnum(
|
||||
value: "go.probo.inc/probo/pkg/coredata.VendorRiskAssessmentOrderFieldExpiresAt"
|
||||
)
|
||||
}
|
||||
|
||||
input VendorOrder
|
||||
@goModel(
|
||||
model: "go.probo.inc/probo/pkg/server/api/console/v1/types.VendorOrderBy"
|
||||
) {
|
||||
direction: OrderDirection!
|
||||
field: VendorOrderField!
|
||||
}
|
||||
|
||||
input VendorComplianceReportOrder
|
||||
@goModel(
|
||||
model: "go.probo.inc/probo/pkg/server/api/console/v1/types.VendorComplianceReportOrderBy"
|
||||
) {
|
||||
direction: OrderDirection!
|
||||
field: VendorComplianceReportOrderField!
|
||||
}
|
||||
|
||||
input VendorContactOrder
|
||||
@goModel(
|
||||
model: "go.probo.inc/probo/pkg/server/api/console/v1/types.VendorContactOrderBy"
|
||||
) {
|
||||
direction: OrderDirection!
|
||||
field: VendorContactOrderField!
|
||||
}
|
||||
|
||||
input VendorServiceOrder
|
||||
@goModel(
|
||||
model: "go.probo.inc/probo/pkg/server/api/console/v1/types.VendorServiceOrderBy"
|
||||
) {
|
||||
direction: OrderDirection!
|
||||
field: VendorServiceOrderField!
|
||||
}
|
||||
|
||||
input VendorRiskAssessmentOrder {
|
||||
field: VendorRiskAssessmentOrderField!
|
||||
direction: OrderDirection!
|
||||
}
|
||||
|
||||
type Vendor implements Node {
|
||||
id: ID!
|
||||
name: String!
|
||||
category: VendorCategory!
|
||||
description: String
|
||||
|
||||
organization: Organization! @goField(forceResolver: true)
|
||||
|
||||
complianceReports(
|
||||
first: Int
|
||||
after: CursorKey
|
||||
last: Int
|
||||
before: CursorKey
|
||||
orderBy: VendorComplianceReportOrder
|
||||
): VendorComplianceReportConnection! @goField(forceResolver: true)
|
||||
|
||||
businessAssociateAgreement: VendorBusinessAssociateAgreement
|
||||
@goField(forceResolver: true)
|
||||
dataPrivacyAgreement: VendorDataPrivacyAgreement
|
||||
@goField(forceResolver: true)
|
||||
|
||||
contacts(
|
||||
first: Int
|
||||
after: CursorKey
|
||||
last: Int
|
||||
before: CursorKey
|
||||
orderBy: VendorContactOrder
|
||||
): VendorContactConnection! @goField(forceResolver: true)
|
||||
|
||||
services(
|
||||
first: Int
|
||||
after: CursorKey
|
||||
last: Int
|
||||
before: CursorKey
|
||||
orderBy: VendorServiceOrder
|
||||
): VendorServiceConnection! @goField(forceResolver: true)
|
||||
|
||||
riskAssessments(
|
||||
first: Int
|
||||
after: CursorKey
|
||||
last: Int
|
||||
before: CursorKey
|
||||
orderBy: VendorRiskAssessmentOrder
|
||||
): VendorRiskAssessmentConnection! @goField(forceResolver: true)
|
||||
|
||||
businessOwner: Profile @goField(forceResolver: true)
|
||||
securityOwner: Profile @goField(forceResolver: true)
|
||||
|
||||
statusPageUrl: String
|
||||
termsOfServiceUrl: String
|
||||
privacyPolicyUrl: String
|
||||
serviceLevelAgreementUrl: String
|
||||
dataProcessingAgreementUrl: String
|
||||
businessAssociateAgreementUrl: String
|
||||
subprocessorsListUrl: String
|
||||
certifications: [String!]!
|
||||
countries: [CountryCode!]!
|
||||
securityPageUrl: String
|
||||
trustPageUrl: String
|
||||
headquarterAddress: String
|
||||
legalName: String
|
||||
websiteUrl: String
|
||||
showOnTrustCenter: Boolean!
|
||||
createdAt: Datetime!
|
||||
updatedAt: Datetime!
|
||||
|
||||
permission(action: String!): Boolean! @goField(forceResolver: true)
|
||||
}
|
||||
|
||||
type VendorComplianceReport implements Node {
|
||||
id: ID!
|
||||
vendor: Vendor! @goField(forceResolver: true)
|
||||
reportDate: Datetime!
|
||||
validUntil: Datetime
|
||||
reportName: String!
|
||||
file: File @goField(forceResolver: true)
|
||||
createdAt: Datetime!
|
||||
updatedAt: Datetime!
|
||||
|
||||
permission(action: String!): Boolean! @goField(forceResolver: true)
|
||||
}
|
||||
|
||||
type VendorBusinessAssociateAgreement implements Node {
|
||||
id: ID!
|
||||
vendor: Vendor! @goField(forceResolver: true)
|
||||
validFrom: Datetime
|
||||
validUntil: Datetime
|
||||
fileName: String!
|
||||
fileUrl: String! @goField(forceResolver: true)
|
||||
fileSize: BigInt!
|
||||
createdAt: Datetime!
|
||||
updatedAt: Datetime!
|
||||
|
||||
permission(action: String!): Boolean! @goField(forceResolver: true)
|
||||
}
|
||||
|
||||
type VendorContact implements Node {
|
||||
id: ID!
|
||||
vendor: Vendor! @goField(forceResolver: true)
|
||||
fullName: String
|
||||
email: EmailAddr
|
||||
phone: String
|
||||
role: String
|
||||
createdAt: Datetime!
|
||||
updatedAt: Datetime!
|
||||
|
||||
permission(action: String!): Boolean! @goField(forceResolver: true)
|
||||
}
|
||||
|
||||
type VendorService implements Node {
|
||||
id: ID!
|
||||
vendor: Vendor! @goField(forceResolver: true)
|
||||
name: String!
|
||||
description: String
|
||||
createdAt: Datetime!
|
||||
updatedAt: Datetime!
|
||||
|
||||
permission(action: String!): Boolean! @goField(forceResolver: true)
|
||||
}
|
||||
|
||||
type VendorDataPrivacyAgreement implements Node {
|
||||
id: ID!
|
||||
vendor: Vendor! @goField(forceResolver: true)
|
||||
validFrom: Datetime
|
||||
validUntil: Datetime
|
||||
fileName: String!
|
||||
fileUrl: String! @goField(forceResolver: true)
|
||||
fileSize: BigInt!
|
||||
createdAt: Datetime!
|
||||
updatedAt: Datetime!
|
||||
|
||||
permission(action: String!): Boolean! @goField(forceResolver: true)
|
||||
}
|
||||
|
||||
type VendorRiskAssessment implements Node {
|
||||
id: ID!
|
||||
vendor: Vendor! @goField(forceResolver: true)
|
||||
expiresAt: Datetime!
|
||||
dataSensitivity: DataSensitivity!
|
||||
businessImpact: BusinessImpact!
|
||||
notes: String
|
||||
createdAt: Datetime!
|
||||
updatedAt: Datetime!
|
||||
|
||||
permission(action: String!): Boolean! @goField(forceResolver: true)
|
||||
}
|
||||
|
||||
type VendorConnection
|
||||
@goModel(
|
||||
model: "go.probo.inc/probo/pkg/server/api/console/v1/types.VendorConnection"
|
||||
) {
|
||||
totalCount: Int! @goField(forceResolver: true)
|
||||
edges: [VendorEdge!]!
|
||||
pageInfo: PageInfo!
|
||||
}
|
||||
|
||||
type VendorEdge {
|
||||
cursor: CursorKey!
|
||||
node: Vendor!
|
||||
}
|
||||
|
||||
type VendorComplianceReportConnection {
|
||||
edges: [VendorComplianceReportEdge!]!
|
||||
pageInfo: PageInfo!
|
||||
}
|
||||
|
||||
type VendorComplianceReportEdge {
|
||||
cursor: CursorKey!
|
||||
node: VendorComplianceReport!
|
||||
}
|
||||
|
||||
type VendorContactConnection {
|
||||
edges: [VendorContactEdge!]!
|
||||
pageInfo: PageInfo!
|
||||
}
|
||||
|
||||
type VendorContactEdge {
|
||||
cursor: CursorKey!
|
||||
node: VendorContact!
|
||||
}
|
||||
|
||||
type VendorServiceConnection {
|
||||
edges: [VendorServiceEdge!]!
|
||||
pageInfo: PageInfo!
|
||||
}
|
||||
|
||||
type VendorServiceEdge {
|
||||
cursor: CursorKey!
|
||||
node: VendorService!
|
||||
}
|
||||
|
||||
type VendorRiskAssessmentConnection {
|
||||
edges: [VendorRiskAssessmentEdge!]!
|
||||
pageInfo: PageInfo!
|
||||
}
|
||||
|
||||
type VendorRiskAssessmentEdge {
|
||||
cursor: CursorKey!
|
||||
node: VendorRiskAssessment!
|
||||
}
|
||||
|
||||
extend type Mutation {
|
||||
createVendor(input: CreateVendorInput!): CreateVendorPayload!
|
||||
updateVendor(input: UpdateVendorInput!): UpdateVendorPayload!
|
||||
deleteVendor(input: DeleteVendorInput!): DeleteVendorPayload!
|
||||
createVendorContact(
|
||||
input: CreateVendorContactInput!
|
||||
): CreateVendorContactPayload!
|
||||
updateVendorContact(
|
||||
input: UpdateVendorContactInput!
|
||||
): UpdateVendorContactPayload!
|
||||
deleteVendorContact(
|
||||
input: DeleteVendorContactInput!
|
||||
): DeleteVendorContactPayload!
|
||||
createVendorService(
|
||||
input: CreateVendorServiceInput!
|
||||
): CreateVendorServicePayload!
|
||||
updateVendorService(
|
||||
input: UpdateVendorServiceInput!
|
||||
): UpdateVendorServicePayload!
|
||||
deleteVendorService(
|
||||
input: DeleteVendorServiceInput!
|
||||
): DeleteVendorServicePayload!
|
||||
uploadVendorComplianceReport(
|
||||
input: UploadVendorComplianceReportInput!
|
||||
): UploadVendorComplianceReportPayload!
|
||||
deleteVendorComplianceReport(
|
||||
input: DeleteVendorComplianceReportInput!
|
||||
): DeleteVendorComplianceReportPayload!
|
||||
uploadVendorBusinessAssociateAgreement(
|
||||
input: UploadVendorBusinessAssociateAgreementInput!
|
||||
): UploadVendorBusinessAssociateAgreementPayload!
|
||||
updateVendorBusinessAssociateAgreement(
|
||||
input: UpdateVendorBusinessAssociateAgreementInput!
|
||||
): UpdateVendorBusinessAssociateAgreementPayload!
|
||||
deleteVendorBusinessAssociateAgreement(
|
||||
input: DeleteVendorBusinessAssociateAgreementInput!
|
||||
): DeleteVendorBusinessAssociateAgreementPayload!
|
||||
uploadVendorDataPrivacyAgreement(
|
||||
input: UploadVendorDataPrivacyAgreementInput!
|
||||
): UploadVendorDataPrivacyAgreementPayload!
|
||||
updateVendorDataPrivacyAgreement(
|
||||
input: UpdateVendorDataPrivacyAgreementInput!
|
||||
): UpdateVendorDataPrivacyAgreementPayload!
|
||||
deleteVendorDataPrivacyAgreement(
|
||||
input: DeleteVendorDataPrivacyAgreementInput!
|
||||
): DeleteVendorDataPrivacyAgreementPayload!
|
||||
createVendorRiskAssessment(
|
||||
input: CreateVendorRiskAssessmentInput!
|
||||
): CreateVendorRiskAssessmentPayload!
|
||||
assessVendor(input: AssessVendorInput!): AssessVendorPayload!
|
||||
publishVendorList(
|
||||
input: PublishVendorListInput!
|
||||
): PublishVendorListPayload!
|
||||
}
|
||||
|
||||
input PublishVendorListInput {
|
||||
organizationId: ID!
|
||||
approverIds: [ID!]
|
||||
minor: Boolean!
|
||||
}
|
||||
|
||||
type PublishVendorListPayload {
|
||||
documentEdge: DocumentEdge!
|
||||
documentVersionEdge: DocumentVersionEdge!
|
||||
}
|
||||
|
||||
input CreateVendorInput {
|
||||
organizationId: ID!
|
||||
name: String!
|
||||
description: String
|
||||
headquarterAddress: String
|
||||
legalName: String
|
||||
websiteUrl: String
|
||||
privacyPolicyUrl: String
|
||||
category: VendorCategory
|
||||
serviceLevelAgreementUrl: String
|
||||
dataProcessingAgreementUrl: String
|
||||
businessAssociateAgreementUrl: String
|
||||
subprocessorsListUrl: String
|
||||
certifications: [String!]
|
||||
countries: [CountryCode!]
|
||||
securityPageUrl: String
|
||||
trustPageUrl: String
|
||||
statusPageUrl: String
|
||||
termsOfServiceUrl: String
|
||||
businessOwnerId: ID
|
||||
securityOwnerId: ID
|
||||
}
|
||||
|
||||
input UpdateVendorInput {
|
||||
id: ID!
|
||||
name: String
|
||||
description: String @goField(omittable: true)
|
||||
statusPageUrl: String @goField(omittable: true)
|
||||
termsOfServiceUrl: String @goField(omittable: true)
|
||||
privacyPolicyUrl: String @goField(omittable: true)
|
||||
serviceLevelAgreementUrl: String @goField(omittable: true)
|
||||
dataProcessingAgreementUrl: String @goField(omittable: true)
|
||||
businessAssociateAgreementUrl: String @goField(omittable: true)
|
||||
subprocessorsListUrl: String @goField(omittable: true)
|
||||
websiteUrl: String @goField(omittable: true)
|
||||
legalName: String @goField(omittable: true)
|
||||
headquarterAddress: String @goField(omittable: true)
|
||||
category: VendorCategory
|
||||
certifications: [String!]
|
||||
countries: [CountryCode!]
|
||||
securityPageUrl: String @goField(omittable: true)
|
||||
trustPageUrl: String @goField(omittable: true)
|
||||
businessOwnerId: ID @goField(omittable: true)
|
||||
securityOwnerId: ID @goField(omittable: true)
|
||||
showOnTrustCenter: Boolean
|
||||
}
|
||||
|
||||
input DeleteVendorInput {
|
||||
vendorId: ID!
|
||||
}
|
||||
|
||||
input CreateVendorContactInput {
|
||||
vendorId: ID!
|
||||
fullName: String
|
||||
email: EmailAddr
|
||||
phone: String
|
||||
role: String
|
||||
}
|
||||
|
||||
input UpdateVendorContactInput {
|
||||
id: ID!
|
||||
fullName: String @goField(omittable: true)
|
||||
email: EmailAddr @goField(omittable: true)
|
||||
phone: String @goField(omittable: true)
|
||||
role: String @goField(omittable: true)
|
||||
}
|
||||
|
||||
input DeleteVendorContactInput {
|
||||
vendorContactId: ID!
|
||||
}
|
||||
|
||||
input CreateVendorServiceInput {
|
||||
vendorId: ID!
|
||||
name: String!
|
||||
description: String
|
||||
url: String
|
||||
type: String
|
||||
}
|
||||
|
||||
input UpdateVendorServiceInput {
|
||||
id: ID!
|
||||
name: String
|
||||
description: String @goField(omittable: true)
|
||||
url: String
|
||||
type: String
|
||||
}
|
||||
|
||||
input DeleteVendorServiceInput {
|
||||
vendorServiceId: ID!
|
||||
}
|
||||
|
||||
input UploadVendorComplianceReportInput {
|
||||
vendorId: ID!
|
||||
reportDate: Datetime!
|
||||
validUntil: Datetime
|
||||
reportName: String!
|
||||
file: Upload!
|
||||
}
|
||||
|
||||
input DeleteVendorComplianceReportInput {
|
||||
reportId: ID!
|
||||
}
|
||||
|
||||
input UploadVendorBusinessAssociateAgreementInput {
|
||||
vendorId: ID!
|
||||
validFrom: Datetime
|
||||
validUntil: Datetime
|
||||
fileName: String!
|
||||
file: Upload!
|
||||
}
|
||||
|
||||
input UpdateVendorBusinessAssociateAgreementInput {
|
||||
vendorId: ID!
|
||||
validFrom: Datetime @goField(omittable: true)
|
||||
validUntil: Datetime @goField(omittable: true)
|
||||
}
|
||||
|
||||
input DeleteVendorBusinessAssociateAgreementInput {
|
||||
vendorId: ID!
|
||||
}
|
||||
|
||||
input UploadVendorDataPrivacyAgreementInput {
|
||||
vendorId: ID!
|
||||
validFrom: Datetime
|
||||
validUntil: Datetime
|
||||
fileName: String!
|
||||
file: Upload!
|
||||
}
|
||||
|
||||
input UpdateVendorDataPrivacyAgreementInput {
|
||||
vendorId: ID!
|
||||
validFrom: Datetime @goField(omittable: true)
|
||||
validUntil: Datetime @goField(omittable: true)
|
||||
}
|
||||
|
||||
input DeleteVendorDataPrivacyAgreementInput {
|
||||
vendorId: ID!
|
||||
}
|
||||
|
||||
input CreateVendorRiskAssessmentInput {
|
||||
vendorId: ID!
|
||||
expiresAt: Datetime!
|
||||
dataSensitivity: DataSensitivity!
|
||||
businessImpact: BusinessImpact!
|
||||
notes: String
|
||||
}
|
||||
|
||||
input AssessVendorInput {
|
||||
id: ID!
|
||||
websiteUrl: String!
|
||||
procedure: String
|
||||
}
|
||||
|
||||
type VendorSubprocessor {
|
||||
name: String!
|
||||
country: String!
|
||||
purpose: String!
|
||||
}
|
||||
|
||||
type CreateVendorPayload {
|
||||
vendorEdge: VendorEdge!
|
||||
}
|
||||
|
||||
type UpdateVendorPayload {
|
||||
vendor: Vendor!
|
||||
}
|
||||
|
||||
type DeleteVendorPayload {
|
||||
deletedVendorId: ID!
|
||||
}
|
||||
|
||||
type CreateVendorContactPayload {
|
||||
vendorContactEdge: VendorContactEdge!
|
||||
}
|
||||
|
||||
type UpdateVendorContactPayload {
|
||||
vendorContact: VendorContact!
|
||||
}
|
||||
|
||||
type DeleteVendorContactPayload {
|
||||
deletedVendorContactId: ID!
|
||||
}
|
||||
|
||||
type CreateVendorServicePayload {
|
||||
vendorServiceEdge: VendorServiceEdge!
|
||||
}
|
||||
|
||||
type UpdateVendorServicePayload {
|
||||
vendorService: VendorService!
|
||||
}
|
||||
|
||||
type DeleteVendorServicePayload {
|
||||
deletedVendorServiceId: ID!
|
||||
}
|
||||
|
||||
type UploadVendorComplianceReportPayload {
|
||||
vendorComplianceReportEdge: VendorComplianceReportEdge!
|
||||
}
|
||||
|
||||
type DeleteVendorComplianceReportPayload {
|
||||
deletedVendorComplianceReportId: ID!
|
||||
}
|
||||
|
||||
type UploadVendorBusinessAssociateAgreementPayload {
|
||||
vendorBusinessAssociateAgreement: VendorBusinessAssociateAgreement!
|
||||
}
|
||||
|
||||
type UpdateVendorBusinessAssociateAgreementPayload {
|
||||
vendorBusinessAssociateAgreement: VendorBusinessAssociateAgreement!
|
||||
}
|
||||
|
||||
type DeleteVendorBusinessAssociateAgreementPayload {
|
||||
deletedVendorId: ID!
|
||||
}
|
||||
|
||||
type UploadVendorDataPrivacyAgreementPayload {
|
||||
vendorDataPrivacyAgreement: VendorDataPrivacyAgreement!
|
||||
}
|
||||
|
||||
type UpdateVendorDataPrivacyAgreementPayload {
|
||||
vendorDataPrivacyAgreement: VendorDataPrivacyAgreement!
|
||||
}
|
||||
|
||||
type DeleteVendorDataPrivacyAgreementPayload {
|
||||
deletedVendorId: ID!
|
||||
}
|
||||
|
||||
type CreateVendorRiskAssessmentPayload {
|
||||
vendorRiskAssessmentEdge: VendorRiskAssessmentEdge!
|
||||
}
|
||||
|
||||
type AssessVendorPayload {
|
||||
vendor: Vendor!
|
||||
report: String!
|
||||
subprocessors: [VendorSubprocessor!]!
|
||||
}
|
||||
@@ -1,11 +1,11 @@
|
||||
enum WebhookEventType
|
||||
@goModel(model: "go.probo.inc/probo/pkg/coredata.WebhookEventType") {
|
||||
VENDOR_CREATED
|
||||
@goEnum(value: "go.probo.inc/probo/pkg/coredata.WebhookEventTypeVendorCreated")
|
||||
VENDOR_UPDATED
|
||||
@goEnum(value: "go.probo.inc/probo/pkg/coredata.WebhookEventTypeVendorUpdated")
|
||||
VENDOR_DELETED
|
||||
@goEnum(value: "go.probo.inc/probo/pkg/coredata.WebhookEventTypeVendorDeleted")
|
||||
THIRD_PARTY_CREATED
|
||||
@goEnum(value: "go.probo.inc/probo/pkg/coredata.WebhookEventTypeThirdPartyCreated")
|
||||
THIRD_PARTY_UPDATED
|
||||
@goEnum(value: "go.probo.inc/probo/pkg/coredata.WebhookEventTypeThirdPartyUpdated")
|
||||
THIRD_PARTY_DELETED
|
||||
@goEnum(value: "go.probo.inc/probo/pkg/coredata.WebhookEventTypeThirdPartyDeleted")
|
||||
USER_CREATED
|
||||
@goEnum(value: "go.probo.inc/probo/pkg/coredata.WebhookEventTypeUserCreated")
|
||||
USER_UPDATED
|
||||
|
||||
@@ -1208,20 +1208,20 @@ func (r *organizationResolver) CookieBanners(ctx context.Context, obj *types.Org
|
||||
return types.NewCookieBannerConnection(p, r, obj.ID), nil
|
||||
}
|
||||
|
||||
// Vendors is the resolver for the vendors field.
|
||||
func (r *organizationResolver) Vendors(ctx context.Context, obj *types.Organization, first *int, after *page.CursorKey, last *int, before *page.CursorKey, orderBy *types.VendorOrderBy) (*types.VendorConnection, error) {
|
||||
if err := r.authorize(ctx, obj.ID, probo.ActionVendorList); err != nil {
|
||||
// ThirdParties is the resolver for the thirdParties field.
|
||||
func (r *organizationResolver) ThirdParties(ctx context.Context, obj *types.Organization, first *int, after *page.CursorKey, last *int, before *page.CursorKey, orderBy *types.ThirdPartyOrderBy) (*types.ThirdPartyConnection, error) {
|
||||
if err := r.authorize(ctx, obj.ID, probo.ActionThirdPartyList); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
prb := r.ProboService(ctx, obj.ID.TenantID())
|
||||
|
||||
pageOrderBy := page.OrderBy[coredata.VendorOrderField]{
|
||||
Field: coredata.VendorOrderFieldCreatedAt,
|
||||
pageOrderBy := page.OrderBy[coredata.ThirdPartyOrderField]{
|
||||
Field: coredata.ThirdPartyOrderFieldCreatedAt,
|
||||
Direction: page.OrderDirectionDesc,
|
||||
}
|
||||
if orderBy != nil {
|
||||
pageOrderBy = page.OrderBy[coredata.VendorOrderField]{
|
||||
pageOrderBy = page.OrderBy[coredata.ThirdPartyOrderField]{
|
||||
Field: orderBy.Field,
|
||||
Direction: orderBy.Direction,
|
||||
}
|
||||
@@ -1229,28 +1229,28 @@ func (r *organizationResolver) Vendors(ctx context.Context, obj *types.Organizat
|
||||
|
||||
cursor := types.NewCursor(first, after, last, before, pageOrderBy)
|
||||
|
||||
vendorFilter := coredata.NewVendorFilter(nil)
|
||||
thirdPartyFilter := coredata.NewThirdPartyFilter(nil)
|
||||
|
||||
page, err := prb.Vendors.ListForOrganizationID(ctx, obj.ID, cursor, vendorFilter)
|
||||
page, err := prb.ThirdParties.ListForOrganizationID(ctx, obj.ID, cursor, thirdPartyFilter)
|
||||
if err != nil {
|
||||
r.logger.ErrorCtx(ctx, "cannot list organization vendors", log.Error(err))
|
||||
r.logger.ErrorCtx(ctx, "cannot list organization thirdParties", log.Error(err))
|
||||
return nil, gqlutils.Internal(ctx)
|
||||
}
|
||||
|
||||
return types.NewVendorConnection(page, r, obj.ID), nil
|
||||
return types.NewThirdPartyConnection(page, r, obj.ID), nil
|
||||
}
|
||||
|
||||
// VendorsDocument is the resolver for the vendorsDocument field.
|
||||
func (r *organizationResolver) VendorsDocument(ctx context.Context, obj *types.Organization) (*types.Document, error) {
|
||||
// ThirdPartiesDocument is the resolver for the thirdPartiesDocument field.
|
||||
func (r *organizationResolver) ThirdPartiesDocument(ctx context.Context, obj *types.Organization) (*types.Document, error) {
|
||||
if err := r.authorize(ctx, obj.ID, probo.ActionDocumentGet); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
prb := r.ProboService(ctx, obj.ID.TenantID())
|
||||
|
||||
documentID, err := prb.GeneratedDocuments.GetVendorsDocumentID(ctx, obj.ID)
|
||||
documentID, err := prb.GeneratedDocuments.GetThirdPartiesDocumentID(ctx, obj.ID)
|
||||
if err != nil {
|
||||
r.logger.ErrorCtx(ctx, "cannot get vendors document ID", log.Error(err))
|
||||
r.logger.ErrorCtx(ctx, "cannot get thirdParties document ID", log.Error(err))
|
||||
return nil, gqlutils.Internal(ctx)
|
||||
}
|
||||
if documentID == nil {
|
||||
@@ -1262,7 +1262,7 @@ func (r *organizationResolver) VendorsDocument(ctx context.Context, obj *types.O
|
||||
if errors.Is(err, coredata.ErrResourceNotFound) {
|
||||
return nil, nil
|
||||
}
|
||||
r.logger.ErrorCtx(ctx, "cannot load vendors document", log.Error(err))
|
||||
r.logger.ErrorCtx(ctx, "cannot load thirdParties document", log.Error(err))
|
||||
return nil, gqlutils.Internal(ctx)
|
||||
}
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ func (r *mutationResolver) CreateProcessingActivity(ctx context.Context, input t
|
||||
NextReviewDate: input.NextReviewDate,
|
||||
Role: input.Role,
|
||||
DataProtectionOfficerID: input.DataProtectionOfficerID,
|
||||
VendorIDs: input.VendorIds,
|
||||
ThirdPartyIDs: input.ThirdPartyIds,
|
||||
}
|
||||
|
||||
activity, err := prb.ProcessingActivities.Create(ctx, &req)
|
||||
@@ -91,7 +91,7 @@ func (r *mutationResolver) UpdateProcessingActivity(ctx context.Context, input t
|
||||
NextReviewDate: gqlutils.UnwrapOmittable(input.NextReviewDate),
|
||||
Role: input.Role,
|
||||
DataProtectionOfficerID: gqlutils.UnwrapOmittable(input.DataProtectionOfficerID),
|
||||
VendorIDs: &input.VendorIds,
|
||||
ThirdPartyIDs: &input.ThirdPartyIds,
|
||||
}
|
||||
|
||||
activity, err := prb.ProcessingActivities.Update(ctx, &req)
|
||||
@@ -196,20 +196,20 @@ func (r *processingActivityResolver) DataProtectionOfficer(ctx context.Context,
|
||||
return types.NewProfile(dpo), nil
|
||||
}
|
||||
|
||||
// Vendors is the resolver for the vendors field.
|
||||
func (r *processingActivityResolver) Vendors(ctx context.Context, obj *types.ProcessingActivity, first *int, after *page.CursorKey, last *int, before *page.CursorKey, orderBy *types.VendorOrderBy) (*types.VendorConnection, error) {
|
||||
if err := r.authorize(ctx, obj.ID, probo.ActionVendorList); err != nil {
|
||||
// ThirdParties is the resolver for the thirdParties field.
|
||||
func (r *processingActivityResolver) ThirdParties(ctx context.Context, obj *types.ProcessingActivity, first *int, after *page.CursorKey, last *int, before *page.CursorKey, orderBy *types.ThirdPartyOrderBy) (*types.ThirdPartyConnection, error) {
|
||||
if err := r.authorize(ctx, obj.ID, probo.ActionThirdPartyList); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
prb := r.ProboService(ctx, obj.ID.TenantID())
|
||||
|
||||
pageOrderBy := page.OrderBy[coredata.VendorOrderField]{
|
||||
Field: coredata.VendorOrderFieldCreatedAt,
|
||||
pageOrderBy := page.OrderBy[coredata.ThirdPartyOrderField]{
|
||||
Field: coredata.ThirdPartyOrderFieldCreatedAt,
|
||||
Direction: page.OrderDirectionDesc,
|
||||
}
|
||||
if orderBy != nil {
|
||||
pageOrderBy = page.OrderBy[coredata.VendorOrderField]{
|
||||
pageOrderBy = page.OrderBy[coredata.ThirdPartyOrderField]{
|
||||
Field: orderBy.Field,
|
||||
Direction: orderBy.Direction,
|
||||
}
|
||||
@@ -217,13 +217,13 @@ func (r *processingActivityResolver) Vendors(ctx context.Context, obj *types.Pro
|
||||
|
||||
cursor := types.NewCursor(first, after, last, before, pageOrderBy)
|
||||
|
||||
page, err := prb.Vendors.ListForProcessingActivityID(ctx, obj.ID, cursor)
|
||||
page, err := prb.ThirdParties.ListForProcessingActivityID(ctx, obj.ID, cursor)
|
||||
if err != nil {
|
||||
r.logger.ErrorCtx(ctx, "cannot list processing activity vendors", log.Error(err))
|
||||
r.logger.ErrorCtx(ctx, "cannot list processing activity thirdParties", log.Error(err))
|
||||
return nil, gqlutils.Internal(ctx)
|
||||
}
|
||||
|
||||
return types.NewVendorConnection(page, r, obj.ID), nil
|
||||
return types.NewThirdPartyConnection(page, r, obj.ID), nil
|
||||
}
|
||||
|
||||
// DataProtectionImpactAssessment is the resolver for the dataProtectionImpactAssessment field.
|
||||
|
||||
1140
pkg/server/api/console/v1/third_party_resolvers.go
Normal file
1140
pkg/server/api/console/v1/third_party_resolvers.go
Normal file
File diff suppressed because it is too large
Load Diff
@@ -20,21 +20,21 @@ import (
|
||||
)
|
||||
|
||||
type CommonThirdParty struct {
|
||||
ID gid.GID `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Category coredata.VendorCategory `json:"category"`
|
||||
WebsiteURL *string `json:"websiteUrl,omitempty"`
|
||||
HeadquarterAddress *string `json:"headquarterAddress,omitempty"`
|
||||
LegalName *string `json:"legalName,omitempty"`
|
||||
PrivacyPolicyURL *string `json:"privacyPolicyUrl,omitempty"`
|
||||
ServiceLevelAgreementURL *string `json:"serviceLevelAgreementUrl,omitempty"`
|
||||
DataProcessingAgreementURL *string `json:"dataProcessingAgreementUrl,omitempty"`
|
||||
Certifications []string `json:"certifications"`
|
||||
SecurityPageURL *string `json:"securityPageUrl,omitempty"`
|
||||
TrustPageURL *string `json:"trustPageUrl,omitempty"`
|
||||
StatusPageURL *string `json:"statusPageUrl,omitempty"`
|
||||
TermsOfServiceURL *string `json:"termsOfServiceUrl,omitempty"`
|
||||
LogoFileID *gid.GID `json:"logoFileId,omitempty"`
|
||||
ID gid.GID `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Category coredata.ThirdPartyCategory `json:"category"`
|
||||
WebsiteURL *string `json:"websiteUrl,omitempty"`
|
||||
HeadquarterAddress *string `json:"headquarterAddress,omitempty"`
|
||||
LegalName *string `json:"legalName,omitempty"`
|
||||
PrivacyPolicyURL *string `json:"privacyPolicyUrl,omitempty"`
|
||||
ServiceLevelAgreementURL *string `json:"serviceLevelAgreementUrl,omitempty"`
|
||||
DataProcessingAgreementURL *string `json:"dataProcessingAgreementUrl,omitempty"`
|
||||
Certifications []string `json:"certifications"`
|
||||
SecurityPageURL *string `json:"securityPageUrl,omitempty"`
|
||||
TrustPageURL *string `json:"trustPageUrl,omitempty"`
|
||||
StatusPageURL *string `json:"statusPageUrl,omitempty"`
|
||||
TermsOfServiceURL *string `json:"termsOfServiceUrl,omitempty"`
|
||||
LogoFileID *gid.GID `json:"logoFileId,omitempty"`
|
||||
}
|
||||
|
||||
func NewCommonThirdParty(c *coredata.CommonThirdParty) *CommonThirdParty {
|
||||
|
||||
@@ -28,7 +28,7 @@ type Datum struct {
|
||||
Name string `json:"name"`
|
||||
DataClassification coredata.DataClassification `json:"dataClassification"`
|
||||
Owner *Profile `json:"owner"`
|
||||
Vendors *VendorConnection `json:"vendors"`
|
||||
ThirdParties *ThirdPartyConnection `json:"third_parties"`
|
||||
Organization *Organization `json:"organization"`
|
||||
CreatedAt time.Time `json:"createdAt"`
|
||||
UpdatedAt time.Time `json:"updatedAt"`
|
||||
|
||||
@@ -22,11 +22,11 @@ import (
|
||||
)
|
||||
|
||||
type (
|
||||
VendorOrderBy OrderBy[coredata.VendorOrderField]
|
||||
ThirdPartyOrderBy OrderBy[coredata.ThirdPartyOrderField]
|
||||
|
||||
VendorConnection struct {
|
||||
ThirdPartyConnection struct {
|
||||
TotalCount int
|
||||
Edges []*VendorEdge
|
||||
Edges []*ThirdPartyEdge
|
||||
PageInfo PageInfo
|
||||
|
||||
Resolver any
|
||||
@@ -34,18 +34,18 @@ type (
|
||||
}
|
||||
)
|
||||
|
||||
func NewVendorConnection(
|
||||
p *page.Page[*coredata.Vendor, coredata.VendorOrderField],
|
||||
func NewThirdPartyConnection(
|
||||
p *page.Page[*coredata.ThirdParty, coredata.ThirdPartyOrderField],
|
||||
parentType any,
|
||||
parentID gid.GID,
|
||||
) *VendorConnection {
|
||||
var edges = make([]*VendorEdge, len(p.Data))
|
||||
) *ThirdPartyConnection {
|
||||
var edges = make([]*ThirdPartyEdge, len(p.Data))
|
||||
|
||||
for i := range edges {
|
||||
edges[i] = NewVendorEdge(p.Data[i], p.Cursor.OrderBy.Field)
|
||||
edges[i] = NewThirdPartyEdge(p.Data[i], p.Cursor.OrderBy.Field)
|
||||
}
|
||||
|
||||
return &VendorConnection{
|
||||
return &ThirdPartyConnection{
|
||||
Edges: edges,
|
||||
PageInfo: *NewPageInfo(p),
|
||||
|
||||
@@ -54,15 +54,15 @@ func NewVendorConnection(
|
||||
}
|
||||
}
|
||||
|
||||
func NewVendorEdge(v *coredata.Vendor, orderBy coredata.VendorOrderField) *VendorEdge {
|
||||
return &VendorEdge{
|
||||
func NewThirdPartyEdge(v *coredata.ThirdParty, orderBy coredata.ThirdPartyOrderField) *ThirdPartyEdge {
|
||||
return &ThirdPartyEdge{
|
||||
Cursor: v.CursorKey(orderBy),
|
||||
Node: NewVendor(v),
|
||||
Node: NewThirdParty(v),
|
||||
}
|
||||
}
|
||||
|
||||
func NewVendor(v *coredata.Vendor) *Vendor {
|
||||
object := &Vendor{
|
||||
func NewThirdParty(v *coredata.ThirdParty) *ThirdParty {
|
||||
object := &ThirdParty{
|
||||
ID: v.ID,
|
||||
Organization: &Organization{
|
||||
ID: v.OrganizationID,
|
||||
@@ -104,10 +104,10 @@ func NewVendor(v *coredata.Vendor) *Vendor {
|
||||
return object
|
||||
}
|
||||
|
||||
func NewVendorSubprocessors(sps []probo.Subprocessor) []*VendorSubprocessor {
|
||||
result := make([]*VendorSubprocessor, len(sps))
|
||||
func NewThirdPartySubprocessors(sps []probo.Subprocessor) []*ThirdPartySubprocessor {
|
||||
result := make([]*ThirdPartySubprocessor, len(sps))
|
||||
for i, sp := range sps {
|
||||
result[i] = &VendorSubprocessor{
|
||||
result[i] = &ThirdPartySubprocessor{
|
||||
Name: sp.Name,
|
||||
Country: sp.Country,
|
||||
Purpose: sp.Purpose,
|
||||
@@ -18,11 +18,11 @@ import (
|
||||
"go.probo.inc/probo/pkg/coredata"
|
||||
)
|
||||
|
||||
func NewVendorBusinessAssociateAgreement(v *coredata.VendorBusinessAssociateAgreement, file *coredata.File) *VendorBusinessAssociateAgreement {
|
||||
return &VendorBusinessAssociateAgreement{
|
||||
func NewThirdPartyBusinessAssociateAgreement(v *coredata.ThirdPartyBusinessAssociateAgreement, file *coredata.File) *ThirdPartyBusinessAssociateAgreement {
|
||||
return &ThirdPartyBusinessAssociateAgreement{
|
||||
ID: v.ID,
|
||||
Vendor: &Vendor{
|
||||
ID: v.VendorID,
|
||||
ThirdParty: &ThirdParty{
|
||||
ID: v.ThirdPartyID,
|
||||
},
|
||||
ValidFrom: v.ValidFrom,
|
||||
ValidUntil: v.ValidUntil,
|
||||
@@ -20,34 +20,34 @@ import (
|
||||
)
|
||||
|
||||
type (
|
||||
VendorComplianceReportOrderBy OrderBy[coredata.VendorComplianceReportOrderField]
|
||||
ThirdPartyComplianceReportOrderBy OrderBy[coredata.ThirdPartyComplianceReportOrderField]
|
||||
)
|
||||
|
||||
func NewVendorComplianceReportConnection(p *page.Page[*coredata.VendorComplianceReport, coredata.VendorComplianceReportOrderField]) *VendorComplianceReportConnection {
|
||||
var edges = make([]*VendorComplianceReportEdge, len(p.Data))
|
||||
func NewThirdPartyComplianceReportConnection(p *page.Page[*coredata.ThirdPartyComplianceReport, coredata.ThirdPartyComplianceReportOrderField]) *ThirdPartyComplianceReportConnection {
|
||||
var edges = make([]*ThirdPartyComplianceReportEdge, len(p.Data))
|
||||
|
||||
for i := range edges {
|
||||
edges[i] = NewVendorComplianceReportEdge(p.Data[i], p.Cursor.OrderBy.Field)
|
||||
edges[i] = NewThirdPartyComplianceReportEdge(p.Data[i], p.Cursor.OrderBy.Field)
|
||||
}
|
||||
|
||||
return &VendorComplianceReportConnection{
|
||||
return &ThirdPartyComplianceReportConnection{
|
||||
Edges: edges,
|
||||
PageInfo: NewPageInfo(p),
|
||||
}
|
||||
}
|
||||
|
||||
func NewVendorComplianceReportEdge(c *coredata.VendorComplianceReport, orderBy coredata.VendorComplianceReportOrderField) *VendorComplianceReportEdge {
|
||||
return &VendorComplianceReportEdge{
|
||||
func NewThirdPartyComplianceReportEdge(c *coredata.ThirdPartyComplianceReport, orderBy coredata.ThirdPartyComplianceReportOrderField) *ThirdPartyComplianceReportEdge {
|
||||
return &ThirdPartyComplianceReportEdge{
|
||||
Cursor: c.CursorKey(orderBy),
|
||||
Node: NewVendorComplianceReport(c),
|
||||
Node: NewThirdPartyComplianceReport(c),
|
||||
}
|
||||
}
|
||||
|
||||
func NewVendorComplianceReport(c *coredata.VendorComplianceReport) *VendorComplianceReport {
|
||||
object := &VendorComplianceReport{
|
||||
func NewThirdPartyComplianceReport(c *coredata.ThirdPartyComplianceReport) *ThirdPartyComplianceReport {
|
||||
object := &ThirdPartyComplianceReport{
|
||||
ID: c.ID,
|
||||
Vendor: &Vendor{
|
||||
ID: c.VendorID,
|
||||
ThirdParty: &ThirdParty{
|
||||
ID: c.ThirdPartyID,
|
||||
},
|
||||
ReportDate: c.ReportDate,
|
||||
ValidUntil: c.ValidUntil,
|
||||
@@ -20,34 +20,34 @@ import (
|
||||
)
|
||||
|
||||
type (
|
||||
VendorContactOrderBy OrderBy[coredata.VendorContactOrderField]
|
||||
ThirdPartyContactOrderBy OrderBy[coredata.ThirdPartyContactOrderField]
|
||||
)
|
||||
|
||||
func NewVendorContactConnection(p *page.Page[*coredata.VendorContact, coredata.VendorContactOrderField]) *VendorContactConnection {
|
||||
var edges = make([]*VendorContactEdge, len(p.Data))
|
||||
func NewThirdPartyContactConnection(p *page.Page[*coredata.ThirdPartyContact, coredata.ThirdPartyContactOrderField]) *ThirdPartyContactConnection {
|
||||
var edges = make([]*ThirdPartyContactEdge, len(p.Data))
|
||||
|
||||
for i := range edges {
|
||||
edges[i] = NewVendorContactEdge(p.Data[i], p.Cursor.OrderBy.Field)
|
||||
edges[i] = NewThirdPartyContactEdge(p.Data[i], p.Cursor.OrderBy.Field)
|
||||
}
|
||||
|
||||
return &VendorContactConnection{
|
||||
return &ThirdPartyContactConnection{
|
||||
Edges: edges,
|
||||
PageInfo: NewPageInfo(p),
|
||||
}
|
||||
}
|
||||
|
||||
func NewVendorContactEdge(c *coredata.VendorContact, orderBy coredata.VendorContactOrderField) *VendorContactEdge {
|
||||
return &VendorContactEdge{
|
||||
func NewThirdPartyContactEdge(c *coredata.ThirdPartyContact, orderBy coredata.ThirdPartyContactOrderField) *ThirdPartyContactEdge {
|
||||
return &ThirdPartyContactEdge{
|
||||
Cursor: c.CursorKey(orderBy),
|
||||
Node: NewVendorContact(c),
|
||||
Node: NewThirdPartyContact(c),
|
||||
}
|
||||
}
|
||||
|
||||
func NewVendorContact(c *coredata.VendorContact) *VendorContact {
|
||||
return &VendorContact{
|
||||
func NewThirdPartyContact(c *coredata.ThirdPartyContact) *ThirdPartyContact {
|
||||
return &ThirdPartyContact{
|
||||
ID: c.ID,
|
||||
Vendor: &Vendor{
|
||||
ID: c.VendorID,
|
||||
ThirdParty: &ThirdParty{
|
||||
ID: c.ThirdPartyID,
|
||||
},
|
||||
FullName: c.FullName,
|
||||
Email: c.Email,
|
||||
@@ -18,11 +18,11 @@ import (
|
||||
"go.probo.inc/probo/pkg/coredata"
|
||||
)
|
||||
|
||||
func NewVendorDataPrivacyAgreement(v *coredata.VendorDataPrivacyAgreement, file *coredata.File) *VendorDataPrivacyAgreement {
|
||||
return &VendorDataPrivacyAgreement{
|
||||
func NewThirdPartyDataPrivacyAgreement(v *coredata.ThirdPartyDataPrivacyAgreement, file *coredata.File) *ThirdPartyDataPrivacyAgreement {
|
||||
return &ThirdPartyDataPrivacyAgreement{
|
||||
ID: v.ID,
|
||||
Vendor: &Vendor{
|
||||
ID: v.VendorID,
|
||||
ThirdParty: &ThirdParty{
|
||||
ID: v.ThirdPartyID,
|
||||
},
|
||||
ValidFrom: v.ValidFrom,
|
||||
ValidUntil: v.ValidUntil,
|
||||
@@ -20,34 +20,34 @@ import (
|
||||
)
|
||||
|
||||
type (
|
||||
VendorRiskAssessmentOrderBy OrderBy[coredata.VendorRiskAssessmentOrderField]
|
||||
ThirdPartyRiskAssessmentOrderBy OrderBy[coredata.ThirdPartyRiskAssessmentOrderField]
|
||||
)
|
||||
|
||||
func NewVendorRiskAssessmentConnection(p *page.Page[*coredata.VendorRiskAssessment, coredata.VendorRiskAssessmentOrderField]) *VendorRiskAssessmentConnection {
|
||||
var edges = make([]*VendorRiskAssessmentEdge, len(p.Data))
|
||||
func NewThirdPartyRiskAssessmentConnection(p *page.Page[*coredata.ThirdPartyRiskAssessment, coredata.ThirdPartyRiskAssessmentOrderField]) *ThirdPartyRiskAssessmentConnection {
|
||||
var edges = make([]*ThirdPartyRiskAssessmentEdge, len(p.Data))
|
||||
|
||||
for i := range edges {
|
||||
edges[i] = NewVendorRiskAssessmentEdge(p.Data[i], p.Cursor.OrderBy.Field)
|
||||
edges[i] = NewThirdPartyRiskAssessmentEdge(p.Data[i], p.Cursor.OrderBy.Field)
|
||||
}
|
||||
|
||||
return &VendorRiskAssessmentConnection{
|
||||
return &ThirdPartyRiskAssessmentConnection{
|
||||
Edges: edges,
|
||||
PageInfo: NewPageInfo(p),
|
||||
}
|
||||
}
|
||||
|
||||
func NewVendorRiskAssessmentEdge(c *coredata.VendorRiskAssessment, orderBy coredata.VendorRiskAssessmentOrderField) *VendorRiskAssessmentEdge {
|
||||
return &VendorRiskAssessmentEdge{
|
||||
func NewThirdPartyRiskAssessmentEdge(c *coredata.ThirdPartyRiskAssessment, orderBy coredata.ThirdPartyRiskAssessmentOrderField) *ThirdPartyRiskAssessmentEdge {
|
||||
return &ThirdPartyRiskAssessmentEdge{
|
||||
Cursor: c.CursorKey(orderBy),
|
||||
Node: NewVendorRiskAssessment(c),
|
||||
Node: NewThirdPartyRiskAssessment(c),
|
||||
}
|
||||
}
|
||||
|
||||
func NewVendorRiskAssessment(c *coredata.VendorRiskAssessment) *VendorRiskAssessment {
|
||||
return &VendorRiskAssessment{
|
||||
func NewThirdPartyRiskAssessment(c *coredata.ThirdPartyRiskAssessment) *ThirdPartyRiskAssessment {
|
||||
return &ThirdPartyRiskAssessment{
|
||||
ID: c.ID,
|
||||
Vendor: &Vendor{
|
||||
ID: c.VendorID,
|
||||
ThirdParty: &ThirdParty{
|
||||
ID: c.ThirdPartyID,
|
||||
},
|
||||
ExpiresAt: c.ExpiresAt,
|
||||
DataSensitivity: c.DataSensitivity,
|
||||
@@ -20,34 +20,34 @@ import (
|
||||
)
|
||||
|
||||
type (
|
||||
VendorServiceOrderBy OrderBy[coredata.VendorServiceOrderField]
|
||||
ThirdPartyServiceOrderBy OrderBy[coredata.ThirdPartyServiceOrderField]
|
||||
)
|
||||
|
||||
func NewVendorServiceConnection(p *page.Page[*coredata.VendorService, coredata.VendorServiceOrderField]) *VendorServiceConnection {
|
||||
var edges = make([]*VendorServiceEdge, len(p.Data))
|
||||
func NewThirdPartyServiceConnection(p *page.Page[*coredata.ThirdPartyService, coredata.ThirdPartyServiceOrderField]) *ThirdPartyServiceConnection {
|
||||
var edges = make([]*ThirdPartyServiceEdge, len(p.Data))
|
||||
|
||||
for i := range edges {
|
||||
edges[i] = NewVendorServiceEdge(p.Data[i], p.Cursor.OrderBy.Field)
|
||||
edges[i] = NewThirdPartyServiceEdge(p.Data[i], p.Cursor.OrderBy.Field)
|
||||
}
|
||||
|
||||
return &VendorServiceConnection{
|
||||
return &ThirdPartyServiceConnection{
|
||||
Edges: edges,
|
||||
PageInfo: NewPageInfo(p),
|
||||
}
|
||||
}
|
||||
|
||||
func NewVendorServiceEdge(s *coredata.VendorService, orderBy coredata.VendorServiceOrderField) *VendorServiceEdge {
|
||||
return &VendorServiceEdge{
|
||||
func NewThirdPartyServiceEdge(s *coredata.ThirdPartyService, orderBy coredata.ThirdPartyServiceOrderField) *ThirdPartyServiceEdge {
|
||||
return &ThirdPartyServiceEdge{
|
||||
Cursor: s.CursorKey(orderBy),
|
||||
Node: NewVendorService(s),
|
||||
Node: NewThirdPartyService(s),
|
||||
}
|
||||
}
|
||||
|
||||
func NewVendorService(s *coredata.VendorService) *VendorService {
|
||||
return &VendorService{
|
||||
func NewThirdPartyService(s *coredata.ThirdPartyService) *ThirdPartyService {
|
||||
return &ThirdPartyService{
|
||||
ID: s.ID,
|
||||
Vendor: &Vendor{
|
||||
ID: s.VendorID,
|
||||
ThirdParty: &ThirdParty{
|
||||
ID: s.ThirdPartyID,
|
||||
},
|
||||
Name: s.Name,
|
||||
Description: s.Description,
|
||||
File diff suppressed because it is too large
Load Diff
@@ -45,19 +45,19 @@ func (r *Resolver) ListOrganizationsTool(ctx context.Context, req *mcp.CallToolR
|
||||
return nil, result, nil
|
||||
}
|
||||
|
||||
// ListVendorsTool handles the listVendors tool
|
||||
// List all vendors for the organization
|
||||
func (r *Resolver) ListVendorsTool(ctx context.Context, req *mcp.CallToolRequest, input *types.ListVendorsInput) (*mcp.CallToolResult, types.ListVendorsOutput, error) {
|
||||
r.MustAuthorize(ctx, input.OrganizationID, probo.ActionVendorList)
|
||||
// ListThirdPartiesTool handles the listThirdParties tool
|
||||
// List all thirdParties for the organization
|
||||
func (r *Resolver) ListThirdPartiesTool(ctx context.Context, req *mcp.CallToolRequest, input *types.ListThirdPartiesInput) (*mcp.CallToolResult, types.ListThirdPartiesOutput, error) {
|
||||
r.MustAuthorize(ctx, input.OrganizationID, probo.ActionThirdPartyList)
|
||||
|
||||
prb := r.ProboService(ctx, input.OrganizationID)
|
||||
|
||||
pageOrderBy := page.OrderBy[coredata.VendorOrderField]{
|
||||
Field: coredata.VendorOrderFieldCreatedAt,
|
||||
pageOrderBy := page.OrderBy[coredata.ThirdPartyOrderField]{
|
||||
Field: coredata.ThirdPartyOrderFieldCreatedAt,
|
||||
Direction: page.OrderDirectionDesc,
|
||||
}
|
||||
if input.OrderBy != nil {
|
||||
pageOrderBy = page.OrderBy[coredata.VendorOrderField]{
|
||||
pageOrderBy = page.OrderBy[coredata.ThirdPartyOrderField]{
|
||||
Field: input.OrderBy.Field,
|
||||
Direction: input.OrderBy.Direction,
|
||||
}
|
||||
@@ -65,26 +65,26 @@ func (r *Resolver) ListVendorsTool(ctx context.Context, req *mcp.CallToolRequest
|
||||
|
||||
cursor := types.NewCursor(input.Size, input.Cursor, pageOrderBy)
|
||||
|
||||
vendorFilter := coredata.NewVendorFilter(nil)
|
||||
thirdPartyFilter := coredata.NewThirdPartyFilter(nil)
|
||||
|
||||
page, err := prb.Vendors.ListForOrganizationID(ctx, input.OrganizationID, cursor, vendorFilter)
|
||||
page, err := prb.ThirdParties.ListForOrganizationID(ctx, input.OrganizationID, cursor, thirdPartyFilter)
|
||||
if err != nil {
|
||||
panic(fmt.Errorf("cannot list organization vendors: %w", err))
|
||||
panic(fmt.Errorf("cannot list organization thirdParties: %w", err))
|
||||
}
|
||||
|
||||
return nil, types.NewListVendorsOutput(page), nil
|
||||
return nil, types.NewListThirdPartiesOutput(page), nil
|
||||
}
|
||||
|
||||
// AddVendorTool handles the addVendor tool
|
||||
// Add a new vendor to the organization
|
||||
func (r *Resolver) AddVendorTool(ctx context.Context, req *mcp.CallToolRequest, input *types.AddVendorInput) (*mcp.CallToolResult, types.AddVendorOutput, error) {
|
||||
r.MustAuthorize(ctx, input.OrganizationID, probo.ActionVendorCreate)
|
||||
// AddThirdPartyTool handles the addThirdParty tool
|
||||
// Add a new thirdParty to the organization
|
||||
func (r *Resolver) AddThirdPartyTool(ctx context.Context, req *mcp.CallToolRequest, input *types.AddThirdPartyInput) (*mcp.CallToolResult, types.AddThirdPartyOutput, error) {
|
||||
r.MustAuthorize(ctx, input.OrganizationID, probo.ActionThirdPartyCreate)
|
||||
|
||||
svc := r.ProboService(ctx, input.OrganizationID)
|
||||
|
||||
var category *coredata.VendorCategory
|
||||
var category *coredata.ThirdPartyCategory
|
||||
if input.Category != nil {
|
||||
cat := coredata.VendorCategory(*input.Category)
|
||||
cat := coredata.ThirdPartyCategory(*input.Category)
|
||||
category = &cat
|
||||
}
|
||||
|
||||
@@ -96,9 +96,9 @@ func (r *Resolver) AddVendorTool(ctx context.Context, req *mcp.CallToolRequest,
|
||||
}
|
||||
}
|
||||
|
||||
vendor, err := svc.Vendors.Create(
|
||||
thirdParty, err := svc.ThirdParties.Create(
|
||||
ctx,
|
||||
probo.CreateVendorRequest{
|
||||
probo.CreateThirdPartyRequest{
|
||||
OrganizationID: input.OrganizationID,
|
||||
Name: input.Name,
|
||||
Description: input.Description,
|
||||
@@ -122,16 +122,16 @@ func (r *Resolver) AddVendorTool(ctx context.Context, req *mcp.CallToolRequest,
|
||||
},
|
||||
)
|
||||
if err != nil {
|
||||
return nil, types.AddVendorOutput{}, fmt.Errorf("failed to create vendor: %w", err)
|
||||
return nil, types.AddThirdPartyOutput{}, fmt.Errorf("failed to create thirdParty: %w", err)
|
||||
}
|
||||
|
||||
return nil, types.NewAddVendorOutput(vendor), nil
|
||||
return nil, types.NewAddThirdPartyOutput(thirdParty), nil
|
||||
}
|
||||
|
||||
// UpdateVendorTool handles the updateVendor tool
|
||||
// Update an existing vendor
|
||||
func (r *Resolver) UpdateVendorTool(ctx context.Context, req *mcp.CallToolRequest, input *types.UpdateVendorInput) (*mcp.CallToolResult, types.UpdateVendorOutput, error) {
|
||||
r.MustAuthorize(ctx, input.ID, probo.ActionVendorUpdate)
|
||||
// UpdateThirdPartyTool handles the updateThirdParty tool
|
||||
// Update an existing thirdParty
|
||||
func (r *Resolver) UpdateThirdPartyTool(ctx context.Context, req *mcp.CallToolRequest, input *types.UpdateThirdPartyInput) (*mcp.CallToolResult, types.UpdateThirdPartyOutput, error) {
|
||||
r.MustAuthorize(ctx, input.ID, probo.ActionThirdPartyUpdate)
|
||||
|
||||
svc := r.ProboService(ctx, input.ID)
|
||||
|
||||
@@ -210,9 +210,9 @@ func (r *Resolver) UpdateVendorTool(ctx context.Context, req *mcp.CallToolReques
|
||||
securityOwnerID = &input.SecurityOwnerID
|
||||
}
|
||||
|
||||
var category *coredata.VendorCategory
|
||||
var category *coredata.ThirdPartyCategory
|
||||
if input.Category != nil {
|
||||
cat := coredata.VendorCategory(*input.Category)
|
||||
cat := coredata.ThirdPartyCategory(*input.Category)
|
||||
category = &cat
|
||||
}
|
||||
|
||||
@@ -224,9 +224,9 @@ func (r *Resolver) UpdateVendorTool(ctx context.Context, req *mcp.CallToolReques
|
||||
}
|
||||
}
|
||||
|
||||
vendor, err := svc.Vendors.Update(
|
||||
thirdParty, err := svc.ThirdParties.Update(
|
||||
ctx,
|
||||
probo.UpdateVendorRequest{
|
||||
probo.UpdateThirdPartyRequest{
|
||||
ID: input.ID,
|
||||
Name: input.Name,
|
||||
Description: description,
|
||||
@@ -250,10 +250,10 @@ func (r *Resolver) UpdateVendorTool(ctx context.Context, req *mcp.CallToolReques
|
||||
},
|
||||
)
|
||||
if err != nil {
|
||||
return nil, types.UpdateVendorOutput{}, fmt.Errorf("failed to update vendor: %w", err)
|
||||
return nil, types.UpdateThirdPartyOutput{}, fmt.Errorf("failed to update thirdParty: %w", err)
|
||||
}
|
||||
|
||||
return nil, types.NewUpdateVendorOutput(vendor), nil
|
||||
return nil, types.NewUpdateThirdPartyOutput(thirdParty), nil
|
||||
}
|
||||
|
||||
func (r *Resolver) ListRisksTool(ctx context.Context, req *mcp.CallToolRequest, input *types.ListRisksInput) (*mcp.CallToolResult, types.ListRisksOutput, error) {
|
||||
@@ -593,7 +593,7 @@ func (r *Resolver) AddAssetTool(ctx context.Context, req *mcp.CallToolRequest, i
|
||||
OwnerID: input.OwnerID,
|
||||
AssetType: input.AssetType,
|
||||
DataTypesStored: input.DataTypesStored,
|
||||
VendorIDs: input.VendorIds,
|
||||
ThirdPartyIDs: input.ThirdPartyIds,
|
||||
},
|
||||
)
|
||||
if err != nil {
|
||||
@@ -619,7 +619,7 @@ func (r *Resolver) UpdateAssetTool(ctx context.Context, req *mcp.CallToolRequest
|
||||
OwnerID: input.OwnerID,
|
||||
AssetType: input.AssetType,
|
||||
DataTypesStored: input.DataTypesStored,
|
||||
VendorIDs: input.VendorIds,
|
||||
ThirdPartyIDs: input.ThirdPartyIds,
|
||||
},
|
||||
)
|
||||
if err != nil {
|
||||
@@ -684,7 +684,7 @@ func (r *Resolver) AddDatumTool(ctx context.Context, req *mcp.CallToolRequest, i
|
||||
Name: input.Name,
|
||||
DataClassification: input.DataClassification,
|
||||
OwnerID: input.OwnerID,
|
||||
VendorIDs: input.VendorIds,
|
||||
ThirdPartyIDs: input.ThirdPartyIds,
|
||||
},
|
||||
)
|
||||
if err != nil {
|
||||
@@ -708,7 +708,7 @@ func (r *Resolver) UpdateDatumTool(ctx context.Context, req *mcp.CallToolRequest
|
||||
Name: input.Name,
|
||||
DataClassification: input.DataClassification,
|
||||
OwnerID: input.OwnerID,
|
||||
VendorIDs: input.VendorIds,
|
||||
ThirdPartyIDs: input.ThirdPartyIds,
|
||||
},
|
||||
)
|
||||
if err != nil {
|
||||
@@ -1004,7 +1004,7 @@ func (r *Resolver) AddProcessingActivityTool(ctx context.Context, req *mcp.CallT
|
||||
NextReviewDate: input.NextReviewDate,
|
||||
Role: input.Role,
|
||||
DataProtectionOfficerID: input.DataProtectionOfficerID,
|
||||
VendorIDs: input.VendorIds,
|
||||
ThirdPartyIDs: input.ThirdPartyIds,
|
||||
},
|
||||
)
|
||||
if err != nil {
|
||||
@@ -1021,9 +1021,9 @@ func (r *Resolver) UpdateProcessingActivityTool(ctx context.Context, req *mcp.Ca
|
||||
|
||||
svc := r.ProboService(ctx, input.ID)
|
||||
|
||||
var vendorIDs *[]gid.GID
|
||||
if input.VendorIds != nil {
|
||||
vendorIDs = &input.VendorIds
|
||||
var thirdPartyIDs *[]gid.GID
|
||||
if input.ThirdPartyIds != nil {
|
||||
thirdPartyIDs = &input.ThirdPartyIds
|
||||
}
|
||||
|
||||
processingActivity, err := svc.ProcessingActivities.Update(
|
||||
@@ -1049,7 +1049,7 @@ func (r *Resolver) UpdateProcessingActivityTool(ctx context.Context, req *mcp.Ca
|
||||
NextReviewDate: UnwrapOmittable(input.NextReviewDate),
|
||||
Role: input.Role,
|
||||
DataProtectionOfficerID: UnwrapOmittable(input.DataProtectionOfficerID),
|
||||
VendorIDs: vendorIDs,
|
||||
ThirdPartyIDs: thirdPartyIDs,
|
||||
},
|
||||
)
|
||||
if err != nil {
|
||||
@@ -2729,19 +2729,19 @@ func (r *Resolver) DeleteApplicabilityStatementTool(ctx context.Context, req *mc
|
||||
}, nil
|
||||
}
|
||||
|
||||
// ListVendorRiskAssessmentsTool handles the listVendorRiskAssessments tool
|
||||
// List all risk assessments for a vendor
|
||||
func (r *Resolver) ListVendorRiskAssessmentsTool(ctx context.Context, req *mcp.CallToolRequest, input *types.ListVendorRiskAssessmentsInput) (*mcp.CallToolResult, types.ListVendorRiskAssessmentsOutput, error) {
|
||||
r.MustAuthorize(ctx, input.VendorID, probo.ActionVendorRiskAssessmentList)
|
||||
// ListThirdPartyRiskAssessmentsTool handles the listThirdPartyRiskAssessments tool
|
||||
// List all risk assessments for a thirdParty
|
||||
func (r *Resolver) ListThirdPartyRiskAssessmentsTool(ctx context.Context, req *mcp.CallToolRequest, input *types.ListThirdPartyRiskAssessmentsInput) (*mcp.CallToolResult, types.ListThirdPartyRiskAssessmentsOutput, error) {
|
||||
r.MustAuthorize(ctx, input.ThirdPartyID, probo.ActionThirdPartyRiskAssessmentList)
|
||||
|
||||
prb := r.ProboService(ctx, input.VendorID)
|
||||
prb := r.ProboService(ctx, input.ThirdPartyID)
|
||||
|
||||
pageOrderBy := page.OrderBy[coredata.VendorRiskAssessmentOrderField]{
|
||||
Field: coredata.VendorRiskAssessmentOrderFieldCreatedAt,
|
||||
pageOrderBy := page.OrderBy[coredata.ThirdPartyRiskAssessmentOrderField]{
|
||||
Field: coredata.ThirdPartyRiskAssessmentOrderFieldCreatedAt,
|
||||
Direction: page.OrderDirectionDesc,
|
||||
}
|
||||
if input.OrderBy != nil {
|
||||
pageOrderBy = page.OrderBy[coredata.VendorRiskAssessmentOrderField]{
|
||||
pageOrderBy = page.OrderBy[coredata.ThirdPartyRiskAssessmentOrderField]{
|
||||
Field: input.OrderBy.Field,
|
||||
Direction: input.OrderBy.Direction,
|
||||
}
|
||||
@@ -2749,25 +2749,25 @@ func (r *Resolver) ListVendorRiskAssessmentsTool(ctx context.Context, req *mcp.C
|
||||
|
||||
cursor := types.NewCursor(input.Size, input.Cursor, pageOrderBy)
|
||||
|
||||
p, err := prb.Vendors.ListRiskAssessments(ctx, input.VendorID, cursor)
|
||||
p, err := prb.ThirdParties.ListRiskAssessments(ctx, input.ThirdPartyID, cursor)
|
||||
if err != nil {
|
||||
return nil, types.ListVendorRiskAssessmentsOutput{}, fmt.Errorf("cannot list vendor risk assessments: %w", err)
|
||||
return nil, types.ListThirdPartyRiskAssessmentsOutput{}, fmt.Errorf("cannot list thirdParty risk assessments: %w", err)
|
||||
}
|
||||
|
||||
return nil, types.NewListVendorRiskAssessmentsOutput(p), nil
|
||||
return nil, types.NewListThirdPartyRiskAssessmentsOutput(p), nil
|
||||
}
|
||||
|
||||
// AddVendorRiskAssessmentTool handles the addVendorRiskAssessment tool
|
||||
// Add a new risk assessment for a vendor
|
||||
func (r *Resolver) AddVendorRiskAssessmentTool(ctx context.Context, req *mcp.CallToolRequest, input *types.AddVendorRiskAssessmentInput) (*mcp.CallToolResult, types.AddVendorRiskAssessmentOutput, error) {
|
||||
r.MustAuthorize(ctx, input.VendorID, probo.ActionVendorRiskAssessmentCreate)
|
||||
// AddThirdPartyRiskAssessmentTool handles the addThirdPartyRiskAssessment tool
|
||||
// Add a new risk assessment for a thirdParty
|
||||
func (r *Resolver) AddThirdPartyRiskAssessmentTool(ctx context.Context, req *mcp.CallToolRequest, input *types.AddThirdPartyRiskAssessmentInput) (*mcp.CallToolResult, types.AddThirdPartyRiskAssessmentOutput, error) {
|
||||
r.MustAuthorize(ctx, input.ThirdPartyID, probo.ActionThirdPartyRiskAssessmentCreate)
|
||||
|
||||
prb := r.ProboService(ctx, input.VendorID)
|
||||
prb := r.ProboService(ctx, input.ThirdPartyID)
|
||||
|
||||
assessment, err := prb.Vendors.CreateRiskAssessment(
|
||||
assessment, err := prb.ThirdParties.CreateRiskAssessment(
|
||||
ctx,
|
||||
probo.CreateVendorRiskAssessmentRequest{
|
||||
VendorID: input.VendorID,
|
||||
probo.CreateThirdPartyRiskAssessmentRequest{
|
||||
ThirdPartyID: input.ThirdPartyID,
|
||||
ExpiresAt: input.ExpiresAt,
|
||||
DataSensitivity: input.DataSensitivity,
|
||||
BusinessImpact: input.BusinessImpact,
|
||||
@@ -2775,24 +2775,24 @@ func (r *Resolver) AddVendorRiskAssessmentTool(ctx context.Context, req *mcp.Cal
|
||||
},
|
||||
)
|
||||
if err != nil {
|
||||
return nil, types.AddVendorRiskAssessmentOutput{}, fmt.Errorf("failed to create vendor risk assessment: %w", err)
|
||||
return nil, types.AddThirdPartyRiskAssessmentOutput{}, fmt.Errorf("failed to create thirdParty risk assessment: %w", err)
|
||||
}
|
||||
|
||||
return nil, types.NewAddVendorRiskAssessmentOutput(assessment), nil
|
||||
return nil, types.NewAddThirdPartyRiskAssessmentOutput(assessment), nil
|
||||
}
|
||||
|
||||
func (r *Resolver) DeleteVendorTool(ctx context.Context, req *mcp.CallToolRequest, input *types.DeleteVendorInput) (*mcp.CallToolResult, types.DeleteVendorOutput, error) {
|
||||
r.MustAuthorize(ctx, input.ID, probo.ActionVendorDelete)
|
||||
func (r *Resolver) DeleteThirdPartyTool(ctx context.Context, req *mcp.CallToolRequest, input *types.DeleteThirdPartyInput) (*mcp.CallToolResult, types.DeleteThirdPartyOutput, error) {
|
||||
r.MustAuthorize(ctx, input.ID, probo.ActionThirdPartyDelete)
|
||||
|
||||
svc := r.ProboService(ctx, input.ID)
|
||||
|
||||
err := svc.Vendors.Delete(ctx, input.ID)
|
||||
err := svc.ThirdParties.Delete(ctx, input.ID)
|
||||
if err != nil {
|
||||
return nil, types.DeleteVendorOutput{}, fmt.Errorf("failed to delete vendor: %w", err)
|
||||
return nil, types.DeleteThirdPartyOutput{}, fmt.Errorf("failed to delete thirdParty: %w", err)
|
||||
}
|
||||
|
||||
return nil, types.DeleteVendorOutput{
|
||||
DeletedVendorID: input.ID,
|
||||
return nil, types.DeleteThirdPartyOutput{
|
||||
DeletedThirdPartyID: input.ID,
|
||||
}, nil
|
||||
}
|
||||
|
||||
@@ -3841,19 +3841,19 @@ func (r *Resolver) PublishAssetListTool(ctx context.Context, req *mcp.CallToolRe
|
||||
}, nil
|
||||
}
|
||||
|
||||
// ListVendorContactsTool handles the listVendorContacts tool
|
||||
// List all contacts for a vendor
|
||||
func (r *Resolver) ListVendorContactsTool(ctx context.Context, req *mcp.CallToolRequest, input *types.ListVendorContactsInput) (*mcp.CallToolResult, types.ListVendorContactsOutput, error) {
|
||||
r.MustAuthorize(ctx, input.VendorID, probo.ActionVendorContactList)
|
||||
// ListThirdPartyContactsTool handles the listThirdPartyContacts tool
|
||||
// List all contacts for a thirdParty
|
||||
func (r *Resolver) ListThirdPartyContactsTool(ctx context.Context, req *mcp.CallToolRequest, input *types.ListThirdPartyContactsInput) (*mcp.CallToolResult, types.ListThirdPartyContactsOutput, error) {
|
||||
r.MustAuthorize(ctx, input.ThirdPartyID, probo.ActionThirdPartyContactList)
|
||||
|
||||
prb := r.ProboService(ctx, input.VendorID)
|
||||
prb := r.ProboService(ctx, input.ThirdPartyID)
|
||||
|
||||
pageOrderBy := page.OrderBy[coredata.VendorContactOrderField]{
|
||||
Field: coredata.VendorContactOrderFieldCreatedAt,
|
||||
pageOrderBy := page.OrderBy[coredata.ThirdPartyContactOrderField]{
|
||||
Field: coredata.ThirdPartyContactOrderFieldCreatedAt,
|
||||
Direction: page.OrderDirectionDesc,
|
||||
}
|
||||
if input.OrderBy != nil {
|
||||
pageOrderBy = page.OrderBy[coredata.VendorContactOrderField]{
|
||||
pageOrderBy = page.OrderBy[coredata.ThirdPartyContactOrderField]{
|
||||
Field: input.OrderBy.Field,
|
||||
Direction: input.OrderBy.Direction,
|
||||
}
|
||||
@@ -3861,50 +3861,50 @@ func (r *Resolver) ListVendorContactsTool(ctx context.Context, req *mcp.CallTool
|
||||
|
||||
cursor := types.NewCursor(input.Size, input.Cursor, pageOrderBy)
|
||||
|
||||
p, err := prb.VendorContacts.List(ctx, input.VendorID, cursor)
|
||||
p, err := prb.ThirdPartyContacts.List(ctx, input.ThirdPartyID, cursor)
|
||||
if err != nil {
|
||||
return nil, types.ListVendorContactsOutput{}, fmt.Errorf("cannot list vendor contacts: %w", err)
|
||||
return nil, types.ListThirdPartyContactsOutput{}, fmt.Errorf("cannot list thirdParty contacts: %w", err)
|
||||
}
|
||||
|
||||
return nil, types.NewListVendorContactsOutput(p), nil
|
||||
return nil, types.NewListThirdPartyContactsOutput(p), nil
|
||||
}
|
||||
|
||||
// AddVendorContactTool handles the addVendorContact tool
|
||||
// Add a new contact to a vendor
|
||||
func (r *Resolver) AddVendorContactTool(ctx context.Context, req *mcp.CallToolRequest, input *types.AddVendorContactInput) (*mcp.CallToolResult, types.AddVendorContactOutput, error) {
|
||||
r.MustAuthorize(ctx, input.VendorID, probo.ActionVendorContactCreate)
|
||||
// AddThirdPartyContactTool handles the addThirdPartyContact tool
|
||||
// Add a new contact to a thirdParty
|
||||
func (r *Resolver) AddThirdPartyContactTool(ctx context.Context, req *mcp.CallToolRequest, input *types.AddThirdPartyContactInput) (*mcp.CallToolResult, types.AddThirdPartyContactOutput, error) {
|
||||
r.MustAuthorize(ctx, input.ThirdPartyID, probo.ActionThirdPartyContactCreate)
|
||||
|
||||
prb := r.ProboService(ctx, input.VendorID)
|
||||
prb := r.ProboService(ctx, input.ThirdPartyID)
|
||||
|
||||
emailAddr, err := mail.ParseAddr(input.Email)
|
||||
if err != nil {
|
||||
return nil, types.AddVendorContactOutput{}, fmt.Errorf("invalid email address: %w", err)
|
||||
return nil, types.AddThirdPartyContactOutput{}, fmt.Errorf("invalid email address: %w", err)
|
||||
}
|
||||
|
||||
vendorContact, err := prb.VendorContacts.Create(ctx, probo.CreateVendorContactRequest{
|
||||
VendorID: input.VendorID,
|
||||
FullName: &input.FullName,
|
||||
Email: &emailAddr,
|
||||
Phone: &input.Phone,
|
||||
Role: &input.Role,
|
||||
thirdPartyContact, err := prb.ThirdPartyContacts.Create(ctx, probo.CreateThirdPartyContactRequest{
|
||||
ThirdPartyID: input.ThirdPartyID,
|
||||
FullName: &input.FullName,
|
||||
Email: &emailAddr,
|
||||
Phone: &input.Phone,
|
||||
Role: &input.Role,
|
||||
})
|
||||
if err != nil {
|
||||
return nil, types.AddVendorContactOutput{}, fmt.Errorf("cannot create vendor contact: %w", err)
|
||||
return nil, types.AddThirdPartyContactOutput{}, fmt.Errorf("cannot create thirdParty contact: %w", err)
|
||||
}
|
||||
|
||||
return nil, types.AddVendorContactOutput{
|
||||
VendorContact: types.NewVendorContact(vendorContact),
|
||||
return nil, types.AddThirdPartyContactOutput{
|
||||
ThirdPartyContact: types.NewThirdPartyContact(thirdPartyContact),
|
||||
}, nil
|
||||
}
|
||||
|
||||
// UpdateVendorContactTool handles the updateVendorContact tool
|
||||
// Update an existing vendor contact
|
||||
func (r *Resolver) UpdateVendorContactTool(ctx context.Context, req *mcp.CallToolRequest, input *types.UpdateVendorContactInput) (*mcp.CallToolResult, types.UpdateVendorContactOutput, error) {
|
||||
r.MustAuthorize(ctx, input.ID, probo.ActionVendorContactUpdate)
|
||||
// UpdateThirdPartyContactTool handles the updateThirdPartyContact tool
|
||||
// Update an existing thirdParty contact
|
||||
func (r *Resolver) UpdateThirdPartyContactTool(ctx context.Context, req *mcp.CallToolRequest, input *types.UpdateThirdPartyContactInput) (*mcp.CallToolResult, types.UpdateThirdPartyContactOutput, error) {
|
||||
r.MustAuthorize(ctx, input.ID, probo.ActionThirdPartyContactUpdate)
|
||||
|
||||
prb := r.ProboService(ctx, input.ID)
|
||||
|
||||
updateReq := probo.UpdateVendorContactRequest{
|
||||
updateReq := probo.UpdateThirdPartyContactRequest{
|
||||
ID: input.ID,
|
||||
}
|
||||
|
||||
@@ -3915,7 +3915,7 @@ func (r *Resolver) UpdateVendorContactTool(ctx context.Context, req *mcp.CallToo
|
||||
if input.Email != nil {
|
||||
emailAddr, err := mail.ParseAddr(*input.Email)
|
||||
if err != nil {
|
||||
return nil, types.UpdateVendorContactOutput{}, fmt.Errorf("invalid email address: %w", err)
|
||||
return nil, types.UpdateThirdPartyContactOutput{}, fmt.Errorf("invalid email address: %w", err)
|
||||
}
|
||||
emailPtr := &emailAddr
|
||||
updateReq.Email = &emailPtr
|
||||
@@ -3929,46 +3929,46 @@ func (r *Resolver) UpdateVendorContactTool(ctx context.Context, req *mcp.CallToo
|
||||
updateReq.Role = &input.Role
|
||||
}
|
||||
|
||||
vendorContact, err := prb.VendorContacts.Update(ctx, updateReq)
|
||||
thirdPartyContact, err := prb.ThirdPartyContacts.Update(ctx, updateReq)
|
||||
if err != nil {
|
||||
return nil, types.UpdateVendorContactOutput{}, fmt.Errorf("cannot update vendor contact: %w", err)
|
||||
return nil, types.UpdateThirdPartyContactOutput{}, fmt.Errorf("cannot update thirdParty contact: %w", err)
|
||||
}
|
||||
|
||||
return nil, types.UpdateVendorContactOutput{
|
||||
VendorContact: types.NewVendorContact(vendorContact),
|
||||
return nil, types.UpdateThirdPartyContactOutput{
|
||||
ThirdPartyContact: types.NewThirdPartyContact(thirdPartyContact),
|
||||
}, nil
|
||||
}
|
||||
|
||||
// DeleteVendorContactTool handles the deleteVendorContact tool
|
||||
// Delete a vendor contact
|
||||
func (r *Resolver) DeleteVendorContactTool(ctx context.Context, req *mcp.CallToolRequest, input *types.DeleteVendorContactInput) (*mcp.CallToolResult, types.DeleteVendorContactOutput, error) {
|
||||
r.MustAuthorize(ctx, input.ID, probo.ActionVendorContactDelete)
|
||||
// DeleteThirdPartyContactTool handles the deleteThirdPartyContact tool
|
||||
// Delete a thirdParty contact
|
||||
func (r *Resolver) DeleteThirdPartyContactTool(ctx context.Context, req *mcp.CallToolRequest, input *types.DeleteThirdPartyContactInput) (*mcp.CallToolResult, types.DeleteThirdPartyContactOutput, error) {
|
||||
r.MustAuthorize(ctx, input.ID, probo.ActionThirdPartyContactDelete)
|
||||
|
||||
prb := r.ProboService(ctx, input.ID)
|
||||
|
||||
err := prb.VendorContacts.Delete(ctx, input.ID)
|
||||
err := prb.ThirdPartyContacts.Delete(ctx, input.ID)
|
||||
if err != nil {
|
||||
return nil, types.DeleteVendorContactOutput{}, fmt.Errorf("cannot delete vendor contact: %w", err)
|
||||
return nil, types.DeleteThirdPartyContactOutput{}, fmt.Errorf("cannot delete thirdParty contact: %w", err)
|
||||
}
|
||||
|
||||
return nil, types.DeleteVendorContactOutput{
|
||||
DeletedVendorContactID: input.ID,
|
||||
return nil, types.DeleteThirdPartyContactOutput{
|
||||
DeletedThirdPartyContactID: input.ID,
|
||||
}, nil
|
||||
}
|
||||
|
||||
// ListVendorServicesTool handles the listVendorServices tool
|
||||
// List all services for a vendor
|
||||
func (r *Resolver) ListVendorServicesTool(ctx context.Context, req *mcp.CallToolRequest, input *types.ListVendorServicesInput) (*mcp.CallToolResult, types.ListVendorServicesOutput, error) {
|
||||
r.MustAuthorize(ctx, input.VendorID, probo.ActionVendorServiceList)
|
||||
// ListThirdPartyServicesTool handles the listThirdPartyServices tool
|
||||
// List all services for a thirdParty
|
||||
func (r *Resolver) ListThirdPartyServicesTool(ctx context.Context, req *mcp.CallToolRequest, input *types.ListThirdPartyServicesInput) (*mcp.CallToolResult, types.ListThirdPartyServicesOutput, error) {
|
||||
r.MustAuthorize(ctx, input.ThirdPartyID, probo.ActionThirdPartyServiceList)
|
||||
|
||||
prb := r.ProboService(ctx, input.VendorID)
|
||||
prb := r.ProboService(ctx, input.ThirdPartyID)
|
||||
|
||||
pageOrderBy := page.OrderBy[coredata.VendorServiceOrderField]{
|
||||
Field: coredata.VendorServiceOrderFieldCreatedAt,
|
||||
pageOrderBy := page.OrderBy[coredata.ThirdPartyServiceOrderField]{
|
||||
Field: coredata.ThirdPartyServiceOrderFieldCreatedAt,
|
||||
Direction: page.OrderDirectionDesc,
|
||||
}
|
||||
if input.OrderBy != nil {
|
||||
pageOrderBy = page.OrderBy[coredata.VendorServiceOrderField]{
|
||||
pageOrderBy = page.OrderBy[coredata.ThirdPartyServiceOrderField]{
|
||||
Field: input.OrderBy.Field,
|
||||
Direction: input.OrderBy.Direction,
|
||||
}
|
||||
@@ -3976,43 +3976,43 @@ func (r *Resolver) ListVendorServicesTool(ctx context.Context, req *mcp.CallTool
|
||||
|
||||
cursor := types.NewCursor(input.Size, input.Cursor, pageOrderBy)
|
||||
|
||||
p, err := prb.VendorServices.List(ctx, input.VendorID, cursor)
|
||||
p, err := prb.ThirdPartyServices.List(ctx, input.ThirdPartyID, cursor)
|
||||
if err != nil {
|
||||
return nil, types.ListVendorServicesOutput{}, fmt.Errorf("cannot list vendor services: %w", err)
|
||||
return nil, types.ListThirdPartyServicesOutput{}, fmt.Errorf("cannot list thirdParty services: %w", err)
|
||||
}
|
||||
|
||||
return nil, types.NewListVendorServicesOutput(p), nil
|
||||
return nil, types.NewListThirdPartyServicesOutput(p), nil
|
||||
}
|
||||
|
||||
// AddVendorServiceTool handles the addVendorService tool
|
||||
// Add a new service to a vendor
|
||||
func (r *Resolver) AddVendorServiceTool(ctx context.Context, req *mcp.CallToolRequest, input *types.AddVendorServiceInput) (*mcp.CallToolResult, types.AddVendorServiceOutput, error) {
|
||||
r.MustAuthorize(ctx, input.VendorID, probo.ActionVendorServiceCreate)
|
||||
// AddThirdPartyServiceTool handles the addThirdPartyService tool
|
||||
// Add a new service to a thirdParty
|
||||
func (r *Resolver) AddThirdPartyServiceTool(ctx context.Context, req *mcp.CallToolRequest, input *types.AddThirdPartyServiceInput) (*mcp.CallToolResult, types.AddThirdPartyServiceOutput, error) {
|
||||
r.MustAuthorize(ctx, input.ThirdPartyID, probo.ActionThirdPartyServiceCreate)
|
||||
|
||||
prb := r.ProboService(ctx, input.VendorID)
|
||||
prb := r.ProboService(ctx, input.ThirdPartyID)
|
||||
|
||||
vendorService, err := prb.VendorServices.Create(ctx, probo.CreateVendorServiceRequest{
|
||||
VendorID: input.VendorID,
|
||||
Name: input.Name,
|
||||
Description: input.Description,
|
||||
thirdPartyService, err := prb.ThirdPartyServices.Create(ctx, probo.CreateThirdPartyServiceRequest{
|
||||
ThirdPartyID: input.ThirdPartyID,
|
||||
Name: input.Name,
|
||||
Description: input.Description,
|
||||
})
|
||||
if err != nil {
|
||||
return nil, types.AddVendorServiceOutput{}, fmt.Errorf("cannot create vendor service: %w", err)
|
||||
return nil, types.AddThirdPartyServiceOutput{}, fmt.Errorf("cannot create thirdParty service: %w", err)
|
||||
}
|
||||
|
||||
return nil, types.AddVendorServiceOutput{
|
||||
VendorService: types.NewVendorService(vendorService),
|
||||
return nil, types.AddThirdPartyServiceOutput{
|
||||
ThirdPartyService: types.NewThirdPartyService(thirdPartyService),
|
||||
}, nil
|
||||
}
|
||||
|
||||
// UpdateVendorServiceTool handles the updateVendorService tool
|
||||
// Update an existing vendor service
|
||||
func (r *Resolver) UpdateVendorServiceTool(ctx context.Context, req *mcp.CallToolRequest, input *types.UpdateVendorServiceInput) (*mcp.CallToolResult, types.UpdateVendorServiceOutput, error) {
|
||||
r.MustAuthorize(ctx, input.ID, probo.ActionVendorServiceUpdate)
|
||||
// UpdateThirdPartyServiceTool handles the updateThirdPartyService tool
|
||||
// Update an existing thirdParty service
|
||||
func (r *Resolver) UpdateThirdPartyServiceTool(ctx context.Context, req *mcp.CallToolRequest, input *types.UpdateThirdPartyServiceInput) (*mcp.CallToolResult, types.UpdateThirdPartyServiceOutput, error) {
|
||||
r.MustAuthorize(ctx, input.ID, probo.ActionThirdPartyServiceUpdate)
|
||||
|
||||
prb := r.ProboService(ctx, input.ID)
|
||||
|
||||
updateReq := probo.UpdateVendorServiceRequest{
|
||||
updateReq := probo.UpdateThirdPartyServiceRequest{
|
||||
ID: input.ID,
|
||||
}
|
||||
|
||||
@@ -4024,30 +4024,30 @@ func (r *Resolver) UpdateVendorServiceTool(ctx context.Context, req *mcp.CallToo
|
||||
updateReq.Description = &input.Description
|
||||
}
|
||||
|
||||
vendorService, err := prb.VendorServices.Update(ctx, updateReq)
|
||||
thirdPartyService, err := prb.ThirdPartyServices.Update(ctx, updateReq)
|
||||
if err != nil {
|
||||
return nil, types.UpdateVendorServiceOutput{}, fmt.Errorf("cannot update vendor service: %w", err)
|
||||
return nil, types.UpdateThirdPartyServiceOutput{}, fmt.Errorf("cannot update thirdParty service: %w", err)
|
||||
}
|
||||
|
||||
return nil, types.UpdateVendorServiceOutput{
|
||||
VendorService: types.NewVendorService(vendorService),
|
||||
return nil, types.UpdateThirdPartyServiceOutput{
|
||||
ThirdPartyService: types.NewThirdPartyService(thirdPartyService),
|
||||
}, nil
|
||||
}
|
||||
|
||||
// DeleteVendorServiceTool handles the deleteVendorService tool
|
||||
// Delete a vendor service
|
||||
func (r *Resolver) DeleteVendorServiceTool(ctx context.Context, req *mcp.CallToolRequest, input *types.DeleteVendorServiceInput) (*mcp.CallToolResult, types.DeleteVendorServiceOutput, error) {
|
||||
r.MustAuthorize(ctx, input.ID, probo.ActionVendorServiceDelete)
|
||||
// DeleteThirdPartyServiceTool handles the deleteThirdPartyService tool
|
||||
// Delete a thirdParty service
|
||||
func (r *Resolver) DeleteThirdPartyServiceTool(ctx context.Context, req *mcp.CallToolRequest, input *types.DeleteThirdPartyServiceInput) (*mcp.CallToolResult, types.DeleteThirdPartyServiceOutput, error) {
|
||||
r.MustAuthorize(ctx, input.ID, probo.ActionThirdPartyServiceDelete)
|
||||
|
||||
prb := r.ProboService(ctx, input.ID)
|
||||
|
||||
err := prb.VendorServices.Delete(ctx, input.ID)
|
||||
err := prb.ThirdPartyServices.Delete(ctx, input.ID)
|
||||
if err != nil {
|
||||
return nil, types.DeleteVendorServiceOutput{}, fmt.Errorf("cannot delete vendor service: %w", err)
|
||||
return nil, types.DeleteThirdPartyServiceOutput{}, fmt.Errorf("cannot delete thirdParty service: %w", err)
|
||||
}
|
||||
|
||||
return nil, types.DeleteVendorServiceOutput{
|
||||
DeletedVendorServiceID: input.ID,
|
||||
return nil, types.DeleteThirdPartyServiceOutput{
|
||||
DeletedThirdPartyServiceID: input.ID,
|
||||
}, nil
|
||||
}
|
||||
func (r *Resolver) DeleteAssetTool(ctx context.Context, req *mcp.CallToolRequest, input *types.DeleteAssetInput) (*mcp.CallToolResult, types.DeleteAssetOutput, error) {
|
||||
@@ -4572,24 +4572,24 @@ func (r *Resolver) DeleteCustomDomainTool(ctx context.Context, req *mcp.CallTool
|
||||
return nil, types.DeleteCustomDomainOutput{DeletedCustomDomain: deletedDomain}, nil
|
||||
}
|
||||
|
||||
func (r *Resolver) AssessVendorTool(ctx context.Context, req *mcp.CallToolRequest, input *types.AssessVendorInput) (*mcp.CallToolResult, types.AssessVendorOutput, error) {
|
||||
r.MustAuthorize(ctx, input.ID, probo.ActionVendorAssess)
|
||||
func (r *Resolver) AssessThirdPartyTool(ctx context.Context, req *mcp.CallToolRequest, input *types.AssessThirdPartyInput) (*mcp.CallToolResult, types.AssessThirdPartyOutput, error) {
|
||||
r.MustAuthorize(ctx, input.ID, probo.ActionThirdPartyAssess)
|
||||
|
||||
svc := r.ProboService(ctx, input.ID)
|
||||
|
||||
result, err := svc.Vendors.Assess(
|
||||
result, err := svc.ThirdParties.Assess(
|
||||
ctx,
|
||||
probo.AssessVendorRequest{
|
||||
probo.AssessThirdPartyRequest{
|
||||
ID: input.ID,
|
||||
WebsiteURL: input.WebsiteURL,
|
||||
Procedure: input.Procedure,
|
||||
},
|
||||
)
|
||||
if err != nil {
|
||||
return nil, types.AssessVendorOutput{}, fmt.Errorf("cannot assess vendor: %w", err)
|
||||
return nil, types.AssessThirdPartyOutput{}, fmt.Errorf("cannot assess thirdParty: %w", err)
|
||||
}
|
||||
|
||||
return nil, types.NewAssessVendorOutput(result), nil
|
||||
return nil, types.NewAssessThirdPartyOutput(result), nil
|
||||
}
|
||||
|
||||
func (r *Resolver) PublishFindingListTool(ctx context.Context, req *mcp.CallToolRequest, input *types.PublishFindingListInput) (*mcp.CallToolResult, types.PublishFindingListOutput, error) {
|
||||
@@ -4672,17 +4672,17 @@ func (r *Resolver) PublishTransferImpactAssessmentListTool(ctx context.Context,
|
||||
}, nil
|
||||
}
|
||||
|
||||
func (r *Resolver) PublishVendorListTool(ctx context.Context, req *mcp.CallToolRequest, input *types.PublishVendorListInput) (*mcp.CallToolResult, types.PublishVendorListOutput, error) {
|
||||
r.MustAuthorize(ctx, input.OrganizationID, probo.ActionVendorPublish)
|
||||
func (r *Resolver) PublishThirdPartyListTool(ctx context.Context, req *mcp.CallToolRequest, input *types.PublishThirdPartyListInput) (*mcp.CallToolResult, types.PublishThirdPartyListOutput, error) {
|
||||
r.MustAuthorize(ctx, input.OrganizationID, probo.ActionThirdPartyPublish)
|
||||
|
||||
svc := r.ProboService(ctx, input.OrganizationID)
|
||||
|
||||
document, documentVersion, err := svc.GeneratedDocuments.PublishVendorList(ctx, input.OrganizationID, input.ApproverIds, input.Minor)
|
||||
document, documentVersion, err := svc.GeneratedDocuments.PublishThirdPartyList(ctx, input.OrganizationID, input.ApproverIds, input.Minor)
|
||||
if err != nil {
|
||||
return nil, types.PublishVendorListOutput{}, fmt.Errorf("cannot publish vendor list: %w", err)
|
||||
return nil, types.PublishThirdPartyListOutput{}, fmt.Errorf("cannot publish thirdParty list: %w", err)
|
||||
}
|
||||
|
||||
return nil, types.PublishVendorListOutput{
|
||||
return nil, types.PublishThirdPartyListOutput{
|
||||
DocumentID: document.ID,
|
||||
DocumentVersionID: documentVersion.ID,
|
||||
}, nil
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -20,11 +20,11 @@ import (
|
||||
"go.probo.inc/probo/pkg/probo"
|
||||
)
|
||||
|
||||
func NewVendorRiskAssessment(v *coredata.VendorRiskAssessment) *VendorRiskAssessment {
|
||||
return &VendorRiskAssessment{
|
||||
func NewThirdPartyRiskAssessment(v *coredata.ThirdPartyRiskAssessment) *ThirdPartyRiskAssessment {
|
||||
return &ThirdPartyRiskAssessment{
|
||||
ID: v.ID,
|
||||
OrganizationID: v.OrganizationID,
|
||||
VendorID: v.VendorID,
|
||||
ThirdPartyID: v.ThirdPartyID,
|
||||
ExpiresAt: v.ExpiresAt,
|
||||
DataSensitivity: v.DataSensitivity,
|
||||
BusinessImpact: v.BusinessImpact,
|
||||
@@ -34,10 +34,10 @@ func NewVendorRiskAssessment(v *coredata.VendorRiskAssessment) *VendorRiskAssess
|
||||
}
|
||||
}
|
||||
|
||||
func NewListVendorRiskAssessmentsOutput(p *page.Page[*coredata.VendorRiskAssessment, coredata.VendorRiskAssessmentOrderField]) ListVendorRiskAssessmentsOutput {
|
||||
assessments := make([]*VendorRiskAssessment, 0, len(p.Data))
|
||||
func NewListThirdPartyRiskAssessmentsOutput(p *page.Page[*coredata.ThirdPartyRiskAssessment, coredata.ThirdPartyRiskAssessmentOrderField]) ListThirdPartyRiskAssessmentsOutput {
|
||||
assessments := make([]*ThirdPartyRiskAssessment, 0, len(p.Data))
|
||||
for _, v := range p.Data {
|
||||
assessments = append(assessments, NewVendorRiskAssessment(v))
|
||||
assessments = append(assessments, NewThirdPartyRiskAssessment(v))
|
||||
}
|
||||
|
||||
var nextCursor *page.CursorKey
|
||||
@@ -46,30 +46,30 @@ func NewListVendorRiskAssessmentsOutput(p *page.Page[*coredata.VendorRiskAssessm
|
||||
nextCursor = &cursorKey
|
||||
}
|
||||
|
||||
return ListVendorRiskAssessmentsOutput{
|
||||
NextCursor: nextCursor,
|
||||
VendorRiskAssessments: assessments,
|
||||
return ListThirdPartyRiskAssessmentsOutput{
|
||||
NextCursor: nextCursor,
|
||||
ThirdPartyRiskAssessments: assessments,
|
||||
}
|
||||
}
|
||||
|
||||
func NewAddVendorRiskAssessmentOutput(v *coredata.VendorRiskAssessment) AddVendorRiskAssessmentOutput {
|
||||
return AddVendorRiskAssessmentOutput{
|
||||
VendorRiskAssessment: NewVendorRiskAssessment(v),
|
||||
func NewAddThirdPartyRiskAssessmentOutput(v *coredata.ThirdPartyRiskAssessment) AddThirdPartyRiskAssessmentOutput {
|
||||
return AddThirdPartyRiskAssessmentOutput{
|
||||
ThirdPartyRiskAssessment: NewThirdPartyRiskAssessment(v),
|
||||
}
|
||||
}
|
||||
|
||||
func NewVendor(v *coredata.Vendor) *Vendor {
|
||||
func NewThirdParty(v *coredata.ThirdParty) *ThirdParty {
|
||||
countries := make([]string, len(v.Countries))
|
||||
for i, c := range v.Countries {
|
||||
countries[i] = string(c)
|
||||
}
|
||||
|
||||
return &Vendor{
|
||||
return &ThirdParty{
|
||||
ID: v.ID,
|
||||
OrganizationID: v.OrganizationID,
|
||||
Name: v.Name,
|
||||
Description: v.Description,
|
||||
Category: VendorCategory(v.Category),
|
||||
Category: ThirdPartyCategory(v.Category),
|
||||
HeadquarterAddress: v.HeadquarterAddress,
|
||||
LegalName: v.LegalName,
|
||||
WebsiteURL: v.WebsiteURL,
|
||||
@@ -91,37 +91,37 @@ func NewVendor(v *coredata.Vendor) *Vendor {
|
||||
}
|
||||
}
|
||||
|
||||
func NewListVendorsOutput(vendorPage *page.Page[*coredata.Vendor, coredata.VendorOrderField]) ListVendorsOutput {
|
||||
vendors := make([]*Vendor, 0, len(vendorPage.Data))
|
||||
for _, v := range vendorPage.Data {
|
||||
vendors = append(vendors, NewVendor(v))
|
||||
func NewListThirdPartiesOutput(thirdPartyPage *page.Page[*coredata.ThirdParty, coredata.ThirdPartyOrderField]) ListThirdPartiesOutput {
|
||||
thirdParties := make([]*ThirdParty, 0, len(thirdPartyPage.Data))
|
||||
for _, v := range thirdPartyPage.Data {
|
||||
thirdParties = append(thirdParties, NewThirdParty(v))
|
||||
}
|
||||
|
||||
var nextCursor *page.CursorKey
|
||||
if len(vendorPage.Data) > 0 {
|
||||
cursorKey := vendorPage.Data[len(vendorPage.Data)-1].CursorKey(vendorPage.Cursor.OrderBy.Field)
|
||||
if len(thirdPartyPage.Data) > 0 {
|
||||
cursorKey := thirdPartyPage.Data[len(thirdPartyPage.Data)-1].CursorKey(thirdPartyPage.Cursor.OrderBy.Field)
|
||||
nextCursor = &cursorKey
|
||||
}
|
||||
|
||||
return ListVendorsOutput{
|
||||
NextCursor: nextCursor,
|
||||
Vendors: vendors,
|
||||
return ListThirdPartiesOutput{
|
||||
NextCursor: nextCursor,
|
||||
ThirdParties: thirdParties,
|
||||
}
|
||||
}
|
||||
|
||||
func NewAddVendorOutput(v *coredata.Vendor) AddVendorOutput {
|
||||
return AddVendorOutput{
|
||||
Vendor: NewVendor(v),
|
||||
func NewAddThirdPartyOutput(v *coredata.ThirdParty) AddThirdPartyOutput {
|
||||
return AddThirdPartyOutput{
|
||||
ThirdParty: NewThirdParty(v),
|
||||
}
|
||||
}
|
||||
|
||||
func NewUpdateVendorOutput(v *coredata.Vendor) UpdateVendorOutput {
|
||||
return UpdateVendorOutput{
|
||||
Vendor: NewVendor(v),
|
||||
func NewUpdateThirdPartyOutput(v *coredata.ThirdParty) UpdateThirdPartyOutput {
|
||||
return UpdateThirdPartyOutput{
|
||||
ThirdParty: NewThirdParty(v),
|
||||
}
|
||||
}
|
||||
|
||||
func NewVendorContact(vc *coredata.VendorContact) *VendorContact {
|
||||
func NewThirdPartyContact(vc *coredata.ThirdPartyContact) *ThirdPartyContact {
|
||||
var fullName string
|
||||
if vc.FullName != nil {
|
||||
fullName = *vc.FullName
|
||||
@@ -142,22 +142,22 @@ func NewVendorContact(vc *coredata.VendorContact) *VendorContact {
|
||||
role = *vc.Role
|
||||
}
|
||||
|
||||
return &VendorContact{
|
||||
ID: vc.ID,
|
||||
VendorID: vc.VendorID,
|
||||
FullName: fullName,
|
||||
Email: email,
|
||||
Phone: phone,
|
||||
Role: role,
|
||||
CreatedAt: vc.CreatedAt,
|
||||
UpdatedAt: vc.UpdatedAt,
|
||||
return &ThirdPartyContact{
|
||||
ID: vc.ID,
|
||||
ThirdPartyID: vc.ThirdPartyID,
|
||||
FullName: fullName,
|
||||
Email: email,
|
||||
Phone: phone,
|
||||
Role: role,
|
||||
CreatedAt: vc.CreatedAt,
|
||||
UpdatedAt: vc.UpdatedAt,
|
||||
}
|
||||
}
|
||||
|
||||
func NewListVendorContactsOutput(p *page.Page[*coredata.VendorContact, coredata.VendorContactOrderField]) ListVendorContactsOutput {
|
||||
contacts := make([]*VendorContact, 0, len(p.Data))
|
||||
func NewListThirdPartyContactsOutput(p *page.Page[*coredata.ThirdPartyContact, coredata.ThirdPartyContactOrderField]) ListThirdPartyContactsOutput {
|
||||
contacts := make([]*ThirdPartyContact, 0, len(p.Data))
|
||||
for _, vc := range p.Data {
|
||||
contacts = append(contacts, NewVendorContact(vc))
|
||||
contacts = append(contacts, NewThirdPartyContact(vc))
|
||||
}
|
||||
|
||||
var nextCursor *page.CursorKey
|
||||
@@ -166,32 +166,32 @@ func NewListVendorContactsOutput(p *page.Page[*coredata.VendorContact, coredata.
|
||||
nextCursor = &cursorKey
|
||||
}
|
||||
|
||||
return ListVendorContactsOutput{
|
||||
NextCursor: nextCursor,
|
||||
VendorContacts: contacts,
|
||||
return ListThirdPartyContactsOutput{
|
||||
NextCursor: nextCursor,
|
||||
ThirdPartyContacts: contacts,
|
||||
}
|
||||
}
|
||||
|
||||
func NewVendorService(vs *coredata.VendorService) *VendorService {
|
||||
func NewThirdPartyService(vs *coredata.ThirdPartyService) *ThirdPartyService {
|
||||
var description string
|
||||
if vs.Description != nil {
|
||||
description = *vs.Description
|
||||
}
|
||||
|
||||
return &VendorService{
|
||||
ID: vs.ID,
|
||||
VendorID: vs.VendorID,
|
||||
Name: vs.Name,
|
||||
Description: description,
|
||||
CreatedAt: vs.CreatedAt,
|
||||
UpdatedAt: vs.UpdatedAt,
|
||||
return &ThirdPartyService{
|
||||
ID: vs.ID,
|
||||
ThirdPartyID: vs.ThirdPartyID,
|
||||
Name: vs.Name,
|
||||
Description: description,
|
||||
CreatedAt: vs.CreatedAt,
|
||||
UpdatedAt: vs.UpdatedAt,
|
||||
}
|
||||
}
|
||||
|
||||
func NewListVendorServicesOutput(p *page.Page[*coredata.VendorService, coredata.VendorServiceOrderField]) ListVendorServicesOutput {
|
||||
services := make([]*VendorService, 0, len(p.Data))
|
||||
func NewListThirdPartyServicesOutput(p *page.Page[*coredata.ThirdPartyService, coredata.ThirdPartyServiceOrderField]) ListThirdPartyServicesOutput {
|
||||
services := make([]*ThirdPartyService, 0, len(p.Data))
|
||||
for _, vs := range p.Data {
|
||||
services = append(services, NewVendorService(vs))
|
||||
services = append(services, NewThirdPartyService(vs))
|
||||
}
|
||||
|
||||
var nextCursor *page.CursorKey
|
||||
@@ -200,16 +200,16 @@ func NewListVendorServicesOutput(p *page.Page[*coredata.VendorService, coredata.
|
||||
nextCursor = &cursorKey
|
||||
}
|
||||
|
||||
return ListVendorServicesOutput{
|
||||
NextCursor: nextCursor,
|
||||
VendorServices: services,
|
||||
return ListThirdPartyServicesOutput{
|
||||
NextCursor: nextCursor,
|
||||
ThirdPartyServices: services,
|
||||
}
|
||||
}
|
||||
|
||||
func NewVendorSubprocessors(sps []probo.Subprocessor) []*VendorSubprocessor {
|
||||
result := make([]*VendorSubprocessor, len(sps))
|
||||
func NewThirdPartySubprocessors(sps []probo.Subprocessor) []*ThirdPartySubprocessor {
|
||||
result := make([]*ThirdPartySubprocessor, len(sps))
|
||||
for i, sp := range sps {
|
||||
result[i] = &VendorSubprocessor{
|
||||
result[i] = &ThirdPartySubprocessor{
|
||||
Name: sp.Name,
|
||||
Country: sp.Country,
|
||||
Purpose: sp.Purpose,
|
||||
@@ -218,10 +218,10 @@ func NewVendorSubprocessors(sps []probo.Subprocessor) []*VendorSubprocessor {
|
||||
return result
|
||||
}
|
||||
|
||||
func NewAssessVendorOutput(result *probo.AssessVendorResult) AssessVendorOutput {
|
||||
return AssessVendorOutput{
|
||||
Vendor: NewVendor(result.Vendor),
|
||||
func NewAssessThirdPartyOutput(result *probo.AssessThirdPartyResult) AssessThirdPartyOutput {
|
||||
return AssessThirdPartyOutput{
|
||||
ThirdParty: NewThirdParty(result.ThirdParty),
|
||||
Report: result.Report,
|
||||
Subprocessors: NewVendorSubprocessors(result.Subprocessors),
|
||||
Subprocessors: NewThirdPartySubprocessors(result.Subprocessors),
|
||||
}
|
||||
}
|
||||
@@ -97,13 +97,13 @@ func (r *queryResolver) Node(ctx context.Context, id gid.GID) (types.Node, error
|
||||
}
|
||||
return types.NewAudit(audit), nil
|
||||
|
||||
case coredata.VendorEntityType:
|
||||
vendor, err := trustService.Vendors.Get(ctx, id)
|
||||
case coredata.ThirdPartyEntityType:
|
||||
thirdParty, err := trustService.ThirdParties.Get(ctx, id)
|
||||
if err != nil {
|
||||
r.logger.ErrorCtx(ctx, "cannot get vendor", log.Error(err))
|
||||
r.logger.ErrorCtx(ctx, "cannot get thirdParty", log.Error(err))
|
||||
return nil, gqlutils.Internal(ctx)
|
||||
}
|
||||
return types.NewSubprocessor(vendor), nil
|
||||
return types.NewSubprocessor(thirdParty), nil
|
||||
|
||||
case coredata.TrustCenterEntityType:
|
||||
trustCenter, err := trustService.TrustCenters.Get(ctx, id)
|
||||
|
||||
@@ -163,73 +163,73 @@ type ComplianceFrameworkEdge
|
||||
}
|
||||
|
||||
enum SubprocessorCategory
|
||||
@goModel(model: "go.probo.inc/probo/pkg/coredata.VendorCategory") {
|
||||
@goModel(model: "go.probo.inc/probo/pkg/coredata.ThirdPartyCategory") {
|
||||
ANALYTICS
|
||||
@goEnum(value: "go.probo.inc/probo/pkg/coredata.VendorCategoryAnalytics")
|
||||
@goEnum(value: "go.probo.inc/probo/pkg/coredata.ThirdPartyCategoryAnalytics")
|
||||
CLOUD_MONITORING
|
||||
@goEnum(
|
||||
value: "go.probo.inc/probo/pkg/coredata.VendorCategoryCloudMonitoring"
|
||||
value: "go.probo.inc/probo/pkg/coredata.ThirdPartyCategoryCloudMonitoring"
|
||||
)
|
||||
CLOUD_PROVIDER
|
||||
@goEnum(
|
||||
value: "go.probo.inc/probo/pkg/coredata.VendorCategoryCloudProvider"
|
||||
value: "go.probo.inc/probo/pkg/coredata.ThirdPartyCategoryCloudProvider"
|
||||
)
|
||||
COLLABORATION
|
||||
@goEnum(
|
||||
value: "go.probo.inc/probo/pkg/coredata.VendorCategoryCollaboration"
|
||||
value: "go.probo.inc/probo/pkg/coredata.ThirdPartyCategoryCollaboration"
|
||||
)
|
||||
CUSTOMER_SUPPORT
|
||||
@goEnum(
|
||||
value: "go.probo.inc/probo/pkg/coredata.VendorCategoryCustomerSupport"
|
||||
value: "go.probo.inc/probo/pkg/coredata.ThirdPartyCategoryCustomerSupport"
|
||||
)
|
||||
DATA_STORAGE_AND_PROCESSING
|
||||
@goEnum(
|
||||
value: "go.probo.inc/probo/pkg/coredata.VendorCategoryDataStorageAndProcessing"
|
||||
value: "go.probo.inc/probo/pkg/coredata.ThirdPartyCategoryDataStorageAndProcessing"
|
||||
)
|
||||
DOCUMENT_MANAGEMENT
|
||||
@goEnum(
|
||||
value: "go.probo.inc/probo/pkg/coredata.VendorCategoryDocumentManagement"
|
||||
value: "go.probo.inc/probo/pkg/coredata.ThirdPartyCategoryDocumentManagement"
|
||||
)
|
||||
EMPLOYEE_MANAGEMENT
|
||||
@goEnum(
|
||||
value: "go.probo.inc/probo/pkg/coredata.VendorCategoryEmployeeManagement"
|
||||
value: "go.probo.inc/probo/pkg/coredata.ThirdPartyCategoryEmployeeManagement"
|
||||
)
|
||||
ENGINEERING
|
||||
@goEnum(value: "go.probo.inc/probo/pkg/coredata.VendorCategoryEngineering")
|
||||
@goEnum(value: "go.probo.inc/probo/pkg/coredata.ThirdPartyCategoryEngineering")
|
||||
FINANCE
|
||||
@goEnum(value: "go.probo.inc/probo/pkg/coredata.VendorCategoryFinance")
|
||||
@goEnum(value: "go.probo.inc/probo/pkg/coredata.ThirdPartyCategoryFinance")
|
||||
IDENTITY_PROVIDER
|
||||
@goEnum(
|
||||
value: "go.probo.inc/probo/pkg/coredata.VendorCategoryIdentityProvider"
|
||||
value: "go.probo.inc/probo/pkg/coredata.ThirdPartyCategoryIdentityProvider"
|
||||
)
|
||||
IT @goEnum(value: "go.probo.inc/probo/pkg/coredata.VendorCategoryIT")
|
||||
IT @goEnum(value: "go.probo.inc/probo/pkg/coredata.ThirdPartyCategoryIT")
|
||||
MARKETING
|
||||
@goEnum(value: "go.probo.inc/probo/pkg/coredata.VendorCategoryMarketing")
|
||||
@goEnum(value: "go.probo.inc/probo/pkg/coredata.ThirdPartyCategoryMarketing")
|
||||
OFFICE_OPERATIONS
|
||||
@goEnum(
|
||||
value: "go.probo.inc/probo/pkg/coredata.VendorCategoryOfficeOperations"
|
||||
value: "go.probo.inc/probo/pkg/coredata.ThirdPartyCategoryOfficeOperations"
|
||||
)
|
||||
OTHER @goEnum(value: "go.probo.inc/probo/pkg/coredata.VendorCategoryOther")
|
||||
OTHER @goEnum(value: "go.probo.inc/probo/pkg/coredata.ThirdPartyCategoryOther")
|
||||
PASSWORD_MANAGEMENT
|
||||
@goEnum(
|
||||
value: "go.probo.inc/probo/pkg/coredata.VendorCategoryPasswordManagement"
|
||||
value: "go.probo.inc/probo/pkg/coredata.ThirdPartyCategoryPasswordManagement"
|
||||
)
|
||||
PRODUCT_AND_DESIGN
|
||||
@goEnum(
|
||||
value: "go.probo.inc/probo/pkg/coredata.VendorCategoryProductAndDesign"
|
||||
value: "go.probo.inc/probo/pkg/coredata.ThirdPartyCategoryProductAndDesign"
|
||||
)
|
||||
PROFESSIONAL_SERVICES
|
||||
@goEnum(
|
||||
value: "go.probo.inc/probo/pkg/coredata.VendorCategoryProfessionalServices"
|
||||
value: "go.probo.inc/probo/pkg/coredata.ThirdPartyCategoryProfessionalServices"
|
||||
)
|
||||
RECRUITING
|
||||
@goEnum(value: "go.probo.inc/probo/pkg/coredata.VendorCategoryRecruiting")
|
||||
SALES @goEnum(value: "go.probo.inc/probo/pkg/coredata.VendorCategorySales")
|
||||
@goEnum(value: "go.probo.inc/probo/pkg/coredata.ThirdPartyCategoryRecruiting")
|
||||
SALES @goEnum(value: "go.probo.inc/probo/pkg/coredata.ThirdPartyCategorySales")
|
||||
SECURITY
|
||||
@goEnum(value: "go.probo.inc/probo/pkg/coredata.VendorCategorySecurity")
|
||||
@goEnum(value: "go.probo.inc/probo/pkg/coredata.ThirdPartyCategorySecurity")
|
||||
VERSION_CONTROL
|
||||
@goEnum(
|
||||
value: "go.probo.inc/probo/pkg/coredata.VendorCategoryVersionControl"
|
||||
value: "go.probo.inc/probo/pkg/coredata.ThirdPartyCategoryVersionControl"
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -598,7 +598,7 @@ func (r *subprocessorConnectionResolver) TotalCount(ctx context.Context, obj *ty
|
||||
|
||||
switch obj.Resolver.(type) {
|
||||
case *trustCenterResolver:
|
||||
count, err := trustService.Vendors.CountForTrustCenterId(ctx, obj.ParentID)
|
||||
count, err := trustService.ThirdParties.CountForTrustCenterId(ctx, obj.ParentID)
|
||||
if err != nil {
|
||||
r.logger.ErrorCtx(ctx, "cannot count subprocessors", log.Error(err))
|
||||
return 0, gqlutils.Internal(ctx)
|
||||
@@ -717,19 +717,19 @@ func (r *trustCenterResolver) Audits(ctx context.Context, obj *types.TrustCenter
|
||||
func (r *trustCenterResolver) Subprocessors(ctx context.Context, obj *types.TrustCenter, first *int, after *page.CursorKey, last *int, before *page.CursorKey) (*types.SubprocessorConnection, error) {
|
||||
trustService := r.TrustService(ctx, obj.ID.TenantID())
|
||||
|
||||
pageOrderBy := page.OrderBy[coredata.VendorOrderField]{
|
||||
Field: coredata.VendorOrderFieldName,
|
||||
pageOrderBy := page.OrderBy[coredata.ThirdPartyOrderField]{
|
||||
Field: coredata.ThirdPartyOrderFieldName,
|
||||
Direction: page.OrderDirectionAsc,
|
||||
}
|
||||
cursor := types.NewCursor(first, after, last, before, pageOrderBy)
|
||||
|
||||
vendorPage, err := trustService.Vendors.ListForOrganizationId(ctx, obj.Organization.ID, cursor)
|
||||
thirdPartyPage, err := trustService.ThirdParties.ListForOrganizationId(ctx, obj.Organization.ID, cursor)
|
||||
if err != nil {
|
||||
r.logger.ErrorCtx(ctx, "cannot list subprocessors", log.Error(err))
|
||||
return nil, gqlutils.Internal(ctx)
|
||||
}
|
||||
|
||||
return types.NewSubprocessorConnection(vendorPage, r, obj.ID), nil
|
||||
return types.NewSubprocessorConnection(thirdPartyPage, r, obj.ID), nil
|
||||
}
|
||||
|
||||
// References is the resolver for the references field.
|
||||
|
||||
@@ -32,13 +32,13 @@ type (
|
||||
)
|
||||
|
||||
func NewSubprocessorConnection(
|
||||
p *page.Page[*coredata.Vendor, coredata.VendorOrderField],
|
||||
p *page.Page[*coredata.ThirdParty, coredata.ThirdPartyOrderField],
|
||||
parentType any,
|
||||
parentID gid.GID,
|
||||
) *SubprocessorConnection {
|
||||
edges := make([]*SubprocessorEdge, len(p.Data))
|
||||
for i, vendor := range p.Data {
|
||||
edges[i] = NewSubprocessorEdge(vendor, p.Cursor.OrderBy.Field)
|
||||
for i, thirdParty := range p.Data {
|
||||
edges[i] = NewSubprocessorEdge(thirdParty, p.Cursor.OrderBy.Field)
|
||||
}
|
||||
|
||||
return &SubprocessorConnection{
|
||||
@@ -50,7 +50,7 @@ func NewSubprocessorConnection(
|
||||
}
|
||||
}
|
||||
|
||||
func NewSubprocessor(v *coredata.Vendor) *Subprocessor {
|
||||
func NewSubprocessor(v *coredata.ThirdParty) *Subprocessor {
|
||||
return &Subprocessor{
|
||||
ID: v.ID,
|
||||
Name: v.Name,
|
||||
@@ -62,7 +62,7 @@ func NewSubprocessor(v *coredata.Vendor) *Subprocessor {
|
||||
}
|
||||
}
|
||||
|
||||
func NewSubprocessorEdge(v *coredata.Vendor, orderField coredata.VendorOrderField) *SubprocessorEdge {
|
||||
func NewSubprocessorEdge(v *coredata.ThirdParty, orderField coredata.ThirdPartyOrderField) *SubprocessorEdge {
|
||||
return &SubprocessorEdge{
|
||||
Node: NewSubprocessor(v),
|
||||
Cursor: v.CursorKey(orderField),
|
||||
Reference in New Issue
Block a user