UNPKG

@itwin/access-control-client

Version:

Access control client for the iTwin platform

16 lines 1.15 kB
import type { AccessToken } from "@itwin/core-bentley"; import type { BentleyAPIResponse } from "../types/CommonApiTypes"; import type { Role } from "../types/Role"; export interface IRolesClient { /** Retrieves a list of roles the for a specified iTwin */ getITwinRoles(accessToken: AccessToken, iTwinId: string): Promise<BentleyAPIResponse<Role[]>>; /** Retrieves a role for a specified iTwin */ getITwinRole(accessToken: AccessToken, iTwinId: string, roleId: string): Promise<BentleyAPIResponse<Role>>; /** Creates a new iTwin Role */ createITwinRole(accessToken: AccessToken, iTwinId: string, role: Pick<Role, "displayName" | "description">): Promise<BentleyAPIResponse<Pick<Role, "id" | "displayName" | "description">>>; /** Removes an existing iTwin Role */ deleteITwinRole(accessToken: AccessToken, iTwinId: string, roleId: string): Promise<BentleyAPIResponse<undefined>>; /** Updates an existing iTwin Role */ updateITwinRole(accessToken: AccessToken, iTwinId: string, roleId: string, role: Partial<Omit<Role, "id">>): Promise<BentleyAPIResponse<Role>>; } //# sourceMappingURL=RolesClient.d.ts.map