Business Teams Service GraphQL schema

Learn more about the Business Teams Service GraphQL queries.

Business Teams Service supports GraphQL queries with respect to a schema that is defined in the SDL language.

schema {
    query: Query
    mutation: Mutation
}


# Root type for all queries
type Query {

    # Retrieve a team definition.
    #
    # Note:
    # There are 3 predefined teams with fixed uuid:
    # * 10000000-0000-0000-0000-000000000000 - the "Administators" team.
    #   Members of this team are TeamServer administrators.
    # * 20000000-0000-0000-0000-000000000000 - the "Creators" team.
    #   Members of this team are allowed to create new teams.
    # * 30000000-0000-0000-0000-000000000000 - the "Repository Readers" team.
    #   Members of this team are allowed to retrieve user and group information
    #   from the user repository.
    #
    # Who is authorized:
    # * Members of team's reader team, unless the membership parameter is set to "deep"
    # * Members of team's writer team, unless the membership parameter is set to "deep"
    # * Members of team's administrator team, unless the membership parameter is set to "deep"
    # * Team owner, unless the membership parameter is set to "deep"
    # * TeamServer administrators
    #
    team(

        # The unique identifier of the team definition.
        uuid: String!,

        # When true, return also the admin part of a team when possible.
        adminPart: Boolean = false,

        # If "shallow", the team definition contains only the directly contained users, groups and teams. If "deep", the team definition contains the recursively contained users, groups and teams (but LDAP groups are not expanded).
        membership: TeamMembershipEnum = shallow

    ): Team

    # Validates the existence of the user and group members of a team definition.
    #
    # Who is authorized:
    # * Members of team's reader team
    # * Members of team's writer team
    # * Members of team's administrator team
    # * Team owner
    # * TeamServer administrators
    #
    validateTeam(

        # The unique identifier of the team definition.
        uuid: String!

    ): ValidateTeam

    # Retrieve a teams collection.
    #
    # Who is authorized:
    # * TeamServer users, unless the membership parameter is set to "deep"
    # * TeamServer administrators
    #
    teams(
        # When true, return also the admin part of a team when possible.
        adminPart: Boolean = false,

        # When true, only those team are returned that contain the current user.
        myteams: Boolean = false,

        # When specified, only those team definitions matching the filter expression are returned. A filter is a logical expression consisting of an attribute test (e.g., ```displayName EQ "ABC"```) or logical combinations (AND, OR, NOT) of attribute tests. Operator precedence can be overridden by braces ```()```.
        filter: String = null,

        # Specifies the attributes whose value is used to order the returned items.
        sortBy: TeamSortByEnum = displayName,

        # Specifies whether the sort order is ascending or descending.
        sortOrder: SortOrderEnum = ascending,

        # Specifies the index of the first retrieved result within the list of all elements that match the search filter. The index starts at 1.
        startIndex: Int = 1,

        # Non-negative integer that specified the desired maximum number of retrieved elements per page. If this parameter is missing, all elements are retrieved.
        maxCount: Int = -1,

        # If "shallow", the team definition contains only the directly contained users, groups and teams. If "deep", the team definition contains the recursively contained users, groups and teams (but LDAP groups are not expanded).
        membership: TeamMembershipEnum = shallow
    ): TeamCollection

    # Retrieve a groups collection.
    #
    # Who is authorized:
    # * Members of the "Repository Readers" team
    # * Members of the "Creators" team
    # * TeamServer administrators
    # * If the context parameter is passed:
    #    * members of context team's writer team
    #    * members of context team's administrator team
    #    * context team owner
    #
    groups(
        # If set to the UUID of a team, the API can be called by anyone with
        # write permission on the team. If no context is given, the API can
        # only be called by TeamServer administrators, members of the
        # "Creators" team and members of the "Repository Readers" team.
        context: String,

        # When specified, only those user definitions matching the filter expression are returned. A filter is a logical expression consisting of an attribute test (e.g., ```displayName EQ "ABC"```).
        filter: String = null,

        # Specifies the attributes whose value is used to order the returned items.
        sortBy: GroupSortByEnum = displayName,

        # Specifies whether the sort order is ascending or descending.
        sortOrder: SortOrderEnum = ascending,

        # Specifies the index of the first retrieved result within the list of all elements that match the search filter. The index starts at 1.
        startIndex: Int = 1,

        # Non-negative integer that specified the desired maximum number of retrieved elements per page. If this parameter is missing, all elements are retrieved.
        maxCount: Int = -1,

        # If "true", the names of the users of this group are returned. This includes the direct users but also the indirect users (e.g. users that are in subgroups of this group).
        includeMembers: Boolean = false
    ): GroupCollection

    # Retrieve a user's collection.
    #
    # Who is authorized:
    # * Members of the "Repository Readers" team
    # * Members of the "Creators" team
    # * TeamServer administrators
    # * If the context parameter is passed:
    #    * members of context team's writer team
    #    * members of context team's administrator team
    #    * context team owner
    #
    users(
        # If set to the UUID of a team, the API can be called by anyone with
        # write permission on the team. If no context is given, the API can
        # only be called by TeamServer administrators, members of the
        # "Creators" team and members of the "Repository Readers" team.
        context: String,

        # When specified, only those user definitions matching the filter expression are returned. A filter is a logical expression consisting of an attribute test (e.g., ```displayName EQ "ABC"```).
        filter: String = null,

        # Specifies the attributes whose value is used to order the returned items.
        sortBy: UserSortByEnum = displayName,

        # Specifies whether the sort order is ascending or descending.
        sortOrder: SortOrderEnum = ascending,

        # Specifies the index of the first retrieved result within the list of all elements that match the search filter. The index starts at 1.
        startIndex: Int = 1,

        # Non-negative integer that specified the desired maximum number of retrieved elements per page. If this parameter is missing, all elements are retrieved.
        maxCount: Int = -1,

        # If "true", the names of the groups that the user belongs to are returned. This includes the direct groups but also the indirect ancestors groups (e.g. groups the direct groups are members of).
        includeMemberships: Boolean = false
    ): UserCollection

    # Retrieve a collection of teams related to the user.
    # By default, it returns the list of teams the user is a member of.
    # Other relationships can be specified by the `relationship` parameter.
    #
    # Who is authorized:
    # * TeamServer administrators if the user parameter is set.
    # * Any authenticated user if the user parameter is not set,
    #   i.e., if the teams are calculated for the current user. 
    #
    userTeams(
        # The id of the user. When not specified, the current user is taken.
        user: String,

        # The relationship of the user to the team. When not specified, the teams the user is a member of are returned.
        relationship: TeamRelationshipEnum = member,

        # When true, return also the admin part of a team when possible.
        adminPart: Boolean = false,

        # When specified, only those team definitions matching the filter expression are returned. A filter is a logical expression consisting of an attribute test (e.g., ```displayName EQ "ABC"```) or logical combinations (AND, OR, NOT) of attribute tests. Operator precedence can be overridden by braces ```()```.
        filter: String = null,

        # Specifies the attributes whose value is used to order the returned items.
        sortBy: TeamSortByEnum = displayName,

        # Specifies whether the sort order is ascending or descending.
        sortOrder: SortOrderEnum = ascending,

        # Specifies the index of the first retrieved result within the list of all elements that match the search filter. The index starts at 1.
        startIndex: Int = 1,

        # Non-negative integer that specified the desired maximum number of retrieved elements per page. If this parameter is missing, all elements are retrieved.
        maxCount: Int = -1,
    ): TeamCollection

    # Retrieve a collection of users that are contained in a team.
    #
    # Who is authorized:
    # * Members of team's reader team
    # * Members of team's writer team
    # * Members of team's administrator team
    # * Team owner
    # * TeamServer administrators are able to retrieve the complete result.
    # * In order to retrieve a complete result, read permission is required
    #   not only on the team itself but also on all subteams. Otherwise the
    #   result might be incomplete (see the "complete" field of the response).
    containedUsers(
        # The unique identifier of the team definition.
        uuid: String!,

        # If set to true, it returns a "forbidden" response if the current user
        # cannot access any relevant subteam. If set to false, it silently
        # ignores subteams that the current user cannot access.
        strictPermission: Boolean = false,

        # When specified, only those user definitions matching the filter
        # expression are returned. A filter is a logical expression consisting
        # of an attribute test (e.g., ```displayName EQ "ABC"```).
        filter: String = null,

        # Specifies the attributes whose value is used to order the returned items.
        sortBy: UserSortByEnum = displayName,

        # Specifies whether the sort order is ascending or descending.
        sortOrder: SortOrderEnum = ascending,

        # Specifies the index of the first retrieved result within the list of all elements that match the search filter. The index starts at 1.
        startIndex: Int = 1,

        # Non-negative integer that specified the desired maximum number of retrieved elements per page. If this parameter is missing, all elements are retrieved.
        maxCount: Int = -1,
    ): UserCollection

    # Retrieve a collection of groups that are contained in a team
    #
    # Who is authorized:
    # * Members of team's reader team
    # * Members of team's writer team
    # * Members of team's administrator team
    # * Team owner
    # * TeamServer administrators are able to retrieve the complete result.
    # * In order to retrieve a complete result, read permission is required
    #   not only on the team itself but also on all subteams. Otherwise the
    #   result might be incomplete (see the "complete" field of the response).
    containedGroups(
        # The unique identifier of the team definition.
        uuid: String!,

        # If set to true, it returns a "forbidden" response if the current user
        # cannot access any relevant subteam. If set to false, it silently
        # ignores subteams that the current user cannot access.
        strictPermission: Boolean = false,

        # When specified, only those group definitions matching the filter
        # expression are returned. A filter is a logical expression consisting
        # of an attribute test (e.g., ```displayName EQ "ABC"```).
        filter: String = null,

        # Specifies the attributes whose value is used to order the returned items.
        sortBy: GroupSortByEnum = displayName,

        # Specifies whether the sort order is ascending or descending.
        sortOrder: SortOrderEnum = ascending,

        # Specifies the index of the first retrieved result within the list of all elements that match the search filter. The index starts at 1.
        startIndex: Int = 1,

        # Non-negative integer that specified the desired maximum number of retrieved elements per page. If this parameter is missing, all elements are retrieved.
        maxCount: Int = -1,
    ): GroupCollection

    # Check if the user is a member of any of the provided teams
    #
    # Who is authorized:
    # * TeamServer administrators if the user parameter is set.
    # * Any authenticated user if the user parameter is not set,
    #   i.e., if the check is done for the current user. 
    # 
    userMemberOfAnyTeam(

        # A list of unique identifiers of team definitions.
        teamIds: [String!],
        
        # The id of the user. When not specified, the current user is taken.
        user: String = null

    ): UserMemberOfAnyTeam

    # Retrieve the list of tags for teams.
    #
    # Who is authorized:
    # * Members of the "Creators" team
    # * TeamServer administrators
    # * If the context parameter is passed:
    #    * members of context team's writer team
    #    * members of context team's administrator team
    #    * context team owner
    #
    tags(
        # If set to the UUID of a team, the API can be called by anyone with
        # write permission on the team. If no context is given, the API can
        # only be called by TeamServer administrators and members of the
        # "Creators" team.
        context: String = null,

        # When specified, only those tags matching the filter
        # expression are returned. A filter is a logical expression consisting
        # of an attribute test (e.g., ```name CO "ABC"```).
        filter: String = null,

        # Specifies whether the sort order is ascending or descending.
        sortOrder: SortOrderEnum = ascending,

        # Specifies the index of the first retrieved result within the list
        # of all elements that match the search filter. The index starts at 1.
        startIndex: Int = 1,

        # Non-negative integer that specified the desired maximum number of
        # retrieved elements per page.
        # If this parameter is missing, all elements are retrieved.
        maxCount: Int = -1
    ): TagCollection

    # Retrieve a team tag.
    #
    # Who is authorized:
    # * Members of the "Creators" team
    # * TeamServer administrators
    # * If the context parameter is passed:
    #    * members of context team's writer team
    #    * members of context team's administrator team
    #    * context team owner
    #
    tag(
        # The unique name of the team tag.
        name: String!,

        # If set to the UUID of a team, the API can be called by anyone with
        # write permission on the team. If no context is given, the API can
        # only be called by TeamServer administrators and members of the
        # "Creators" team.
        context: String = null
    ): Tag

    # Retrieve the info of the current user
    userInfo: UserInfo

    # Retrieve the permissions of the current user
    userPermission: UserPermission
}


