Enhance vendor management with extended data fields
Signed-off-by: gearnode <bryan@frimin.fr>
This commit is contained in:
12
pkg/coredata/migrations/20250410T160300Z.sql
Normal file
12
pkg/coredata/migrations/20250410T160300Z.sql
Normal file
@@ -0,0 +1,12 @@
|
||||
ALTER TABLE vendors
|
||||
ADD COLUMN service_level_agreement_url TEXT,
|
||||
ADD COLUMN data_processing_agreement_url TEXT,
|
||||
ADD COLUMN security_page_url TEXT,
|
||||
ADD COLUMN trust_page_url TEXT,
|
||||
ADD COLUMN headquarter_address TEXT,
|
||||
ADD COLUMN legal_name TEXT,
|
||||
ADD COLUMN website_url TEXT,
|
||||
ADD COLUMN category TEXT,
|
||||
ADD COLUMN certifications TEXT[];
|
||||
|
||||
|
||||
1
pkg/coredata/migrations/20250410T160700Z.sql
Normal file
1
pkg/coredata/migrations/20250410T160700Z.sql
Normal file
@@ -0,0 +1 @@
|
||||
UPDATE vendors SET category = 'Other' WHERE category IS NULL;
|
||||
1
pkg/coredata/migrations/20250410T161200Z.sql
Normal file
1
pkg/coredata/migrations/20250410T161200Z.sql
Normal file
@@ -0,0 +1 @@
|
||||
ALTER TABLE vendors ALTER COLUMN description DROP NOT NULL;
|
||||
6
pkg/coredata/migrations/20250410T162000Z.sql
Normal file
6
pkg/coredata/migrations/20250410T162000Z.sql
Normal file
@@ -0,0 +1,6 @@
|
||||
ALTER TABLE vendor_compliance_reports
|
||||
DROP CONSTRAINT vendor_compliance_reports_vendor_id_fkey,
|
||||
ADD CONSTRAINT vendor_compliance_reports_vendor_id_fkey
|
||||
FOREIGN KEY (vendor_id)
|
||||
REFERENCES vendors(id)
|
||||
ON DELETE CASCADE;
|
||||
@@ -31,19 +31,28 @@ var ErrConcurrentModification = errors.New("concurrent modification")
|
||||
|
||||
type (
|
||||
Vendor struct {
|
||||
ID gid.GID `db:"id"`
|
||||
OrganizationID gid.GID `db:"organization_id"`
|
||||
Name string `db:"name"`
|
||||
Description string `db:"description"`
|
||||
ServiceStartAt time.Time `db:"service_start_at"`
|
||||
ServiceTerminationAt *time.Time `db:"service_termination_at"`
|
||||
ServiceCriticality ServiceCriticality `db:"service_criticality"`
|
||||
RiskTier RiskTier `db:"risk_tier"`
|
||||
StatusPageURL *string `db:"status_page_url"`
|
||||
TermsOfServiceURL *string `db:"terms_of_service_url"`
|
||||
PrivacyPolicyURL *string `db:"privacy_policy_url"`
|
||||
CreatedAt time.Time `db:"created_at"`
|
||||
UpdatedAt time.Time `db:"updated_at"`
|
||||
ID gid.GID `db:"id"`
|
||||
OrganizationID gid.GID `db:"organization_id"`
|
||||
Name string `db:"name"`
|
||||
Description *string `db:"description"`
|
||||
Category string `db:"category"`
|
||||
ServiceStartAt time.Time `db:"service_start_at"`
|
||||
ServiceTerminationAt *time.Time `db:"service_termination_at"`
|
||||
HeadquarterAddress *string `db:"headquarter_address"`
|
||||
LegalName *string `db:"legal_name"`
|
||||
WebsiteURL *string `db:"website_url"`
|
||||
PrivacyPolicyURL *string `db:"privacy_policy_url"`
|
||||
ServiceLevelAgreementURL *string `db:"service_level_agreement_url"`
|
||||
DataProcessingAgreementURL *string `db:"data_processing_agreement_url"`
|
||||
Certifications []string `db:"certifications"`
|
||||
ServiceCriticality ServiceCriticality `db:"service_criticality"`
|
||||
RiskTier RiskTier `db:"risk_tier"`
|
||||
StatusPageURL *string `db:"status_page_url"`
|
||||
TermsOfServiceURL *string `db:"terms_of_service_url"`
|
||||
SecurityPageURL *string `db:"security_page_url"`
|
||||
TrustPageURL *string `db:"trust_page_url"`
|
||||
CreatedAt time.Time `db:"created_at"`
|
||||
UpdatedAt time.Time `db:"updated_at"`
|
||||
}
|
||||
|
||||
Vendors []*Vendor
|
||||
@@ -72,13 +81,22 @@ SELECT
|
||||
organization_id,
|
||||
name,
|
||||
description,
|
||||
category,
|
||||
headquarter_address,
|
||||
legal_name,
|
||||
website_url,
|
||||
service_start_at,
|
||||
service_termination_at,
|
||||
privacy_policy_url,
|
||||
service_level_agreement_url,
|
||||
data_processing_agreement_url,
|
||||
certifications,
|
||||
service_criticality,
|
||||
risk_tier,
|
||||
status_page_url,
|
||||
terms_of_service_url,
|
||||
privacy_policy_url,
|
||||
security_page_url,
|
||||
trust_page_url,
|
||||
created_at,
|
||||
updated_at
|
||||
FROM
|
||||
@@ -123,13 +141,22 @@ INSERT INTO
|
||||
organization_id,
|
||||
name,
|
||||
description,
|
||||
category,
|
||||
headquarter_address,
|
||||
legal_name,
|
||||
website_url,
|
||||
privacy_policy_url,
|
||||
service_level_agreement_url,
|
||||
data_processing_agreement_url,
|
||||
certifications,
|
||||
service_start_at,
|
||||
service_termination_at,
|
||||
service_criticality,
|
||||
risk_tier,
|
||||
status_page_url,
|
||||
terms_of_service_url,
|
||||
privacy_policy_url,
|
||||
security_page_url,
|
||||
trust_page_url,
|
||||
created_at,
|
||||
updated_at
|
||||
)
|
||||
@@ -139,33 +166,51 @@ VALUES (
|
||||
@organization_id,
|
||||
@name,
|
||||
@description,
|
||||
@category,
|
||||
@headquarter_address,
|
||||
@legal_name,
|
||||
@website_url,
|
||||
@privacy_policy_url,
|
||||
@service_level_agreement_url,
|
||||
@data_processing_agreement_url,
|
||||
@certifications,
|
||||
@service_start_at,
|
||||
@service_termination_at,
|
||||
@service_criticality,
|
||||
@risk_tier,
|
||||
@status_page_url,
|
||||
@terms_of_service_url,
|
||||
@privacy_policy_url,
|
||||
@security_page_url,
|
||||
@trust_page_url,
|
||||
@created_at,
|
||||
@updated_at
|
||||
)
|
||||
`
|
||||
|
||||
args := pgx.StrictNamedArgs{
|
||||
"tenant_id": scope.GetTenantID(),
|
||||
"vendor_id": v.ID,
|
||||
"organization_id": v.OrganizationID,
|
||||
"name": v.Name,
|
||||
"description": v.Description,
|
||||
"service_start_at": v.ServiceStartAt,
|
||||
"service_termination_at": v.ServiceTerminationAt,
|
||||
"service_criticality": v.ServiceCriticality,
|
||||
"risk_tier": v.RiskTier,
|
||||
"status_page_url": v.StatusPageURL,
|
||||
"terms_of_service_url": v.TermsOfServiceURL,
|
||||
"privacy_policy_url": v.PrivacyPolicyURL,
|
||||
"created_at": v.CreatedAt,
|
||||
"updated_at": v.UpdatedAt,
|
||||
"tenant_id": scope.GetTenantID(),
|
||||
"vendor_id": v.ID,
|
||||
"organization_id": v.OrganizationID,
|
||||
"name": v.Name,
|
||||
"description": v.Description,
|
||||
"category": v.Category,
|
||||
"headquarter_address": v.HeadquarterAddress,
|
||||
"legal_name": v.LegalName,
|
||||
"website_url": v.WebsiteURL,
|
||||
"privacy_policy_url": v.PrivacyPolicyURL,
|
||||
"service_level_agreement_url": v.ServiceLevelAgreementURL,
|
||||
"data_processing_agreement_url": v.DataProcessingAgreementURL,
|
||||
"certifications": v.Certifications,
|
||||
"service_start_at": v.ServiceStartAt,
|
||||
"service_termination_at": v.ServiceTerminationAt,
|
||||
"service_criticality": v.ServiceCriticality,
|
||||
"risk_tier": v.RiskTier,
|
||||
"status_page_url": v.StatusPageURL,
|
||||
"terms_of_service_url": v.TermsOfServiceURL,
|
||||
"security_page_url": v.SecurityPageURL,
|
||||
"trust_page_url": v.TrustPageURL,
|
||||
"created_at": v.CreatedAt,
|
||||
"updated_at": v.UpdatedAt,
|
||||
}
|
||||
_, err := conn.Exec(ctx, q, args)
|
||||
return err
|
||||
@@ -202,13 +247,22 @@ SELECT
|
||||
organization_id,
|
||||
name,
|
||||
description,
|
||||
category,
|
||||
headquarter_address,
|
||||
legal_name,
|
||||
website_url,
|
||||
privacy_policy_url,
|
||||
service_level_agreement_url,
|
||||
data_processing_agreement_url,
|
||||
certifications,
|
||||
service_start_at,
|
||||
service_termination_at,
|
||||
service_criticality,
|
||||
risk_tier,
|
||||
status_page_url,
|
||||
terms_of_service_url,
|
||||
privacy_policy_url,
|
||||
security_page_url,
|
||||
trust_page_url,
|
||||
created_at,
|
||||
updated_at
|
||||
FROM
|
||||
@@ -253,9 +307,18 @@ SET
|
||||
service_termination_at = @service_termination_at,
|
||||
service_criticality = @service_criticality,
|
||||
risk_tier = @risk_tier,
|
||||
category = @category,
|
||||
headquarter_address = @headquarter_address,
|
||||
legal_name = @legal_name,
|
||||
website_url = @website_url,
|
||||
privacy_policy_url = @privacy_policy_url,
|
||||
service_level_agreement_url = @service_level_agreement_url,
|
||||
data_processing_agreement_url = @data_processing_agreement_url,
|
||||
certifications = @certifications,
|
||||
status_page_url = @status_page_url,
|
||||
terms_of_service_url = @terms_of_service_url,
|
||||
privacy_policy_url = @privacy_policy_url,
|
||||
security_page_url = @security_page_url,
|
||||
trust_page_url = @trust_page_url,
|
||||
updated_at = @updated_at
|
||||
WHERE %s
|
||||
AND id = @vendor_id
|
||||
@@ -263,17 +326,26 @@ WHERE %s
|
||||
q = fmt.Sprintf(q, scope.SQLFragment())
|
||||
|
||||
args := pgx.StrictNamedArgs{
|
||||
"vendor_id": v.ID,
|
||||
"updated_at": time.Now(),
|
||||
"name": v.Name,
|
||||
"description": v.Description,
|
||||
"service_start_at": v.ServiceStartAt,
|
||||
"service_termination_at": v.ServiceTerminationAt,
|
||||
"service_criticality": v.ServiceCriticality,
|
||||
"risk_tier": v.RiskTier,
|
||||
"status_page_url": v.StatusPageURL,
|
||||
"terms_of_service_url": v.TermsOfServiceURL,
|
||||
"privacy_policy_url": v.PrivacyPolicyURL,
|
||||
"vendor_id": v.ID,
|
||||
"updated_at": time.Now(),
|
||||
"name": v.Name,
|
||||
"description": v.Description,
|
||||
"service_start_at": v.ServiceStartAt,
|
||||
"service_termination_at": v.ServiceTerminationAt,
|
||||
"service_criticality": v.ServiceCriticality,
|
||||
"risk_tier": v.RiskTier,
|
||||
"category": v.Category,
|
||||
"headquarter_address": v.HeadquarterAddress,
|
||||
"legal_name": v.LegalName,
|
||||
"website_url": v.WebsiteURL,
|
||||
"privacy_policy_url": v.PrivacyPolicyURL,
|
||||
"service_level_agreement_url": v.ServiceLevelAgreementURL,
|
||||
"data_processing_agreement_url": v.DataProcessingAgreementURL,
|
||||
"certifications": v.Certifications,
|
||||
"status_page_url": v.StatusPageURL,
|
||||
"terms_of_service_url": v.TermsOfServiceURL,
|
||||
"security_page_url": v.SecurityPageURL,
|
||||
"trust_page_url": v.TrustPageURL,
|
||||
}
|
||||
|
||||
maps.Copy(args, scope.SQLArguments())
|
||||
|
||||
@@ -31,30 +31,47 @@ type (
|
||||
}
|
||||
|
||||
CreateVendorRequest struct {
|
||||
OrganizationID gid.GID
|
||||
Name string
|
||||
Description string
|
||||
ServiceStartAt time.Time
|
||||
ServiceTerminationAt *time.Time
|
||||
ServiceCriticality coredata.ServiceCriticality
|
||||
RiskTier coredata.RiskTier
|
||||
StatusPageURL *string
|
||||
TermsOfServiceURL *string
|
||||
PrivacyPolicyURL *string
|
||||
OrganizationID gid.GID
|
||||
Name string
|
||||
Description *string
|
||||
HeadquarterAddress *string
|
||||
LegalName *string
|
||||
WebsiteURL *string
|
||||
Category *string
|
||||
PrivacyPolicyURL *string
|
||||
ServiceLevelAgreementURL *string
|
||||
DataProcessingAgreementURL *string
|
||||
Certifications []string
|
||||
SecurityPageURL *string
|
||||
TrustPageURL *string
|
||||
TermsOfServiceURL *string
|
||||
StatusPageURL *string
|
||||
ServiceStartAt time.Time
|
||||
ServiceTerminationAt *time.Time
|
||||
ServiceCriticality coredata.ServiceCriticality
|
||||
RiskTier coredata.RiskTier
|
||||
}
|
||||
|
||||
UpdateVendorRequest struct {
|
||||
ID gid.GID
|
||||
ExpectedVersion int
|
||||
Name *string
|
||||
Description *string
|
||||
ServiceStartAt *time.Time
|
||||
ServiceTerminationAt *time.Time
|
||||
ServiceCriticality *coredata.ServiceCriticality
|
||||
RiskTier *coredata.RiskTier
|
||||
StatusPageURL *string
|
||||
TermsOfServiceURL *string
|
||||
PrivacyPolicyURL *string
|
||||
ID gid.GID
|
||||
Name *string
|
||||
Description *string
|
||||
HeadquarterAddress *string
|
||||
LegalName *string
|
||||
WebsiteURL *string
|
||||
TermsOfServiceURL *string
|
||||
Category *string
|
||||
PrivacyPolicyURL *string
|
||||
ServiceLevelAgreementURL *string
|
||||
DataProcessingAgreementURL *string
|
||||
Certifications []string
|
||||
SecurityPageURL *string
|
||||
TrustPageURL *string
|
||||
StatusPageURL *string
|
||||
ServiceStartAt *time.Time
|
||||
ServiceTerminationAt *time.Time
|
||||
ServiceCriticality *coredata.ServiceCriticality
|
||||
RiskTier *coredata.RiskTier
|
||||
}
|
||||
)
|
||||
|
||||
@@ -103,7 +120,7 @@ func (s VendorService) Update(
|
||||
}
|
||||
|
||||
if req.Description != nil {
|
||||
vendor.Description = *req.Description
|
||||
vendor.Description = req.Description
|
||||
}
|
||||
|
||||
if req.ServiceStartAt != nil {
|
||||
@@ -134,6 +151,60 @@ func (s VendorService) Update(
|
||||
vendor.PrivacyPolicyURL = req.PrivacyPolicyURL
|
||||
}
|
||||
|
||||
if req.ServiceLevelAgreementURL != nil {
|
||||
vendor.ServiceLevelAgreementURL = req.ServiceLevelAgreementURL
|
||||
}
|
||||
|
||||
if req.DataProcessingAgreementURL != nil {
|
||||
vendor.DataProcessingAgreementURL = req.DataProcessingAgreementURL
|
||||
}
|
||||
|
||||
if req.Category != nil {
|
||||
vendor.Category = *req.Category
|
||||
}
|
||||
|
||||
if req.SecurityPageURL != nil {
|
||||
vendor.SecurityPageURL = req.SecurityPageURL
|
||||
}
|
||||
|
||||
if req.TrustPageURL != nil {
|
||||
vendor.TrustPageURL = req.TrustPageURL
|
||||
}
|
||||
|
||||
if req.HeadquarterAddress != nil {
|
||||
vendor.HeadquarterAddress = req.HeadquarterAddress
|
||||
}
|
||||
|
||||
if req.LegalName != nil {
|
||||
vendor.LegalName = req.LegalName
|
||||
}
|
||||
|
||||
if req.WebsiteURL != nil {
|
||||
vendor.WebsiteURL = req.WebsiteURL
|
||||
}
|
||||
|
||||
if req.TermsOfServiceURL != nil {
|
||||
vendor.TermsOfServiceURL = req.TermsOfServiceURL
|
||||
}
|
||||
|
||||
if req.Certifications != nil {
|
||||
vendor.Certifications = req.Certifications
|
||||
}
|
||||
|
||||
if req.StatusPageURL != nil {
|
||||
vendor.StatusPageURL = req.StatusPageURL
|
||||
}
|
||||
|
||||
if req.SecurityPageURL != nil {
|
||||
vendor.SecurityPageURL = req.SecurityPageURL
|
||||
}
|
||||
|
||||
if req.TrustPageURL != nil {
|
||||
vendor.TrustPageURL = req.TrustPageURL
|
||||
}
|
||||
|
||||
vendor.UpdatedAt = time.Now()
|
||||
|
||||
if err := vendor.Update(ctx, conn, s.svc.scope); err != nil {
|
||||
return fmt.Errorf("cannot update vendor: %w", err)
|
||||
}
|
||||
@@ -194,19 +265,33 @@ func (s VendorService) Create(
|
||||
|
||||
organization := &coredata.Organization{}
|
||||
vendor := &coredata.Vendor{
|
||||
ID: vendorID,
|
||||
OrganizationID: req.OrganizationID,
|
||||
Name: req.Name,
|
||||
CreatedAt: now,
|
||||
UpdatedAt: now,
|
||||
Description: req.Description,
|
||||
ServiceStartAt: req.ServiceStartAt,
|
||||
ServiceTerminationAt: req.ServiceTerminationAt,
|
||||
ServiceCriticality: req.ServiceCriticality,
|
||||
RiskTier: req.RiskTier,
|
||||
StatusPageURL: req.StatusPageURL,
|
||||
TermsOfServiceURL: req.TermsOfServiceURL,
|
||||
PrivacyPolicyURL: req.PrivacyPolicyURL,
|
||||
ID: vendorID,
|
||||
OrganizationID: req.OrganizationID,
|
||||
Name: req.Name,
|
||||
CreatedAt: now,
|
||||
UpdatedAt: now,
|
||||
Description: req.Description,
|
||||
ServiceStartAt: req.ServiceStartAt,
|
||||
ServiceTerminationAt: req.ServiceTerminationAt,
|
||||
HeadquarterAddress: req.HeadquarterAddress,
|
||||
LegalName: req.LegalName,
|
||||
WebsiteURL: req.WebsiteURL,
|
||||
PrivacyPolicyURL: req.PrivacyPolicyURL,
|
||||
ServiceLevelAgreementURL: req.ServiceLevelAgreementURL,
|
||||
DataProcessingAgreementURL: req.DataProcessingAgreementURL,
|
||||
Certifications: req.Certifications,
|
||||
SecurityPageURL: req.SecurityPageURL,
|
||||
TrustPageURL: req.TrustPageURL,
|
||||
StatusPageURL: req.StatusPageURL,
|
||||
TermsOfServiceURL: req.TermsOfServiceURL,
|
||||
ServiceCriticality: req.ServiceCriticality,
|
||||
RiskTier: req.RiskTier,
|
||||
}
|
||||
|
||||
if req.Category != nil {
|
||||
vendor.Category = *req.Category
|
||||
} else {
|
||||
vendor.Category = "Other"
|
||||
}
|
||||
|
||||
err = s.svc.pg.WithTx(
|
||||
|
||||
@@ -427,7 +427,7 @@ type People implements Node {
|
||||
type Vendor implements Node {
|
||||
id: ID!
|
||||
name: String!
|
||||
description: String!
|
||||
description: String
|
||||
|
||||
complianceReports(
|
||||
first: Int
|
||||
@@ -444,6 +444,14 @@ type Vendor implements Node {
|
||||
statusPageUrl: String
|
||||
termsOfServiceUrl: String
|
||||
privacyPolicyUrl: String
|
||||
serviceLevelAgreementUrl: String
|
||||
dataProcessingAgreementUrl: String
|
||||
certifications: [String!]!
|
||||
securityPageUrl: String
|
||||
trustPageUrl: String
|
||||
headquarterAddress: String
|
||||
legalName: String
|
||||
websiteUrl: String
|
||||
createdAt: Datetime!
|
||||
updatedAt: Datetime!
|
||||
}
|
||||
@@ -864,14 +872,23 @@ input DeleteOrganizationInput {
|
||||
input CreateVendorInput {
|
||||
organizationId: ID!
|
||||
name: String!
|
||||
description: String!
|
||||
description: String
|
||||
headquarterAddress: String
|
||||
legalName: String
|
||||
websiteUrl: String
|
||||
privacyPolicyUrl: String
|
||||
category: String
|
||||
serviceLevelAgreementUrl: String
|
||||
dataProcessingAgreementUrl: String
|
||||
certifications: [String!]
|
||||
securityPageUrl: String
|
||||
trustPageUrl: String
|
||||
statusPageUrl: String
|
||||
termsOfServiceUrl: String
|
||||
serviceStartAt: Datetime!
|
||||
serviceTerminationAt: Datetime
|
||||
serviceCriticality: ServiceCriticality!
|
||||
riskTier: RiskTier!
|
||||
statusPageUrl: String
|
||||
termsOfServiceUrl: String
|
||||
privacyPolicyUrl: String
|
||||
}
|
||||
|
||||
input UpdateVendorInput {
|
||||
@@ -885,6 +902,15 @@ input UpdateVendorInput {
|
||||
statusPageUrl: String
|
||||
termsOfServiceUrl: String
|
||||
privacyPolicyUrl: String
|
||||
serviceLevelAgreementUrl: String
|
||||
dataProcessingAgreementUrl: String
|
||||
websiteUrl: String
|
||||
legalName: String
|
||||
headquarterAddress: String
|
||||
category: String
|
||||
certifications: [String!]
|
||||
securityPageUrl: String
|
||||
trustPageUrl: String
|
||||
}
|
||||
|
||||
input DeleteVendorInput {
|
||||
|
||||
@@ -508,19 +508,27 @@ type ComplexityRoot struct {
|
||||
}
|
||||
|
||||
Vendor struct {
|
||||
ComplianceReports func(childComplexity int, first *int, after *page.CursorKey, last *int, before *page.CursorKey, orderBy *types.VendorComplianceReportOrderBy) int
|
||||
CreatedAt func(childComplexity int) int
|
||||
Description func(childComplexity int) int
|
||||
ID func(childComplexity int) int
|
||||
Name func(childComplexity int) int
|
||||
PrivacyPolicyURL func(childComplexity int) int
|
||||
RiskTier func(childComplexity int) int
|
||||
ServiceCriticality func(childComplexity int) int
|
||||
ServiceStartAt func(childComplexity int) int
|
||||
ServiceTerminationAt func(childComplexity int) int
|
||||
StatusPageURL func(childComplexity int) int
|
||||
TermsOfServiceURL func(childComplexity int) int
|
||||
UpdatedAt func(childComplexity int) int
|
||||
Certifications func(childComplexity int) int
|
||||
ComplianceReports func(childComplexity int, first *int, after *page.CursorKey, last *int, before *page.CursorKey, orderBy *types.VendorComplianceReportOrderBy) int
|
||||
CreatedAt func(childComplexity int) int
|
||||
DataProcessingAgreementURL func(childComplexity int) int
|
||||
Description func(childComplexity int) int
|
||||
HeadquarterAddress func(childComplexity int) int
|
||||
ID func(childComplexity int) int
|
||||
LegalName func(childComplexity int) int
|
||||
Name func(childComplexity int) int
|
||||
PrivacyPolicyURL func(childComplexity int) int
|
||||
RiskTier func(childComplexity int) int
|
||||
SecurityPageURL func(childComplexity int) int
|
||||
ServiceCriticality func(childComplexity int) int
|
||||
ServiceLevelAgreementURL func(childComplexity int) int
|
||||
ServiceStartAt func(childComplexity int) int
|
||||
ServiceTerminationAt func(childComplexity int) int
|
||||
StatusPageURL func(childComplexity int) int
|
||||
TermsOfServiceURL func(childComplexity int) int
|
||||
TrustPageURL func(childComplexity int) int
|
||||
UpdatedAt func(childComplexity int) int
|
||||
WebsiteURL func(childComplexity int) int
|
||||
}
|
||||
|
||||
VendorComplianceReport struct {
|
||||
@@ -2498,6 +2506,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
|
||||
|
||||
return e.complexity.UserEdge.Node(childComplexity), true
|
||||
|
||||
case "Vendor.certifications":
|
||||
if e.complexity.Vendor.Certifications == nil {
|
||||
break
|
||||
}
|
||||
|
||||
return e.complexity.Vendor.Certifications(childComplexity), true
|
||||
|
||||
case "Vendor.complianceReports":
|
||||
if e.complexity.Vendor.ComplianceReports == nil {
|
||||
break
|
||||
@@ -2517,6 +2532,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
|
||||
|
||||
return e.complexity.Vendor.CreatedAt(childComplexity), true
|
||||
|
||||
case "Vendor.dataProcessingAgreementUrl":
|
||||
if e.complexity.Vendor.DataProcessingAgreementURL == nil {
|
||||
break
|
||||
}
|
||||
|
||||
return e.complexity.Vendor.DataProcessingAgreementURL(childComplexity), true
|
||||
|
||||
case "Vendor.description":
|
||||
if e.complexity.Vendor.Description == nil {
|
||||
break
|
||||
@@ -2524,6 +2546,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
|
||||
|
||||
return e.complexity.Vendor.Description(childComplexity), true
|
||||
|
||||
case "Vendor.headquarterAddress":
|
||||
if e.complexity.Vendor.HeadquarterAddress == nil {
|
||||
break
|
||||
}
|
||||
|
||||
return e.complexity.Vendor.HeadquarterAddress(childComplexity), true
|
||||
|
||||
case "Vendor.id":
|
||||
if e.complexity.Vendor.ID == nil {
|
||||
break
|
||||
@@ -2531,6 +2560,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
|
||||
|
||||
return e.complexity.Vendor.ID(childComplexity), true
|
||||
|
||||
case "Vendor.legalName":
|
||||
if e.complexity.Vendor.LegalName == nil {
|
||||
break
|
||||
}
|
||||
|
||||
return e.complexity.Vendor.LegalName(childComplexity), true
|
||||
|
||||
case "Vendor.name":
|
||||
if e.complexity.Vendor.Name == nil {
|
||||
break
|
||||
@@ -2552,6 +2588,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
|
||||
|
||||
return e.complexity.Vendor.RiskTier(childComplexity), true
|
||||
|
||||
case "Vendor.securityPageUrl":
|
||||
if e.complexity.Vendor.SecurityPageURL == nil {
|
||||
break
|
||||
}
|
||||
|
||||
return e.complexity.Vendor.SecurityPageURL(childComplexity), true
|
||||
|
||||
case "Vendor.serviceCriticality":
|
||||
if e.complexity.Vendor.ServiceCriticality == nil {
|
||||
break
|
||||
@@ -2559,6 +2602,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
|
||||
|
||||
return e.complexity.Vendor.ServiceCriticality(childComplexity), true
|
||||
|
||||
case "Vendor.serviceLevelAgreementUrl":
|
||||
if e.complexity.Vendor.ServiceLevelAgreementURL == nil {
|
||||
break
|
||||
}
|
||||
|
||||
return e.complexity.Vendor.ServiceLevelAgreementURL(childComplexity), true
|
||||
|
||||
case "Vendor.serviceStartAt":
|
||||
if e.complexity.Vendor.ServiceStartAt == nil {
|
||||
break
|
||||
@@ -2587,6 +2637,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
|
||||
|
||||
return e.complexity.Vendor.TermsOfServiceURL(childComplexity), true
|
||||
|
||||
case "Vendor.trustPageUrl":
|
||||
if e.complexity.Vendor.TrustPageURL == nil {
|
||||
break
|
||||
}
|
||||
|
||||
return e.complexity.Vendor.TrustPageURL(childComplexity), true
|
||||
|
||||
case "Vendor.updatedAt":
|
||||
if e.complexity.Vendor.UpdatedAt == nil {
|
||||
break
|
||||
@@ -2594,6 +2651,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
|
||||
|
||||
return e.complexity.Vendor.UpdatedAt(childComplexity), true
|
||||
|
||||
case "Vendor.websiteUrl":
|
||||
if e.complexity.Vendor.WebsiteURL == nil {
|
||||
break
|
||||
}
|
||||
|
||||
return e.complexity.Vendor.WebsiteURL(childComplexity), true
|
||||
|
||||
case "VendorComplianceReport.createdAt":
|
||||
if e.complexity.VendorComplianceReport.CreatedAt == nil {
|
||||
break
|
||||
@@ -3327,7 +3391,7 @@ type People implements Node {
|
||||
type Vendor implements Node {
|
||||
id: ID!
|
||||
name: String!
|
||||
description: String!
|
||||
description: String
|
||||
|
||||
complianceReports(
|
||||
first: Int
|
||||
@@ -3344,6 +3408,14 @@ type Vendor implements Node {
|
||||
statusPageUrl: String
|
||||
termsOfServiceUrl: String
|
||||
privacyPolicyUrl: String
|
||||
serviceLevelAgreementUrl: String
|
||||
dataProcessingAgreementUrl: String
|
||||
certifications: [String!]!
|
||||
securityPageUrl: String
|
||||
trustPageUrl: String
|
||||
headquarterAddress: String
|
||||
legalName: String
|
||||
websiteUrl: String
|
||||
createdAt: Datetime!
|
||||
updatedAt: Datetime!
|
||||
}
|
||||
@@ -3764,14 +3836,23 @@ input DeleteOrganizationInput {
|
||||
input CreateVendorInput {
|
||||
organizationId: ID!
|
||||
name: String!
|
||||
description: String!
|
||||
description: String
|
||||
headquarterAddress: String
|
||||
legalName: String
|
||||
websiteUrl: String
|
||||
privacyPolicyUrl: String
|
||||
category: String
|
||||
serviceLevelAgreementUrl: String
|
||||
dataProcessingAgreementUrl: String
|
||||
certifications: [String!]
|
||||
securityPageUrl: String
|
||||
trustPageUrl: String
|
||||
statusPageUrl: String
|
||||
termsOfServiceUrl: String
|
||||
serviceStartAt: Datetime!
|
||||
serviceTerminationAt: Datetime
|
||||
serviceCriticality: ServiceCriticality!
|
||||
riskTier: RiskTier!
|
||||
statusPageUrl: String
|
||||
termsOfServiceUrl: String
|
||||
privacyPolicyUrl: String
|
||||
}
|
||||
|
||||
input UpdateVendorInput {
|
||||
@@ -3785,6 +3866,15 @@ input UpdateVendorInput {
|
||||
statusPageUrl: String
|
||||
termsOfServiceUrl: String
|
||||
privacyPolicyUrl: String
|
||||
serviceLevelAgreementUrl: String
|
||||
dataProcessingAgreementUrl: String
|
||||
websiteUrl: String
|
||||
legalName: String
|
||||
headquarterAddress: String
|
||||
category: String
|
||||
certifications: [String!]
|
||||
securityPageUrl: String
|
||||
trustPageUrl: String
|
||||
}
|
||||
|
||||
input DeleteVendorInput {
|
||||
@@ -17818,6 +17908,22 @@ func (ec *executionContext) fieldContext_UpdateVendorPayload_vendor(_ context.Co
|
||||
return ec.fieldContext_Vendor_termsOfServiceUrl(ctx, field)
|
||||
case "privacyPolicyUrl":
|
||||
return ec.fieldContext_Vendor_privacyPolicyUrl(ctx, field)
|
||||
case "serviceLevelAgreementUrl":
|
||||
return ec.fieldContext_Vendor_serviceLevelAgreementUrl(ctx, field)
|
||||
case "dataProcessingAgreementUrl":
|
||||
return ec.fieldContext_Vendor_dataProcessingAgreementUrl(ctx, field)
|
||||
case "certifications":
|
||||
return ec.fieldContext_Vendor_certifications(ctx, field)
|
||||
case "securityPageUrl":
|
||||
return ec.fieldContext_Vendor_securityPageUrl(ctx, field)
|
||||
case "trustPageUrl":
|
||||
return ec.fieldContext_Vendor_trustPageUrl(ctx, field)
|
||||
case "headquarterAddress":
|
||||
return ec.fieldContext_Vendor_headquarterAddress(ctx, field)
|
||||
case "legalName":
|
||||
return ec.fieldContext_Vendor_legalName(ctx, field)
|
||||
case "websiteUrl":
|
||||
return ec.fieldContext_Vendor_websiteUrl(ctx, field)
|
||||
case "createdAt":
|
||||
return ec.fieldContext_Vendor_createdAt(ctx, field)
|
||||
case "updatedAt":
|
||||
@@ -18412,14 +18518,11 @@ func (ec *executionContext) _Vendor_description(ctx context.Context, field graph
|
||||
return graphql.Null
|
||||
}
|
||||
if resTmp == nil {
|
||||
if !graphql.HasFieldError(ctx, fc) {
|
||||
ec.Errorf(ctx, "must not be null")
|
||||
}
|
||||
return graphql.Null
|
||||
}
|
||||
res := resTmp.(string)
|
||||
res := resTmp.(*string)
|
||||
fc.Result = res
|
||||
return ec.marshalNString2string(ctx, field.Selections, res)
|
||||
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
|
||||
}
|
||||
|
||||
func (ec *executionContext) fieldContext_Vendor_description(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
||||
@@ -18792,6 +18895,337 @@ func (ec *executionContext) fieldContext_Vendor_privacyPolicyUrl(_ context.Conte
|
||||
return fc, nil
|
||||
}
|
||||
|
||||
func (ec *executionContext) _Vendor_serviceLevelAgreementUrl(ctx context.Context, field graphql.CollectedField, obj *types.Vendor) (ret graphql.Marshaler) {
|
||||
fc, err := ec.fieldContext_Vendor_serviceLevelAgreementUrl(ctx, field)
|
||||
if err != nil {
|
||||
return graphql.Null
|
||||
}
|
||||
ctx = graphql.WithFieldContext(ctx, fc)
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
ec.Error(ctx, ec.Recover(ctx, r))
|
||||
ret = graphql.Null
|
||||
}
|
||||
}()
|
||||
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
|
||||
ctx = rctx // use context from middleware stack in children
|
||||
return obj.ServiceLevelAgreementURL, nil
|
||||
})
|
||||
if err != nil {
|
||||
ec.Error(ctx, err)
|
||||
return graphql.Null
|
||||
}
|
||||
if resTmp == nil {
|
||||
return graphql.Null
|
||||
}
|
||||
res := resTmp.(*string)
|
||||
fc.Result = res
|
||||
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
|
||||
}
|
||||
|
||||
func (ec *executionContext) fieldContext_Vendor_serviceLevelAgreementUrl(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
||||
fc = &graphql.FieldContext{
|
||||
Object: "Vendor",
|
||||
Field: field,
|
||||
IsMethod: false,
|
||||
IsResolver: false,
|
||||
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
||||
return nil, errors.New("field of type String does not have child fields")
|
||||
},
|
||||
}
|
||||
return fc, nil
|
||||
}
|
||||
|
||||
func (ec *executionContext) _Vendor_dataProcessingAgreementUrl(ctx context.Context, field graphql.CollectedField, obj *types.Vendor) (ret graphql.Marshaler) {
|
||||
fc, err := ec.fieldContext_Vendor_dataProcessingAgreementUrl(ctx, field)
|
||||
if err != nil {
|
||||
return graphql.Null
|
||||
}
|
||||
ctx = graphql.WithFieldContext(ctx, fc)
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
ec.Error(ctx, ec.Recover(ctx, r))
|
||||
ret = graphql.Null
|
||||
}
|
||||
}()
|
||||
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
|
||||
ctx = rctx // use context from middleware stack in children
|
||||
return obj.DataProcessingAgreementURL, nil
|
||||
})
|
||||
if err != nil {
|
||||
ec.Error(ctx, err)
|
||||
return graphql.Null
|
||||
}
|
||||
if resTmp == nil {
|
||||
return graphql.Null
|
||||
}
|
||||
res := resTmp.(*string)
|
||||
fc.Result = res
|
||||
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
|
||||
}
|
||||
|
||||
func (ec *executionContext) fieldContext_Vendor_dataProcessingAgreementUrl(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
||||
fc = &graphql.FieldContext{
|
||||
Object: "Vendor",
|
||||
Field: field,
|
||||
IsMethod: false,
|
||||
IsResolver: false,
|
||||
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
||||
return nil, errors.New("field of type String does not have child fields")
|
||||
},
|
||||
}
|
||||
return fc, nil
|
||||
}
|
||||
|
||||
func (ec *executionContext) _Vendor_certifications(ctx context.Context, field graphql.CollectedField, obj *types.Vendor) (ret graphql.Marshaler) {
|
||||
fc, err := ec.fieldContext_Vendor_certifications(ctx, field)
|
||||
if err != nil {
|
||||
return graphql.Null
|
||||
}
|
||||
ctx = graphql.WithFieldContext(ctx, fc)
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
ec.Error(ctx, ec.Recover(ctx, r))
|
||||
ret = graphql.Null
|
||||
}
|
||||
}()
|
||||
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
|
||||
ctx = rctx // use context from middleware stack in children
|
||||
return obj.Certifications, nil
|
||||
})
|
||||
if err != nil {
|
||||
ec.Error(ctx, err)
|
||||
return graphql.Null
|
||||
}
|
||||
if resTmp == nil {
|
||||
if !graphql.HasFieldError(ctx, fc) {
|
||||
ec.Errorf(ctx, "must not be null")
|
||||
}
|
||||
return graphql.Null
|
||||
}
|
||||
res := resTmp.([]string)
|
||||
fc.Result = res
|
||||
return ec.marshalNString2ᚕstringᚄ(ctx, field.Selections, res)
|
||||
}
|
||||
|
||||
func (ec *executionContext) fieldContext_Vendor_certifications(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
||||
fc = &graphql.FieldContext{
|
||||
Object: "Vendor",
|
||||
Field: field,
|
||||
IsMethod: false,
|
||||
IsResolver: false,
|
||||
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
||||
return nil, errors.New("field of type String does not have child fields")
|
||||
},
|
||||
}
|
||||
return fc, nil
|
||||
}
|
||||
|
||||
func (ec *executionContext) _Vendor_securityPageUrl(ctx context.Context, field graphql.CollectedField, obj *types.Vendor) (ret graphql.Marshaler) {
|
||||
fc, err := ec.fieldContext_Vendor_securityPageUrl(ctx, field)
|
||||
if err != nil {
|
||||
return graphql.Null
|
||||
}
|
||||
ctx = graphql.WithFieldContext(ctx, fc)
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
ec.Error(ctx, ec.Recover(ctx, r))
|
||||
ret = graphql.Null
|
||||
}
|
||||
}()
|
||||
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
|
||||
ctx = rctx // use context from middleware stack in children
|
||||
return obj.SecurityPageURL, nil
|
||||
})
|
||||
if err != nil {
|
||||
ec.Error(ctx, err)
|
||||
return graphql.Null
|
||||
}
|
||||
if resTmp == nil {
|
||||
return graphql.Null
|
||||
}
|
||||
res := resTmp.(*string)
|
||||
fc.Result = res
|
||||
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
|
||||
}
|
||||
|
||||
func (ec *executionContext) fieldContext_Vendor_securityPageUrl(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
||||
fc = &graphql.FieldContext{
|
||||
Object: "Vendor",
|
||||
Field: field,
|
||||
IsMethod: false,
|
||||
IsResolver: false,
|
||||
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
||||
return nil, errors.New("field of type String does not have child fields")
|
||||
},
|
||||
}
|
||||
return fc, nil
|
||||
}
|
||||
|
||||
func (ec *executionContext) _Vendor_trustPageUrl(ctx context.Context, field graphql.CollectedField, obj *types.Vendor) (ret graphql.Marshaler) {
|
||||
fc, err := ec.fieldContext_Vendor_trustPageUrl(ctx, field)
|
||||
if err != nil {
|
||||
return graphql.Null
|
||||
}
|
||||
ctx = graphql.WithFieldContext(ctx, fc)
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
ec.Error(ctx, ec.Recover(ctx, r))
|
||||
ret = graphql.Null
|
||||
}
|
||||
}()
|
||||
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
|
||||
ctx = rctx // use context from middleware stack in children
|
||||
return obj.TrustPageURL, nil
|
||||
})
|
||||
if err != nil {
|
||||
ec.Error(ctx, err)
|
||||
return graphql.Null
|
||||
}
|
||||
if resTmp == nil {
|
||||
return graphql.Null
|
||||
}
|
||||
res := resTmp.(*string)
|
||||
fc.Result = res
|
||||
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
|
||||
}
|
||||
|
||||
func (ec *executionContext) fieldContext_Vendor_trustPageUrl(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
||||
fc = &graphql.FieldContext{
|
||||
Object: "Vendor",
|
||||
Field: field,
|
||||
IsMethod: false,
|
||||
IsResolver: false,
|
||||
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
||||
return nil, errors.New("field of type String does not have child fields")
|
||||
},
|
||||
}
|
||||
return fc, nil
|
||||
}
|
||||
|
||||
func (ec *executionContext) _Vendor_headquarterAddress(ctx context.Context, field graphql.CollectedField, obj *types.Vendor) (ret graphql.Marshaler) {
|
||||
fc, err := ec.fieldContext_Vendor_headquarterAddress(ctx, field)
|
||||
if err != nil {
|
||||
return graphql.Null
|
||||
}
|
||||
ctx = graphql.WithFieldContext(ctx, fc)
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
ec.Error(ctx, ec.Recover(ctx, r))
|
||||
ret = graphql.Null
|
||||
}
|
||||
}()
|
||||
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
|
||||
ctx = rctx // use context from middleware stack in children
|
||||
return obj.HeadquarterAddress, nil
|
||||
})
|
||||
if err != nil {
|
||||
ec.Error(ctx, err)
|
||||
return graphql.Null
|
||||
}
|
||||
if resTmp == nil {
|
||||
return graphql.Null
|
||||
}
|
||||
res := resTmp.(*string)
|
||||
fc.Result = res
|
||||
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
|
||||
}
|
||||
|
||||
func (ec *executionContext) fieldContext_Vendor_headquarterAddress(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
||||
fc = &graphql.FieldContext{
|
||||
Object: "Vendor",
|
||||
Field: field,
|
||||
IsMethod: false,
|
||||
IsResolver: false,
|
||||
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
||||
return nil, errors.New("field of type String does not have child fields")
|
||||
},
|
||||
}
|
||||
return fc, nil
|
||||
}
|
||||
|
||||
func (ec *executionContext) _Vendor_legalName(ctx context.Context, field graphql.CollectedField, obj *types.Vendor) (ret graphql.Marshaler) {
|
||||
fc, err := ec.fieldContext_Vendor_legalName(ctx, field)
|
||||
if err != nil {
|
||||
return graphql.Null
|
||||
}
|
||||
ctx = graphql.WithFieldContext(ctx, fc)
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
ec.Error(ctx, ec.Recover(ctx, r))
|
||||
ret = graphql.Null
|
||||
}
|
||||
}()
|
||||
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
|
||||
ctx = rctx // use context from middleware stack in children
|
||||
return obj.LegalName, nil
|
||||
})
|
||||
if err != nil {
|
||||
ec.Error(ctx, err)
|
||||
return graphql.Null
|
||||
}
|
||||
if resTmp == nil {
|
||||
return graphql.Null
|
||||
}
|
||||
res := resTmp.(*string)
|
||||
fc.Result = res
|
||||
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
|
||||
}
|
||||
|
||||
func (ec *executionContext) fieldContext_Vendor_legalName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
||||
fc = &graphql.FieldContext{
|
||||
Object: "Vendor",
|
||||
Field: field,
|
||||
IsMethod: false,
|
||||
IsResolver: false,
|
||||
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
||||
return nil, errors.New("field of type String does not have child fields")
|
||||
},
|
||||
}
|
||||
return fc, nil
|
||||
}
|
||||
|
||||
func (ec *executionContext) _Vendor_websiteUrl(ctx context.Context, field graphql.CollectedField, obj *types.Vendor) (ret graphql.Marshaler) {
|
||||
fc, err := ec.fieldContext_Vendor_websiteUrl(ctx, field)
|
||||
if err != nil {
|
||||
return graphql.Null
|
||||
}
|
||||
ctx = graphql.WithFieldContext(ctx, fc)
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
ec.Error(ctx, ec.Recover(ctx, r))
|
||||
ret = graphql.Null
|
||||
}
|
||||
}()
|
||||
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
|
||||
ctx = rctx // use context from middleware stack in children
|
||||
return obj.WebsiteURL, nil
|
||||
})
|
||||
if err != nil {
|
||||
ec.Error(ctx, err)
|
||||
return graphql.Null
|
||||
}
|
||||
if resTmp == nil {
|
||||
return graphql.Null
|
||||
}
|
||||
res := resTmp.(*string)
|
||||
fc.Result = res
|
||||
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
|
||||
}
|
||||
|
||||
func (ec *executionContext) fieldContext_Vendor_websiteUrl(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
||||
fc = &graphql.FieldContext{
|
||||
Object: "Vendor",
|
||||
Field: field,
|
||||
IsMethod: false,
|
||||
IsResolver: false,
|
||||
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
||||
return nil, errors.New("field of type String does not have child fields")
|
||||
},
|
||||
}
|
||||
return fc, nil
|
||||
}
|
||||
|
||||
func (ec *executionContext) _Vendor_createdAt(ctx context.Context, field graphql.CollectedField, obj *types.Vendor) (ret graphql.Marshaler) {
|
||||
fc, err := ec.fieldContext_Vendor_createdAt(ctx, field)
|
||||
if err != nil {
|
||||
@@ -18985,6 +19419,22 @@ func (ec *executionContext) fieldContext_VendorComplianceReport_vendor(_ context
|
||||
return ec.fieldContext_Vendor_termsOfServiceUrl(ctx, field)
|
||||
case "privacyPolicyUrl":
|
||||
return ec.fieldContext_Vendor_privacyPolicyUrl(ctx, field)
|
||||
case "serviceLevelAgreementUrl":
|
||||
return ec.fieldContext_Vendor_serviceLevelAgreementUrl(ctx, field)
|
||||
case "dataProcessingAgreementUrl":
|
||||
return ec.fieldContext_Vendor_dataProcessingAgreementUrl(ctx, field)
|
||||
case "certifications":
|
||||
return ec.fieldContext_Vendor_certifications(ctx, field)
|
||||
case "securityPageUrl":
|
||||
return ec.fieldContext_Vendor_securityPageUrl(ctx, field)
|
||||
case "trustPageUrl":
|
||||
return ec.fieldContext_Vendor_trustPageUrl(ctx, field)
|
||||
case "headquarterAddress":
|
||||
return ec.fieldContext_Vendor_headquarterAddress(ctx, field)
|
||||
case "legalName":
|
||||
return ec.fieldContext_Vendor_legalName(ctx, field)
|
||||
case "websiteUrl":
|
||||
return ec.fieldContext_Vendor_websiteUrl(ctx, field)
|
||||
case "createdAt":
|
||||
return ec.fieldContext_Vendor_createdAt(ctx, field)
|
||||
case "updatedAt":
|
||||
@@ -19722,6 +20172,22 @@ func (ec *executionContext) fieldContext_VendorEdge_node(_ context.Context, fiel
|
||||
return ec.fieldContext_Vendor_termsOfServiceUrl(ctx, field)
|
||||
case "privacyPolicyUrl":
|
||||
return ec.fieldContext_Vendor_privacyPolicyUrl(ctx, field)
|
||||
case "serviceLevelAgreementUrl":
|
||||
return ec.fieldContext_Vendor_serviceLevelAgreementUrl(ctx, field)
|
||||
case "dataProcessingAgreementUrl":
|
||||
return ec.fieldContext_Vendor_dataProcessingAgreementUrl(ctx, field)
|
||||
case "certifications":
|
||||
return ec.fieldContext_Vendor_certifications(ctx, field)
|
||||
case "securityPageUrl":
|
||||
return ec.fieldContext_Vendor_securityPageUrl(ctx, field)
|
||||
case "trustPageUrl":
|
||||
return ec.fieldContext_Vendor_trustPageUrl(ctx, field)
|
||||
case "headquarterAddress":
|
||||
return ec.fieldContext_Vendor_headquarterAddress(ctx, field)
|
||||
case "legalName":
|
||||
return ec.fieldContext_Vendor_legalName(ctx, field)
|
||||
case "websiteUrl":
|
||||
return ec.fieldContext_Vendor_websiteUrl(ctx, field)
|
||||
case "createdAt":
|
||||
return ec.fieldContext_Vendor_createdAt(ctx, field)
|
||||
case "updatedAt":
|
||||
@@ -22475,7 +22941,7 @@ func (ec *executionContext) unmarshalInputCreateVendorInput(ctx context.Context,
|
||||
asMap[k] = v
|
||||
}
|
||||
|
||||
fieldsInOrder := [...]string{"organizationId", "name", "description", "serviceStartAt", "serviceTerminationAt", "serviceCriticality", "riskTier", "statusPageUrl", "termsOfServiceUrl", "privacyPolicyUrl"}
|
||||
fieldsInOrder := [...]string{"organizationId", "name", "description", "headquarterAddress", "legalName", "websiteUrl", "privacyPolicyUrl", "category", "serviceLevelAgreementUrl", "dataProcessingAgreementUrl", "certifications", "securityPageUrl", "trustPageUrl", "statusPageUrl", "termsOfServiceUrl", "serviceStartAt", "serviceTerminationAt", "serviceCriticality", "riskTier"}
|
||||
for _, k := range fieldsInOrder {
|
||||
v, ok := asMap[k]
|
||||
if !ok {
|
||||
@@ -22498,11 +22964,95 @@ func (ec *executionContext) unmarshalInputCreateVendorInput(ctx context.Context,
|
||||
it.Name = data
|
||||
case "description":
|
||||
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("description"))
|
||||
data, err := ec.unmarshalNString2string(ctx, v)
|
||||
data, err := ec.unmarshalOString2ᚖstring(ctx, v)
|
||||
if err != nil {
|
||||
return it, err
|
||||
}
|
||||
it.Description = data
|
||||
case "headquarterAddress":
|
||||
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("headquarterAddress"))
|
||||
data, err := ec.unmarshalOString2ᚖstring(ctx, v)
|
||||
if err != nil {
|
||||
return it, err
|
||||
}
|
||||
it.HeadquarterAddress = data
|
||||
case "legalName":
|
||||
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("legalName"))
|
||||
data, err := ec.unmarshalOString2ᚖstring(ctx, v)
|
||||
if err != nil {
|
||||
return it, err
|
||||
}
|
||||
it.LegalName = data
|
||||
case "websiteUrl":
|
||||
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("websiteUrl"))
|
||||
data, err := ec.unmarshalOString2ᚖstring(ctx, v)
|
||||
if err != nil {
|
||||
return it, err
|
||||
}
|
||||
it.WebsiteURL = data
|
||||
case "privacyPolicyUrl":
|
||||
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("privacyPolicyUrl"))
|
||||
data, err := ec.unmarshalOString2ᚖstring(ctx, v)
|
||||
if err != nil {
|
||||
return it, err
|
||||
}
|
||||
it.PrivacyPolicyURL = data
|
||||
case "category":
|
||||
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("category"))
|
||||
data, err := ec.unmarshalOString2ᚖstring(ctx, v)
|
||||
if err != nil {
|
||||
return it, err
|
||||
}
|
||||
it.Category = data
|
||||
case "serviceLevelAgreementUrl":
|
||||
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("serviceLevelAgreementUrl"))
|
||||
data, err := ec.unmarshalOString2ᚖstring(ctx, v)
|
||||
if err != nil {
|
||||
return it, err
|
||||
}
|
||||
it.ServiceLevelAgreementURL = data
|
||||
case "dataProcessingAgreementUrl":
|
||||
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("dataProcessingAgreementUrl"))
|
||||
data, err := ec.unmarshalOString2ᚖstring(ctx, v)
|
||||
if err != nil {
|
||||
return it, err
|
||||
}
|
||||
it.DataProcessingAgreementURL = data
|
||||
case "certifications":
|
||||
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("certifications"))
|
||||
data, err := ec.unmarshalOString2ᚕstringᚄ(ctx, v)
|
||||
if err != nil {
|
||||
return it, err
|
||||
}
|
||||
it.Certifications = data
|
||||
case "securityPageUrl":
|
||||
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("securityPageUrl"))
|
||||
data, err := ec.unmarshalOString2ᚖstring(ctx, v)
|
||||
if err != nil {
|
||||
return it, err
|
||||
}
|
||||
it.SecurityPageURL = data
|
||||
case "trustPageUrl":
|
||||
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("trustPageUrl"))
|
||||
data, err := ec.unmarshalOString2ᚖstring(ctx, v)
|
||||
if err != nil {
|
||||
return it, err
|
||||
}
|
||||
it.TrustPageURL = data
|
||||
case "statusPageUrl":
|
||||
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("statusPageUrl"))
|
||||
data, err := ec.unmarshalOString2ᚖstring(ctx, v)
|
||||
if err != nil {
|
||||
return it, err
|
||||
}
|
||||
it.StatusPageURL = data
|
||||
case "termsOfServiceUrl":
|
||||
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("termsOfServiceUrl"))
|
||||
data, err := ec.unmarshalOString2ᚖstring(ctx, v)
|
||||
if err != nil {
|
||||
return it, err
|
||||
}
|
||||
it.TermsOfServiceURL = data
|
||||
case "serviceStartAt":
|
||||
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("serviceStartAt"))
|
||||
data, err := ec.unmarshalNDatetime2timeᚐTime(ctx, v)
|
||||
@@ -22531,27 +23081,6 @@ func (ec *executionContext) unmarshalInputCreateVendorInput(ctx context.Context,
|
||||
return it, err
|
||||
}
|
||||
it.RiskTier = data
|
||||
case "statusPageUrl":
|
||||
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("statusPageUrl"))
|
||||
data, err := ec.unmarshalOString2ᚖstring(ctx, v)
|
||||
if err != nil {
|
||||
return it, err
|
||||
}
|
||||
it.StatusPageURL = data
|
||||
case "termsOfServiceUrl":
|
||||
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("termsOfServiceUrl"))
|
||||
data, err := ec.unmarshalOString2ᚖstring(ctx, v)
|
||||
if err != nil {
|
||||
return it, err
|
||||
}
|
||||
it.TermsOfServiceURL = data
|
||||
case "privacyPolicyUrl":
|
||||
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("privacyPolicyUrl"))
|
||||
data, err := ec.unmarshalOString2ᚖstring(ctx, v)
|
||||
if err != nil {
|
||||
return it, err
|
||||
}
|
||||
it.PrivacyPolicyURL = data
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23819,7 +24348,7 @@ func (ec *executionContext) unmarshalInputUpdateVendorInput(ctx context.Context,
|
||||
asMap[k] = v
|
||||
}
|
||||
|
||||
fieldsInOrder := [...]string{"id", "name", "description", "serviceStartAt", "serviceTerminationAt", "serviceCriticality", "riskTier", "statusPageUrl", "termsOfServiceUrl", "privacyPolicyUrl"}
|
||||
fieldsInOrder := [...]string{"id", "name", "description", "serviceStartAt", "serviceTerminationAt", "serviceCriticality", "riskTier", "statusPageUrl", "termsOfServiceUrl", "privacyPolicyUrl", "serviceLevelAgreementUrl", "dataProcessingAgreementUrl", "websiteUrl", "legalName", "headquarterAddress", "category", "certifications", "securityPageUrl", "trustPageUrl"}
|
||||
for _, k := range fieldsInOrder {
|
||||
v, ok := asMap[k]
|
||||
if !ok {
|
||||
@@ -23896,6 +24425,69 @@ func (ec *executionContext) unmarshalInputUpdateVendorInput(ctx context.Context,
|
||||
return it, err
|
||||
}
|
||||
it.PrivacyPolicyURL = data
|
||||
case "serviceLevelAgreementUrl":
|
||||
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("serviceLevelAgreementUrl"))
|
||||
data, err := ec.unmarshalOString2ᚖstring(ctx, v)
|
||||
if err != nil {
|
||||
return it, err
|
||||
}
|
||||
it.ServiceLevelAgreementURL = data
|
||||
case "dataProcessingAgreementUrl":
|
||||
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("dataProcessingAgreementUrl"))
|
||||
data, err := ec.unmarshalOString2ᚖstring(ctx, v)
|
||||
if err != nil {
|
||||
return it, err
|
||||
}
|
||||
it.DataProcessingAgreementURL = data
|
||||
case "websiteUrl":
|
||||
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("websiteUrl"))
|
||||
data, err := ec.unmarshalOString2ᚖstring(ctx, v)
|
||||
if err != nil {
|
||||
return it, err
|
||||
}
|
||||
it.WebsiteURL = data
|
||||
case "legalName":
|
||||
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("legalName"))
|
||||
data, err := ec.unmarshalOString2ᚖstring(ctx, v)
|
||||
if err != nil {
|
||||
return it, err
|
||||
}
|
||||
it.LegalName = data
|
||||
case "headquarterAddress":
|
||||
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("headquarterAddress"))
|
||||
data, err := ec.unmarshalOString2ᚖstring(ctx, v)
|
||||
if err != nil {
|
||||
return it, err
|
||||
}
|
||||
it.HeadquarterAddress = data
|
||||
case "category":
|
||||
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("category"))
|
||||
data, err := ec.unmarshalOString2ᚖstring(ctx, v)
|
||||
if err != nil {
|
||||
return it, err
|
||||
}
|
||||
it.Category = data
|
||||
case "certifications":
|
||||
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("certifications"))
|
||||
data, err := ec.unmarshalOString2ᚕstringᚄ(ctx, v)
|
||||
if err != nil {
|
||||
return it, err
|
||||
}
|
||||
it.Certifications = data
|
||||
case "securityPageUrl":
|
||||
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("securityPageUrl"))
|
||||
data, err := ec.unmarshalOString2ᚖstring(ctx, v)
|
||||
if err != nil {
|
||||
return it, err
|
||||
}
|
||||
it.SecurityPageURL = data
|
||||
case "trustPageUrl":
|
||||
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("trustPageUrl"))
|
||||
data, err := ec.unmarshalOString2ᚖstring(ctx, v)
|
||||
if err != nil {
|
||||
return it, err
|
||||
}
|
||||
it.TrustPageURL = data
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28595,9 +29187,6 @@ func (ec *executionContext) _Vendor(ctx context.Context, sel ast.SelectionSet, o
|
||||
}
|
||||
case "description":
|
||||
out.Values[i] = ec._Vendor_description(ctx, field, obj)
|
||||
if out.Values[i] == graphql.Null {
|
||||
atomic.AddUint32(&out.Invalids, 1)
|
||||
}
|
||||
case "complianceReports":
|
||||
field := field
|
||||
|
||||
@@ -28657,6 +29246,25 @@ func (ec *executionContext) _Vendor(ctx context.Context, sel ast.SelectionSet, o
|
||||
out.Values[i] = ec._Vendor_termsOfServiceUrl(ctx, field, obj)
|
||||
case "privacyPolicyUrl":
|
||||
out.Values[i] = ec._Vendor_privacyPolicyUrl(ctx, field, obj)
|
||||
case "serviceLevelAgreementUrl":
|
||||
out.Values[i] = ec._Vendor_serviceLevelAgreementUrl(ctx, field, obj)
|
||||
case "dataProcessingAgreementUrl":
|
||||
out.Values[i] = ec._Vendor_dataProcessingAgreementUrl(ctx, field, obj)
|
||||
case "certifications":
|
||||
out.Values[i] = ec._Vendor_certifications(ctx, field, obj)
|
||||
if out.Values[i] == graphql.Null {
|
||||
atomic.AddUint32(&out.Invalids, 1)
|
||||
}
|
||||
case "securityPageUrl":
|
||||
out.Values[i] = ec._Vendor_securityPageUrl(ctx, field, obj)
|
||||
case "trustPageUrl":
|
||||
out.Values[i] = ec._Vendor_trustPageUrl(ctx, field, obj)
|
||||
case "headquarterAddress":
|
||||
out.Values[i] = ec._Vendor_headquarterAddress(ctx, field, obj)
|
||||
case "legalName":
|
||||
out.Values[i] = ec._Vendor_legalName(ctx, field, obj)
|
||||
case "websiteUrl":
|
||||
out.Values[i] = ec._Vendor_websiteUrl(ctx, field, obj)
|
||||
case "createdAt":
|
||||
out.Values[i] = ec._Vendor_createdAt(ctx, field, obj)
|
||||
if out.Values[i] == graphql.Null {
|
||||
|
||||
@@ -182,16 +182,25 @@ type CreateTaskPayload struct {
|
||||
}
|
||||
|
||||
type CreateVendorInput struct {
|
||||
OrganizationID gid.GID `json:"organizationId"`
|
||||
Name string `json:"name"`
|
||||
Description string `json:"description"`
|
||||
ServiceStartAt time.Time `json:"serviceStartAt"`
|
||||
ServiceTerminationAt *time.Time `json:"serviceTerminationAt,omitempty"`
|
||||
ServiceCriticality coredata.ServiceCriticality `json:"serviceCriticality"`
|
||||
RiskTier coredata.RiskTier `json:"riskTier"`
|
||||
StatusPageURL *string `json:"statusPageUrl,omitempty"`
|
||||
TermsOfServiceURL *string `json:"termsOfServiceUrl,omitempty"`
|
||||
PrivacyPolicyURL *string `json:"privacyPolicyUrl,omitempty"`
|
||||
OrganizationID gid.GID `json:"organizationId"`
|
||||
Name string `json:"name"`
|
||||
Description *string `json:"description,omitempty"`
|
||||
HeadquarterAddress *string `json:"headquarterAddress,omitempty"`
|
||||
LegalName *string `json:"legalName,omitempty"`
|
||||
WebsiteURL *string `json:"websiteUrl,omitempty"`
|
||||
PrivacyPolicyURL *string `json:"privacyPolicyUrl,omitempty"`
|
||||
Category *string `json:"category,omitempty"`
|
||||
ServiceLevelAgreementURL *string `json:"serviceLevelAgreementUrl,omitempty"`
|
||||
DataProcessingAgreementURL *string `json:"dataProcessingAgreementUrl,omitempty"`
|
||||
Certifications []string `json:"certifications,omitempty"`
|
||||
SecurityPageURL *string `json:"securityPageUrl,omitempty"`
|
||||
TrustPageURL *string `json:"trustPageUrl,omitempty"`
|
||||
StatusPageURL *string `json:"statusPageUrl,omitempty"`
|
||||
TermsOfServiceURL *string `json:"termsOfServiceUrl,omitempty"`
|
||||
ServiceStartAt time.Time `json:"serviceStartAt"`
|
||||
ServiceTerminationAt *time.Time `json:"serviceTerminationAt,omitempty"`
|
||||
ServiceCriticality coredata.ServiceCriticality `json:"serviceCriticality"`
|
||||
RiskTier coredata.RiskTier `json:"riskTier"`
|
||||
}
|
||||
|
||||
type CreateVendorPayload struct {
|
||||
@@ -671,16 +680,25 @@ type UpdateTaskPayload struct {
|
||||
}
|
||||
|
||||
type UpdateVendorInput struct {
|
||||
ID gid.GID `json:"id"`
|
||||
Name *string `json:"name,omitempty"`
|
||||
Description *string `json:"description,omitempty"`
|
||||
ServiceStartAt *time.Time `json:"serviceStartAt,omitempty"`
|
||||
ServiceTerminationAt *time.Time `json:"serviceTerminationAt,omitempty"`
|
||||
ServiceCriticality *coredata.ServiceCriticality `json:"serviceCriticality,omitempty"`
|
||||
RiskTier *coredata.RiskTier `json:"riskTier,omitempty"`
|
||||
StatusPageURL *string `json:"statusPageUrl,omitempty"`
|
||||
TermsOfServiceURL *string `json:"termsOfServiceUrl,omitempty"`
|
||||
PrivacyPolicyURL *string `json:"privacyPolicyUrl,omitempty"`
|
||||
ID gid.GID `json:"id"`
|
||||
Name *string `json:"name,omitempty"`
|
||||
Description *string `json:"description,omitempty"`
|
||||
ServiceStartAt *time.Time `json:"serviceStartAt,omitempty"`
|
||||
ServiceTerminationAt *time.Time `json:"serviceTerminationAt,omitempty"`
|
||||
ServiceCriticality *coredata.ServiceCriticality `json:"serviceCriticality,omitempty"`
|
||||
RiskTier *coredata.RiskTier `json:"riskTier,omitempty"`
|
||||
StatusPageURL *string `json:"statusPageUrl,omitempty"`
|
||||
TermsOfServiceURL *string `json:"termsOfServiceUrl,omitempty"`
|
||||
PrivacyPolicyURL *string `json:"privacyPolicyUrl,omitempty"`
|
||||
ServiceLevelAgreementURL *string `json:"serviceLevelAgreementUrl,omitempty"`
|
||||
DataProcessingAgreementURL *string `json:"dataProcessingAgreementUrl,omitempty"`
|
||||
WebsiteURL *string `json:"websiteUrl,omitempty"`
|
||||
LegalName *string `json:"legalName,omitempty"`
|
||||
HeadquarterAddress *string `json:"headquarterAddress,omitempty"`
|
||||
Category *string `json:"category,omitempty"`
|
||||
Certifications []string `json:"certifications,omitempty"`
|
||||
SecurityPageURL *string `json:"securityPageUrl,omitempty"`
|
||||
TrustPageURL *string `json:"trustPageUrl,omitempty"`
|
||||
}
|
||||
|
||||
type UpdateVendorPayload struct {
|
||||
@@ -721,19 +739,27 @@ type UserEdge struct {
|
||||
}
|
||||
|
||||
type Vendor struct {
|
||||
ID gid.GID `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Description string `json:"description"`
|
||||
ComplianceReports *VendorComplianceReportConnection `json:"complianceReports"`
|
||||
ServiceStartAt time.Time `json:"serviceStartAt"`
|
||||
ServiceTerminationAt *time.Time `json:"serviceTerminationAt,omitempty"`
|
||||
ServiceCriticality coredata.ServiceCriticality `json:"serviceCriticality"`
|
||||
RiskTier coredata.RiskTier `json:"riskTier"`
|
||||
StatusPageURL *string `json:"statusPageUrl,omitempty"`
|
||||
TermsOfServiceURL *string `json:"termsOfServiceUrl,omitempty"`
|
||||
PrivacyPolicyURL *string `json:"privacyPolicyUrl,omitempty"`
|
||||
CreatedAt time.Time `json:"createdAt"`
|
||||
UpdatedAt time.Time `json:"updatedAt"`
|
||||
ID gid.GID `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Description *string `json:"description,omitempty"`
|
||||
ComplianceReports *VendorComplianceReportConnection `json:"complianceReports"`
|
||||
ServiceStartAt time.Time `json:"serviceStartAt"`
|
||||
ServiceTerminationAt *time.Time `json:"serviceTerminationAt,omitempty"`
|
||||
ServiceCriticality coredata.ServiceCriticality `json:"serviceCriticality"`
|
||||
RiskTier coredata.RiskTier `json:"riskTier"`
|
||||
StatusPageURL *string `json:"statusPageUrl,omitempty"`
|
||||
TermsOfServiceURL *string `json:"termsOfServiceUrl,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"`
|
||||
HeadquarterAddress *string `json:"headquarterAddress,omitempty"`
|
||||
LegalName *string `json:"legalName,omitempty"`
|
||||
WebsiteURL *string `json:"websiteUrl,omitempty"`
|
||||
CreatedAt time.Time `json:"createdAt"`
|
||||
UpdatedAt time.Time `json:"updatedAt"`
|
||||
}
|
||||
|
||||
func (Vendor) IsNode() {}
|
||||
|
||||
@@ -45,17 +45,25 @@ func NewVendorEdge(v *coredata.Vendor, orderBy coredata.VendorOrderField) *Vendo
|
||||
|
||||
func NewVendor(v *coredata.Vendor) *Vendor {
|
||||
return &Vendor{
|
||||
ID: v.ID,
|
||||
Name: v.Name,
|
||||
Description: v.Description,
|
||||
CreatedAt: v.CreatedAt,
|
||||
UpdatedAt: v.UpdatedAt,
|
||||
ServiceStartAt: v.ServiceStartAt,
|
||||
ServiceTerminationAt: v.ServiceTerminationAt,
|
||||
ServiceCriticality: v.ServiceCriticality,
|
||||
RiskTier: v.RiskTier,
|
||||
StatusPageURL: v.StatusPageURL,
|
||||
TermsOfServiceURL: v.TermsOfServiceURL,
|
||||
PrivacyPolicyURL: v.PrivacyPolicyURL,
|
||||
ID: v.ID,
|
||||
Name: v.Name,
|
||||
Description: v.Description,
|
||||
CreatedAt: v.CreatedAt,
|
||||
UpdatedAt: v.UpdatedAt,
|
||||
ServiceStartAt: v.ServiceStartAt,
|
||||
ServiceTerminationAt: v.ServiceTerminationAt,
|
||||
ServiceCriticality: v.ServiceCriticality,
|
||||
RiskTier: v.RiskTier,
|
||||
StatusPageURL: v.StatusPageURL,
|
||||
TermsOfServiceURL: v.TermsOfServiceURL,
|
||||
PrivacyPolicyURL: v.PrivacyPolicyURL,
|
||||
ServiceLevelAgreementURL: v.ServiceLevelAgreementURL,
|
||||
DataProcessingAgreementURL: v.DataProcessingAgreementURL,
|
||||
Certifications: v.Certifications,
|
||||
SecurityPageURL: v.SecurityPageURL,
|
||||
TrustPageURL: v.TrustPageURL,
|
||||
HeadquarterAddress: v.HeadquarterAddress,
|
||||
LegalName: v.LegalName,
|
||||
WebsiteURL: v.WebsiteURL,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -355,18 +355,30 @@ func (r *mutationResolver) DeletePeople(ctx context.Context, input types.DeleteP
|
||||
func (r *mutationResolver) CreateVendor(ctx context.Context, input types.CreateVendorInput) (*types.CreateVendorPayload, error) {
|
||||
svc := r.GetTenantServiceIfAuthorized(ctx, input.OrganizationID.TenantID())
|
||||
|
||||
vendor, err := svc.Vendors.Create(ctx, probo.CreateVendorRequest{
|
||||
OrganizationID: input.OrganizationID,
|
||||
Name: input.Name,
|
||||
Description: input.Description,
|
||||
ServiceStartAt: input.ServiceStartAt,
|
||||
ServiceTerminationAt: input.ServiceTerminationAt,
|
||||
ServiceCriticality: input.ServiceCriticality,
|
||||
RiskTier: input.RiskTier,
|
||||
StatusPageURL: input.StatusPageURL,
|
||||
TermsOfServiceURL: input.TermsOfServiceURL,
|
||||
PrivacyPolicyURL: input.PrivacyPolicyURL,
|
||||
})
|
||||
vendor, err := svc.Vendors.Create(
|
||||
ctx,
|
||||
probo.CreateVendorRequest{
|
||||
OrganizationID: input.OrganizationID,
|
||||
Name: input.Name,
|
||||
Description: input.Description,
|
||||
ServiceStartAt: input.ServiceStartAt,
|
||||
ServiceTerminationAt: input.ServiceTerminationAt,
|
||||
ServiceCriticality: input.ServiceCriticality,
|
||||
RiskTier: input.RiskTier,
|
||||
StatusPageURL: input.StatusPageURL,
|
||||
TermsOfServiceURL: input.TermsOfServiceURL,
|
||||
PrivacyPolicyURL: input.PrivacyPolicyURL,
|
||||
ServiceLevelAgreementURL: input.ServiceLevelAgreementURL,
|
||||
LegalName: input.LegalName,
|
||||
HeadquarterAddress: input.HeadquarterAddress,
|
||||
WebsiteURL: input.WebsiteURL,
|
||||
Category: input.Category,
|
||||
DataProcessingAgreementURL: input.DataProcessingAgreementURL,
|
||||
Certifications: input.Certifications,
|
||||
SecurityPageURL: input.SecurityPageURL,
|
||||
TrustPageURL: input.TrustPageURL,
|
||||
},
|
||||
)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("cannot create vendor: %w", err)
|
||||
}
|
||||
@@ -380,16 +392,25 @@ func (r *mutationResolver) UpdateVendor(ctx context.Context, input types.UpdateV
|
||||
svc := r.GetTenantServiceIfAuthorized(ctx, input.ID.TenantID())
|
||||
|
||||
vendor, err := svc.Vendors.Update(ctx, probo.UpdateVendorRequest{
|
||||
ID: input.ID,
|
||||
Name: input.Name,
|
||||
Description: input.Description,
|
||||
ServiceStartAt: input.ServiceStartAt,
|
||||
ServiceTerminationAt: input.ServiceTerminationAt,
|
||||
ServiceCriticality: input.ServiceCriticality,
|
||||
RiskTier: input.RiskTier,
|
||||
StatusPageURL: input.StatusPageURL,
|
||||
TermsOfServiceURL: input.TermsOfServiceURL,
|
||||
PrivacyPolicyURL: input.PrivacyPolicyURL,
|
||||
ID: input.ID,
|
||||
Name: input.Name,
|
||||
Description: input.Description,
|
||||
ServiceStartAt: input.ServiceStartAt,
|
||||
ServiceTerminationAt: input.ServiceTerminationAt,
|
||||
ServiceCriticality: input.ServiceCriticality,
|
||||
RiskTier: input.RiskTier,
|
||||
StatusPageURL: input.StatusPageURL,
|
||||
TermsOfServiceURL: input.TermsOfServiceURL,
|
||||
PrivacyPolicyURL: input.PrivacyPolicyURL,
|
||||
ServiceLevelAgreementURL: input.ServiceLevelAgreementURL,
|
||||
DataProcessingAgreementURL: input.DataProcessingAgreementURL,
|
||||
SecurityPageURL: input.SecurityPageURL,
|
||||
TrustPageURL: input.TrustPageURL,
|
||||
HeadquarterAddress: input.HeadquarterAddress,
|
||||
LegalName: input.LegalName,
|
||||
WebsiteURL: input.WebsiteURL,
|
||||
Category: input.Category,
|
||||
Certifications: input.Certifications,
|
||||
})
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("cannot update vendor: %w", err)
|
||||
|
||||
Reference in New Issue
Block a user