/** * 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 { DatabaseInitialisation } from '../model/DatabaseInitialisation'; import { DocIdentifier } from '../model/DocIdentifier'; import { Group } from '../model/Group'; import { GroupDatabasesInfo } from '../model/GroupDatabasesInfo'; import { GroupDeletionReport } from '../model/GroupDeletionReport'; import { IdWithRev } from '../model/IdWithRev'; import { ListOfIds } from '../model/ListOfIds'; import { ListOfProperties } from '../model/ListOfProperties'; import { PaginatedListGroup } from '../model/PaginatedListGroup'; import { RegistrationInformation } from '../model/RegistrationInformation'; import { RegistrationSuccess } from '../model/RegistrationSuccess'; import { ReplicationInfo } from '../model/ReplicationInfo'; import { Unit } from '../model/Unit'; import { AuthenticationProvider } from '../../icc-x-api/auth/AuthenticationProvider'; import { RoleConfiguration } from '../model/RoleConfiguration'; import { UserTypeEnum } from '../model/UserTypeEnum'; export declare class IccGroupApi { host: string; headers: Array; authenticationProvider: AuthenticationProvider; fetchImpl?: (input: RequestInfo, init?: RequestInit) => Promise; constructor(host: string, headers: any, authenticationProvider?: AuthenticationProvider, fetchImpl?: (input: RequestInfo, init?: RequestInit) => Promise); setHeaders(h: Array): void; handleError(e: XHR.XHRError): never; /** * Changes the supergroup of the group passed as parameter according to the operation token * @summary Transfers the ownership of a group * @param operationToken The operation token generated by the target group * @param childGroupId The id of the group to transfer */ changeSuperGroup(operationToken: string, childGroupId: string): Promise; /** * Create a new group and associated dbs. The created group will be manageable by the users that belong to the same group as the one that called createGroup. Several tasks can be executed during the group creation like DB replications towards the created DBs, users creation and healthcare parties creation * @summary Create a group * @param body * @param id The id of the group, also used for subsequent authentication against the db (can only contain digits, letters, - and _) * @param name The name of the group * @param type The type of the group. * @param password The password of the group (can only contain digits, letters, - and _) * @param server The server on which the group dbs will be created * @param q The number of shards for patient and healthdata dbs : 3-8 is a recommended range of value * @param n The number of replications for dbs : 3 is a recommended value * @param superGroup Group parent */ createGroup(id: string, name: string, password: string, server?: string, q?: number, n?: number, superGroup?: string, type?: string, body?: DatabaseInitialisation): Promise; /** * Delete group without reset or deleteing storage * @summary Delete group * @param id The id of group to delete */ deleteGroup(id: string): Promise; /** * Deletes an operation token in the group of the user based on its id * @summary Deletes an operation token for the current group * @param tokenId The operation that the token will allow */ deleteOperationToken(tokenId: string): Promise; /** * List groups that are the children of the group with the provided parent id * @summary Find groups by parent * @param id The id of the group * @param startDocumentId A group document ID used as a cursor for pagination * @param limit Number of rows */ findGroups(id: string, startDocumentId?: string, limit?: number): Promise; /** * List groups that are the children of the group with the provided parent id and that match the provided search string * @summary Find groups by parent and content * @param id The id of the group * @param searchString The string to search for in the group. Properties, name and id are scanned for the provided search string. * @param startKey The start key for pagination, depends on the filters used * @param startDocumentId A group document ID used as a cursor for pagination * @param limit Number of rows */ findGroupsWithContent(id: string, searchString: string, startKey?: string, startDocumentId?: string, limit?: number): Promise; /** * Get a group by id * @summary Get a group by id * @param id The id of the group */ getGroup(id: string): Promise; /** * Reset storage * @summary Reset storage for group * @param body */ getGroupsStorageInfos(body?: ListOfIds): Promise>; /** * * @summary Get all the parent groups of the group passed as parameter, as long as the current user has access to them * @param id The id of the group */ getHierarchy(id: string): Promise>; /** * Get a group by id * @summary Get a group by id * @param id The id of the group */ getNameOfGroupParent(id: string): Promise; /** * Creates an operation token with limited time and scope validity for the group of the user * @summary Creates an operation token for the current group * @param operation The operation that the token will allow * @param duration The duration of the token in seconds (default 3600) */ getOperationToken(operation: string, duration?: number): Promise; /** * * @summary Get index info * @param id The id of the group */ getReplicationInfo1(id: string): Promise; /** * Hard deletes the provided group from CouchDB. This operation can only be done by an admin user * @summary Hard delete group * @param id The id of group to delete */ hardDeleteGroup(id: string): Promise>; /** * Init design docs for provided group * @summary Init design docs * @param id The id of the group * @param clazz The class of the design doc * @param warmup Warmup the design doc * @param dryRun Do nothing */ initDesignDocs(id: string, clazz?: string, warmup?: boolean, dryRun?: boolean): Promise; /** * List existing groups * @summary List all the groups ids the current user can access */ listAllGroupsIds(): Promise>; /** * List available apps for user * @summary List apps */ listApps(): Promise>; /** * List existing groups * @summary List groups */ listGroups(): Promise>; /** * Update existing group name * @summary Update group name * @param id The id of the group * @param name The new name for the group */ modifyGroupName(id: string, name: string): Promise; /** * Update existing group properties * @summary Update group properties * @param body * @param id The id of the group */ modifyGroupProperties(id: string, body?: ListOfProperties): Promise; /** * Sets the default roles to assign to a certain category of users in a group. * * @param groupId the group to update. * @param userType the type of user. * @param roleIds the ids of the roles to assign by default to that type of user. * @return the updated group */ setDefaultRoles(groupId: string, userType: UserTypeEnum, roleIds: string[]): Promise; getDefaultRoles(groupId: string): Promise<{ [key in UserTypeEnum]: RoleConfiguration[]; }>; /** * Create a new group and associated dbs. The created group will be manageable by the users that belong to the same group as the one that called createGroup. Several tasks can be executed during the group creation like DB replications towards the created DBs, users creation and healthcare parties creation * @summary Create a group * @param body * @param type The type of the group (default: root) * @param role The role of the user (default: admin) */ registerNewGroupAdministrator(type?: string, role?: string, body?: RegistrationInformation): Promise; /** * Reset storage * @summary Reset storage for group * @param body * @param id The id of the group * @param q The number of shards for patient and healthdata dbs : 3-8 is a recommended range of value * @param n The number of replications for dbs : 3 is a recommended value */ resetStorage(id: string, q?: number, n?: number, body?: ListOfIds): Promise; /** * Update password for provided group * @summary Set group password * @param id The id of the group * @param password The new password for the group (can only contain digits, letters, - and _) */ setGroupPassword(id: string, password: string): Promise; /** * Solve conflicts for group * @summary Solve conflicts for group * @param id The id of the group * @param limit Solve at most limit conflicts * @param warmup Warmup the design doc */ solveConflicts(id: string, limit?: number, warmup?: boolean): Promise>; /** * Update group application id * @summary Set group password * @param id The id of the group * @param applicationId The new application id for the group */ modifyGroupApplicationId(id: string, applicationId: string): Promise; }