UNPKG

@itwin/access-control-client

Version:

Access control client for the iTwin platform

53 lines 2.99 kB
/** @packageDocumentation * @module AccessControlClient */ import type { AccessToken } from "@itwin/core-bentley"; import type { IUserMembersClient } from "../accessControlClientInterfaces/UserMembersClient"; import type { BentleyAPIResponse, ODataQueryParams } from "../types/CommonApiTypes"; import type { AddUserMember, AddUserMemberResponse, MultipleUserMembersResponse, SingleUserMemberResponse } from "../types/UserMembers"; import { BaseClient } from "./BaseClient"; /** Client API to perform user members operations. */ export declare class UserMembersClient extends BaseClient implements IUserMembersClient { /** Create a new UserMembersClient 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 user members and their roles assignments. * @param accessToken The client access token string * @param iTwinId The id of the iTwin * @returns Array of members */ queryITwinUserMembers(accessToken: AccessToken, iTwinId: string, arg?: Pick<ODataQueryParams, "top" | "skip">): Promise<BentleyAPIResponse<MultipleUserMembersResponse>>; /** Retrieves a specific user 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 */ getITwinUserMember(accessToken: AccessToken, iTwinId: string, memberId: string): Promise<BentleyAPIResponse<SingleUserMemberResponse>>; /** Add new iTwin user members * @param accessToken The client access token string * @param iTwinId The id of the iTwin * @param newMembers The list of members to add or invite, along with their role * @param customMessage Send custom message in welcome email when adding new members * @returns AddUserMemberResponse -- the added or invited user members */ addITwinUserMembers(accessToken: AccessToken, iTwinId: string, newMembers: AddUserMember[], customMessage?: string): Promise<BentleyAPIResponse<AddUserMemberResponse>>; /** Remove the specified user 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 */ removeITwinUserMember(accessToken: AccessToken, iTwinId: string, memberId: string): Promise<BentleyAPIResponse<undefined>>; /** Update iTwin user 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 */ updateITwinUserMember(accessToken: AccessToken, iTwinId: string, memberId: string, roleIds: string[]): Promise<BentleyAPIResponse<SingleUserMemberResponse>>; } //# sourceMappingURL=UserMembersClient.d.ts.map