# Root type for all mutations
type Mutation {
    # Create a team definition.
    #
    # Who is authorized:
    # * Members of the "Creators" team
    # * TeamServer administrators
    #
    createTeam(
        # The team definition when creating a new team
        team: TeamInput!

        # The requested uuid (optional), where the uuid specified
        # must not exist yet.
        requesteduuid: String = null,

        # If set to true, it checks the values given for users and groups and
        # translates them into valid user ids and group ids. This allows
        # users and groups to be specified by distinguished names or by
        # short user names. Internally, the users and groups are stored by
        # their ids.
        # If set to false, it takes the user and groups specification as is
        # without trying to translate them. In this case, it is the
        # responsibility of the caller to ensure they are ids.
        checkUsersAndGroups: Boolean = false
    ): Team

    # Replace a team definition.
    #
    # Who is authorized:
    # * Members of team's writer team, unless the team's admin section is passed.
    # * Members of team's administrator team
    # * Team owner
    # * TeamServer administrators
    #
    replaceTeam(
        # The unique identifier of the team definition.
        uuid: String!,

        # The new team definition for the team with the uuid 
        team: TeamInput!,

        # If set to true, it checks the values given for users and groups and
        # translates them into valid user ids and group ids. This allows
        # users and groups to be specified by distinguished names or by
        # short user names. Internally, the users and groups are stored by
        # their ids.
        # If set to false, it takes the user and groups specification as is
        # without trying to translate them. In this case, it is the
        # responsibility of the caller to ensure they are ids.
        checkUsersAndGroups: Boolean = false
    ): Team

    # Update a team incrementally.
    #
    # The update specification knows the following paths:
    # * distinguishedName: string
    # * displayName: string
    # * description: string
    # * users: list of strings
    # * groups: list of strings
    # * teams: list of strings
    # * tags: list of strings
    # * admin.owner: string
    # * admin.readerTeam: string
    # * admin.writerTeam: string
    # * admin.administratorTeam (also admin.adminTeam): string
    #
    # Who is authorized:
    # * Members of team's writer team, unless any field of the team's admin section is updated
    # * Members of team's administrator team
    # * Team owner
    # * TeamServer administrators
    #
    updateTeam(
        # The unique identifier of the team definition.
        uuid: String!,

        # A specification how the team must be updated.
        update: Update!,

        # If set to true, it checks the values given for users and groups and
        # translates them into valid user ids and group ids. This allows
        # users and groups to be specified by distinguished names or by
        # short user names. Internally, the users and groups are stored by
        # their ids.
        # If set to false, it takes the user and groups specification as is
        # without trying to translate them. In this case, it is the
        # responsibility of the caller to ensure they are ids.
        checkUsersAndGroups: Boolean = false
    ): Team

    # Delete a team definition.
    #
    # The "Administators" team (uuid 10000000-0000-0000-0000-000000000000),
    # the "Creators" team (uuid 20000000-0000-0000-0000-000000000000), and
    # the "Repository Readers" team (uuid 30000000-0000-0000-0000-000000000000)
    # cannot be deleted.
    #
    # Who is authorized:
    # * Members of team's administrator team
    # * Team owner
    # * TeamServer administrators
    #
    deleteTeam(
        # The unique identifier of the team definition.
        uuid: String!
    ): String

    # Create a team tag.
    #
    # Who is authorized:
    # * Members of the "Creators" team
    # * TeamServer administrators
    # * If the context parameter is passed:
    #    * members of context team's writer team
    #    * members of context team's administrator team
    #    * context team owner
    #
    createTag(
        # The new tag.
        tag: TagInput!,

        # If set to the UUID of a team, the API can be called by anyone with
        # write permission on the team. If no context is given, the API can
        # only be called by TeamServer administrators and members of the
        # "Creators" team.
        context: String = null
    ): Tag

    # Replace a team tag.
    # This can be used to update the description of a tag.
    #
    # Who is authorized:
    # * Members of the "Creators" team
    # * TeamServer administrators
    # * If the context parameter is passed:
    #    * members of context team's writer team
    #    * members of context team's administrator team
    #    * context team owner
    #
    replaceTag(
        # The unique name of the team tag.
        name: String!,

        # The new tag definition for the tag with the name. 
        tag: TagInput!,

        # If set to the UUID of a team, the API can be called by anyone with
        # write permission on the team. If no context is given, the API can
        # only be called by TeamServer administrators and members of the
        # "Creators" team.
        context: String = null
    ): Tag

    # Delete a team tag. This removes the tag also from all teams.
    #
    # Who is authorized:
    # * TeamServer administrators
    # * If the tag is not used by any team, additionally authorized:
    #    * Members of the "Creators" team
    #    * If the context parameter is passed:
    #       * members of context team's writer team
    #       * members of context team's administrator team
    #       * context team owner
    #
    deleteTag(
        # The unique name of the team tag.
        name: String!,

        # If set to the UUID of a team, the API can be called by anyone with
        # write permission on the team. If no context is given, the API can
        # only be called by TeamServer administrators and members of the
        # "Creators" team.
        context: String = null
    ): String
}


