Add search and status/role/type filters to People

Makes it practical to find people in larger orgs across GraphQL, MCP, CLI, and n8n, with page size raised to 100.

Signed-off-by: Sacha Al Himdani <sacha@probo.com>
This commit is contained in:
Sacha Al Himdani
2026-07-27 14:46:15 +02:00
parent edb67743ae
commit d61ec8dd65
19 changed files with 624 additions and 123 deletions

View File

@@ -2771,9 +2771,23 @@ func (r *Resolver) ListUsersTool(ctx context.Context, req *mcp.CallToolRequest,
filter := coredata.NewMembershipProfileFilter(nil).WithMembership()
if input.Filter != nil {
filter = coredata.NewMembershipProfileFilter(input.Filter.ContractEnded).WithMembership()
if input.Filter.State != nil {
filter.WithState(*input.Filter.State)
}
if input.Filter.Query != nil {
filter.WithQuery(input.Filter.Query)
}
if input.Filter.Role != nil {
filter.WithRole(*input.Filter.Role)
}
if input.Filter.Kind != nil {
kind := string(*input.Filter.Kind)
filter.WithKind(&kind)
}
}
pageResult, err := r.iamSvc.OrganizationService.ListProfiles(ctx, input.OrganizationID, cursor, filter)

View File

@@ -188,6 +188,13 @@ components:
- INACTIVE
go.probo.inc/mcpgen/type: go.probo.inc/probo/pkg/coredata.ProfileState
ProfileKind:
type: string
enum:
- EMPLOYEE
- CONTRACTOR
- SERVICE_ACCOUNT
ProfileSource:
type: string
enum:
@@ -572,6 +579,15 @@ components:
state:
$ref: "#/components/schemas/ProfileState"
description: Filter by profile state (ACTIVE or INACTIVE)
query:
type: string
description: Search by full name, email address, or position
role:
$ref: "#/components/schemas/MembershipRole"
description: Filter by membership role
kind:
$ref: "#/components/schemas/ProfileKind"
description: Filter by profile kind
ListUsersOutput:
type: object