7c16abc8eb
* feat(workspaces): add workspaces module with roles and scopes * feat(workspaces): add domain, graphql and persistent storage dataschema * fix(workspaces): correct db injections * chore(workspaces): add EE license * chore(license): mentions workspaces separately in license file * fix(core): roles import in migration * fix(workspaces): drop workspace_acl on down migration * fix(workspaces): roles constants * fix(workspaces): coding standards --------- Co-authored-by: Dimitrie Stefanescu <didimitrie@gmail.com>
92 lines
1.7 KiB
GraphQL
92 lines
1.7 KiB
GraphQL
type Workspace {
|
|
id: ID!
|
|
name: String!
|
|
description: String
|
|
createdAt: DateTime!
|
|
updatedAt: DateTime!
|
|
createdBy: LimitedUser
|
|
"""
|
|
Active user's role for this workspace. `null` if request is not authenticated, or the workspace is not explicitly shared with you.
|
|
"""
|
|
role: String
|
|
team: [WorkspaceCollaborator!]!
|
|
invitedTeam: [PendingWorkspaceCollaborator!]
|
|
projects(
|
|
limit: Int! = 25
|
|
cursor: String
|
|
filter: UserProjectsFilter
|
|
): ProjectCollection!
|
|
}
|
|
|
|
type WorkspaceCollaborator {
|
|
id: ID!
|
|
role: String!
|
|
user: LimitedUser!
|
|
}
|
|
|
|
type PendingWorkspaceCollaborator {
|
|
id: ID!
|
|
inviteId: String!
|
|
workspaceId: String!
|
|
workspaceName: String!
|
|
"""
|
|
E-mail address or name of the invited user
|
|
"""
|
|
title: String!
|
|
role: String!
|
|
invitedBy: LimitedUser!
|
|
"""
|
|
Set only if user is registered
|
|
"""
|
|
user: LimitedUser
|
|
"""
|
|
Only available if the active user is the pending workspace collaborator
|
|
"""
|
|
token: String
|
|
}
|
|
|
|
type WorkspaceCollection {
|
|
totalCount: Int!
|
|
cursor: String
|
|
items: [Workspace!]!
|
|
}
|
|
|
|
extend type User {
|
|
"""
|
|
Get the workspaces for the user
|
|
"""
|
|
workspaces(
|
|
limit: Int! = 25
|
|
cursor: String = null
|
|
filter: UserWorkspacesFilter
|
|
): WorkspaceCollection! @isOwner
|
|
}
|
|
|
|
extend type Project {
|
|
workspace: Workspace
|
|
}
|
|
|
|
type ServerWorkspacesInfo {
|
|
"""
|
|
This is a backend control variable for the workspaces feature set.
|
|
Since workspaces need a backend logic to be enabled, this is not enough as a feature flag.
|
|
"""
|
|
workspacesEnabled: Boolean!
|
|
}
|
|
|
|
extend type ServerInfo {
|
|
workspaces: ServerWorkspacesInfo!
|
|
}
|
|
|
|
extend type AdminQueries {
|
|
workspaceList(
|
|
query: String
|
|
limit: Int! = 25
|
|
cursor: String = null
|
|
): WorkspaceCollection!
|
|
}
|
|
|
|
input UserWorkspacesFilter {
|
|
search: String
|
|
}
|