import Client , { UserGroupDeletionFailedError , UserGroupDoesNotExistError } from "./client" ; /**
 * The user group class represents a user user in nextcloud.
 * spec: https://docs.nextcloud.com/server/latest/admin_manual/configuration_user/instruction_set_for_groups.html
 * id
 * getSubAdmins
 * getMembers
 */ export default class UserGroup { readonly id : string ; private client : Client ; constructor ( client , id ) { this . id = id ; this . client = client ; } throws public async delete ( ) { try { return await this . client . deleteUserGroup ( this . id ) ; } catch ( e ) { if ( e instanceof UserGroupDoesNotExistError ) { return ; } throw e ; } } public async getMemberUserIds ( ) { return await this . client . getUserGroupMembers ( this . id ) ; } public async getSubadminUserIds ( ) { return await this . client . getUserGroupSubadmins ( this . id ) ; } }