Add category field
Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
This commit is contained in:
@@ -75,12 +75,36 @@ const (
|
||||
- terms_of_service_url: URL to terms of service page
|
||||
- status_page_url: URL to system status page
|
||||
- certifications: Array of security/compliance certifications (e.g., ["SOC2", "ISO27001"])
|
||||
- category: One of the following enum values:
|
||||
- "ANALYTICS"
|
||||
- "CLOUD_MONITORING"
|
||||
- "CLOUD_PROVIDER"
|
||||
- "COLLABORATION"
|
||||
- "CUSTOMER_SUPPORT"
|
||||
- "DATA_STORAGE_AND_PROCESSING"
|
||||
- "DOCUMENT_MANAGEMENT"
|
||||
- "EMPLOYEE_MANAGEMENT"
|
||||
- "ENGINEERING"
|
||||
- "FINANCE"
|
||||
- "IDENTITY_PROVIDER"
|
||||
- "IT"
|
||||
- "MARKETING"
|
||||
- "OFFICE_OPERATIONS"
|
||||
- "OTHER"
|
||||
- "PASSWORD_MANAGEMENT"
|
||||
- "PRODUCT_AND_DESIGN"
|
||||
- "PROFESSIONAL_SERVICES"
|
||||
- "RECRUITING"
|
||||
- "SALES"
|
||||
- "SECURITY"
|
||||
- "VERSION_CONTROL"
|
||||
|
||||
# SOP
|
||||
- Please ensure the output is clean, standardized JSON.
|
||||
- Use web search to gather info, if you cannot find what you are looking for, just return an empty string instead
|
||||
- For URLs, return the full URL if found, otherwise an empty string
|
||||
- For certifications, return an empty array if none found
|
||||
- For category, if you cannot determine the category, use "OTHER"
|
||||
|
||||
# **Example output format:**
|
||||
Respond ONLY with a JSON object. No explanation, no markdown, no preamble. Like this:
|
||||
@@ -96,7 +120,8 @@ const (
|
||||
"trust_page_url": "https://stripe.com/trust",
|
||||
"terms_of_service_url": "https://stripe.com/terms",
|
||||
"status_page_url": "https://status.stripe.com",
|
||||
"certifications": ["SOC1", "SOC2", "PCI DSS Level 1", "ISO 27001"]
|
||||
"certifications": ["SOC1", "SOC2", "PCI DSS Level 1", "ISO 27001"],
|
||||
"category": "FINANCE"
|
||||
}
|
||||
|
||||
### Company url:
|
||||
|
||||
@@ -84,11 +84,7 @@ func (i *BusinessImpact) UnmarshalJSON(data []byte) error {
|
||||
}
|
||||
|
||||
func (i *BusinessImpact) UnmarshalText(text []byte) error {
|
||||
var s string
|
||||
if err := json.Unmarshal(text, &s); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
s := string(text)
|
||||
switch s {
|
||||
case "LOW":
|
||||
*i = BusinessImpactLow
|
||||
|
||||
84
pkg/coredata/migrations/20250527T211803Z.sql
Normal file
84
pkg/coredata/migrations/20250527T211803Z.sql
Normal file
@@ -0,0 +1,84 @@
|
||||
CREATE TYPE vendor_category AS ENUM (
|
||||
'ANALYTICS',
|
||||
'CLOUD_MONITORING',
|
||||
'CLOUD_PROVIDER',
|
||||
'COLLABORATION',
|
||||
'CUSTOMER_SUPPORT',
|
||||
'DATA_STORAGE_AND_PROCESSING',
|
||||
'DOCUMENT_MANAGEMENT',
|
||||
'EMPLOYEE_MANAGEMENT',
|
||||
'ENGINEERING',
|
||||
'FINANCE',
|
||||
'IDENTITY_PROVIDER',
|
||||
'IT',
|
||||
'MARKETING',
|
||||
'OFFICE_OPERATIONS',
|
||||
'OTHER',
|
||||
'PASSWORD_MANAGEMENT',
|
||||
'PRODUCT_AND_DESIGN',
|
||||
'PROFESSIONAL_SERVICES',
|
||||
'RECRUITING',
|
||||
'SALES',
|
||||
'SECURITY',
|
||||
'VERSION_CONTROL'
|
||||
);
|
||||
|
||||
ALTER TABLE vendors DROP COLUMN IF EXISTS category;
|
||||
ALTER TABLE vendors ADD COLUMN category vendor_category NOT NULL DEFAULT 'OTHER';
|
||||
|
||||
-- Update categories based on the vendor data.json mappings
|
||||
UPDATE vendors SET category = 'ANALYTICS' WHERE name IN ('Segment', 'Plausible Analytics', 'PostHog');
|
||||
|
||||
UPDATE vendors SET category = 'CLOUD_MONITORING' WHERE name IN ('Datadog', 'New Relic', 'Better Stack');
|
||||
|
||||
UPDATE vendors SET category = 'CLOUD_PROVIDER' WHERE name IN (
|
||||
'Amazon Web Services (AWS)', 'Microsoft Azure', 'Google Cloud Platform', 'Cloudflare',
|
||||
'Vercel', 'Fly.io', 'Latitude.sh', 'Google', 'Heroku', 'Porter', 'OVHcloud global',
|
||||
'OVHcloud US', 'bunny.net'
|
||||
);
|
||||
|
||||
UPDATE vendors SET category = 'COLLABORATION' WHERE name IN (
|
||||
'Slack', 'Microsoft 365', 'Cal.com', 'Zoom', 'Sendgrid', 'Google Workspace',
|
||||
'Signal', 'monday.com', 'Calendly', 'Twilio', 'Otter.ai', 'Claap', 'ClickUp'
|
||||
);
|
||||
|
||||
UPDATE vendors SET category = 'CUSTOMER_SUPPORT' WHERE name = 'Pylon';
|
||||
|
||||
UPDATE vendors SET category = 'DATA_STORAGE_AND_PROCESSING' WHERE name IN (
|
||||
'Supabase', 'PlanetScale', 'ClickHouse', 'Airtable', 'Upstash'
|
||||
);
|
||||
|
||||
UPDATE vendors SET category = 'DOCUMENT_MANAGEMENT' WHERE name = 'Notion';
|
||||
|
||||
UPDATE vendors SET category = 'EMPLOYEE_MANAGEMENT' WHERE name IN ('Gusto', 'Checkr', 'Rippling');
|
||||
|
||||
UPDATE vendors SET category = 'ENGINEERING' WHERE name IN (
|
||||
'Sentry', 'npm', 'Atlassian', 'Algolia', 'Mintlify', 'Linear', 'Langfuse',
|
||||
'OpenAI', 'Anthropic', 'Cursor', 'Together AI', 'Docker', 'jsDelivr'
|
||||
);
|
||||
|
||||
UPDATE vendors SET category = 'FINANCE' WHERE name IN (
|
||||
'Stripe', 'Pulley', 'Mercury', 'Brex', 'Ramp', 'Carta', 'Qonto', 'Spendesk', 'Puzzle', 'Vouch'
|
||||
);
|
||||
|
||||
UPDATE vendors SET category = 'IDENTITY_PROVIDER' WHERE name IN ('Auth0', 'Clerk');
|
||||
|
||||
UPDATE vendors SET category = 'IT' WHERE name IN ('Namecheap', 'Plesk');
|
||||
|
||||
UPDATE vendors SET category = 'MARKETING' WHERE name IN (
|
||||
'Hubspot', 'Mailchimp', 'Resend', 'Brevo', 'Loops', 'Perplexity'
|
||||
);
|
||||
|
||||
UPDATE vendors SET category = 'PASSWORD_MANAGEMENT' WHERE name IN ('1Password', 'Bitwarden');
|
||||
|
||||
UPDATE vendors SET category = 'PRODUCT_AND_DESIGN' WHERE name IN (
|
||||
'Framer', 'Figma', 'Webflow', 'Pitch'
|
||||
);
|
||||
|
||||
UPDATE vendors SET category = 'RECRUITING' WHERE name = 'Lever';
|
||||
|
||||
UPDATE vendors SET category = 'SALES' WHERE name IN ('Apollo.io', 'Pipedrive', 'folk');
|
||||
|
||||
UPDATE vendors SET category = 'SECURITY' WHERE name IN ('Tailscale', 'Probo');
|
||||
|
||||
UPDATE vendors SET category = 'VERSION_CONTROL' WHERE name = 'Github';
|
||||
@@ -28,26 +28,26 @@ import (
|
||||
|
||||
type (
|
||||
Vendor struct {
|
||||
ID gid.GID `db:"id"`
|
||||
OrganizationID gid.GID `db:"organization_id"`
|
||||
Name string `db:"name"`
|
||||
Description *string `db:"description"`
|
||||
Category string `db:"category"`
|
||||
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"`
|
||||
BusinessOwnerID *gid.GID `db:"business_owner_id"`
|
||||
SecurityOwnerID *gid.GID `db:"security_owner_id"`
|
||||
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"`
|
||||
ID gid.GID `db:"id"`
|
||||
OrganizationID gid.GID `db:"organization_id"`
|
||||
Name string `db:"name"`
|
||||
Description *string `db:"description"`
|
||||
Category VendorCategory `db:"category"`
|
||||
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"`
|
||||
BusinessOwnerID *gid.GID `db:"business_owner_id"`
|
||||
SecurityOwnerID *gid.GID `db:"security_owner_id"`
|
||||
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
|
||||
|
||||
228
pkg/coredata/vendor_category.go
Normal file
228
pkg/coredata/vendor_category.go
Normal file
@@ -0,0 +1,228 @@
|
||||
// Copyright (c) 2025 Probo Inc <hello@getprobo.com>.
|
||||
//
|
||||
// Permission to use, copy, modify, and/or distribute this software for any
|
||||
// purpose with or without fee is hereby granted, provided that the above
|
||||
// copyright notice and this permission notice appear in all copies.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
||||
// REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
// AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
// INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
// LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||||
// OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
// PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
package coredata
|
||||
|
||||
import (
|
||||
"database/sql/driver"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
type VendorCategory string
|
||||
|
||||
const (
|
||||
VendorCategoryAnalytics VendorCategory = "ANALYTICS"
|
||||
VendorCategoryCloudMonitoring VendorCategory = "CLOUD_MONITORING"
|
||||
VendorCategoryCloudProvider VendorCategory = "CLOUD_PROVIDER"
|
||||
VendorCategoryCollaboration VendorCategory = "COLLABORATION"
|
||||
VendorCategoryCustomerSupport VendorCategory = "CUSTOMER_SUPPORT"
|
||||
VendorCategoryDataStorageAndProcessing VendorCategory = "DATA_STORAGE_AND_PROCESSING"
|
||||
VendorCategoryDocumentManagement VendorCategory = "DOCUMENT_MANAGEMENT"
|
||||
VendorCategoryEmployeeManagement VendorCategory = "EMPLOYEE_MANAGEMENT"
|
||||
VendorCategoryEngineering VendorCategory = "ENGINEERING"
|
||||
VendorCategoryFinance VendorCategory = "FINANCE"
|
||||
VendorCategoryIdentityProvider VendorCategory = "IDENTITY_PROVIDER"
|
||||
VendorCategoryIT VendorCategory = "IT"
|
||||
VendorCategoryMarketing VendorCategory = "MARKETING"
|
||||
VendorCategoryOfficeOperations VendorCategory = "OFFICE_OPERATIONS"
|
||||
VendorCategoryOther VendorCategory = "OTHER"
|
||||
VendorCategoryPasswordManagement VendorCategory = "PASSWORD_MANAGEMENT"
|
||||
VendorCategoryProductAndDesign VendorCategory = "PRODUCT_AND_DESIGN"
|
||||
VendorCategoryProfessionalServices VendorCategory = "PROFESSIONAL_SERVICES"
|
||||
VendorCategoryRecruiting VendorCategory = "RECRUITING"
|
||||
VendorCategorySales VendorCategory = "SALES"
|
||||
VendorCategorySecurity VendorCategory = "SECURITY"
|
||||
VendorCategoryVersionControl VendorCategory = "VERSION_CONTROL"
|
||||
)
|
||||
|
||||
func (i VendorCategory) String() string {
|
||||
return string(i)
|
||||
}
|
||||
|
||||
func (i *VendorCategory) Scan(value interface{}) error {
|
||||
switch v := value.(type) {
|
||||
case string:
|
||||
switch v {
|
||||
case "ANALYTICS":
|
||||
*i = VendorCategoryAnalytics
|
||||
case "CLOUD_MONITORING":
|
||||
*i = VendorCategoryCloudMonitoring
|
||||
case "CLOUD_PROVIDER":
|
||||
*i = VendorCategoryCloudProvider
|
||||
case "COLLABORATION":
|
||||
*i = VendorCategoryCollaboration
|
||||
case "CUSTOMER_SUPPORT":
|
||||
*i = VendorCategoryCustomerSupport
|
||||
case "DATA_STORAGE_AND_PROCESSING":
|
||||
*i = VendorCategoryDataStorageAndProcessing
|
||||
case "DOCUMENT_MANAGEMENT":
|
||||
*i = VendorCategoryDocumentManagement
|
||||
case "EMPLOYEE_MANAGEMENT":
|
||||
*i = VendorCategoryEmployeeManagement
|
||||
case "ENGINEERING":
|
||||
*i = VendorCategoryEngineering
|
||||
case "FINANCE":
|
||||
*i = VendorCategoryFinance
|
||||
case "IDENTITY_PROVIDER":
|
||||
*i = VendorCategoryIdentityProvider
|
||||
case "IT":
|
||||
*i = VendorCategoryIT
|
||||
case "MARKETING":
|
||||
*i = VendorCategoryMarketing
|
||||
case "OFFICE_OPERATIONS":
|
||||
*i = VendorCategoryOfficeOperations
|
||||
case "OTHER":
|
||||
*i = VendorCategoryOther
|
||||
case "PASSWORD_MANAGEMENT":
|
||||
*i = VendorCategoryPasswordManagement
|
||||
case "PRODUCT_AND_DESIGN":
|
||||
*i = VendorCategoryProductAndDesign
|
||||
case "PROFESSIONAL_SERVICES":
|
||||
*i = VendorCategoryProfessionalServices
|
||||
case "RECRUITING":
|
||||
*i = VendorCategoryRecruiting
|
||||
case "SALES":
|
||||
*i = VendorCategorySales
|
||||
case "SECURITY":
|
||||
*i = VendorCategorySecurity
|
||||
case "VERSION_CONTROL":
|
||||
*i = VendorCategoryVersionControl
|
||||
default:
|
||||
return fmt.Errorf("invalid VendorCategory value: %q", v)
|
||||
}
|
||||
default:
|
||||
return fmt.Errorf("unsupported type for VendorCategory: %T", value)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (i VendorCategory) Value() (driver.Value, error) {
|
||||
return i.String(), nil
|
||||
}
|
||||
|
||||
func (i VendorCategory) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(i.String())
|
||||
}
|
||||
|
||||
func (i *VendorCategory) UnmarshalJSON(data []byte) error {
|
||||
var s string
|
||||
if err := json.Unmarshal(data, &s); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
switch s {
|
||||
case "ANALYTICS":
|
||||
*i = VendorCategoryAnalytics
|
||||
case "CLOUD_MONITORING":
|
||||
*i = VendorCategoryCloudMonitoring
|
||||
case "CLOUD_PROVIDER":
|
||||
*i = VendorCategoryCloudProvider
|
||||
case "COLLABORATION":
|
||||
*i = VendorCategoryCollaboration
|
||||
case "CUSTOMER_SUPPORT":
|
||||
*i = VendorCategoryCustomerSupport
|
||||
case "DATA_STORAGE_AND_PROCESSING":
|
||||
*i = VendorCategoryDataStorageAndProcessing
|
||||
case "DOCUMENT_MANAGEMENT":
|
||||
*i = VendorCategoryDocumentManagement
|
||||
case "EMPLOYEE_MANAGEMENT":
|
||||
*i = VendorCategoryEmployeeManagement
|
||||
case "ENGINEERING":
|
||||
*i = VendorCategoryEngineering
|
||||
case "FINANCE":
|
||||
*i = VendorCategoryFinance
|
||||
case "IDENTITY_PROVIDER":
|
||||
*i = VendorCategoryIdentityProvider
|
||||
case "IT":
|
||||
*i = VendorCategoryIT
|
||||
case "MARKETING":
|
||||
*i = VendorCategoryMarketing
|
||||
case "OFFICE_OPERATIONS":
|
||||
*i = VendorCategoryOfficeOperations
|
||||
case "OTHER":
|
||||
*i = VendorCategoryOther
|
||||
case "PASSWORD_MANAGEMENT":
|
||||
*i = VendorCategoryPasswordManagement
|
||||
case "PRODUCT_AND_DESIGN":
|
||||
*i = VendorCategoryProductAndDesign
|
||||
case "PROFESSIONAL_SERVICES":
|
||||
*i = VendorCategoryProfessionalServices
|
||||
case "RECRUITING":
|
||||
*i = VendorCategoryRecruiting
|
||||
case "SALES":
|
||||
*i = VendorCategorySales
|
||||
case "SECURITY":
|
||||
*i = VendorCategorySecurity
|
||||
case "VERSION_CONTROL":
|
||||
*i = VendorCategoryVersionControl
|
||||
default:
|
||||
return fmt.Errorf("invalid VendorCategory value: %q", s)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (i *VendorCategory) UnmarshalText(text []byte) error {
|
||||
s := string(text)
|
||||
|
||||
switch s {
|
||||
case "ANALYTICS":
|
||||
*i = VendorCategoryAnalytics
|
||||
case "CLOUD_MONITORING":
|
||||
*i = VendorCategoryCloudMonitoring
|
||||
case "CLOUD_PROVIDER":
|
||||
*i = VendorCategoryCloudProvider
|
||||
case "COLLABORATION":
|
||||
*i = VendorCategoryCollaboration
|
||||
case "CUSTOMER_SUPPORT":
|
||||
*i = VendorCategoryCustomerSupport
|
||||
case "DATA_STORAGE_AND_PROCESSING":
|
||||
*i = VendorCategoryDataStorageAndProcessing
|
||||
case "DOCUMENT_MANAGEMENT":
|
||||
*i = VendorCategoryDocumentManagement
|
||||
case "EMPLOYEE_MANAGEMENT":
|
||||
*i = VendorCategoryEmployeeManagement
|
||||
case "ENGINEERING":
|
||||
*i = VendorCategoryEngineering
|
||||
case "FINANCE":
|
||||
*i = VendorCategoryFinance
|
||||
case "IDENTITY_PROVIDER":
|
||||
*i = VendorCategoryIdentityProvider
|
||||
case "IT":
|
||||
*i = VendorCategoryIT
|
||||
case "MARKETING":
|
||||
*i = VendorCategoryMarketing
|
||||
case "OFFICE_OPERATIONS":
|
||||
*i = VendorCategoryOfficeOperations
|
||||
case "OTHER":
|
||||
*i = VendorCategoryOther
|
||||
case "PASSWORD_MANAGEMENT":
|
||||
*i = VendorCategoryPasswordManagement
|
||||
case "PRODUCT_AND_DESIGN":
|
||||
*i = VendorCategoryProductAndDesign
|
||||
case "PROFESSIONAL_SERVICES":
|
||||
*i = VendorCategoryProfessionalServices
|
||||
case "RECRUITING":
|
||||
*i = VendorCategoryRecruiting
|
||||
case "SALES":
|
||||
*i = VendorCategorySales
|
||||
case "SECURITY":
|
||||
*i = VendorCategorySecurity
|
||||
case "VERSION_CONTROL":
|
||||
*i = VendorCategoryVersionControl
|
||||
default:
|
||||
return fmt.Errorf("invalid VendorCategory value: %q", s)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
@@ -37,7 +37,7 @@ type (
|
||||
HeadquarterAddress *string
|
||||
LegalName *string
|
||||
WebsiteURL *string
|
||||
Category *string
|
||||
Category *coredata.VendorCategory
|
||||
PrivacyPolicyURL *string
|
||||
ServiceLevelAgreementURL *string
|
||||
DataProcessingAgreementURL *string
|
||||
@@ -58,7 +58,7 @@ type (
|
||||
LegalName *string
|
||||
WebsiteURL *string
|
||||
TermsOfServiceURL *string
|
||||
Category *string
|
||||
Category *coredata.VendorCategory
|
||||
PrivacyPolicyURL *string
|
||||
ServiceLevelAgreementURL *string
|
||||
DataProcessingAgreementURL *string
|
||||
@@ -160,6 +160,8 @@ func (s VendorService) Update(
|
||||
|
||||
if req.Category != nil {
|
||||
vendor.Category = *req.Category
|
||||
} else {
|
||||
vendor.Category = coredata.VendorCategoryOther
|
||||
}
|
||||
|
||||
if req.SecurityPageURL != nil {
|
||||
@@ -321,7 +323,7 @@ func (s VendorService) Create(
|
||||
if req.Category != nil {
|
||||
vendor.Category = *req.Category
|
||||
} else {
|
||||
vendor.Category = "Other"
|
||||
vendor.Category = coredata.VendorCategoryOther
|
||||
}
|
||||
|
||||
if err := vendor.Insert(ctx, conn, s.svc.scope); err != nil {
|
||||
@@ -441,7 +443,7 @@ func (s VendorService) Assess(
|
||||
Name: vendorInfo.Name,
|
||||
WebsiteURL: &req.WebsiteURL,
|
||||
Description: &vendorInfo.Description,
|
||||
Category: vendorInfo.Category,
|
||||
Category: coredata.VendorCategory(vendorInfo.Category),
|
||||
HeadquarterAddress: &vendorInfo.HeadquarterAddress,
|
||||
LegalName: &vendorInfo.LegalName,
|
||||
PrivacyPolicyURL: &vendorInfo.PrivacyPolicyURL,
|
||||
|
||||
@@ -312,6 +312,31 @@ enum PolicyVersionOrderField
|
||||
)
|
||||
}
|
||||
|
||||
enum VendorCategory @goModel(model: "github.com/getprobo/probo/pkg/coredata.VendorCategory") {
|
||||
ANALYTICS @goEnum(value: "github.com/getprobo/probo/pkg/coredata.VendorCategoryAnalytics")
|
||||
CLOUD_MONITORING @goEnum(value: "github.com/getprobo/probo/pkg/coredata.VendorCategoryCloudMonitoring")
|
||||
CLOUD_PROVIDER @goEnum(value: "github.com/getprobo/probo/pkg/coredata.VendorCategoryCloudProvider")
|
||||
COLLABORATION @goEnum(value: "github.com/getprobo/probo/pkg/coredata.VendorCategoryCollaboration")
|
||||
CUSTOMER_SUPPORT @goEnum(value: "github.com/getprobo/probo/pkg/coredata.VendorCategoryCustomerSupport")
|
||||
DATA_STORAGE_AND_PROCESSING @goEnum(value: "github.com/getprobo/probo/pkg/coredata.VendorCategoryDataStorageAndProcessing")
|
||||
DOCUMENT_MANAGEMENT @goEnum(value: "github.com/getprobo/probo/pkg/coredata.VendorCategoryDocumentManagement")
|
||||
EMPLOYEE_MANAGEMENT @goEnum(value: "github.com/getprobo/probo/pkg/coredata.VendorCategoryEmployeeManagement")
|
||||
ENGINEERING @goEnum(value: "github.com/getprobo/probo/pkg/coredata.VendorCategoryEngineering")
|
||||
FINANCE @goEnum(value: "github.com/getprobo/probo/pkg/coredata.VendorCategoryFinance")
|
||||
IDENTITY_PROVIDER @goEnum(value: "github.com/getprobo/probo/pkg/coredata.VendorCategoryIdentityProvider")
|
||||
IT @goEnum(value: "github.com/getprobo/probo/pkg/coredata.VendorCategoryIT")
|
||||
MARKETING @goEnum(value: "github.com/getprobo/probo/pkg/coredata.VendorCategoryMarketing")
|
||||
OFFICE_OPERATIONS @goEnum(value: "github.com/getprobo/probo/pkg/coredata.VendorCategoryOfficeOperations")
|
||||
OTHER @goEnum(value: "github.com/getprobo/probo/pkg/coredata.VendorCategoryOther")
|
||||
PASSWORD_MANAGEMENT @goEnum(value: "github.com/getprobo/probo/pkg/coredata.VendorCategoryPasswordManagement")
|
||||
PRODUCT_AND_DESIGN @goEnum(value: "github.com/getprobo/probo/pkg/coredata.VendorCategoryProductAndDesign")
|
||||
PROFESSIONAL_SERVICES @goEnum(value: "github.com/getprobo/probo/pkg/coredata.VendorCategoryProfessionalServices")
|
||||
RECRUITING @goEnum(value: "github.com/getprobo/probo/pkg/coredata.VendorCategoryRecruiting")
|
||||
SALES @goEnum(value: "github.com/getprobo/probo/pkg/coredata.VendorCategorySales")
|
||||
SECURITY @goEnum(value: "github.com/getprobo/probo/pkg/coredata.VendorCategorySecurity")
|
||||
VERSION_CONTROL @goEnum(value: "github.com/getprobo/probo/pkg/coredata.VendorCategoryVersionControl")
|
||||
}
|
||||
|
||||
# Order Input Types
|
||||
input UserOrder
|
||||
@goModel(
|
||||
@@ -539,6 +564,7 @@ type People implements Node {
|
||||
type Vendor implements Node {
|
||||
id: ID!
|
||||
name: String!
|
||||
category: VendorCategory!
|
||||
description: String
|
||||
|
||||
organization: Organization! @goField(forceResolver: true)
|
||||
@@ -1115,7 +1141,7 @@ input CreateVendorInput {
|
||||
legalName: String
|
||||
websiteUrl: String
|
||||
privacyPolicyUrl: String
|
||||
category: String
|
||||
category: VendorCategory
|
||||
serviceLevelAgreementUrl: String
|
||||
dataProcessingAgreementUrl: String
|
||||
certifications: [String!]
|
||||
@@ -1139,7 +1165,7 @@ input UpdateVendorInput {
|
||||
websiteUrl: String
|
||||
legalName: String
|
||||
headquarterAddress: String
|
||||
category: String
|
||||
category: VendorCategory
|
||||
certifications: [String!]
|
||||
securityPageUrl: String
|
||||
trustPageUrl: String
|
||||
|
||||
@@ -674,6 +674,7 @@ type ComplexityRoot struct {
|
||||
|
||||
Vendor struct {
|
||||
BusinessOwner func(childComplexity int) int
|
||||
Category 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
|
||||
@@ -3513,6 +3514,13 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin
|
||||
|
||||
return e.complexity.Vendor.BusinessOwner(childComplexity), true
|
||||
|
||||
case "Vendor.category":
|
||||
if e.complexity.Vendor.Category == nil {
|
||||
break
|
||||
}
|
||||
|
||||
return e.complexity.Vendor.Category(childComplexity), true
|
||||
|
||||
case "Vendor.certifications":
|
||||
if e.complexity.Vendor.Certifications == nil {
|
||||
break
|
||||
@@ -4397,6 +4405,31 @@ enum PolicyVersionOrderField
|
||||
)
|
||||
}
|
||||
|
||||
enum VendorCategory @goModel(model: "github.com/getprobo/probo/pkg/coredata.VendorCategory") {
|
||||
ANALYTICS @goEnum(value: "github.com/getprobo/probo/pkg/coredata.VendorCategoryAnalytics")
|
||||
CLOUD_MONITORING @goEnum(value: "github.com/getprobo/probo/pkg/coredata.VendorCategoryCloudMonitoring")
|
||||
CLOUD_PROVIDER @goEnum(value: "github.com/getprobo/probo/pkg/coredata.VendorCategoryCloudProvider")
|
||||
COLLABORATION @goEnum(value: "github.com/getprobo/probo/pkg/coredata.VendorCategoryCollaboration")
|
||||
CUSTOMER_SUPPORT @goEnum(value: "github.com/getprobo/probo/pkg/coredata.VendorCategoryCustomerSupport")
|
||||
DATA_STORAGE_AND_PROCESSING @goEnum(value: "github.com/getprobo/probo/pkg/coredata.VendorCategoryDataStorageAndProcessing")
|
||||
DOCUMENT_MANAGEMENT @goEnum(value: "github.com/getprobo/probo/pkg/coredata.VendorCategoryDocumentManagement")
|
||||
EMPLOYEE_MANAGEMENT @goEnum(value: "github.com/getprobo/probo/pkg/coredata.VendorCategoryEmployeeManagement")
|
||||
ENGINEERING @goEnum(value: "github.com/getprobo/probo/pkg/coredata.VendorCategoryEngineering")
|
||||
FINANCE @goEnum(value: "github.com/getprobo/probo/pkg/coredata.VendorCategoryFinance")
|
||||
IDENTITY_PROVIDER @goEnum(value: "github.com/getprobo/probo/pkg/coredata.VendorCategoryIdentityProvider")
|
||||
IT @goEnum(value: "github.com/getprobo/probo/pkg/coredata.VendorCategoryIT")
|
||||
MARKETING @goEnum(value: "github.com/getprobo/probo/pkg/coredata.VendorCategoryMarketing")
|
||||
OFFICE_OPERATIONS @goEnum(value: "github.com/getprobo/probo/pkg/coredata.VendorCategoryOfficeOperations")
|
||||
OTHER @goEnum(value: "github.com/getprobo/probo/pkg/coredata.VendorCategoryOther")
|
||||
PASSWORD_MANAGEMENT @goEnum(value: "github.com/getprobo/probo/pkg/coredata.VendorCategoryPasswordManagement")
|
||||
PRODUCT_AND_DESIGN @goEnum(value: "github.com/getprobo/probo/pkg/coredata.VendorCategoryProductAndDesign")
|
||||
PROFESSIONAL_SERVICES @goEnum(value: "github.com/getprobo/probo/pkg/coredata.VendorCategoryProfessionalServices")
|
||||
RECRUITING @goEnum(value: "github.com/getprobo/probo/pkg/coredata.VendorCategoryRecruiting")
|
||||
SALES @goEnum(value: "github.com/getprobo/probo/pkg/coredata.VendorCategorySales")
|
||||
SECURITY @goEnum(value: "github.com/getprobo/probo/pkg/coredata.VendorCategorySecurity")
|
||||
VERSION_CONTROL @goEnum(value: "github.com/getprobo/probo/pkg/coredata.VendorCategoryVersionControl")
|
||||
}
|
||||
|
||||
# Order Input Types
|
||||
input UserOrder
|
||||
@goModel(
|
||||
@@ -4624,6 +4657,7 @@ type People implements Node {
|
||||
type Vendor implements Node {
|
||||
id: ID!
|
||||
name: String!
|
||||
category: VendorCategory!
|
||||
description: String
|
||||
|
||||
organization: Organization! @goField(forceResolver: true)
|
||||
@@ -5200,7 +5234,7 @@ input CreateVendorInput {
|
||||
legalName: String
|
||||
websiteUrl: String
|
||||
privacyPolicyUrl: String
|
||||
category: String
|
||||
category: VendorCategory
|
||||
serviceLevelAgreementUrl: String
|
||||
dataProcessingAgreementUrl: String
|
||||
certifications: [String!]
|
||||
@@ -5224,7 +5258,7 @@ input UpdateVendorInput {
|
||||
websiteUrl: String
|
||||
legalName: String
|
||||
headquarterAddress: String
|
||||
category: String
|
||||
category: VendorCategory
|
||||
certifications: [String!]
|
||||
securityPageUrl: String
|
||||
trustPageUrl: String
|
||||
@@ -9802,6 +9836,8 @@ func (ec *executionContext) fieldContext_AssessVendorPayload_vendor(_ context.Co
|
||||
return ec.fieldContext_Vendor_id(ctx, field)
|
||||
case "name":
|
||||
return ec.fieldContext_Vendor_name(ctx, field)
|
||||
case "category":
|
||||
return ec.fieldContext_Vendor_category(ctx, field)
|
||||
case "description":
|
||||
return ec.fieldContext_Vendor_description(ctx, field)
|
||||
case "organization":
|
||||
@@ -25613,6 +25649,8 @@ func (ec *executionContext) fieldContext_UpdateVendorPayload_vendor(_ context.Co
|
||||
return ec.fieldContext_Vendor_id(ctx, field)
|
||||
case "name":
|
||||
return ec.fieldContext_Vendor_name(ctx, field)
|
||||
case "category":
|
||||
return ec.fieldContext_Vendor_category(ctx, field)
|
||||
case "description":
|
||||
return ec.fieldContext_Vendor_description(ctx, field)
|
||||
case "organization":
|
||||
@@ -26396,6 +26434,50 @@ func (ec *executionContext) fieldContext_Vendor_name(_ context.Context, field gr
|
||||
return fc, nil
|
||||
}
|
||||
|
||||
func (ec *executionContext) _Vendor_category(ctx context.Context, field graphql.CollectedField, obj *types.Vendor) (ret graphql.Marshaler) {
|
||||
fc, err := ec.fieldContext_Vendor_category(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.Category, 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.(coredata.VendorCategory)
|
||||
fc.Result = res
|
||||
return ec.marshalNVendorCategory2githubᚗcomᚋgetproboᚋproboᚋpkgᚋcoredataᚐVendorCategory(ctx, field.Selections, res)
|
||||
}
|
||||
|
||||
func (ec *executionContext) fieldContext_Vendor_category(_ 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 VendorCategory does not have child fields")
|
||||
},
|
||||
}
|
||||
return fc, nil
|
||||
}
|
||||
|
||||
func (ec *executionContext) _Vendor_description(ctx context.Context, field graphql.CollectedField, obj *types.Vendor) (ret graphql.Marshaler) {
|
||||
fc, err := ec.fieldContext_Vendor_description(ctx, field)
|
||||
if err != nil {
|
||||
@@ -27388,6 +27470,8 @@ func (ec *executionContext) fieldContext_VendorComplianceReport_vendor(_ context
|
||||
return ec.fieldContext_Vendor_id(ctx, field)
|
||||
case "name":
|
||||
return ec.fieldContext_Vendor_name(ctx, field)
|
||||
case "category":
|
||||
return ec.fieldContext_Vendor_category(ctx, field)
|
||||
case "description":
|
||||
return ec.fieldContext_Vendor_description(ctx, field)
|
||||
case "organization":
|
||||
@@ -28141,6 +28225,8 @@ func (ec *executionContext) fieldContext_VendorEdge_node(_ context.Context, fiel
|
||||
return ec.fieldContext_Vendor_id(ctx, field)
|
||||
case "name":
|
||||
return ec.fieldContext_Vendor_name(ctx, field)
|
||||
case "category":
|
||||
return ec.fieldContext_Vendor_category(ctx, field)
|
||||
case "description":
|
||||
return ec.fieldContext_Vendor_description(ctx, field)
|
||||
case "organization":
|
||||
@@ -28273,6 +28359,8 @@ func (ec *executionContext) fieldContext_VendorRiskAssessment_vendor(_ context.C
|
||||
return ec.fieldContext_Vendor_id(ctx, field)
|
||||
case "name":
|
||||
return ec.fieldContext_Vendor_name(ctx, field)
|
||||
case "category":
|
||||
return ec.fieldContext_Vendor_category(ctx, field)
|
||||
case "description":
|
||||
return ec.fieldContext_Vendor_description(ctx, field)
|
||||
case "organization":
|
||||
@@ -31869,7 +31957,7 @@ func (ec *executionContext) unmarshalInputCreateVendorInput(ctx context.Context,
|
||||
it.PrivacyPolicyURL = data
|
||||
case "category":
|
||||
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("category"))
|
||||
data, err := ec.unmarshalOString2ᚖstring(ctx, v)
|
||||
data, err := ec.unmarshalOVendorCategory2ᚖgithubᚗcomᚋgetproboᚋproboᚋpkgᚋcoredataᚐVendorCategory(ctx, v)
|
||||
if err != nil {
|
||||
return it, err
|
||||
}
|
||||
@@ -33706,7 +33794,7 @@ func (ec *executionContext) unmarshalInputUpdateVendorInput(ctx context.Context,
|
||||
it.HeadquarterAddress = data
|
||||
case "category":
|
||||
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("category"))
|
||||
data, err := ec.unmarshalOString2ᚖstring(ctx, v)
|
||||
data, err := ec.unmarshalOVendorCategory2ᚖgithubᚗcomᚋgetproboᚋproboᚋpkgᚋcoredataᚐVendorCategory(ctx, v)
|
||||
if err != nil {
|
||||
return it, err
|
||||
}
|
||||
@@ -40470,6 +40558,11 @@ func (ec *executionContext) _Vendor(ctx context.Context, sel ast.SelectionSet, o
|
||||
if out.Values[i] == graphql.Null {
|
||||
atomic.AddUint32(&out.Invalids, 1)
|
||||
}
|
||||
case "category":
|
||||
out.Values[i] = ec._Vendor_category(ctx, field, obj)
|
||||
if out.Values[i] == graphql.Null {
|
||||
atomic.AddUint32(&out.Invalids, 1)
|
||||
}
|
||||
case "description":
|
||||
out.Values[i] = ec._Vendor_description(ctx, field, obj)
|
||||
case "organization":
|
||||
@@ -44539,6 +44632,74 @@ func (ec *executionContext) marshalNVendor2ᚖgithubᚗcomᚋgetproboᚋproboᚋ
|
||||
return ec._Vendor(ctx, sel, v)
|
||||
}
|
||||
|
||||
func (ec *executionContext) unmarshalNVendorCategory2githubᚗcomᚋgetproboᚋproboᚋpkgᚋcoredataᚐVendorCategory(ctx context.Context, v any) (coredata.VendorCategory, error) {
|
||||
tmp, err := graphql.UnmarshalString(v)
|
||||
res := unmarshalNVendorCategory2githubᚗcomᚋgetproboᚋproboᚋpkgᚋcoredataᚐVendorCategory[tmp]
|
||||
return res, graphql.ErrorOnPath(ctx, err)
|
||||
}
|
||||
|
||||
func (ec *executionContext) marshalNVendorCategory2githubᚗcomᚋgetproboᚋproboᚋpkgᚋcoredataᚐVendorCategory(ctx context.Context, sel ast.SelectionSet, v coredata.VendorCategory) graphql.Marshaler {
|
||||
_ = sel
|
||||
res := graphql.MarshalString(marshalNVendorCategory2githubᚗcomᚋgetproboᚋproboᚋpkgᚋcoredataᚐVendorCategory[v])
|
||||
if res == graphql.Null {
|
||||
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
||||
ec.Errorf(ctx, "the requested element is null which the schema does not allow")
|
||||
}
|
||||
}
|
||||
return res
|
||||
}
|
||||
|
||||
var (
|
||||
unmarshalNVendorCategory2githubᚗcomᚋgetproboᚋproboᚋpkgᚋcoredataᚐVendorCategory = map[string]coredata.VendorCategory{
|
||||
"ANALYTICS": coredata.VendorCategoryAnalytics,
|
||||
"CLOUD_MONITORING": coredata.VendorCategoryCloudMonitoring,
|
||||
"CLOUD_PROVIDER": coredata.VendorCategoryCloudProvider,
|
||||
"COLLABORATION": coredata.VendorCategoryCollaboration,
|
||||
"CUSTOMER_SUPPORT": coredata.VendorCategoryCustomerSupport,
|
||||
"DATA_STORAGE_AND_PROCESSING": coredata.VendorCategoryDataStorageAndProcessing,
|
||||
"DOCUMENT_MANAGEMENT": coredata.VendorCategoryDocumentManagement,
|
||||
"EMPLOYEE_MANAGEMENT": coredata.VendorCategoryEmployeeManagement,
|
||||
"ENGINEERING": coredata.VendorCategoryEngineering,
|
||||
"FINANCE": coredata.VendorCategoryFinance,
|
||||
"IDENTITY_PROVIDER": coredata.VendorCategoryIdentityProvider,
|
||||
"IT": coredata.VendorCategoryIT,
|
||||
"MARKETING": coredata.VendorCategoryMarketing,
|
||||
"OFFICE_OPERATIONS": coredata.VendorCategoryOfficeOperations,
|
||||
"OTHER": coredata.VendorCategoryOther,
|
||||
"PASSWORD_MANAGEMENT": coredata.VendorCategoryPasswordManagement,
|
||||
"PRODUCT_AND_DESIGN": coredata.VendorCategoryProductAndDesign,
|
||||
"PROFESSIONAL_SERVICES": coredata.VendorCategoryProfessionalServices,
|
||||
"RECRUITING": coredata.VendorCategoryRecruiting,
|
||||
"SALES": coredata.VendorCategorySales,
|
||||
"SECURITY": coredata.VendorCategorySecurity,
|
||||
"VERSION_CONTROL": coredata.VendorCategoryVersionControl,
|
||||
}
|
||||
marshalNVendorCategory2githubᚗcomᚋgetproboᚋproboᚋpkgᚋcoredataᚐVendorCategory = map[coredata.VendorCategory]string{
|
||||
coredata.VendorCategoryAnalytics: "ANALYTICS",
|
||||
coredata.VendorCategoryCloudMonitoring: "CLOUD_MONITORING",
|
||||
coredata.VendorCategoryCloudProvider: "CLOUD_PROVIDER",
|
||||
coredata.VendorCategoryCollaboration: "COLLABORATION",
|
||||
coredata.VendorCategoryCustomerSupport: "CUSTOMER_SUPPORT",
|
||||
coredata.VendorCategoryDataStorageAndProcessing: "DATA_STORAGE_AND_PROCESSING",
|
||||
coredata.VendorCategoryDocumentManagement: "DOCUMENT_MANAGEMENT",
|
||||
coredata.VendorCategoryEmployeeManagement: "EMPLOYEE_MANAGEMENT",
|
||||
coredata.VendorCategoryEngineering: "ENGINEERING",
|
||||
coredata.VendorCategoryFinance: "FINANCE",
|
||||
coredata.VendorCategoryIdentityProvider: "IDENTITY_PROVIDER",
|
||||
coredata.VendorCategoryIT: "IT",
|
||||
coredata.VendorCategoryMarketing: "MARKETING",
|
||||
coredata.VendorCategoryOfficeOperations: "OFFICE_OPERATIONS",
|
||||
coredata.VendorCategoryOther: "OTHER",
|
||||
coredata.VendorCategoryPasswordManagement: "PASSWORD_MANAGEMENT",
|
||||
coredata.VendorCategoryProductAndDesign: "PRODUCT_AND_DESIGN",
|
||||
coredata.VendorCategoryProfessionalServices: "PROFESSIONAL_SERVICES",
|
||||
coredata.VendorCategoryRecruiting: "RECRUITING",
|
||||
coredata.VendorCategorySales: "SALES",
|
||||
coredata.VendorCategorySecurity: "SECURITY",
|
||||
coredata.VendorCategoryVersionControl: "VERSION_CONTROL",
|
||||
}
|
||||
)
|
||||
|
||||
func (ec *executionContext) marshalNVendorComplianceReport2ᚖgithubᚗcomᚋgetproboᚋproboᚋpkgᚋserverᚋapiᚋconsoleᚋv1ᚋtypesᚐVendorComplianceReport(ctx context.Context, sel ast.SelectionSet, v *types.VendorComplianceReport) graphql.Marshaler {
|
||||
if v == nil {
|
||||
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
||||
@@ -45590,6 +45751,76 @@ func (ec *executionContext) unmarshalOUserOrder2ᚖgithubᚗcomᚋgetproboᚋpro
|
||||
return &res, graphql.ErrorOnPath(ctx, err)
|
||||
}
|
||||
|
||||
func (ec *executionContext) unmarshalOVendorCategory2ᚖgithubᚗcomᚋgetproboᚋproboᚋpkgᚋcoredataᚐVendorCategory(ctx context.Context, v any) (*coredata.VendorCategory, error) {
|
||||
if v == nil {
|
||||
return nil, nil
|
||||
}
|
||||
tmp, err := graphql.UnmarshalString(v)
|
||||
res := unmarshalOVendorCategory2ᚖgithubᚗcomᚋgetproboᚋproboᚋpkgᚋcoredataᚐVendorCategory[tmp]
|
||||
return &res, graphql.ErrorOnPath(ctx, err)
|
||||
}
|
||||
|
||||
func (ec *executionContext) marshalOVendorCategory2ᚖgithubᚗcomᚋgetproboᚋproboᚋpkgᚋcoredataᚐVendorCategory(ctx context.Context, sel ast.SelectionSet, v *coredata.VendorCategory) graphql.Marshaler {
|
||||
if v == nil {
|
||||
return graphql.Null
|
||||
}
|
||||
_ = sel
|
||||
_ = ctx
|
||||
res := graphql.MarshalString(marshalOVendorCategory2ᚖgithubᚗcomᚋgetproboᚋproboᚋpkgᚋcoredataᚐVendorCategory[*v])
|
||||
return res
|
||||
}
|
||||
|
||||
var (
|
||||
unmarshalOVendorCategory2ᚖgithubᚗcomᚋgetproboᚋproboᚋpkgᚋcoredataᚐVendorCategory = map[string]coredata.VendorCategory{
|
||||
"ANALYTICS": coredata.VendorCategoryAnalytics,
|
||||
"CLOUD_MONITORING": coredata.VendorCategoryCloudMonitoring,
|
||||
"CLOUD_PROVIDER": coredata.VendorCategoryCloudProvider,
|
||||
"COLLABORATION": coredata.VendorCategoryCollaboration,
|
||||
"CUSTOMER_SUPPORT": coredata.VendorCategoryCustomerSupport,
|
||||
"DATA_STORAGE_AND_PROCESSING": coredata.VendorCategoryDataStorageAndProcessing,
|
||||
"DOCUMENT_MANAGEMENT": coredata.VendorCategoryDocumentManagement,
|
||||
"EMPLOYEE_MANAGEMENT": coredata.VendorCategoryEmployeeManagement,
|
||||
"ENGINEERING": coredata.VendorCategoryEngineering,
|
||||
"FINANCE": coredata.VendorCategoryFinance,
|
||||
"IDENTITY_PROVIDER": coredata.VendorCategoryIdentityProvider,
|
||||
"IT": coredata.VendorCategoryIT,
|
||||
"MARKETING": coredata.VendorCategoryMarketing,
|
||||
"OFFICE_OPERATIONS": coredata.VendorCategoryOfficeOperations,
|
||||
"OTHER": coredata.VendorCategoryOther,
|
||||
"PASSWORD_MANAGEMENT": coredata.VendorCategoryPasswordManagement,
|
||||
"PRODUCT_AND_DESIGN": coredata.VendorCategoryProductAndDesign,
|
||||
"PROFESSIONAL_SERVICES": coredata.VendorCategoryProfessionalServices,
|
||||
"RECRUITING": coredata.VendorCategoryRecruiting,
|
||||
"SALES": coredata.VendorCategorySales,
|
||||
"SECURITY": coredata.VendorCategorySecurity,
|
||||
"VERSION_CONTROL": coredata.VendorCategoryVersionControl,
|
||||
}
|
||||
marshalOVendorCategory2ᚖgithubᚗcomᚋgetproboᚋproboᚋpkgᚋcoredataᚐVendorCategory = map[coredata.VendorCategory]string{
|
||||
coredata.VendorCategoryAnalytics: "ANALYTICS",
|
||||
coredata.VendorCategoryCloudMonitoring: "CLOUD_MONITORING",
|
||||
coredata.VendorCategoryCloudProvider: "CLOUD_PROVIDER",
|
||||
coredata.VendorCategoryCollaboration: "COLLABORATION",
|
||||
coredata.VendorCategoryCustomerSupport: "CUSTOMER_SUPPORT",
|
||||
coredata.VendorCategoryDataStorageAndProcessing: "DATA_STORAGE_AND_PROCESSING",
|
||||
coredata.VendorCategoryDocumentManagement: "DOCUMENT_MANAGEMENT",
|
||||
coredata.VendorCategoryEmployeeManagement: "EMPLOYEE_MANAGEMENT",
|
||||
coredata.VendorCategoryEngineering: "ENGINEERING",
|
||||
coredata.VendorCategoryFinance: "FINANCE",
|
||||
coredata.VendorCategoryIdentityProvider: "IDENTITY_PROVIDER",
|
||||
coredata.VendorCategoryIT: "IT",
|
||||
coredata.VendorCategoryMarketing: "MARKETING",
|
||||
coredata.VendorCategoryOfficeOperations: "OFFICE_OPERATIONS",
|
||||
coredata.VendorCategoryOther: "OTHER",
|
||||
coredata.VendorCategoryPasswordManagement: "PASSWORD_MANAGEMENT",
|
||||
coredata.VendorCategoryProductAndDesign: "PRODUCT_AND_DESIGN",
|
||||
coredata.VendorCategoryProfessionalServices: "PROFESSIONAL_SERVICES",
|
||||
coredata.VendorCategoryRecruiting: "RECRUITING",
|
||||
coredata.VendorCategorySales: "SALES",
|
||||
coredata.VendorCategorySecurity: "SECURITY",
|
||||
coredata.VendorCategoryVersionControl: "VERSION_CONTROL",
|
||||
}
|
||||
)
|
||||
|
||||
func (ec *executionContext) unmarshalOVendorComplianceReportOrder2ᚖgithubᚗcomᚋgetproboᚋproboᚋpkgᚋserverᚋapiᚋconsoleᚋv1ᚋtypesᚐVendorComplianceReportOrderBy(ctx context.Context, v any) (*types.VendorComplianceReportOrderBy, error) {
|
||||
if v == nil {
|
||||
return nil, nil
|
||||
|
||||
@@ -246,23 +246,23 @@ type CreateTaskPayload struct {
|
||||
}
|
||||
|
||||
type CreateVendorInput struct {
|
||||
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"`
|
||||
BusinessOwnerID *gid.GID `json:"businessOwnerId,omitempty"`
|
||||
SecurityOwnerID *gid.GID `json:"securityOwnerId,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 *coredata.VendorCategory `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"`
|
||||
BusinessOwnerID *gid.GID `json:"businessOwnerId,omitempty"`
|
||||
SecurityOwnerID *gid.GID `json:"securityOwnerId,omitempty"`
|
||||
}
|
||||
|
||||
type CreateVendorPayload struct {
|
||||
@@ -909,23 +909,23 @@ type UpdateTaskPayload struct {
|
||||
}
|
||||
|
||||
type UpdateVendorInput struct {
|
||||
ID gid.GID `json:"id"`
|
||||
Name *string `json:"name,omitempty"`
|
||||
Description *string `json:"description,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"`
|
||||
BusinessOwnerID *gid.GID `json:"businessOwnerId,omitempty"`
|
||||
SecurityOwnerID *gid.GID `json:"securityOwnerId,omitempty"`
|
||||
ID gid.GID `json:"id"`
|
||||
Name *string `json:"name,omitempty"`
|
||||
Description *string `json:"description,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 *coredata.VendorCategory `json:"category,omitempty"`
|
||||
Certifications []string `json:"certifications,omitempty"`
|
||||
SecurityPageURL *string `json:"securityPageUrl,omitempty"`
|
||||
TrustPageURL *string `json:"trustPageUrl,omitempty"`
|
||||
BusinessOwnerID *gid.GID `json:"businessOwnerId,omitempty"`
|
||||
SecurityOwnerID *gid.GID `json:"securityOwnerId,omitempty"`
|
||||
}
|
||||
|
||||
type UpdateVendorPayload struct {
|
||||
@@ -987,6 +987,7 @@ type UserEdge struct {
|
||||
type Vendor struct {
|
||||
ID gid.GID `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Category coredata.VendorCategory `json:"category"`
|
||||
Description *string `json:"description,omitempty"`
|
||||
Organization *Organization `json:"organization"`
|
||||
ComplianceReports *VendorComplianceReportConnection `json:"complianceReports"`
|
||||
|
||||
@@ -59,6 +59,7 @@ func NewVendor(v *coredata.Vendor) *Vendor {
|
||||
HeadquarterAddress: v.HeadquarterAddress,
|
||||
LegalName: v.LegalName,
|
||||
WebsiteURL: v.WebsiteURL,
|
||||
Category: v.Category,
|
||||
UpdatedAt: v.UpdatedAt,
|
||||
CreatedAt: v.CreatedAt,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user