/**
 * iCure Data Stack API Documentation
 * The iCure Data Stack Application API is the native interface to iCure. This version is obsolete, please use v2.
 *
 * OpenAPI spec version: v1
 *
 *
 * NOTE: This class is auto generated by the swagger code generator program.
 * https://github.com/swagger-api/swagger-codegen.git
 * Do not edit the class manually.
 */
import { XHR } from './XHR';
import { AbstractFilterUser } from '../model/AbstractFilterUser';
import { DocIdentifier } from '../model/DocIdentifier';
import { FilterChainUser } from '../model/FilterChainUser';
import { PaginatedListUser } from '../model/PaginatedListUser';
import { PropertyStub } from '../model/PropertyStub';
import { TokenWithGroup } from '../model/TokenWithGroup';
import { Unit } from '../model/Unit';
import { User } from '../model/User';
import { UserGroup } from '../model/UserGroup';
import { AuthenticationProvider } from '../../icc-x-api/auth/AuthenticationProvider';
import { ListOfIds } from '../model/ListOfIds';
import { TimingInfo } from '../model/TimingInfo';
export declare class IccUserApi {
    host: string;
    headers: Array<XHR.Header>;
    authenticationProvider: AuthenticationProvider;
    fetchImpl?: (input: RequestInfo, init?: RequestInit) => Promise<Response>;
    constructor(host: string, headers: any, authenticationProvider?: AuthenticationProvider, fetchImpl?: (input: RequestInfo, init?: RequestInit) => Promise<Response>);
    setHeaders(h: Array<XHR.Header>): void;
    handleError(e: XHR.XHRError): never;
    /**
     * UserDto gets returned.
     * @summary Assign a healthcare party ID to current user
     * @param healthcarePartyId
     */
    assignHealthcareParty(healthcarePartyId: string): Promise<User>;
    /**
     *
     * @summary Check token validity
     * @param userId
     * @param token
     */
    checkTokenValidity(userId: string, token: string): Promise<boolean>;
    /**
     * Create a user. HealthcareParty ID should be set. Email or Login have to be set. If login hasn't been set, Email will be used for Login instead.
     * @summary Create a user
     * @param body
     */
    createUser(body?: User): Promise<User>;
    /**
     * Create a user. HealthcareParty ID should be set. Email has to be set and the Login has to be null. On server-side, Email will be used for Login.
     * @summary Create a user
     * @param body
     * @param groupId
     */
    createUserInGroup(groupId: string, body?: User): Promise<User>;
    /**
     * @summary Creates a new admin user in the group of the current user.
     * @param body the user to create.
     * @return a promise that will resolve to the created user.
     */
    createAdminUser(body?: User): Promise<User>;
    /**
     * @summary Creates a new admin user in a group of the current user.
     * @param body the user to create.
     * @param groupId the id of the group where to create the user.
     * @return a promise that will resolve to the created user.
     */
    createAdminUserInGroup(groupId: string, body?: User): Promise<User>;
    /**
     * Delete a User based on his/her ID. The return value is an array containing the ID of deleted user.
     * @summary Delete a User based on his/her ID.
     * @param userId
     */
    deleteUser(userId: string): Promise<DocIdentifier>;
    /**
     * Delete a User based on his/her ID. The return value is an array containing the ID of deleted user.
     * @summary Delete a User based on his/her ID.
     * @param groupId
     * @param userId
     */
    deleteUserInGroup(groupId: string, userId: string): Promise<Unit>;
    /**
     *
     * @param password
     */
    encodePassword(password: string): Promise<string>;
    /**
     * Returns a list of users along with next start keys and Document ID. If the nextStartKey is Null it means that this is the last page.
     * @summary Filter users for the current user (HcParty)
     * @param body
     * @param startDocumentId A User document ID
     * @param limit Number of rows
     * @param collectTiming if true, include server-side filter timing information in the response
     */
    filterUsersBy(startDocumentId?: string, limit?: number, body?: FilterChainUser, collectTiming?: false): Promise<PaginatedListUser>;
    filterUsersBy(startDocumentId?: string, limit?: number, body?: FilterChainUser, collectTiming?: true): Promise<PaginatedListUser & TimingInfo>;
    /**
     * Returns a list of users along with next start keys and Document ID. If the nextStartKey is Null it means that this is the last page.
     * @summary Filter users for the current user (HcParty) for a provided groupId
     * @param body
     * @param groupId
     * @param startDocumentId A User document ID
     * @param limit Number of rows
     * @param collectTiming if true, include server-side filter timing information in the response
     */
    filterUsersInGroupBy(groupId: string, startDocumentId?: string, limit?: number, body?: FilterChainUser, collectTiming?: false): Promise<PaginatedListUser>;
    filterUsersInGroupBy(groupId: string, startDocumentId?: string, limit?: number, body?: FilterChainUser, collectTiming?: true): Promise<PaginatedListUser & TimingInfo>;
    /**
     *
     * @summary Get the list of users by healthcare party id
     * @param id
     */
    findByHcpartyId(id: string): Promise<Array<string>>;
    /**
     *
     * @summary Get the list of users by patient id
     * @param id
     */
    findByPatientId(id: string): Promise<Array<string>>;
    /**
     * Get current user.
     * @summary Get presently logged-in user.
     */
    getCurrentUser(): Promise<User>;
    /**
     * Get current user.
     * @summary Get presently logged-in user.
     */
    getMatchingUsers(): Promise<Array<UserGroup>>;
    /**
     *
     * @summary Request a new temporary token for authentication
     * @param userId
     * @param key The token key. Only one instance of a token with a defined key can exist at the same time
     * @param tokenValidity The token validity in seconds
     * @param token
     */
    getToken(userId: string, key: string, tokenValidity?: number, token?: string): Promise<string>;
    /**
     *
     * @summary Require a new temporary token for authentication inside all groups
     * @param userIdentifier
     * @param key The token key. Only one instance of a token with a defined key can exist at the same time
     * @param token
     * @param tokenValidity The token validity in seconds
     */
    getTokenInAllGroups(userIdentifier: string, key: string, token?: string, tokenValidity?: number): Promise<Array<TokenWithGroup>>;
    /**
     *
     * @summary Require a new temporary token for authentication inside provided group
     * @param groupId
     * @param userId
     * @param key The token key. Only one instance of a token with a defined key can exist at the same time
     * @param token
     * @param tokenValidity The token validity in seconds
     */
    getTokenInGroup(groupId: string, userId: string, key: string, token?: string, tokenValidity?: number): Promise<string>;
    /**
     * General information about the user
     * @summary Get a user by his ID
     * @param userId
     */
    getUser(userId: string): Promise<User>;
    /**
     * @summary Sets the roles of a user to the ones passed as parameter.
     *
     * @param userId the Id of the user to update.
     * @param roleIds the ids of the roles to add to the user.
     */
    setRoles(userId: string, roleIds: string[]): Promise<User>;
    /**
     * @summary Sets the roles of a user in a group to the ones passed as parameter.
     *
     * @param userId the Id of the user to update.
     * @param groupId the Id of the group the user belongs to.
     * @param roleIds the ids of the roles to add to the user.
     */
    setRolesInGroup(userId: string, groupId: string, roleIds: string[]): Promise<User>;
    /**
     * @summary Reset the roles of a user to the default ones for their type.
     *
     * @param userId the Id of the user to update.
     */
    resetRoles(userId: string): Promise<User>;
    /**
     * @summary Reset the roles of a user in a group to the default ones for their type.
     *
     * @param userId the Id of the user to update.
     * @param groupId the Id of the group the user belongs to.
     */
    resetRolesInGroup(userId: string, groupId: string): Promise<User>;
    /**
     * General information about the user
     * @summary Get a user by his Email/Login
     * @param email
     */
    getUserByEmail(email: string): Promise<User>;
    /**
     * @summary Get a user by his phone number.
     * @param phoneNumber
     * @return a promise that resolves to the specified user.
     */
    getUserByPhoneNumber(phoneNumber: string): Promise<User>;
    /**
     * Returns a list of users.
     * @summary List users with(out) pagination
     * @param startKey An user email
     * @param startDocumentId An user document ID
     * @param limit Number of rows
     * @param skipPatients Filter out patient users
     */
    listUsers(startKey?: string, startDocumentId?: string, limit?: number, skipPatients?: boolean): Promise<PaginatedListUser>;
    /**
     * Returns a list of users.
     * @summary List users with pagination
     * @param groupId
     * @param startKey An user login
     * @param startDocumentId An user document ID
     * @param limit Number of rows
     */
    listUsersInGroup(groupId: string, startKey?: string, startDocumentId?: string, limit?: number): Promise<PaginatedListUser>;
    /**
     *
     * @summary Get ids of healthcare party matching the provided filter for the current user (HcParty)
     * @param body
     * @param collectTiming if true, include server-side filter timing information in the response
     */
    matchUsersBy(body?: AbstractFilterUser, collectTiming?: false): Promise<Array<string>>;
    matchUsersBy(body?: AbstractFilterUser, collectTiming?: true): Promise<Array<string> & TimingInfo>;
    /**
     * Modify a User properties based on his/her ID. The return value is the modified user.
     * @summary Modify a User property
     * @param body
     * @param userId
     */
    modifyProperties(userId: string, body?: Array<PropertyStub>): Promise<User>;
    /**
     * No particular return value. It's just a message.
     * @summary Modify a user.
     * @param body
     */
    modifyUser(body?: User): Promise<User>;
    /**
     * No particular return value. It's just a message.
     * @summary Modify a user.
     * @param body
     * @param groupId
     */
    modifyUserInGroup(groupId: string, body?: User): Promise<User>;
    enable2fa(userId: string, secret: string): Promise<void>;
    enableFasAuthenticationForUser(fasJwtToken: string): Promise<User>;
    revokeFasAuthenticationForUser(fasJwtToken: string): Promise<User>;
    disable2fa(userId: string): Promise<void>;
    getUsers(body?: ListOfIds): Promise<Array<User>>;
}