# The administration data for a new team.
input TeamAdminInput {
    # The id of the user that owns this team.
    # The owner has administration permission on the team.
    owner: String

    # The unique identifier of the team whose members have administration
    # permission on the team. The team owner has administration permission
    # independent of whether the owner is a member of the administrator team or not.
    administratorTeam: String

    # The unique identifier of the team whose members have write permission
    # on the team. Administrators have write permission independent of whether
    # they are members of the writer team or not.
    writerTeam: String

    # The unique identifier of the team whose members have read permission
    # on the team. Administrators and writers have read permission independent
    # of whether they are members of the reader team or not.
    readerTeam: String
}


# The new team definition
input TeamInput {
    # The team definition's distinguished name
    # Distinguished names are used to identify a team in a readable and unique way.
    # The distinguished name must be unique among all teams.
    distinguishedName: String!

    # The team definition's display name
    displayName: String!

    # The team definition's description
    description: String

    # The ids of users that belong to the team. Users are identified by their
    # SCIM id. For many SCIM providers, this is the LDAP distinguished name
    # of the user. However, some SCIM providers use uuids or short names as
    # SCIM ids for users.
    users: [String!]

    # The ids of groups that belong to the team. Users are identified by their
    # SCIM id. For many SCIM providers, this is the LDAP distinguished name
    # of the group. However, some SCIM providers use uuids or short names as
    # SCIM ids for groups.
    groups: [String!]

    # The UUIDs of subteams that belong to the team
    teams: [String!]

    # The tags of the team.
    # Tags can be used to mark teams that have a similar purpose.
    # A tag is a short string and must not contain a colon or semicolon.
    tags: [String!]

    # The admin part of the team
    admin: TeamAdminInput
}


