-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathGroupMembersClient.ts
More file actions
52 lines (46 loc) · 1.9 KB
/
GroupMembersClient.ts
File metadata and controls
52 lines (46 loc) · 1.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/*---------------------------------------------------------------------------------------------
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
* See LICENSE.md in the project root for license terms and full copyright notice.
*--------------------------------------------------------------------------------------------*/
import type { AccessToken } from "@itwin/core-bentley";
import type { BentleyAPIResponse, ODataQueryParams } from "../types/CommonApiTypes";
import type { GroupMemberAssignment, MultipleGroupMembersResponse, SingleGroupMemberResponse } from "../types/GroupMember";
import type { Links } from "../types/links";
export interface IGroupMembersClient {
/** Retrieves a list of group members and their roles assigned to a specified iTwin. */
queryITwinGroupMembers(
accessToken: AccessToken,
iTwinId: string,
arg?: Pick<ODataQueryParams, "top" | "skip">
): Promise<BentleyAPIResponse<MultipleGroupMembersResponse &
{
// eslint-disable-next-line @typescript-eslint/naming-convention
_links: Links
}
>>;
/** Retrieves a specific group member for a specified iTwin. */
getITwinGroupMember(
accessToken: AccessToken,
iTwinId: string,
memberId: string
): Promise<BentleyAPIResponse<SingleGroupMemberResponse>>;
/** Add new iTwin group members */
addITwinGroupMembers(
accessToken: AccessToken,
iTwinId: string,
newMembers: GroupMemberAssignment
): Promise<BentleyAPIResponse<MultipleGroupMembersResponse>>;
/** Remove the specified iTwin group member */
removeITwinGroupMember(
accessToken: AccessToken,
iTwinId: string,
memberId: string
): Promise<BentleyAPIResponse<undefined>>;
/** Update iTwin group member roles */
updateITwinGroupMember(
accessToken: AccessToken,
iTwinId: string,
memberId: string,
roleIds: string[]
): Promise<BentleyAPIResponse<SingleGroupMemberResponse>>;
}