Rename GraphQL APIs to compliance portal
Update console, visitor, MCP, and Slack API surfaces so schemas and resolvers use the Compliance Portal naming consistently. Signed-off-by: Bryan Frimin <bryan@probo.com>
This commit is contained in:
@@ -1523,12 +1523,12 @@ func (r *Resolver) UpdateAuditTool(ctx context.Context, req *mcp.CallToolRequest
|
||||
audit, err := svc.Audits.Update(
|
||||
ctx, scope,
|
||||
&probo.UpdateAuditRequest{
|
||||
ID: input.ID,
|
||||
Name: UnwrapOmittable(input.Name),
|
||||
ValidFrom: input.ValidFrom,
|
||||
ValidUntil: input.ValidUntil,
|
||||
State: input.State,
|
||||
TrustCenterVisibility: input.TrustCenterVisibility,
|
||||
ID: input.ID,
|
||||
Name: UnwrapOmittable(input.Name),
|
||||
ValidFrom: input.ValidFrom,
|
||||
ValidUntil: input.ValidUntil,
|
||||
State: input.State,
|
||||
CompliancePortalVisibility: input.CompliancePortalVisibility,
|
||||
},
|
||||
)
|
||||
if err != nil {
|
||||
@@ -2240,9 +2240,9 @@ func (r *Resolver) AddDocumentTool(ctx context.Context, req *mcp.CallToolRequest
|
||||
|
||||
svc := r.proboSvc
|
||||
|
||||
var trustCenterVisibility *coredata.TrustCenterVisibility
|
||||
if input.TrustCenterVisibility != nil {
|
||||
trustCenterVisibility = input.TrustCenterVisibility
|
||||
var compliancePortalVisibility *coredata.CompliancePortalVisibility
|
||||
if input.CompliancePortalVisibility != nil {
|
||||
compliancePortalVisibility = input.CompliancePortalVisibility
|
||||
}
|
||||
|
||||
contentJSON, err := markdownToProseMirrorJSON(input.Content)
|
||||
@@ -2253,13 +2253,13 @@ func (r *Resolver) AddDocumentTool(ctx context.Context, req *mcp.CallToolRequest
|
||||
document, documentVersion, err := svc.Documents.Create(
|
||||
ctx, scope,
|
||||
probo.CreateDocumentRequest{
|
||||
OrganizationID: input.OrganizationID,
|
||||
Title: input.Title,
|
||||
Content: contentJSON,
|
||||
Classification: input.Classification,
|
||||
DocumentType: input.DocumentType,
|
||||
TrustCenterVisibility: trustCenterVisibility,
|
||||
DefaultApproverIDs: input.DefaultApproverIds,
|
||||
OrganizationID: input.OrganizationID,
|
||||
Title: input.Title,
|
||||
Content: contentJSON,
|
||||
Classification: input.Classification,
|
||||
DocumentType: input.DocumentType,
|
||||
CompliancePortalVisibility: compliancePortalVisibility,
|
||||
DefaultApproverIDs: input.DefaultApproverIds,
|
||||
},
|
||||
)
|
||||
if err != nil {
|
||||
@@ -2296,13 +2296,13 @@ func (r *Resolver) UpdateDocumentTool(ctx context.Context, req *mcp.CallToolRequ
|
||||
document, documentVersion, _, err := svc.Documents.Update(
|
||||
ctx, scope,
|
||||
probo.UpdateDocumentRequest{
|
||||
DocumentID: input.ID,
|
||||
Title: input.Title,
|
||||
Content: content,
|
||||
Classification: input.Classification,
|
||||
DocumentType: input.DocumentType,
|
||||
TrustCenterVisibility: input.TrustCenterVisibility,
|
||||
DefaultApproverIDs: defaultApproverIDs,
|
||||
DocumentID: input.ID,
|
||||
Title: input.Title,
|
||||
Content: content,
|
||||
Classification: input.Classification,
|
||||
DocumentType: input.DocumentType,
|
||||
CompliancePortalVisibility: input.CompliancePortalVisibility,
|
||||
DefaultApproverIDs: defaultApproverIDs,
|
||||
},
|
||||
)
|
||||
if err != nil {
|
||||
@@ -4880,65 +4880,65 @@ func (r *Resolver) DeleteRightsRequestTool(ctx context.Context, req *mcp.CallToo
|
||||
}, nil
|
||||
}
|
||||
|
||||
// GetTrustCenterTool handles the getTrustCenter tool
|
||||
// Get the trust center for an organization
|
||||
func (r *Resolver) GetTrustCenterTool(ctx context.Context, req *mcp.CallToolRequest, input *types.GetTrustCenterInput) (*mcp.CallToolResult, types.GetTrustCenterOutput, error) {
|
||||
// GetCompliancePortalTool handles the getCompliancePortal tool
|
||||
// Get the compliance portal for an organization
|
||||
func (r *Resolver) GetCompliancePortalTool(ctx context.Context, req *mcp.CallToolRequest, input *types.GetCompliancePortalInput) (*mcp.CallToolResult, types.GetCompliancePortalOutput, error) {
|
||||
scope, err := r.Authorize(ctx, input.OrganizationID, management.ActionCompliancePortalGet)
|
||||
if err != nil {
|
||||
return nil, types.GetTrustCenterOutput{}, err
|
||||
return nil, types.GetCompliancePortalOutput{}, err
|
||||
}
|
||||
|
||||
prb := r.management
|
||||
|
||||
trustCenter, err := prb.GetByOrganizationID(ctx, scope, input.OrganizationID)
|
||||
compliancePortal, err := prb.GetByOrganizationID(ctx, scope, input.OrganizationID)
|
||||
if err != nil {
|
||||
return nil, types.GetTrustCenterOutput{}, fmt.Errorf("cannot get trust center: %w", err)
|
||||
return nil, types.GetCompliancePortalOutput{}, fmt.Errorf("cannot get compliance portal: %w", err)
|
||||
}
|
||||
|
||||
tc := types.NewTrustCenter(trustCenter)
|
||||
tc := types.NewCompliancePortal(compliancePortal)
|
||||
|
||||
if trustCenter.LogoFileID != nil {
|
||||
logo, err := r.loadFile(ctx, scope, *trustCenter.LogoFileID)
|
||||
if compliancePortal.LogoFileID != nil {
|
||||
logo, err := r.loadFile(ctx, scope, *compliancePortal.LogoFileID)
|
||||
if err != nil {
|
||||
return nil, types.GetTrustCenterOutput{}, err
|
||||
return nil, types.GetCompliancePortalOutput{}, err
|
||||
}
|
||||
|
||||
tc.Logo = logo
|
||||
}
|
||||
|
||||
if trustCenter.DarkLogoFileID != nil {
|
||||
darkLogo, err := r.loadFile(ctx, scope, *trustCenter.DarkLogoFileID)
|
||||
if compliancePortal.DarkLogoFileID != nil {
|
||||
darkLogo, err := r.loadFile(ctx, scope, *compliancePortal.DarkLogoFileID)
|
||||
if err != nil {
|
||||
return nil, types.GetTrustCenterOutput{}, err
|
||||
return nil, types.GetCompliancePortalOutput{}, err
|
||||
}
|
||||
|
||||
tc.DarkLogo = darkLogo
|
||||
}
|
||||
|
||||
if trustCenter.NonDisclosureAgreementFileID != nil {
|
||||
nda, err := r.loadFile(ctx, scope, *trustCenter.NonDisclosureAgreementFileID)
|
||||
if compliancePortal.NonDisclosureAgreementFileID != nil {
|
||||
nda, err := r.loadFile(ctx, scope, *compliancePortal.NonDisclosureAgreementFileID)
|
||||
if err != nil {
|
||||
return nil, types.GetTrustCenterOutput{}, err
|
||||
return nil, types.GetCompliancePortalOutput{}, err
|
||||
}
|
||||
|
||||
tc.Nda = nda
|
||||
}
|
||||
|
||||
return nil, types.GetTrustCenterOutput{TrustCenter: tc}, nil
|
||||
return nil, types.GetCompliancePortalOutput{CompliancePortal: tc}, nil
|
||||
}
|
||||
|
||||
// UpdateTrustCenterTool handles the updateTrustCenter tool
|
||||
// Update the trust center settings
|
||||
func (r *Resolver) UpdateTrustCenterTool(ctx context.Context, req *mcp.CallToolRequest, input *types.UpdateTrustCenterInput) (*mcp.CallToolResult, types.UpdateTrustCenterOutput, error) {
|
||||
scope, err := r.Authorize(ctx, input.TrustCenterID, management.ActionCompliancePortalUpdate)
|
||||
// UpdateCompliancePortalTool handles the updateCompliancePortal tool
|
||||
// Update the compliance portal settings
|
||||
func (r *Resolver) UpdateCompliancePortalTool(ctx context.Context, req *mcp.CallToolRequest, input *types.UpdateCompliancePortalInput) (*mcp.CallToolResult, types.UpdateCompliancePortalOutput, error) {
|
||||
scope, err := r.Authorize(ctx, input.CompliancePortalID, management.ActionCompliancePortalUpdate)
|
||||
if err != nil {
|
||||
return nil, types.UpdateTrustCenterOutput{}, err
|
||||
return nil, types.UpdateCompliancePortalOutput{}, err
|
||||
}
|
||||
|
||||
prb := r.management
|
||||
|
||||
updateReq := &management.UpdateRequest{
|
||||
ID: input.TrustCenterID,
|
||||
ID: input.CompliancePortalID,
|
||||
}
|
||||
|
||||
if active := UnwrapOmittable(input.Active); active != nil {
|
||||
@@ -4958,31 +4958,31 @@ func (r *Resolver) UpdateTrustCenterTool(ctx context.Context, req *mcp.CallToolR
|
||||
updateReq.Title = *title
|
||||
}
|
||||
|
||||
trustCenter, _, err := prb.Update(ctx, scope, updateReq)
|
||||
compliancePortal, _, err := prb.Update(ctx, scope, updateReq)
|
||||
if err != nil {
|
||||
return nil, types.UpdateTrustCenterOutput{}, fmt.Errorf("cannot update trust center: %w", err)
|
||||
return nil, types.UpdateCompliancePortalOutput{}, fmt.Errorf("cannot update compliance portal: %w", err)
|
||||
}
|
||||
|
||||
return nil, types.UpdateTrustCenterOutput{TrustCenter: types.NewTrustCenter(trustCenter)}, nil
|
||||
return nil, types.UpdateCompliancePortalOutput{CompliancePortal: types.NewCompliancePortal(compliancePortal)}, nil
|
||||
}
|
||||
|
||||
// ListTrustCenterReferencesTool handles the listTrustCenterReferences tool
|
||||
// List all references for a trust center
|
||||
func (r *Resolver) ListTrustCenterReferencesTool(ctx context.Context, req *mcp.CallToolRequest, input *types.ListTrustCenterReferencesInput) (*mcp.CallToolResult, types.ListTrustCenterReferencesOutput, error) {
|
||||
scope, err := r.Authorize(ctx, input.TrustCenterID, management.ActionCompliancePortalReferenceList)
|
||||
// ListCompliancePortalReferencesTool handles the listCompliancePortalReferences tool
|
||||
// List all references for a compliance portal
|
||||
func (r *Resolver) ListCompliancePortalReferencesTool(ctx context.Context, req *mcp.CallToolRequest, input *types.ListCompliancePortalReferencesInput) (*mcp.CallToolResult, types.ListCompliancePortalReferencesOutput, error) {
|
||||
scope, err := r.Authorize(ctx, input.CompliancePortalID, management.ActionCompliancePortalReferenceList)
|
||||
if err != nil {
|
||||
return nil, types.ListTrustCenterReferencesOutput{}, err
|
||||
return nil, types.ListCompliancePortalReferencesOutput{}, err
|
||||
}
|
||||
|
||||
prb := r.management
|
||||
|
||||
pageOrderBy := page.OrderBy[coredata.TrustCenterReferenceOrderField]{
|
||||
Field: coredata.TrustCenterReferenceOrderFieldRank,
|
||||
pageOrderBy := page.OrderBy[coredata.CompliancePortalReferenceOrderField]{
|
||||
Field: coredata.CompliancePortalReferenceOrderFieldRank,
|
||||
Direction: page.OrderDirectionAsc,
|
||||
}
|
||||
|
||||
if input.OrderBy != nil {
|
||||
pageOrderBy = page.OrderBy[coredata.TrustCenterReferenceOrderField]{
|
||||
pageOrderBy = page.OrderBy[coredata.CompliancePortalReferenceOrderField]{
|
||||
Field: input.OrderBy.Field,
|
||||
Direction: input.OrderBy.Direction,
|
||||
}
|
||||
@@ -4990,18 +4990,18 @@ func (r *Resolver) ListTrustCenterReferencesTool(ctx context.Context, req *mcp.C
|
||||
|
||||
cursor := types.NewCursor(input.Size, input.Cursor, pageOrderBy)
|
||||
|
||||
p, err := prb.ListReferences(ctx, scope, input.TrustCenterID, cursor)
|
||||
p, err := prb.ListReferences(ctx, scope, input.CompliancePortalID, cursor)
|
||||
if err != nil {
|
||||
return nil, types.ListTrustCenterReferencesOutput{}, fmt.Errorf("cannot list trust center references: %w", err)
|
||||
return nil, types.ListCompliancePortalReferencesOutput{}, fmt.Errorf("cannot list compliance portal references: %w", err)
|
||||
}
|
||||
|
||||
refs := make([]*types.TrustCenterReference, 0, len(p.Data))
|
||||
refs := make([]*types.CompliancePortalReference, 0, len(p.Data))
|
||||
for _, reference := range p.Data {
|
||||
ref := types.NewTrustCenterReference(reference)
|
||||
ref := types.NewCompliancePortalReference(reference)
|
||||
|
||||
logo, err := r.loadFile(ctx, scope, reference.LogoFileID)
|
||||
if err != nil {
|
||||
return nil, types.ListTrustCenterReferencesOutput{}, err
|
||||
return nil, types.ListCompliancePortalReferencesOutput{}, err
|
||||
}
|
||||
|
||||
ref.Logo = logo
|
||||
@@ -5009,15 +5009,15 @@ func (r *Resolver) ListTrustCenterReferencesTool(ctx context.Context, req *mcp.C
|
||||
refs = append(refs, ref)
|
||||
}
|
||||
|
||||
return nil, types.NewListTrustCenterReferencesOutput(refs, p), nil
|
||||
return nil, types.NewListCompliancePortalReferencesOutput(refs, p), nil
|
||||
}
|
||||
|
||||
// AddTrustCenterReferenceTool handles the addTrustCenterReference tool
|
||||
// Add a new reference to the trust center
|
||||
func (r *Resolver) AddTrustCenterReferenceTool(ctx context.Context, req *mcp.CallToolRequest, input *types.AddTrustCenterReferenceInput) (*mcp.CallToolResult, types.AddTrustCenterReferenceOutput, error) {
|
||||
scope, err := r.Authorize(ctx, input.TrustCenterID, management.ActionCompliancePortalReferenceCreate)
|
||||
// AddCompliancePortalReferenceTool handles the addCompliancePortalReference tool
|
||||
// Add a new reference to the compliance portal
|
||||
func (r *Resolver) AddCompliancePortalReferenceTool(ctx context.Context, req *mcp.CallToolRequest, input *types.AddCompliancePortalReferenceInput) (*mcp.CallToolResult, types.AddCompliancePortalReferenceOutput, error) {
|
||||
scope, err := r.Authorize(ctx, input.CompliancePortalID, management.ActionCompliancePortalReferenceCreate)
|
||||
if err != nil {
|
||||
return nil, types.AddTrustCenterReferenceOutput{}, err
|
||||
return nil, types.AddCompliancePortalReferenceOutput{}, err
|
||||
}
|
||||
|
||||
prb := r.management
|
||||
@@ -5030,25 +5030,25 @@ func (r *Resolver) AddTrustCenterReferenceTool(ctx context.Context, req *mcp.Cal
|
||||
reference, err := prb.CreateReference(
|
||||
ctx, scope,
|
||||
&management.CreateReferenceRequest{
|
||||
TrustCenterID: input.TrustCenterID,
|
||||
Name: input.Name,
|
||||
Description: input.Description,
|
||||
WebsiteURL: websiteURL,
|
||||
CompliancePortalID: input.CompliancePortalID,
|
||||
Name: input.Name,
|
||||
Description: input.Description,
|
||||
WebsiteURL: websiteURL,
|
||||
},
|
||||
)
|
||||
if err != nil {
|
||||
return nil, types.AddTrustCenterReferenceOutput{}, fmt.Errorf("cannot add trust center reference: %w", err)
|
||||
return nil, types.AddCompliancePortalReferenceOutput{}, fmt.Errorf("cannot add compliance portal reference: %w", err)
|
||||
}
|
||||
|
||||
return nil, types.AddTrustCenterReferenceOutput{TrustCenterReference: types.NewTrustCenterReference(reference)}, nil
|
||||
return nil, types.AddCompliancePortalReferenceOutput{CompliancePortalReference: types.NewCompliancePortalReference(reference)}, nil
|
||||
}
|
||||
|
||||
// UpdateTrustCenterReferenceTool handles the updateTrustCenterReference tool
|
||||
// Update a trust center reference
|
||||
func (r *Resolver) UpdateTrustCenterReferenceTool(ctx context.Context, req *mcp.CallToolRequest, input *types.UpdateTrustCenterReferenceInput) (*mcp.CallToolResult, types.UpdateTrustCenterReferenceOutput, error) {
|
||||
// UpdateCompliancePortalReferenceTool handles the updateCompliancePortalReference tool
|
||||
// Update a compliance portal reference
|
||||
func (r *Resolver) UpdateCompliancePortalReferenceTool(ctx context.Context, req *mcp.CallToolRequest, input *types.UpdateCompliancePortalReferenceInput) (*mcp.CallToolResult, types.UpdateCompliancePortalReferenceOutput, error) {
|
||||
scope, err := r.Authorize(ctx, input.ID, management.ActionCompliancePortalReferenceUpdate)
|
||||
if err != nil {
|
||||
return nil, types.UpdateTrustCenterReferenceOutput{}, err
|
||||
return nil, types.UpdateCompliancePortalReferenceOutput{}, err
|
||||
}
|
||||
|
||||
prb := r.management
|
||||
@@ -5072,95 +5072,95 @@ func (r *Resolver) UpdateTrustCenterReferenceTool(ctx context.Context, req *mcp.
|
||||
|
||||
reference, err := prb.UpdateReference(ctx, scope, updateRefReq)
|
||||
if err != nil {
|
||||
return nil, types.UpdateTrustCenterReferenceOutput{}, fmt.Errorf("cannot update trust center reference: %w", err)
|
||||
return nil, types.UpdateCompliancePortalReferenceOutput{}, fmt.Errorf("cannot update compliance portal reference: %w", err)
|
||||
}
|
||||
|
||||
return nil, types.UpdateTrustCenterReferenceOutput{TrustCenterReference: types.NewTrustCenterReference(reference)}, nil
|
||||
return nil, types.UpdateCompliancePortalReferenceOutput{CompliancePortalReference: types.NewCompliancePortalReference(reference)}, nil
|
||||
}
|
||||
|
||||
// DeleteTrustCenterReferenceTool handles the deleteTrustCenterReference tool
|
||||
// Delete a trust center reference
|
||||
func (r *Resolver) DeleteTrustCenterReferenceTool(ctx context.Context, req *mcp.CallToolRequest, input *types.DeleteTrustCenterReferenceInput) (*mcp.CallToolResult, types.DeleteTrustCenterReferenceOutput, error) {
|
||||
// DeleteCompliancePortalReferenceTool handles the deleteCompliancePortalReference tool
|
||||
// Delete a compliance portal reference
|
||||
func (r *Resolver) DeleteCompliancePortalReferenceTool(ctx context.Context, req *mcp.CallToolRequest, input *types.DeleteCompliancePortalReferenceInput) (*mcp.CallToolResult, types.DeleteCompliancePortalReferenceOutput, error) {
|
||||
scope, err := r.Authorize(ctx, input.ID, management.ActionCompliancePortalReferenceDelete)
|
||||
if err != nil {
|
||||
return nil, types.DeleteTrustCenterReferenceOutput{}, err
|
||||
return nil, types.DeleteCompliancePortalReferenceOutput{}, err
|
||||
}
|
||||
|
||||
prb := r.management
|
||||
|
||||
err = prb.DeleteReference(ctx, scope, input.ID)
|
||||
if err != nil {
|
||||
return nil, types.DeleteTrustCenterReferenceOutput{}, fmt.Errorf("cannot delete trust center reference: %w", err)
|
||||
return nil, types.DeleteCompliancePortalReferenceOutput{}, fmt.Errorf("cannot delete compliance portal reference: %w", err)
|
||||
}
|
||||
|
||||
return nil, types.DeleteTrustCenterReferenceOutput{DeletedTrustCenterReferenceID: input.ID}, nil
|
||||
return nil, types.DeleteCompliancePortalReferenceOutput{DeletedCompliancePortalReferenceID: input.ID}, nil
|
||||
}
|
||||
|
||||
// ListTrustCenterFilesTool handles the listTrustCenterFiles tool
|
||||
// List all files for the trust center
|
||||
func (r *Resolver) ListTrustCenterFilesTool(ctx context.Context, req *mcp.CallToolRequest, input *types.ListTrustCenterFilesInput) (*mcp.CallToolResult, types.ListTrustCenterFilesOutput, error) {
|
||||
// ListCompliancePortalFilesTool handles the listCompliancePortalFiles tool
|
||||
// List all files for the compliance portal
|
||||
func (r *Resolver) ListCompliancePortalFilesTool(ctx context.Context, req *mcp.CallToolRequest, input *types.ListCompliancePortalFilesInput) (*mcp.CallToolResult, types.ListCompliancePortalFilesOutput, error) {
|
||||
scope, err := r.Authorize(ctx, input.OrganizationID, management.ActionCompliancePortalFileList)
|
||||
if err != nil {
|
||||
return nil, types.ListTrustCenterFilesOutput{}, err
|
||||
return nil, types.ListCompliancePortalFilesOutput{}, err
|
||||
}
|
||||
|
||||
prb := r.management
|
||||
|
||||
pageOrderBy := page.OrderBy[coredata.TrustCenterFileOrderField]{
|
||||
Field: coredata.TrustCenterFileOrderFieldCreatedAt,
|
||||
pageOrderBy := page.OrderBy[coredata.CompliancePortalFileOrderField]{
|
||||
Field: coredata.CompliancePortalFileOrderFieldCreatedAt,
|
||||
Direction: page.OrderDirectionDesc,
|
||||
}
|
||||
|
||||
if input.OrderBy != nil {
|
||||
pageOrderBy = page.OrderBy[coredata.TrustCenterFileOrderField]{
|
||||
pageOrderBy = page.OrderBy[coredata.CompliancePortalFileOrderField]{
|
||||
Field: input.OrderBy.Field,
|
||||
Direction: input.OrderBy.Direction,
|
||||
}
|
||||
}
|
||||
|
||||
cursor := types.NewCursor(input.Size, input.Cursor, pageOrderBy)
|
||||
filter := coredata.NewTrustCenterFileFilter()
|
||||
filter := coredata.NewCompliancePortalFileFilter()
|
||||
|
||||
p, err := prb.ListFilesForOrganizationID(ctx, scope, input.OrganizationID, cursor, filter)
|
||||
if err != nil {
|
||||
return nil, types.ListTrustCenterFilesOutput{}, fmt.Errorf("cannot list trust center files: %w", err)
|
||||
return nil, types.ListCompliancePortalFilesOutput{}, fmt.Errorf("cannot list compliance portal files: %w", err)
|
||||
}
|
||||
|
||||
files := make([]*types.TrustCenterFile, 0, len(p.Data))
|
||||
files := make([]*types.CompliancePortalFile, 0, len(p.Data))
|
||||
for _, f := range p.Data {
|
||||
file, err := r.loadFile(ctx, scope, f.FileID)
|
||||
if err != nil {
|
||||
return nil, types.ListTrustCenterFilesOutput{}, err
|
||||
return nil, types.ListCompliancePortalFilesOutput{}, err
|
||||
}
|
||||
|
||||
files = append(files, types.NewTrustCenterFile(f, file))
|
||||
files = append(files, types.NewCompliancePortalFile(f, file))
|
||||
}
|
||||
|
||||
return nil, types.NewListTrustCenterFilesOutput(files, p), nil
|
||||
return nil, types.NewListCompliancePortalFilesOutput(files, p), nil
|
||||
}
|
||||
|
||||
// DeleteTrustCenterFileTool handles the deleteTrustCenterFile tool
|
||||
// Delete a trust center file
|
||||
func (r *Resolver) DeleteTrustCenterFileTool(ctx context.Context, req *mcp.CallToolRequest, input *types.DeleteTrustCenterFileInput) (*mcp.CallToolResult, types.DeleteTrustCenterFileOutput, error) {
|
||||
// DeleteCompliancePortalFileTool handles the deleteCompliancePortalFile tool
|
||||
// Delete a compliance portal file
|
||||
func (r *Resolver) DeleteCompliancePortalFileTool(ctx context.Context, req *mcp.CallToolRequest, input *types.DeleteCompliancePortalFileInput) (*mcp.CallToolResult, types.DeleteCompliancePortalFileOutput, error) {
|
||||
scope, err := r.Authorize(ctx, input.ID, management.ActionCompliancePortalFileDelete)
|
||||
if err != nil {
|
||||
return nil, types.DeleteTrustCenterFileOutput{}, err
|
||||
return nil, types.DeleteCompliancePortalFileOutput{}, err
|
||||
}
|
||||
|
||||
prb := r.management
|
||||
|
||||
err = prb.DeleteFile(ctx, scope, input.ID)
|
||||
if err != nil {
|
||||
return nil, types.DeleteTrustCenterFileOutput{}, fmt.Errorf("cannot delete trust center file: %w", err)
|
||||
return nil, types.DeleteCompliancePortalFileOutput{}, fmt.Errorf("cannot delete compliance portal file: %w", err)
|
||||
}
|
||||
|
||||
return nil, types.DeleteTrustCenterFileOutput{DeletedTrustCenterFileID: input.ID}, nil
|
||||
return nil, types.DeleteCompliancePortalFileOutput{DeletedCompliancePortalFileID: input.ID}, nil
|
||||
}
|
||||
|
||||
// ListComplianceCustomLinksTool handles the listComplianceCustomLinks tool
|
||||
// List all custom links for a trust center
|
||||
// List all custom links for a compliance portal
|
||||
func (r *Resolver) ListComplianceCustomLinksTool(ctx context.Context, req *mcp.CallToolRequest, input *types.ListComplianceCustomLinksInput) (*mcp.CallToolResult, types.ListComplianceCustomLinksOutput, error) {
|
||||
scope, err := r.Authorize(ctx, input.TrustCenterID, management.ActionComplianceCustomLinkList)
|
||||
scope, err := r.Authorize(ctx, input.CompliancePortalID, management.ActionComplianceCustomLinkList)
|
||||
if err != nil {
|
||||
return nil, types.ListComplianceCustomLinksOutput{}, err
|
||||
}
|
||||
@@ -5181,7 +5181,7 @@ func (r *Resolver) ListComplianceCustomLinksTool(ctx context.Context, req *mcp.C
|
||||
|
||||
cursor := types.NewCursor(input.Size, input.Cursor, pageOrderBy)
|
||||
|
||||
p, err := prb.ListCustomLinks(ctx, scope, input.TrustCenterID, cursor)
|
||||
p, err := prb.ListCustomLinks(ctx, scope, input.CompliancePortalID, cursor)
|
||||
if err != nil {
|
||||
return nil, types.ListComplianceCustomLinksOutput{}, fmt.Errorf("cannot list compliance custom links: %w", err)
|
||||
}
|
||||
@@ -5190,9 +5190,9 @@ func (r *Resolver) ListComplianceCustomLinksTool(ctx context.Context, req *mcp.C
|
||||
}
|
||||
|
||||
// AddComplianceCustomLinkTool handles the addComplianceCustomLink tool
|
||||
// Add a new custom link to the trust center
|
||||
// Add a new custom link to the compliance portal
|
||||
func (r *Resolver) AddComplianceCustomLinkTool(ctx context.Context, req *mcp.CallToolRequest, input *types.AddComplianceCustomLinkInput) (*mcp.CallToolResult, types.AddComplianceCustomLinkOutput, error) {
|
||||
scope, err := r.Authorize(ctx, input.TrustCenterID, management.ActionComplianceCustomLinkCreate)
|
||||
scope, err := r.Authorize(ctx, input.CompliancePortalID, management.ActionComplianceCustomLinkCreate)
|
||||
if err != nil {
|
||||
return nil, types.AddComplianceCustomLinkOutput{}, err
|
||||
}
|
||||
@@ -5202,9 +5202,9 @@ func (r *Resolver) AddComplianceCustomLinkTool(ctx context.Context, req *mcp.Cal
|
||||
item, err := prb.CreateCustomLink(
|
||||
ctx, scope,
|
||||
&management.CreateCustomLinkRequest{
|
||||
TrustCenterID: input.TrustCenterID,
|
||||
Name: input.Name,
|
||||
URL: input.URL,
|
||||
CompliancePortalID: input.CompliancePortalID,
|
||||
Name: input.Name,
|
||||
URL: input.URL,
|
||||
},
|
||||
)
|
||||
if err != nil {
|
||||
@@ -5274,14 +5274,14 @@ func (r *Resolver) DeleteComplianceCustomLinkTool(ctx context.Context, req *mcp.
|
||||
// CreateCustomDomainTool handles the createCustomDomain tool
|
||||
// Create a custom domain for a compliance page
|
||||
func (r *Resolver) CreateCustomDomainTool(ctx context.Context, req *mcp.CallToolRequest, input *types.CreateCustomDomainInput) (*mcp.CallToolResult, types.CreateCustomDomainOutput, error) {
|
||||
scope, err := r.Authorize(ctx, input.TrustCenterID, management.ActionCustomDomainCreate)
|
||||
scope, err := r.Authorize(ctx, input.CompliancePortalID, management.ActionCustomDomainCreate)
|
||||
if err != nil {
|
||||
return nil, types.CreateCustomDomainOutput{}, err
|
||||
}
|
||||
|
||||
domain, err := r.management.AddCustomDomain(
|
||||
ctx, scope,
|
||||
input.TrustCenterID,
|
||||
input.CompliancePortalID,
|
||||
input.Domain,
|
||||
)
|
||||
if err != nil {
|
||||
@@ -5302,12 +5302,12 @@ func (r *Resolver) CreateCustomDomainTool(ctx context.Context, req *mcp.CallTool
|
||||
// DeleteCustomDomainTool handles the deleteCustomDomain tool
|
||||
// Delete the custom domain of a compliance page
|
||||
func (r *Resolver) DeleteCustomDomainTool(ctx context.Context, req *mcp.CallToolRequest, input *types.DeleteCustomDomainInput) (*mcp.CallToolResult, types.DeleteCustomDomainOutput, error) {
|
||||
scope, err := r.Authorize(ctx, input.TrustCenterID, management.ActionCustomDomainDelete)
|
||||
scope, err := r.Authorize(ctx, input.CompliancePortalID, management.ActionCustomDomainDelete)
|
||||
if err != nil {
|
||||
return nil, types.DeleteCustomDomainOutput{}, err
|
||||
}
|
||||
|
||||
compliancePage, err := r.management.Get(ctx, scope, input.TrustCenterID)
|
||||
compliancePage, err := r.management.Get(ctx, scope, input.CompliancePortalID)
|
||||
if err != nil {
|
||||
return nil, types.DeleteCustomDomainOutput{}, fmt.Errorf("cannot load compliance page: %w", err)
|
||||
}
|
||||
|
||||
@@ -4590,13 +4590,13 @@ components:
|
||||
- OUTDATED
|
||||
go.probo.inc/mcpgen/type: go.probo.inc/probo/pkg/coredata.AuditState
|
||||
|
||||
TrustCenterVisibility:
|
||||
CompliancePortalVisibility:
|
||||
type: string
|
||||
enum:
|
||||
- NONE
|
||||
- PRIVATE
|
||||
- PUBLIC
|
||||
go.probo.inc/mcpgen/type: go.probo.inc/probo/pkg/coredata.TrustCenterVisibility
|
||||
go.probo.inc/mcpgen/type: go.probo.inc/probo/pkg/coredata.CompliancePortalVisibility
|
||||
|
||||
AuditOrderField:
|
||||
type: string
|
||||
@@ -4627,7 +4627,7 @@ components:
|
||||
- organization_id
|
||||
- framework_id
|
||||
- state
|
||||
- trust_center_visibility
|
||||
- compliance_portal_visibility
|
||||
- has_report
|
||||
- created_at
|
||||
- updated_at
|
||||
@@ -4661,9 +4661,9 @@ components:
|
||||
state:
|
||||
$ref: "#/components/schemas/AuditState"
|
||||
description: Audit state
|
||||
trust_center_visibility:
|
||||
$ref: "#/components/schemas/TrustCenterVisibility"
|
||||
description: Trust center visibility
|
||||
compliance_portal_visibility:
|
||||
$ref: "#/components/schemas/CompliancePortalVisibility"
|
||||
description: Compliance portal visibility
|
||||
has_report:
|
||||
type: boolean
|
||||
description: Whether the audit has an attached report
|
||||
@@ -4818,13 +4818,13 @@ components:
|
||||
- type: "null"
|
||||
description: No state
|
||||
description: Audit state
|
||||
trust_center_visibility:
|
||||
compliance_portal_visibility:
|
||||
anyOf:
|
||||
- $ref: "#/components/schemas/TrustCenterVisibility"
|
||||
description: Trust center visibility
|
||||
- $ref: "#/components/schemas/CompliancePortalVisibility"
|
||||
description: Compliance portal visibility
|
||||
- type: "null"
|
||||
description: No trust center visibility
|
||||
description: Trust center visibility
|
||||
description: No compliance portal visibility
|
||||
description: Compliance portal visibility
|
||||
|
||||
UpdateAuditOutput:
|
||||
type: object
|
||||
@@ -5781,7 +5781,7 @@ components:
|
||||
required:
|
||||
- id
|
||||
- organization_id
|
||||
- trust_center_visibility
|
||||
- compliance_portal_visibility
|
||||
- write_mode
|
||||
- status
|
||||
- created_at
|
||||
@@ -5803,9 +5803,9 @@ components:
|
||||
- integer
|
||||
- "null"
|
||||
description: Current published minor version number
|
||||
trust_center_visibility:
|
||||
$ref: "#/components/schemas/TrustCenterVisibility"
|
||||
description: Trust center visibility
|
||||
compliance_portal_visibility:
|
||||
$ref: "#/components/schemas/CompliancePortalVisibility"
|
||||
description: Compliance portal visibility
|
||||
write_mode:
|
||||
$ref: "#/components/schemas/DocumentWriteMode"
|
||||
description: Write mode (authored or generated)
|
||||
@@ -6043,11 +6043,11 @@ components:
|
||||
items:
|
||||
$ref: "#/components/schemas/DocumentWriteMode"
|
||||
description: Filter by write mode (AUTHORED or GENERATED)
|
||||
trust_center_visibilities:
|
||||
compliance_portal_visibilities:
|
||||
type: array
|
||||
items:
|
||||
$ref: "#/components/schemas/TrustCenterVisibility"
|
||||
description: Trust center visibilities
|
||||
$ref: "#/components/schemas/CompliancePortalVisibility"
|
||||
description: Compliance portal visibilities
|
||||
document_types:
|
||||
type: array
|
||||
items:
|
||||
@@ -6118,9 +6118,9 @@ components:
|
||||
document_type:
|
||||
$ref: "#/components/schemas/DocumentType"
|
||||
description: Document type
|
||||
trust_center_visibility:
|
||||
$ref: "#/components/schemas/TrustCenterVisibility"
|
||||
description: Trust center visibility
|
||||
compliance_portal_visibility:
|
||||
$ref: "#/components/schemas/CompliancePortalVisibility"
|
||||
description: Compliance portal visibility
|
||||
default_approver_ids:
|
||||
type: array
|
||||
items:
|
||||
@@ -6159,9 +6159,9 @@ components:
|
||||
document_type:
|
||||
$ref: "#/components/schemas/DocumentType"
|
||||
description: Document type
|
||||
trust_center_visibility:
|
||||
$ref: "#/components/schemas/TrustCenterVisibility"
|
||||
description: Trust center visibility
|
||||
compliance_portal_visibility:
|
||||
$ref: "#/components/schemas/CompliancePortalVisibility"
|
||||
description: Compliance portal visibility
|
||||
default_approver_ids:
|
||||
type: array
|
||||
items:
|
||||
@@ -8739,42 +8739,42 @@ components:
|
||||
- FAILED
|
||||
go.probo.inc/mcpgen/type: go.probo.inc/probo/pkg/coredata.CertificateStatus
|
||||
|
||||
TrustCenterReferenceOrderField:
|
||||
CompliancePortalReferenceOrderField:
|
||||
type: string
|
||||
enum:
|
||||
- RANK
|
||||
- NAME
|
||||
- CREATED_AT
|
||||
- UPDATED_AT
|
||||
go.probo.inc/mcpgen/type: go.probo.inc/probo/pkg/coredata.TrustCenterReferenceOrderField
|
||||
go.probo.inc/mcpgen/type: go.probo.inc/probo/pkg/coredata.CompliancePortalReferenceOrderField
|
||||
|
||||
TrustCenterReferenceOrderBy:
|
||||
CompliancePortalReferenceOrderBy:
|
||||
type: object
|
||||
required:
|
||||
- field
|
||||
- direction
|
||||
properties:
|
||||
field:
|
||||
$ref: "#/components/schemas/TrustCenterReferenceOrderField"
|
||||
$ref: "#/components/schemas/CompliancePortalReferenceOrderField"
|
||||
direction:
|
||||
$ref: "#/components/schemas/OrderDirection"
|
||||
|
||||
TrustCenterFileOrderField:
|
||||
CompliancePortalFileOrderField:
|
||||
type: string
|
||||
enum:
|
||||
- NAME
|
||||
- CREATED_AT
|
||||
- UPDATED_AT
|
||||
go.probo.inc/mcpgen/type: go.probo.inc/probo/pkg/coredata.TrustCenterFileOrderField
|
||||
go.probo.inc/mcpgen/type: go.probo.inc/probo/pkg/coredata.CompliancePortalFileOrderField
|
||||
|
||||
TrustCenterFileOrderBy:
|
||||
CompliancePortalFileOrderBy:
|
||||
type: object
|
||||
required:
|
||||
- field
|
||||
- direction
|
||||
properties:
|
||||
field:
|
||||
$ref: "#/components/schemas/TrustCenterFileOrderField"
|
||||
$ref: "#/components/schemas/CompliancePortalFileOrderField"
|
||||
direction:
|
||||
$ref: "#/components/schemas/OrderDirection"
|
||||
|
||||
@@ -8825,7 +8825,7 @@ components:
|
||||
type: string
|
||||
format: date-time
|
||||
|
||||
TrustCenter:
|
||||
CompliancePortal:
|
||||
type: object
|
||||
required:
|
||||
- id
|
||||
@@ -8880,7 +8880,7 @@ components:
|
||||
type: string
|
||||
format: date-time
|
||||
|
||||
TrustCenterReference:
|
||||
CompliancePortalReference:
|
||||
type: object
|
||||
required:
|
||||
- id
|
||||
@@ -8912,14 +8912,14 @@ components:
|
||||
type: string
|
||||
format: date-time
|
||||
|
||||
TrustCenterFile:
|
||||
CompliancePortalFile:
|
||||
type: object
|
||||
required:
|
||||
- id
|
||||
- name
|
||||
- category
|
||||
- file
|
||||
- trust_center_visibility
|
||||
- compliance_portal_visibility
|
||||
- organization_id
|
||||
- created_at
|
||||
- updated_at
|
||||
@@ -8932,8 +8932,8 @@ components:
|
||||
type: string
|
||||
file:
|
||||
$ref: "#/components/schemas/File"
|
||||
trust_center_visibility:
|
||||
$ref: "#/components/schemas/TrustCenterVisibility"
|
||||
compliance_portal_visibility:
|
||||
$ref: "#/components/schemas/CompliancePortalVisibility"
|
||||
organization_id:
|
||||
$ref: "#/components/schemas/GID"
|
||||
created_at:
|
||||
@@ -9018,7 +9018,7 @@ components:
|
||||
type: string
|
||||
format: date-time
|
||||
|
||||
GetTrustCenterInput:
|
||||
GetCompliancePortalInput:
|
||||
type: object
|
||||
required:
|
||||
- organization_id
|
||||
@@ -9027,27 +9027,27 @@ components:
|
||||
$ref: "#/components/schemas/GID"
|
||||
description: Organization ID
|
||||
|
||||
GetTrustCenterOutput:
|
||||
GetCompliancePortalOutput:
|
||||
type: object
|
||||
required:
|
||||
- trust_center
|
||||
- compliance_portal
|
||||
properties:
|
||||
trust_center:
|
||||
$ref: "#/components/schemas/TrustCenter"
|
||||
compliance_portal:
|
||||
$ref: "#/components/schemas/CompliancePortal"
|
||||
|
||||
UpdateTrustCenterInput:
|
||||
UpdateCompliancePortalInput:
|
||||
type: object
|
||||
required:
|
||||
- trust_center_id
|
||||
- compliance_portal_id
|
||||
properties:
|
||||
trust_center_id:
|
||||
compliance_portal_id:
|
||||
$ref: "#/components/schemas/GID"
|
||||
description: Trust center ID
|
||||
description: Compliance portal ID
|
||||
active:
|
||||
type:
|
||||
- boolean
|
||||
- "null"
|
||||
description: Whether the trust center is active
|
||||
description: Whether the compliance portal is active
|
||||
go.probo.inc/mcpgen/omittable: true
|
||||
search_engine_indexing:
|
||||
anyOf:
|
||||
@@ -9086,25 +9086,25 @@ components:
|
||||
description: Public compliance page title
|
||||
go.probo.inc/mcpgen/omittable: true
|
||||
|
||||
UpdateTrustCenterOutput:
|
||||
UpdateCompliancePortalOutput:
|
||||
type: object
|
||||
required:
|
||||
- trust_center
|
||||
- compliance_portal
|
||||
properties:
|
||||
trust_center:
|
||||
$ref: "#/components/schemas/TrustCenter"
|
||||
compliance_portal:
|
||||
$ref: "#/components/schemas/CompliancePortal"
|
||||
|
||||
ListTrustCenterReferencesInput:
|
||||
ListCompliancePortalReferencesInput:
|
||||
type: object
|
||||
required:
|
||||
- trust_center_id
|
||||
- compliance_portal_id
|
||||
properties:
|
||||
trust_center_id:
|
||||
compliance_portal_id:
|
||||
$ref: "#/components/schemas/GID"
|
||||
description: Trust center ID
|
||||
description: Compliance portal ID
|
||||
order_by:
|
||||
$ref: "#/components/schemas/TrustCenterReferenceOrderBy"
|
||||
description: Trust center reference order by
|
||||
$ref: "#/components/schemas/CompliancePortalReferenceOrderBy"
|
||||
description: Compliance portal reference order by
|
||||
size:
|
||||
type: integer
|
||||
description: Page size
|
||||
@@ -9112,28 +9112,28 @@ components:
|
||||
$ref: "#/components/schemas/CursorKey"
|
||||
description: Page cursor
|
||||
|
||||
ListTrustCenterReferencesOutput:
|
||||
ListCompliancePortalReferencesOutput:
|
||||
type: object
|
||||
required:
|
||||
- trust_center_references
|
||||
- compliance_portal_references
|
||||
properties:
|
||||
next_cursor:
|
||||
$ref: "#/components/schemas/CursorKey"
|
||||
description: Next cursor
|
||||
trust_center_references:
|
||||
compliance_portal_references:
|
||||
type: array
|
||||
items:
|
||||
$ref: "#/components/schemas/TrustCenterReference"
|
||||
$ref: "#/components/schemas/CompliancePortalReference"
|
||||
|
||||
AddTrustCenterReferenceInput:
|
||||
AddCompliancePortalReferenceInput:
|
||||
type: object
|
||||
required:
|
||||
- trust_center_id
|
||||
- compliance_portal_id
|
||||
- name
|
||||
properties:
|
||||
trust_center_id:
|
||||
compliance_portal_id:
|
||||
$ref: "#/components/schemas/GID"
|
||||
description: Trust center ID
|
||||
description: Compliance portal ID
|
||||
name:
|
||||
type: string
|
||||
description: Reference name
|
||||
@@ -9144,22 +9144,22 @@ components:
|
||||
type: string
|
||||
description: Reference website URL
|
||||
|
||||
AddTrustCenterReferenceOutput:
|
||||
AddCompliancePortalReferenceOutput:
|
||||
type: object
|
||||
required:
|
||||
- trust_center_reference
|
||||
- compliance_portal_reference
|
||||
properties:
|
||||
trust_center_reference:
|
||||
$ref: "#/components/schemas/TrustCenterReference"
|
||||
compliance_portal_reference:
|
||||
$ref: "#/components/schemas/CompliancePortalReference"
|
||||
|
||||
UpdateTrustCenterReferenceInput:
|
||||
UpdateCompliancePortalReferenceInput:
|
||||
type: object
|
||||
required:
|
||||
- id
|
||||
properties:
|
||||
id:
|
||||
$ref: "#/components/schemas/GID"
|
||||
description: Trust center reference ID
|
||||
description: Compliance portal reference ID
|
||||
name:
|
||||
type:
|
||||
- string
|
||||
@@ -9185,31 +9185,31 @@ components:
|
||||
description: Reference rank
|
||||
go.probo.inc/mcpgen/omittable: true
|
||||
|
||||
UpdateTrustCenterReferenceOutput:
|
||||
UpdateCompliancePortalReferenceOutput:
|
||||
type: object
|
||||
required:
|
||||
- trust_center_reference
|
||||
- compliance_portal_reference
|
||||
properties:
|
||||
trust_center_reference:
|
||||
$ref: "#/components/schemas/TrustCenterReference"
|
||||
compliance_portal_reference:
|
||||
$ref: "#/components/schemas/CompliancePortalReference"
|
||||
|
||||
DeleteTrustCenterReferenceInput:
|
||||
DeleteCompliancePortalReferenceInput:
|
||||
type: object
|
||||
required:
|
||||
- id
|
||||
properties:
|
||||
id:
|
||||
$ref: "#/components/schemas/GID"
|
||||
description: Trust center reference ID
|
||||
description: Compliance portal reference ID
|
||||
|
||||
DeleteTrustCenterReferenceOutput:
|
||||
DeleteCompliancePortalReferenceOutput:
|
||||
type: object
|
||||
required:
|
||||
- deleted_trust_center_reference_id
|
||||
- deleted_compliance_portal_reference_id
|
||||
properties:
|
||||
deleted_trust_center_reference_id:
|
||||
deleted_compliance_portal_reference_id:
|
||||
$ref: "#/components/schemas/GID"
|
||||
description: Deleted trust center reference ID
|
||||
description: Deleted compliance portal reference ID
|
||||
|
||||
CompliancePortalCommitmentIcon:
|
||||
type: string
|
||||
@@ -9579,7 +9579,7 @@ components:
|
||||
properties:
|
||||
resource_id:
|
||||
$ref: "#/components/schemas/GID"
|
||||
description: Document, trust center file, or audit ID
|
||||
description: Document, compliance portal file, or audit ID
|
||||
alias:
|
||||
type: string
|
||||
description: Human-readable alias slug
|
||||
@@ -9623,7 +9623,7 @@ components:
|
||||
$ref: "#/components/schemas/GID"
|
||||
description: Resource ID whose alias was removed
|
||||
|
||||
ListTrustCenterFilesInput:
|
||||
ListCompliancePortalFilesInput:
|
||||
type: object
|
||||
required:
|
||||
- organization_id
|
||||
@@ -9632,8 +9632,8 @@ components:
|
||||
$ref: "#/components/schemas/GID"
|
||||
description: Organization ID
|
||||
order_by:
|
||||
$ref: "#/components/schemas/TrustCenterFileOrderBy"
|
||||
description: Trust center file order by
|
||||
$ref: "#/components/schemas/CompliancePortalFileOrderBy"
|
||||
description: Compliance portal file order by
|
||||
size:
|
||||
type: integer
|
||||
description: Page size
|
||||
@@ -9641,45 +9641,45 @@ components:
|
||||
$ref: "#/components/schemas/CursorKey"
|
||||
description: Page cursor
|
||||
|
||||
ListTrustCenterFilesOutput:
|
||||
ListCompliancePortalFilesOutput:
|
||||
type: object
|
||||
required:
|
||||
- trust_center_files
|
||||
- compliance_portal_files
|
||||
properties:
|
||||
next_cursor:
|
||||
$ref: "#/components/schemas/CursorKey"
|
||||
description: Next cursor
|
||||
trust_center_files:
|
||||
compliance_portal_files:
|
||||
type: array
|
||||
items:
|
||||
$ref: "#/components/schemas/TrustCenterFile"
|
||||
$ref: "#/components/schemas/CompliancePortalFile"
|
||||
|
||||
DeleteTrustCenterFileInput:
|
||||
DeleteCompliancePortalFileInput:
|
||||
type: object
|
||||
required:
|
||||
- id
|
||||
properties:
|
||||
id:
|
||||
$ref: "#/components/schemas/GID"
|
||||
description: Trust center file ID
|
||||
description: Compliance portal file ID
|
||||
|
||||
DeleteTrustCenterFileOutput:
|
||||
DeleteCompliancePortalFileOutput:
|
||||
type: object
|
||||
required:
|
||||
- deleted_trust_center_file_id
|
||||
- deleted_compliance_portal_file_id
|
||||
properties:
|
||||
deleted_trust_center_file_id:
|
||||
deleted_compliance_portal_file_id:
|
||||
$ref: "#/components/schemas/GID"
|
||||
description: Deleted trust center file ID
|
||||
description: Deleted compliance portal file ID
|
||||
|
||||
ListComplianceCustomLinksInput:
|
||||
type: object
|
||||
required:
|
||||
- trust_center_id
|
||||
- compliance_portal_id
|
||||
properties:
|
||||
trust_center_id:
|
||||
compliance_portal_id:
|
||||
$ref: "#/components/schemas/GID"
|
||||
description: Trust center ID
|
||||
description: Compliance portal ID
|
||||
order_by:
|
||||
$ref: "#/components/schemas/ComplianceCustomLinkOrderBy"
|
||||
description: Compliance custom link order by
|
||||
@@ -9706,13 +9706,13 @@ components:
|
||||
AddComplianceCustomLinkInput:
|
||||
type: object
|
||||
required:
|
||||
- trust_center_id
|
||||
- compliance_portal_id
|
||||
- name
|
||||
- url
|
||||
properties:
|
||||
trust_center_id:
|
||||
compliance_portal_id:
|
||||
$ref: "#/components/schemas/GID"
|
||||
description: Trust center ID
|
||||
description: Compliance portal ID
|
||||
name:
|
||||
type: string
|
||||
description: Custom Link name
|
||||
@@ -9784,12 +9784,12 @@ components:
|
||||
CreateCustomDomainInput:
|
||||
type: object
|
||||
required:
|
||||
- trust_center_id
|
||||
- compliance_portal_id
|
||||
- domain
|
||||
properties:
|
||||
trust_center_id:
|
||||
compliance_portal_id:
|
||||
$ref: "#/components/schemas/GID"
|
||||
description: Compliance page (trust center) ID
|
||||
description: Compliance portal ID
|
||||
domain:
|
||||
type: string
|
||||
description: Custom domain name
|
||||
@@ -9805,11 +9805,11 @@ components:
|
||||
DeleteCustomDomainInput:
|
||||
type: object
|
||||
required:
|
||||
- trust_center_id
|
||||
- compliance_portal_id
|
||||
properties:
|
||||
trust_center_id:
|
||||
compliance_portal_id:
|
||||
$ref: "#/components/schemas/GID"
|
||||
description: Compliance page (trust center) ID
|
||||
description: Compliance portal ID
|
||||
|
||||
DeleteCustomDomainOutput:
|
||||
type: object
|
||||
@@ -14036,57 +14036,57 @@ tools:
|
||||
$ref: "#/components/schemas/DeleteRightsRequestInput"
|
||||
outputSchema:
|
||||
$ref: "#/components/schemas/DeleteRightsRequestOutput"
|
||||
- name: getTrustCenter
|
||||
description: Get the trust center for an organization
|
||||
- name: getCompliancePortal
|
||||
description: Get the compliance portal for an organization
|
||||
hints:
|
||||
readonly: true
|
||||
idempotent: true
|
||||
inputSchema:
|
||||
$ref: "#/components/schemas/GetTrustCenterInput"
|
||||
$ref: "#/components/schemas/GetCompliancePortalInput"
|
||||
outputSchema:
|
||||
$ref: "#/components/schemas/GetTrustCenterOutput"
|
||||
- name: updateTrustCenter
|
||||
description: Update a trust center's settings
|
||||
$ref: "#/components/schemas/GetCompliancePortalOutput"
|
||||
- name: updateCompliancePortal
|
||||
description: Update a compliance portal's settings
|
||||
hints:
|
||||
readonly: false
|
||||
inputSchema:
|
||||
$ref: "#/components/schemas/UpdateTrustCenterInput"
|
||||
$ref: "#/components/schemas/UpdateCompliancePortalInput"
|
||||
outputSchema:
|
||||
$ref: "#/components/schemas/UpdateTrustCenterOutput"
|
||||
- name: listTrustCenterReferences
|
||||
description: List all references for a trust center
|
||||
$ref: "#/components/schemas/UpdateCompliancePortalOutput"
|
||||
- name: listCompliancePortalReferences
|
||||
description: List all references for a compliance portal
|
||||
hints:
|
||||
readonly: true
|
||||
idempotent: true
|
||||
inputSchema:
|
||||
$ref: "#/components/schemas/ListTrustCenterReferencesInput"
|
||||
$ref: "#/components/schemas/ListCompliancePortalReferencesInput"
|
||||
outputSchema:
|
||||
$ref: "#/components/schemas/ListTrustCenterReferencesOutput"
|
||||
- name: addTrustCenterReference
|
||||
description: Add a new reference to a trust center
|
||||
$ref: "#/components/schemas/ListCompliancePortalReferencesOutput"
|
||||
- name: addCompliancePortalReference
|
||||
description: Add a new reference to a compliance portal
|
||||
hints:
|
||||
readonly: false
|
||||
inputSchema:
|
||||
$ref: "#/components/schemas/AddTrustCenterReferenceInput"
|
||||
$ref: "#/components/schemas/AddCompliancePortalReferenceInput"
|
||||
outputSchema:
|
||||
$ref: "#/components/schemas/AddTrustCenterReferenceOutput"
|
||||
- name: updateTrustCenterReference
|
||||
description: Update an existing trust center reference
|
||||
$ref: "#/components/schemas/AddCompliancePortalReferenceOutput"
|
||||
- name: updateCompliancePortalReference
|
||||
description: Update an existing compliance portal reference
|
||||
hints:
|
||||
readonly: false
|
||||
inputSchema:
|
||||
$ref: "#/components/schemas/UpdateTrustCenterReferenceInput"
|
||||
$ref: "#/components/schemas/UpdateCompliancePortalReferenceInput"
|
||||
outputSchema:
|
||||
$ref: "#/components/schemas/UpdateTrustCenterReferenceOutput"
|
||||
- name: deleteTrustCenterReference
|
||||
description: Delete a trust center reference
|
||||
$ref: "#/components/schemas/UpdateCompliancePortalReferenceOutput"
|
||||
- name: deleteCompliancePortalReference
|
||||
description: Delete a compliance portal reference
|
||||
hints:
|
||||
readonly: false
|
||||
destructive: true
|
||||
inputSchema:
|
||||
$ref: "#/components/schemas/DeleteTrustCenterReferenceInput"
|
||||
$ref: "#/components/schemas/DeleteCompliancePortalReferenceInput"
|
||||
outputSchema:
|
||||
$ref: "#/components/schemas/DeleteTrustCenterReferenceOutput"
|
||||
$ref: "#/components/schemas/DeleteCompliancePortalReferenceOutput"
|
||||
- name: listCommitmentGroups
|
||||
description: List all commitment groups for a trust center
|
||||
hints:
|
||||
@@ -14172,26 +14172,26 @@ tools:
|
||||
$ref: "#/components/schemas/RemoveResourceAliasInput"
|
||||
outputSchema:
|
||||
$ref: "#/components/schemas/RemoveResourceAliasOutput"
|
||||
- name: listTrustCenterFiles
|
||||
description: List all files for the trust center
|
||||
- name: listCompliancePortalFiles
|
||||
description: List all files for the compliance portal
|
||||
hints:
|
||||
readonly: true
|
||||
idempotent: true
|
||||
inputSchema:
|
||||
$ref: "#/components/schemas/ListTrustCenterFilesInput"
|
||||
$ref: "#/components/schemas/ListCompliancePortalFilesInput"
|
||||
outputSchema:
|
||||
$ref: "#/components/schemas/ListTrustCenterFilesOutput"
|
||||
- name: deleteTrustCenterFile
|
||||
description: Delete a trust center file
|
||||
$ref: "#/components/schemas/ListCompliancePortalFilesOutput"
|
||||
- name: deleteCompliancePortalFile
|
||||
description: Delete a compliance portal file
|
||||
hints:
|
||||
readonly: false
|
||||
destructive: true
|
||||
inputSchema:
|
||||
$ref: "#/components/schemas/DeleteTrustCenterFileInput"
|
||||
$ref: "#/components/schemas/DeleteCompliancePortalFileInput"
|
||||
outputSchema:
|
||||
$ref: "#/components/schemas/DeleteTrustCenterFileOutput"
|
||||
$ref: "#/components/schemas/DeleteCompliancePortalFileOutput"
|
||||
- name: listComplianceCustomLinks
|
||||
description: List all compliance custom links for a trust center
|
||||
description: List all compliance custom links for a compliance portal
|
||||
hints:
|
||||
readonly: true
|
||||
idempotent: true
|
||||
@@ -14200,7 +14200,7 @@ tools:
|
||||
outputSchema:
|
||||
$ref: "#/components/schemas/ListComplianceCustomLinksOutput"
|
||||
- name: addComplianceCustomLink
|
||||
description: Add a new compliance custom link to a trust center
|
||||
description: Add a new compliance custom link to a compliance portal
|
||||
hints:
|
||||
readonly: false
|
||||
inputSchema:
|
||||
|
||||
@@ -27,17 +27,17 @@ import (
|
||||
|
||||
func NewAudit(a *coredata.Audit, file *coredata.File) *Audit {
|
||||
audit := &Audit{
|
||||
ID: a.ID,
|
||||
Name: a.Name,
|
||||
OrganizationID: a.OrganizationID,
|
||||
FrameworkID: a.FrameworkID,
|
||||
State: a.State,
|
||||
TrustCenterVisibility: a.TrustCenterVisibility,
|
||||
HasReport: a.ReportFileID != nil,
|
||||
ValidFrom: a.ValidFrom,
|
||||
ValidUntil: a.ValidUntil,
|
||||
CreatedAt: a.CreatedAt,
|
||||
UpdatedAt: a.UpdatedAt,
|
||||
ID: a.ID,
|
||||
Name: a.Name,
|
||||
OrganizationID: a.OrganizationID,
|
||||
FrameworkID: a.FrameworkID,
|
||||
State: a.State,
|
||||
CompliancePortalVisibility: a.CompliancePortalVisibility,
|
||||
HasReport: a.ReportFileID != nil,
|
||||
ValidFrom: a.ValidFrom,
|
||||
ValidUntil: a.ValidUntil,
|
||||
CreatedAt: a.CreatedAt,
|
||||
UpdatedAt: a.UpdatedAt,
|
||||
}
|
||||
|
||||
if file != nil {
|
||||
|
||||
@@ -25,8 +25,8 @@ import (
|
||||
"go.probo.inc/probo/pkg/page"
|
||||
)
|
||||
|
||||
func NewTrustCenter(tc *coredata.TrustCenter) *TrustCenter {
|
||||
return &TrustCenter{
|
||||
func NewCompliancePortal(tc *coredata.CompliancePortal) *CompliancePortal {
|
||||
return &CompliancePortal{
|
||||
ID: tc.ID,
|
||||
OrganizationID: tc.OrganizationID,
|
||||
Active: tc.Active,
|
||||
@@ -41,8 +41,8 @@ func NewTrustCenter(tc *coredata.TrustCenter) *TrustCenter {
|
||||
}
|
||||
}
|
||||
|
||||
func NewTrustCenterReference(r *coredata.TrustCenterReference) *TrustCenterReference {
|
||||
return &TrustCenterReference{
|
||||
func NewCompliancePortalReference(r *coredata.CompliancePortalReference) *CompliancePortalReference {
|
||||
return &CompliancePortalReference{
|
||||
ID: r.ID,
|
||||
Name: r.Name,
|
||||
Description: r.Description,
|
||||
@@ -53,10 +53,10 @@ func NewTrustCenterReference(r *coredata.TrustCenterReference) *TrustCenterRefer
|
||||
}
|
||||
}
|
||||
|
||||
func NewListTrustCenterReferencesOutput(
|
||||
refs []*TrustCenterReference,
|
||||
p *page.Page[*coredata.TrustCenterReference, coredata.TrustCenterReferenceOrderField],
|
||||
) ListTrustCenterReferencesOutput {
|
||||
func NewListCompliancePortalReferencesOutput(
|
||||
refs []*CompliancePortalReference,
|
||||
p *page.Page[*coredata.CompliancePortalReference, coredata.CompliancePortalReferenceOrderField],
|
||||
) ListCompliancePortalReferencesOutput {
|
||||
var nextCursor *page.CursorKey
|
||||
|
||||
if len(p.Data) > 0 {
|
||||
@@ -64,35 +64,35 @@ func NewListTrustCenterReferencesOutput(
|
||||
nextCursor = &cursorKey
|
||||
}
|
||||
|
||||
return ListTrustCenterReferencesOutput{
|
||||
return ListCompliancePortalReferencesOutput{
|
||||
NextCursor: nextCursor,
|
||||
CompliancePortalReferences: refs,
|
||||
}
|
||||
}
|
||||
|
||||
func NewCompliancePortalFile(f *coredata.CompliancePortalFile, file *File) *CompliancePortalFile {
|
||||
return &CompliancePortalFile{
|
||||
ID: f.ID,
|
||||
OrganizationID: f.OrganizationID,
|
||||
Name: f.Name,
|
||||
Category: f.Category,
|
||||
File: file,
|
||||
CompliancePortalVisibility: f.CompliancePortalVisibility,
|
||||
CreatedAt: f.CreatedAt,
|
||||
UpdatedAt: f.UpdatedAt,
|
||||
}
|
||||
}
|
||||
|
||||
func NewListCompliancePortalFilesOutput(files []*CompliancePortalFile, p *page.Page[*coredata.CompliancePortalFile, coredata.CompliancePortalFileOrderField]) ListCompliancePortalFilesOutput {
|
||||
var nextCursor *page.CursorKey
|
||||
|
||||
if len(p.Data) > 0 {
|
||||
cursorKey := p.Data[len(p.Data)-1].CursorKey(p.Cursor.OrderBy.Field)
|
||||
nextCursor = &cursorKey
|
||||
}
|
||||
|
||||
return ListCompliancePortalFilesOutput{
|
||||
NextCursor: nextCursor,
|
||||
TrustCenterReferences: refs,
|
||||
}
|
||||
}
|
||||
|
||||
func NewTrustCenterFile(f *coredata.TrustCenterFile, file *File) *TrustCenterFile {
|
||||
return &TrustCenterFile{
|
||||
ID: f.ID,
|
||||
OrganizationID: f.OrganizationID,
|
||||
Name: f.Name,
|
||||
Category: f.Category,
|
||||
File: file,
|
||||
TrustCenterVisibility: f.TrustCenterVisibility,
|
||||
CreatedAt: f.CreatedAt,
|
||||
UpdatedAt: f.UpdatedAt,
|
||||
}
|
||||
}
|
||||
|
||||
func NewListTrustCenterFilesOutput(files []*TrustCenterFile, p *page.Page[*coredata.TrustCenterFile, coredata.TrustCenterFileOrderField]) ListTrustCenterFilesOutput {
|
||||
var nextCursor *page.CursorKey
|
||||
|
||||
if len(p.Data) > 0 {
|
||||
cursorKey := p.Data[len(p.Data)-1].CursorKey(p.Cursor.OrderBy.Field)
|
||||
nextCursor = &cursorKey
|
||||
}
|
||||
|
||||
return ListTrustCenterFilesOutput{
|
||||
NextCursor: nextCursor,
|
||||
TrustCenterFiles: files,
|
||||
CompliancePortalFiles: files,
|
||||
}
|
||||
}
|
||||
@@ -49,16 +49,16 @@ func proseMirrorJSONToMarkdown(pmJSON string) (string, error) {
|
||||
|
||||
func NewDocument(d *coredata.Document) *Document {
|
||||
return &Document{
|
||||
ID: d.ID,
|
||||
OrganizationID: d.OrganizationID,
|
||||
CurrentPublishedMajor: d.CurrentPublishedMajor,
|
||||
CurrentPublishedMinor: d.CurrentPublishedMinor,
|
||||
WriteMode: d.WriteMode,
|
||||
TrustCenterVisibility: d.TrustCenterVisibility,
|
||||
Status: d.Status,
|
||||
ArchivedAt: d.ArchivedAt,
|
||||
CreatedAt: d.CreatedAt,
|
||||
UpdatedAt: d.UpdatedAt,
|
||||
ID: d.ID,
|
||||
OrganizationID: d.OrganizationID,
|
||||
CurrentPublishedMajor: d.CurrentPublishedMajor,
|
||||
CurrentPublishedMinor: d.CurrentPublishedMinor,
|
||||
WriteMode: d.WriteMode,
|
||||
CompliancePortalVisibility: d.CompliancePortalVisibility,
|
||||
Status: d.Status,
|
||||
ArchivedAt: d.ArchivedAt,
|
||||
CreatedAt: d.CreatedAt,
|
||||
UpdatedAt: d.UpdatedAt,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user