# The update of an object
input Update {
    # The operations describe what to update.
    operations: [UpdateOperation!]
}


# The operation to update elements of an object
input UpdateOperation {
    # The update operation to be performed.
    op: UpdateOpEnum!

    # The name of the field that is updated.
    path: String!

    # The update value. It must match the type of the field that is updated.
    # For instance, if the update is for a team, and the path is
    # "displayName", the type must be a string.
    # If the operation is 'delete', no value needs to be specified.
    value: JSON
}


# The team tag when creating or updating a tag.
input TagInput {
    # The name of the tag.
    # This is a short immutable string and must not contain a colon or semicolon.
    # It must be unique.
    name: String!

    # The tag description.
    description: String
}


# A scalar that represents arbitrary JSON.
# The team definition
type Team {
    # The team definition's unique identifier
    uuid: String!

    # The team definition's distinguished name
    # Distinguished names are used to identify a team in a readable and unique way.
    # The distinguished name must be unique among all teams.
    # While the uuid is immutable, the distinguished name can be modified by the user.
    distinguishedName: String!

    # The team definition's display name
    displayName: String

    # The team definition's description
    description: String

    # The ids of users that belong to the team. Users are identified by their
    # SCIM id. For many SCIM providers, this is the LDAP distinguished name
    # of the user. However, some SCIM providers use uuids or short names as
    # SCIM ids for users.
    users: [String!]

    # The users that belong to the team. This field contains the same information as the 
    # users field. However, it can provide more information about users,
    # such as the display name of each user.
    userInfos: [ShortUserInfo!]

    # The ids of groups that belong to the team. Groups are identified by their
    # SCIM id. For many SCIM providers, this is the LDAP distinguished name
    # of the group. However, some SCIM providers use uuids or short names as
    # SCIM ids for groups.
    groups: [String!]

    # The groups that belong to the team. This field contains the same information as the
    # groups field. However, it can provide more information about groups,
    # such as the display name of each group.
    groupInfos: [ShortGroupInfo!]

    # The subteams that belong to the team
    teams: [Team!]

    # The tags of the team.
    # Tags can be used to mark teams that have a similar purpose.
    # A tag is a short string and must not contain a colon or semicolon.
    tags: [String!]

    # Meta data about the creation and update timestamps
    metadata: TeamMetaData

    # Administration section
    admin: TeamAdminData
}


