Add document types filtering and rename ISMS to GOVERNANCE
Adds 5 new document types (PLAN, REGISTER, RECORD, REPORT, TEMPLATE), renames ISMS to GOVERNANCE, and implements type-based filtering across GraphQL, MCP, and frontend. Includes migration, enum updates, filter implementation with SQL array support, and frontend dropdown UI with Relay refetch pattern. Signed-off-by: Bryan Frimin <bryan@getprobo.com>
This commit is contained in:
@@ -2019,7 +2019,8 @@ func (r *Resolver) ListDocumentsTool(ctx context.Context, req *mcp.CallToolReque
|
||||
query = input.Filter.Query
|
||||
}
|
||||
|
||||
documentFilter = coredata.NewDocumentFilter(query)
|
||||
documentFilter = coredata.NewDocumentFilter(query).
|
||||
WithDocumentTypes(input.Filter.DocumentTypes)
|
||||
}
|
||||
|
||||
docPage, err := prb.Documents.ListByOrganizationID(ctx, input.OrganizationID, cursor, documentFilter)
|
||||
|
||||
@@ -5038,9 +5038,14 @@ components:
|
||||
type: string
|
||||
enum:
|
||||
- OTHER
|
||||
- ISMS
|
||||
- GOVERNANCE
|
||||
- POLICY
|
||||
- PROCEDURE
|
||||
- PLAN
|
||||
- REGISTER
|
||||
- RECORD
|
||||
- REPORT
|
||||
- TEMPLATE
|
||||
go.probo.inc/mcpgen/type: go.probo.inc/probo/pkg/coredata.DocumentType
|
||||
|
||||
DocumentClassification:
|
||||
@@ -5314,6 +5319,11 @@ components:
|
||||
items:
|
||||
$ref: "#/components/schemas/TrustCenterVisibility"
|
||||
description: Trust center visibilities
|
||||
document_types:
|
||||
type: array
|
||||
items:
|
||||
$ref: "#/components/schemas/DocumentType"
|
||||
description: Document types
|
||||
|
||||
ListDocumentsOutput:
|
||||
type: object
|
||||
|
||||
Reference in New Issue
Block a user