fix(workspaces): add filtering to workspace team query (#2586)

* chore(workspaces): add some tests for new filters

* fix(workspaces): args style
This commit is contained in:
Chuck Driesler
2024-08-08 06:15:55 +01:00
committed by GitHub
parent 72017c3f2f
commit 7bb40134eb
9 changed files with 179 additions and 45 deletions
@@ -35,15 +35,23 @@ export type DeleteWorkspace = (args: DeleteWorkspaceArgs) => Promise<void>
/** Workspace Roles */
export type GetWorkspaceCollaborators = (args: {
type GetWorkspaceCollaboratorsArgs = {
workspaceId: string
/**
* Optionally filter by role
*/
role?: WorkspaceRoles
}) => Promise<
Array<UserWithRole<LimitedUserRecord> & { workspaceRole: WorkspaceRoles }>
>
filter?: {
/**
* Optionally filter by workspace role
*/
role?: string
/**
* Optionally filter by user name or email
*/
search?: string
}
}
export type GetWorkspaceCollaborators = (
args: GetWorkspaceCollaboratorsArgs
) => Promise<Array<UserWithRole<LimitedUserRecord> & { workspaceRole: WorkspaceRoles }>>
type DeleteWorkspaceRoleArgs = {
workspaceId: string