# The administration data for a team.
type TeamAdminData {
    # The id of the user who owns this team.
    # The owner has administration permission on the team.
    owner: String

    # The info of the user who owns this team.
    # The owner has administration permission on the team.
    # This field contains the same information as the owner field. However, it can provide more
    # information about the onwer, such as the display name of the owner.
    ownerUserInfo: ShortUserInfo

    # The team whose members have administration
    # permission on the team. The team owner has administration permission
    # independent of whether the owner is a member of the administrator team or not.
    administratorTeam: Team

    # The team whose members have write permission
    # on the team. Administrators have write permission independent of whether
    # they are members of the writer team or not.
    writerTeam: Team

    # The team whose members have read permission
    # on the team. Administrators and writers have read permission independent
    # of whether they are members of the reader team or not.
    readerTeam: Team
}


# Result of validateTeam query
type ValidateTeam {
    # An array of valid user ids
    validUsers: [String]

    # An array of invalid user ids
    invalidUsers: [String]

    # An array of valid group ids 
    validGroups: [String]

    # An array of invalid group ids
    invalidGroups: [String]
}


# Metadata about the creation and updating of timestamps
type TeamMetaData {
    # The id of the user that created this team.
    creator: String!

    # The timestamp when the object was created
    created: String!

    # The timestamp when the object was modified
    lastModified: String!

    # The permissions of the current user on the team
    permission: TeamPermission
}


