UNPKG

2.75 kBTypeScriptView Raw
1import basem = require('./ClientApiBases');
2import VsoBaseInterfaces = require('./interfaces/common/VsoBaseInterfaces');
3import SecurityRolesInterfaces = require("./interfaces/SecurityRolesInterfaces");
4export interface ISecurityRolesApi extends basem.ClientApiBase {
5 getRoleAssignments(scopeId: string, resourceId: string): Promise<SecurityRolesInterfaces.RoleAssignment[]>;
6 removeRoleAssignment(scopeId: string, resourceId: string, identityId: string): Promise<void>;
7 removeRoleAssignments(identityIds: string[], scopeId: string, resourceId: string): Promise<void>;
8 setRoleAssignment(roleAssignment: SecurityRolesInterfaces.UserRoleAssignmentRef, scopeId: string, resourceId: string, identityId: string): Promise<SecurityRolesInterfaces.RoleAssignment>;
9 setRoleAssignments(roleAssignments: SecurityRolesInterfaces.UserRoleAssignmentRef[], scopeId: string, resourceId: string): Promise<SecurityRolesInterfaces.RoleAssignment[]>;
10 getRoleDefinitions(scopeId: string): Promise<SecurityRolesInterfaces.SecurityRole[]>;
11}
12export declare class SecurityRolesApi extends basem.ClientApiBase implements ISecurityRolesApi {
13 constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[], options?: VsoBaseInterfaces.IRequestOptions);
14 /**
15 * @param {string} scopeId
16 * @param {string} resourceId
17 */
18 getRoleAssignments(scopeId: string, resourceId: string): Promise<SecurityRolesInterfaces.RoleAssignment[]>;
19 /**
20 * @param {string} scopeId
21 * @param {string} resourceId
22 * @param {string} identityId
23 */
24 removeRoleAssignment(scopeId: string, resourceId: string, identityId: string): Promise<void>;
25 /**
26 * @param {string[]} identityIds
27 * @param {string} scopeId
28 * @param {string} resourceId
29 */
30 removeRoleAssignments(identityIds: string[], scopeId: string, resourceId: string): Promise<void>;
31 /**
32 * @param {SecurityRolesInterfaces.UserRoleAssignmentRef} roleAssignment
33 * @param {string} scopeId
34 * @param {string} resourceId
35 * @param {string} identityId
36 */
37 setRoleAssignment(roleAssignment: SecurityRolesInterfaces.UserRoleAssignmentRef, scopeId: string, resourceId: string, identityId: string): Promise<SecurityRolesInterfaces.RoleAssignment>;
38 /**
39 * @param {SecurityRolesInterfaces.UserRoleAssignmentRef[]} roleAssignments
40 * @param {string} scopeId
41 * @param {string} resourceId
42 */
43 setRoleAssignments(roleAssignments: SecurityRolesInterfaces.UserRoleAssignmentRef[], scopeId: string, resourceId: string): Promise<SecurityRolesInterfaces.RoleAssignment[]>;
44 /**
45 * @param {string} scopeId
46 */
47 getRoleDefinitions(scopeId: string): Promise<SecurityRolesInterfaces.SecurityRole[]>;
48}