import { HttpClient, HttpHeaders } from '@angular/common/http'; import { ToastrService } from 'ngx-toastr'; import { Observable } from 'rxjs'; import { HasMetadata, SharePointService, SpGetOptions } from './share-point'; export interface Group { [name: string]: boolean; } export interface User extends HasMetadata { Groups: Groups; Id: number; LoginName: string; Title: string; PrincipalType: number; Email: string; IsSiteAdmin: boolean; UserPrincipalName: string; } export interface Groups { results: GroupResult[]; } export interface UpdatedGroup { removed: boolean; group: { Title: string; }; } interface GroupResult extends HasMetadata { Id: number; Title: string; } export declare class UserService { private http; private spService; private toaster; private userSubscription$; private userGroupsSubscription$; private readonly baseParams; private spGetOptions; private spSearchOptions; constructor(http: HttpClient, spService: SharePointService, toaster: ToastrService); /** * @return an `Observable` for the current user. */ current(options?: SpGetOptions): Observable; /** * @param searchFor as `string` for first name, last name, email, or employee number * @return an `Observable` array of users that match the search request. */ search(searchFor: string, options?: SpGetOptions): Observable; /** * @param group as `string` group name to add to or delete from * @param loginName as `string` users login name * @param remove as `bool` remove user from group */ updateGroup(group: string, loginName: string, remove: boolean, headers?: HttpHeaders): Observable; /** * userGroups */ userGroups(): Observable; } export declare class UserModule { } export {};