# Permissions of the current user on a team.
type TeamPermission {
    # True if the user is permitted to edit the content of the team.
    canEdit: Boolean!

    # True if the user is permitted to edit the admin part of the team.
    canAdmin: Boolean!

    # True if the user is permitted to delete the team.
    canDelete: Boolean!
}


# Collection of team definitions.
type TeamCollection {
    # An array of team definitions.
    items: [Team!]

    # Whether the items list is complete.
    complete: Boolean

    # Metadata about a paginated collection.
    metadata: PagedCollectionMetaData
}


# Collection of users.
type UserCollection {
    # An array of users.
    items: [UserInfo!]

    # Whether the items list is complete.
    complete: Boolean

    # Metadata about a paginated collection.
    metadata: PagedCollectionMetaData
}


# The short information for a user.
type ShortUserInfo {
    # This is a short name uniquely identifying a user. This is expected to be stable
    # and typically matches what the user specified during login.
    userName: String

    # The user id. Users are identified by their SCIM id. For many SCIM
    # providers, this is the LDAP distinguished name of the user. However, some SCIM
    # providers use uuids or short names as SCIM ids for users.
    distinguishedName: String
 
    # The user's display name.
    displayName: String
}


# The information for a user.
type UserInfo {
    # This is a short name uniquely identifying a user. This is expected to be stable
    # and typically matches what the user specified during login.
    userName: String

    # The user id. Users are identified by their SCIM id. For many SCIM
    # providers, this is the LDAP distinguished name of the user. However, some SCIM
    # providers use uuids or short names as SCIM ids for users.
    distinguishedName: String
 
    # The user's display name.
    displayName: String
    
    # The emails known for this user.
    emails: [Email!]
 
    # The ids of groups the user belongs to. Groups are identified by their
    # SCIM id. For many SCIM providers, this is the LDAP distinguished name
    # of the group. However, some SCIM providers use uuids or short names as
    # SCIM ids for groups.
    groups: [String!]
}


