@itwin/access-control-client
Version:
Access control client for the iTwin platform
55 lines • 2.93 kB
TypeScript
/** @packageDocumentation
* @module AccessControlClient
*/
import type { AccessToken } from "@itwin/core-bentley";
import type { IGroupMembersClient } from "../accessControlClientInterfaces/GroupMembersClient";
import type { BentleyAPIResponse, ODataQueryParams } from "../types/CommonApiTypes";
import type { GroupMemberAssignment, MultipleGroupMembersResponse, SingleGroupMemberResponse } from "../types/GroupMember";
import type { Links } from "../types/links";
import { BaseClient } from "./BaseClient";
/** Client API to perform iTwin group members operations.
*/
export declare class GroupMembersClient extends BaseClient implements IGroupMembersClient {
/** Create a new GroupMembersClient 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 iTwin group members and their roles assignments.
* @param accessToken The client access token string
* @param iTwinId The id of the iTwin
* @returns Array of members
*/
queryITwinGroupMembers(accessToken: AccessToken, iTwinId: string, arg?: Pick<ODataQueryParams, "top" | "skip">): Promise<BentleyAPIResponse<MultipleGroupMembersResponse & {
_links: Links;
}>>;
/** Retrieves a specific group member for a specified iTwin.
* @param accessToken The client access token string
* @param iTwinId The id of the iTwin
* @param memberId The id of the member
* @returns Member
*/
getITwinGroupMember(accessToken: AccessToken, iTwinId: string, memberId: string): Promise<BentleyAPIResponse<SingleGroupMemberResponse>>;
/** Add new iTwin group members
* @param accessToken The client access token string
* @param iTwinId The id of the iTwin
* @param newMembers The list of new members to be added along with their role
* @returns Member[]
*/
addITwinGroupMembers(accessToken: AccessToken, iTwinId: string, newMembers: GroupMemberAssignment): Promise<BentleyAPIResponse<MultipleGroupMembersResponse>>;
/** Remove the specified group member from the iTwin
* @param accessToken The client access token string
* @param iTwinId The id of the iTwin
* @param memberId The id of the member
* @returns No Content
*/
removeITwinGroupMember(accessToken: AccessToken, iTwinId: string, memberId: string): Promise<BentleyAPIResponse<undefined>>;
/** Update iTwin group member roles
* @param accessToken The client access token string
* @param iTwinId The id of the iTwin
* @param memberId The id of the member
* @param roleIds The ids of the roles to be assigned
* @returns Member
*/
updateITwinGroupMember(accessToken: AccessToken, iTwinId: string, memberId: string, roleIds: string[]): Promise<BentleyAPIResponse<SingleGroupMemberResponse>>;
}
//# sourceMappingURL=GroupMembersClient.d.ts.map