@itwin/access-control-client
Version:
Access control client for the iTwin platform
51 lines • 2.5 kB
TypeScript
/** @packageDocumentation
* @module AccessControlClient
*/
import type { AccessToken } from "@itwin/core-bentley";
import type { IRolesClient } from "../accessControlClientInterfaces/RolesClient";
import type { BentleyAPIResponse } from "../types/CommonApiTypes";
import type { Role } from "../types/Role";
import { BaseClient } from "./BaseClient";
/** Client API to perform iTwin role operations.
*/
export declare class RolesClient extends BaseClient implements IRolesClient {
/** Create a new RolesClient instance
* @param url Optional base URL for the access control service. If not provided, defaults to base url.
*/
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
*/
getITwinRoles(accessToken: AccessToken, iTwinId: string): Promise<BentleyAPIResponse<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
*/
getITwinRole(accessToken: AccessToken, iTwinId: string, roleId: string): Promise<BentleyAPIResponse<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
*/
createITwinRole(accessToken: AccessToken, iTwinId: string, role: Pick<Role, "displayName" | "description">): Promise<BentleyAPIResponse<Pick<Role, "id" | "displayName" | "description">>>;
/** 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
*/
deleteITwinRole(accessToken: AccessToken, iTwinId: string, roleId: string): Promise<BentleyAPIResponse<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
*/
updateITwinRole(accessToken: AccessToken, iTwinId: string, roleId: string, role: Partial<Omit<Role, "id">>): Promise<BentleyAPIResponse<Role>>;
}
//# sourceMappingURL=RolesClient.d.ts.map