# The properties of an email.
type Email {
    # The email address.
    value: String

    # The email type (e.g. "work", "home").
    type: String

    # Whether this is the primary email.
    primary: Boolean
}


# Collection of groups.
type GroupCollection {
    # An array of groups.
    items: [GroupInfo!]

    # Whether the items list is complete.
    complete: Boolean

    # Metadata about a paginated collection.
    metadata: PagedCollectionMetaData
}


# The short information for a group.
type ShortGroupInfo {
    # The group id. Groups are identified by their SCIM id. For many SCIM
    # providers, this is the LDAP distinguished name of the group. However, some SCIM
    # providers use uuids or short names as SCIM ids for groups.
    distinguishedName: String
 
    # The group's display name.
    displayName: String
}


# The information for a group.
type GroupInfo {
    # The group id. Groups are identified by their SCIM id. For many SCIM
    # providers, this is the LDAP distinguished name of the group. However, some SCIM
    # providers use uuids or short names as SCIM ids for groups.
    distinguishedName: String
 
    # The group's display name.
    displayName: String

    # The ids of users that are members of this group. Users are identified by
    # their SCIM id. For many SCIM providers, this is the LDAP distinguished
    # name of the user. However, some SCIM providers use uuids or short names
    # as SCIM ids for users.
    users: [String!]
}


# Result of userMemberOfAnyTeam query
type UserMemberOfAnyTeam {
    # Indicator, if the user is a member of any of the provided teams
    memberOfAnyTeam: Boolean!
}


# The permissions of a user indicate what operations the user is allowed to perform. 
type UserPermission {
    # True if the user is permitted to retrieve the list of his own teams.
    canListMyTeams: Boolean!

    # True if the user is permitted to retrieve the list of all teams.
    canListAllTeams: Boolean!

    # True if the user is permitted to retrieve a team or a list of teams with membership=deep.
    canDeepMembership: Boolean!

    # True if the user is permitted to view the details of each team.
    canViewTeamDetails: Boolean!

    # True if the user is permitted to create a new team.
    canCreateTeam: Boolean!

    # True if the user is permitted to modify each existing team.
    canModifyTeam: Boolean!

    # True if the user is permitted to replace each existing team.
    canReplaceTeam: Boolean!

    # True if the user is permitted to delete each existing team.
    canDeleteTeam: Boolean!
}


