import { Configurer } from '../Core/index'; import { PageContent } from '../CommonTypes'; import { GrantList, Grants, GroupInfo, GroupRelated, GroupUsers, UserGroup } from './GroupsTypes'; /**Groups management for users, grants on resources, remote commands on devices. This is where you can configure rights for any resource.*/ export declare class GroupsConfigurer extends Configurer { /** * Administrative Group Management * * You can manage all the groups of all your users from here: create, delete, add users, grant or revoke rights. * When using the administrative API, the 'owner' field is mandatory and MUST NOT be null. * You also can configure additional things: grants on global groups, using the wildcard '*' as the group's owner. * */ /** * Adds a user to a group * * Adds the given user to given group for the given owner, or for a global group. * Addition may fail if the group does not exist. * */ addUser(body: UserGroup): Promise; /** * Lists all the groups * * Returns the paginated list of all groups. * */ allGroups(): Promise>; /** * Creates a group * * Creates a new group for the given owner, or a global group. * Creation may fail if the group already exists or if the group id does not follow the naming rules * */ create(body: GroupInfo): Promise; /** * Removes a user from a group * * Removes the given user from the given group for the given owner, or for a global group. * */ delUser(body: UserGroup): Promise; /** * Removes a group * * Removes an existing group for the given owner, or a global group. * */ deleteGroup(body: GroupRelated): Promise; /** * Grants rights to a group * * Grants the given rights to the given group for the given owner, or for a global group. * */ grant(body: Grants): Promise; /** * Lists the grants for a group * * Lists all the grants that have been previously given by 'grant' to the given group for the given owner, or for a global group. * Listing may fail if the group does not exist. * */ grants(body: GroupRelated): Promise; /** * Lists the users of a group * * Lists all the users of the given group for the given owner, or for a global group. * Listing may fail if the group does not exist. * */ groupUsers(body: GroupRelated): Promise; /** * Revokes a right for a group * * Revokes the given rights, previously given with 'grant' to the given group for the given owner, or for a global group. * */ revoke(body: Grants): Promise; }