@itwin/access-control-client
Version:
Access control client for the iTwin platform
46 lines • 2.2 kB
TypeScript
/** @packageDocumentation
* @module AccessControlClient
*/
import type { AccessToken } from "@itwin/core-bentley";
import type { AccessControlAPIResponse, IRolesClient, Role } from "../accessControlTypes";
import { BaseClient } from "./BaseClient";
export declare class RolesClient extends BaseClient implements IRolesClient {
constructor(url?: string);
/** Retrieves a list of available user roles that are defined for a specified iTwin
* @param accessToken The client access token string
* @param iTwinId The id of the iTwin
* @returns Roles
*/
getITwinRolesAsync(accessToken: AccessToken, iTwinId: string, additionalHeaders?: {
[key: string]: string;
}): Promise<AccessControlAPIResponse<Role[]>>;
/** Retrieves the specified role for the specified iTwin
* @param accessToken The client access token string
* @param iTwinId The id of the iTwin
* @returns Role
*/
getITwinRoleAsync(accessToken: AccessToken, iTwinId: string, roleId: string): Promise<AccessControlAPIResponse<Role>>;
/** Creates a new iTwin Role
* @param accessToken The client access token string
* @param iTwinId The id of the iTwin
* @param role The role to be created
* @returns Role
*/
createITwinRoleAsync(accessToken: AccessToken, iTwinId: string, role: Role): Promise<AccessControlAPIResponse<Role>>;
/** Delete the specified iTwin role
* @param accessToken The client access token string
* @param iTwinId The id of the iTwin
* @param roleId The id of the role to remove
* @returns No Content
*/
deleteITwinRoleAsync(accessToken: AccessToken, iTwinId: string, roleId: string): Promise<AccessControlAPIResponse<undefined>>;
/** Update the specified iTwin role
* @param accessToken The client access token string
* @param iTwinId The id of the iTwin
* @param roleId The id of the role to update
* @param role The updated role
* @returns Role
*/
updateITwinRoleAsync(accessToken: AccessToken, iTwinId: string, roleId: string, role: Role): Promise<AccessControlAPIResponse<Role>>;
}
//# sourceMappingURL=RolesClient.d.ts.map