# Meta data about a paginated collection.
type PagedCollectionMetaData {
    # The total number of elements that match the search filter. A negative number is interpreted as unlimited total number.
    totalSize: Int!

    # The start index in the total list of elements if only a page of elements is returned. The first element has index 1.
    startIndex: Int!

    # The total number of available pages if only a page of elements is returned.
    pageSize: Int

    # The page index if only a page of elements is returned. The first page has page index 1.
    pageIndex: Int
}


# The team tag.
type Tag {
    # The name of the tag.
    name: String!

    # The tag description.
    description: String

    # The number of teams using this tag.
    teamCount: Int
}


# Collection of team tags.
type TagCollection {
    # An array of team tags.
    items: [Tag!]

    # Metadata about a paginated collection.
    metadata: PagedCollectionMetaData
}


# Enumeration for update operations
enum UpdateOpEnum {
    # Add a value
    add
    # Remove a value
    remove
    # Replace a value
    replace
}


# Enumeration for team membership deepness
enum TeamMembershipEnum {
    # Team definitions contains only the directly contained users, groups and teams.
    shallow

    # Team definition contains the recursively contained users, groups and teams (LDAP groups are not expanded).
    deep
}


# Enumeration for team sorting
enum TeamSortByEnum {
    # Sort by distinguishedName
    distinguishedName
    # Sort by displayName
    displayName
    # Sort by description
    description
    # Sort by unique identifier
    uuid
    # Sort by creation timestamp
    created
    # Sort by modification timestamp
    lastModified
}


# Enumeration for user sorting
enum UserSortByEnum {
    # Sort by distinguishedName
    distinguishedName
    # Sort by displayName
    displayName
    # Sort by userName
    userName
    # Sort by email
    emails
}


# Enumeration for group sorting
enum GroupSortByEnum {
    # Sort by distinguishedName
    distinguishedName
    # Sort by displayName
    displayName
}


# Enumeration for sort order
enum SortOrderEnum {
    # Ascending order
    ascending
    # Descending order
    descending
}


# Enumeration for team relationship
enum TeamRelationshipEnum {

    # Returns the teams the user is a member of
    member

    # Returns the teams the user has created
    creator

    # Returns the teams the user is owner of
    owner

    # Returns the teams the user has read permission for
    reader

    # Returns the teams the user has write permission for
    writer

    # Returns the teams the user has administration permission for
    admin

    # Returns the teams where the user is a member of the corresponding reader team.
    # This tests the membership of ```team.admin.readerTeam``` strictly.
    # This differs from the ```reader``` relationship as, for instance, a team
    # owner (or any user with write or administration permission) has
    # read permission even when not being a member of the team's reader team,
    # hence the team owner has the ```reader``` relationship to the team but
    # not necessarily the ```inReaderTeam``` relationship.
    inReaderTeam

    # Returns the teams where the user is a member of the corresponding writer team.
    # This tests the membership of ```team.admin.writerTeam``` strictly.
    # This differs from the ```writer``` relationship as, for instance, a team
    # owner (or any user with administration permission) has write permission
    # even when not being a member of the team's writer team, hence the team
    # owner has the ```writer``` relationship to the team but not necessarily
    # the ```inWriterTeam``` relationship.
    inWriterTeam

    # Returns the teams where the user is a member of the corresponding administrator team.
    # This tests the membership of ```team.admin.administratorTeam``` strictly.
    # This differs from the ```admin``` relationship as, for instance, a team
    # owner (or the global administrator) has administration permission even
    # when not being a member of the team's administrator team, hence the
    # team owner has the ```admin``` relationship to the team but not
    # necessarily the ```inAdministratorTeam``` relationship.
    inAdministratorTeam
}