mftsccs-browser 2.2.34-beta → 2.2.36-beta
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.bundle.js +1 -1
- package/dist/serviceWorker.bundle.js +1 -1
- package/dist/types/DataStructures/AccessControl/AccessControlModels.d.ts +54 -0
- package/dist/types/DataStructures/BaseUrl.d.ts +1 -0
- package/dist/types/Services/AccessControl/APIClientService.d.ts +92 -0
- package/dist/types/Services/AccessControl/AccessControl.d.ts +186 -210
- package/dist/types/Services/Upload.d.ts +1 -0
- package/dist/types/WrapperFunctions/DepenedencyObserver.d.ts +2 -2
- package/dist/types/app.d.ts +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AccessControlModels
|
|
3
|
+
*
|
|
4
|
+
* Data structures for Access Control operations.
|
|
5
|
+
* Contains all request/response types for the access control API.
|
|
6
|
+
*/
|
|
7
|
+
export interface AccessRequest {
|
|
8
|
+
accessId: number;
|
|
9
|
+
permission: string;
|
|
10
|
+
entityId?: number | null;
|
|
11
|
+
}
|
|
12
|
+
export interface AccessResult {
|
|
13
|
+
accessId: number;
|
|
14
|
+
permission: string;
|
|
15
|
+
entityId?: number | null;
|
|
16
|
+
hasAccess: boolean;
|
|
17
|
+
}
|
|
18
|
+
export interface AccessControlAPIResponse<T = any> {
|
|
19
|
+
status: boolean;
|
|
20
|
+
data?: T;
|
|
21
|
+
message?: string;
|
|
22
|
+
errorCode?: string;
|
|
23
|
+
}
|
|
24
|
+
export interface BulkAccessTarget {
|
|
25
|
+
entityId: number;
|
|
26
|
+
permissions: string[];
|
|
27
|
+
}
|
|
28
|
+
export interface BulkAccessRequest {
|
|
29
|
+
accessId?: number;
|
|
30
|
+
targets: BulkAccessTarget[];
|
|
31
|
+
}
|
|
32
|
+
export interface BulkCheckAccessRequest {
|
|
33
|
+
accessId: number;
|
|
34
|
+
permissions: string[];
|
|
35
|
+
entityIds: number[];
|
|
36
|
+
}
|
|
37
|
+
export interface AccessInheritanceRequest {
|
|
38
|
+
accessId?: number;
|
|
39
|
+
connectionTypeId?: number;
|
|
40
|
+
enable?: boolean;
|
|
41
|
+
}
|
|
42
|
+
export interface SuperAdminRequest {
|
|
43
|
+
accessId?: number;
|
|
44
|
+
}
|
|
45
|
+
export interface ConceptAccessRequest {
|
|
46
|
+
conceptIds: number;
|
|
47
|
+
permission: string;
|
|
48
|
+
entityId?: number | null;
|
|
49
|
+
}
|
|
50
|
+
export interface BulkConceptAccessRequest {
|
|
51
|
+
conceptIds: number[];
|
|
52
|
+
permissions: string[];
|
|
53
|
+
entityId?: number | null;
|
|
54
|
+
}
|
|
@@ -70,6 +70,7 @@ export declare class BaseUrl {
|
|
|
70
70
|
static DeleteTheConnectionUrl(): string;
|
|
71
71
|
static DeleteTheConnectionBulkUrl(): string;
|
|
72
72
|
static GetTypeConceptBulk(): string;
|
|
73
|
+
static UploadFileLimitUrl(): string;
|
|
73
74
|
static FreeschemaQueryUrl(): string;
|
|
74
75
|
static uploadImageUrl(): string;
|
|
75
76
|
static uploadImageUrlWithSmall(): string;
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* APIClientService
|
|
3
|
+
*
|
|
4
|
+
* API client service for Access Control endpoints.
|
|
5
|
+
* Provides typed HTTP methods for all access control API operations.
|
|
6
|
+
*
|
|
7
|
+
* This is the TypeScript equivalent of the C# APIClientService class.
|
|
8
|
+
*/
|
|
9
|
+
import { AccessRequest, AccessResult, AccessControlAPIResponse, BulkAccessRequest, BulkCheckAccessRequest, AccessInheritanceRequest, SuperAdminRequest, BulkConceptAccessRequest, ConceptAccessRequest } from '../../DataStructures/AccessControl/AccessControlModels';
|
|
10
|
+
export interface IAPIClientService {
|
|
11
|
+
assignAccessAsync(request: AccessRequest): Promise<AccessControlAPIResponse<AccessResult>>;
|
|
12
|
+
checkAccessAsync(request: AccessRequest): Promise<AccessControlAPIResponse<AccessResult>>;
|
|
13
|
+
revokeAccessAsync(request: AccessRequest): Promise<AccessControlAPIResponse<AccessResult>>;
|
|
14
|
+
assignAccessBulkAsync(request: BulkAccessRequest): Promise<AccessControlAPIResponse<AccessResult[]>>;
|
|
15
|
+
assignConceptAccessBulkAsync(request: BulkConceptAccessRequest): Promise<AccessControlAPIResponse<AccessResult[]>>;
|
|
16
|
+
revokeAccessBulkAsync(request: BulkAccessRequest): Promise<AccessControlAPIResponse<AccessResult[]>>;
|
|
17
|
+
revokeConceptAccessBulkAsync(request: BulkConceptAccessRequest): Promise<AccessControlAPIResponse<AccessResult[]>>;
|
|
18
|
+
checkAccessBulkAsync(request: BulkCheckAccessRequest): Promise<AccessControlAPIResponse<AccessResult[]>>;
|
|
19
|
+
getAccessByIdAsync(accessId: number): Promise<AccessControlAPIResponse<AccessResult[]>>;
|
|
20
|
+
setAccessInheritanceAsync(request: AccessInheritanceRequest): Promise<AccessControlAPIResponse>;
|
|
21
|
+
getAccessInheritanceStatusAsync(accessId: number, connectionTypeId?: number): Promise<AccessControlAPIResponse>;
|
|
22
|
+
assignSuperAdminAccessAsync(request: SuperAdminRequest): Promise<AccessControlAPIResponse>;
|
|
23
|
+
revokeSuperAdminAccessAsync(request: SuperAdminRequest): Promise<AccessControlAPIResponse>;
|
|
24
|
+
checkSuperAdminStatusAsync(accessId: number): Promise<AccessControlAPIResponse>;
|
|
25
|
+
}
|
|
26
|
+
export declare class APIClientService implements IAPIClientService {
|
|
27
|
+
private static get baseUrl();
|
|
28
|
+
private static getAsync;
|
|
29
|
+
private static postAsync;
|
|
30
|
+
private static deleteAsync;
|
|
31
|
+
/**
|
|
32
|
+
* Assign access to an entity
|
|
33
|
+
*/
|
|
34
|
+
assignAccessAsync(request: AccessRequest): Promise<AccessControlAPIResponse<AccessResult>>;
|
|
35
|
+
/**
|
|
36
|
+
* Check if an entity has access
|
|
37
|
+
*/
|
|
38
|
+
checkAccessAsync(request: AccessRequest): Promise<AccessControlAPIResponse<AccessResult>>;
|
|
39
|
+
/**
|
|
40
|
+
* Revoke access from an entity
|
|
41
|
+
*/
|
|
42
|
+
revokeAccessAsync(request: AccessRequest): Promise<AccessControlAPIResponse<AccessResult>>;
|
|
43
|
+
/**
|
|
44
|
+
* Assign access to multiple targets in bulk
|
|
45
|
+
*/
|
|
46
|
+
assignAccessBulkAsync(request: BulkAccessRequest): Promise<AccessControlAPIResponse<AccessResult[]>>;
|
|
47
|
+
/**
|
|
48
|
+
* Revoke access from multiple targets in bulk
|
|
49
|
+
*/
|
|
50
|
+
revokeAccessBulkAsync(request: BulkAccessRequest): Promise<AccessControlAPIResponse<AccessResult[]>>;
|
|
51
|
+
/**
|
|
52
|
+
* Check access for multiple targets in bulk
|
|
53
|
+
*/
|
|
54
|
+
checkAccessBulkAsync(request: BulkCheckAccessRequest): Promise<AccessControlAPIResponse<AccessResult[]>>;
|
|
55
|
+
/**
|
|
56
|
+
* Get all access entries for a specific accessId
|
|
57
|
+
*/
|
|
58
|
+
getAccessByIdAsync(accessId: number): Promise<AccessControlAPIResponse<AccessResult[]>>;
|
|
59
|
+
/**
|
|
60
|
+
* Set access inheritance for an access ID
|
|
61
|
+
*/
|
|
62
|
+
setAccessInheritanceAsync(request: AccessInheritanceRequest): Promise<AccessControlAPIResponse>;
|
|
63
|
+
/**
|
|
64
|
+
* Get access inheritance status
|
|
65
|
+
*/
|
|
66
|
+
getAccessInheritanceStatusAsync(accessId: number, connectionTypeId?: number): Promise<AccessControlAPIResponse>;
|
|
67
|
+
/**
|
|
68
|
+
* Assign super admin access
|
|
69
|
+
*/
|
|
70
|
+
assignSuperAdminAccessAsync(request: SuperAdminRequest): Promise<AccessControlAPIResponse>;
|
|
71
|
+
/**
|
|
72
|
+
* Revoke super admin access
|
|
73
|
+
*/
|
|
74
|
+
revokeSuperAdminAccessAsync(request: SuperAdminRequest): Promise<AccessControlAPIResponse>;
|
|
75
|
+
/**
|
|
76
|
+
* Check super admin status
|
|
77
|
+
*/
|
|
78
|
+
checkSuperAdminStatusAsync(accessId: number): Promise<AccessControlAPIResponse>;
|
|
79
|
+
/**
|
|
80
|
+
* Create a new standalone access record for a concept
|
|
81
|
+
*/
|
|
82
|
+
assignConceptAccessAsync(request: ConceptAccessRequest): Promise<AccessControlAPIResponse<AccessResult>>;
|
|
83
|
+
/**
|
|
84
|
+
* Create new standalone access records for multiple concepts in bulk
|
|
85
|
+
*/
|
|
86
|
+
assignConceptAccessBulkAsync(request: BulkConceptAccessRequest): Promise<AccessControlAPIResponse<AccessResult[]>>;
|
|
87
|
+
/**
|
|
88
|
+
* Revoke access records for multiple concepts in bulk
|
|
89
|
+
*/
|
|
90
|
+
revokeConceptAccessBulkAsync(request: BulkConceptAccessRequest): Promise<AccessControlAPIResponse<AccessResult[]>>;
|
|
91
|
+
}
|
|
92
|
+
export default APIClientService;
|
|
@@ -1,218 +1,194 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
2
|
+
* AccessControlService
|
|
3
|
+
*
|
|
4
|
+
* This service provides access control functionality including:
|
|
5
|
+
* - Check access for concepts with complex permission logic
|
|
6
|
+
* - Assign and revoke access permissions
|
|
7
|
+
* - Bulk operations for access management
|
|
8
|
+
* - Super admin checks
|
|
9
|
+
* - Access inheritance management
|
|
10
|
+
*
|
|
11
|
+
* This is the TypeScript equivalent of the C# AccessControlService class.
|
|
4
12
|
*/
|
|
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
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
*
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
/**
|
|
79
|
-
*
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
*
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
*
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
*
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
*
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
*
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
*
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
*
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
*
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
* Gets public access by access IDs.
|
|
152
|
-
*/
|
|
153
|
-
static getPublicAccessByAccessIds(accessIdList: number[]): Promise<any>;
|
|
154
|
-
/**
|
|
155
|
-
* Gets the full access mapping for public users.
|
|
156
|
-
*/
|
|
157
|
-
static getFullAccessMappingForPublic(): Promise<any>;
|
|
158
|
-
/**
|
|
159
|
-
* Assigns public access for all users.
|
|
160
|
-
*/
|
|
161
|
-
static assignPublicAccessForAllUser(): Promise<any>;
|
|
162
|
-
/**
|
|
163
|
-
* Assigns access by connection type for users.
|
|
164
|
-
*/
|
|
165
|
-
static assignAccessByConncetionTypeOfUser(): Promise<any>;
|
|
166
|
-
/**
|
|
167
|
-
* Sets access inheritance for a concept.
|
|
168
|
-
* @param request - AccessInheritanceRequest
|
|
169
|
-
*/
|
|
170
|
-
static setAccessInheritance(request: {
|
|
171
|
-
mainConceptId: number;
|
|
172
|
-
connectionTypeId: number;
|
|
173
|
-
enable: boolean;
|
|
174
|
-
}): Promise<any>;
|
|
175
|
-
/**
|
|
176
|
-
* Sets access inheritance for multiple concepts in bulk.
|
|
177
|
-
* @param request - BulkAccessInheritanceRequest
|
|
178
|
-
*/
|
|
179
|
-
static setAccessInheritanceBulk(request: {
|
|
180
|
-
items: Array<{
|
|
181
|
-
mainConceptId: number;
|
|
182
|
-
connectionTypeIds: number[];
|
|
183
|
-
}>;
|
|
184
|
-
enable: boolean;
|
|
185
|
-
}): Promise<any>;
|
|
186
|
-
/**
|
|
187
|
-
* Gets the status of access inheritance for a concept.
|
|
188
|
-
*/
|
|
189
|
-
static getAccessInheritanceStatus(mainConceptId: number, connectionTypeId?: number): Promise<any>;
|
|
13
|
+
import { AccessResult, BulkConceptAccessRequest } from '../../DataStructures/AccessControl/AccessControlModels';
|
|
14
|
+
import { IAPIClientService } from './APIClientService';
|
|
15
|
+
/**
|
|
16
|
+
* Interface for the Access Control Service
|
|
17
|
+
*/
|
|
18
|
+
export interface IAccessControlService {
|
|
19
|
+
checkAccess(conceptId: number, permission: string, entityId?: number | null): Promise<boolean>;
|
|
20
|
+
getConceptIdsWithPermission(permission: string, conceptIdsFilter: number[], entityId?: number | null): Promise<number[]>;
|
|
21
|
+
assignAccess(request: BulkConceptAccessRequest): Promise<AccessResult[]>;
|
|
22
|
+
revokeAccess(conceptId: number, permission: string, entityId?: number | null): Promise<boolean>;
|
|
23
|
+
revokeAccessBulk(request: BulkConceptAccessRequest): Promise<AccessResult[]>;
|
|
24
|
+
setAccessInheritance(conceptId: number): Promise<boolean>;
|
|
25
|
+
getAccessInheritanceStatus(conceptId: number, connectionTypeId?: number): Promise<boolean>;
|
|
26
|
+
setAccessInheritanceStatus(conceptId: number, isEnabled: boolean, connectionTypeId?: number): Promise<boolean>;
|
|
27
|
+
isSuperAdmin(entityId: number): Promise<boolean>;
|
|
28
|
+
assignSuperAdmin(entityId: number): Promise<number>;
|
|
29
|
+
revokeSuperAdmin(entityId: number): Promise<string>;
|
|
30
|
+
}
|
|
31
|
+
export declare class AccessControlService implements IAccessControlService {
|
|
32
|
+
private readonly apiClient;
|
|
33
|
+
constructor(apiClient?: IAPIClientService);
|
|
34
|
+
/**
|
|
35
|
+
* Check whether a user/entity has the specified permission.
|
|
36
|
+
* Returns true if allowed, false otherwise.
|
|
37
|
+
*
|
|
38
|
+
* @param conceptId - The ID of the concept to check access for
|
|
39
|
+
* @param permission - The permission to check (read, write, execute, delete)
|
|
40
|
+
* @param entityId - Optional entity ID to check access for
|
|
41
|
+
* @returns Promise<boolean> - True if access is granted, false otherwise
|
|
42
|
+
*/
|
|
43
|
+
checkAccess(conceptId: number, permission: string, entityId?: number | null): Promise<boolean>;
|
|
44
|
+
/**
|
|
45
|
+
* Get all accessIds which have a certain permission for an entity.
|
|
46
|
+
* Optional filter by a list of accessIds.
|
|
47
|
+
*
|
|
48
|
+
* @param permission - The permission to check
|
|
49
|
+
* @param conceptIdsFilter - List of concept IDs to filter
|
|
50
|
+
* @param entityId - Optional entity ID
|
|
51
|
+
* @returns Promise<number[]> - Array of concept IDs that have the permission
|
|
52
|
+
*/
|
|
53
|
+
getConceptIdsWithPermission(permission: string, conceptIdsFilter: number[], entityId?: number | null): Promise<number[]>;
|
|
54
|
+
/**
|
|
55
|
+
* Assign access permissions to multiple targets in bulk
|
|
56
|
+
*
|
|
57
|
+
* @param request - Bulk access request containing targets
|
|
58
|
+
* @returns Promise<AccessResult[]> - Array of access results
|
|
59
|
+
*/
|
|
60
|
+
assignAccess(request: BulkConceptAccessRequest): Promise<AccessResult[]>;
|
|
61
|
+
/**
|
|
62
|
+
* Revoke access permission from an entity
|
|
63
|
+
*
|
|
64
|
+
* @param conceptId - The concept ID to revoke access for
|
|
65
|
+
* @param permission - The permission to revoke
|
|
66
|
+
* @param entityId - Optional entity ID
|
|
67
|
+
* @returns Promise<boolean> - True if successfully revoked, false otherwise
|
|
68
|
+
*/
|
|
69
|
+
revokeAccess(conceptId: number, permission: string, entityId?: number | null): Promise<boolean>;
|
|
70
|
+
revokeAccessBulk(request: BulkConceptAccessRequest): Promise<AccessResult[]>;
|
|
71
|
+
/**
|
|
72
|
+
* Set access inheritance for a concept
|
|
73
|
+
*
|
|
74
|
+
* @param conceptId - The concept ID to set inheritance for
|
|
75
|
+
* @returns Promise<boolean> - True if successful, false otherwise
|
|
76
|
+
*/
|
|
77
|
+
setAccessInheritance(conceptId: number): Promise<boolean>;
|
|
78
|
+
/**
|
|
79
|
+
* Get access inheritance status for a concept
|
|
80
|
+
*
|
|
81
|
+
* @param conceptId - The concept ID to check
|
|
82
|
+
* @param connectionTypeId - The connection type ID (default: 999)
|
|
83
|
+
* @returns Promise<boolean> - True if inheritance is enabled, false otherwise
|
|
84
|
+
*/
|
|
85
|
+
getAccessInheritanceStatus(conceptId: number, connectionTypeId?: number): Promise<boolean>;
|
|
86
|
+
/**
|
|
87
|
+
* Set access inheritance status for a concept
|
|
88
|
+
*
|
|
89
|
+
* @param conceptId - The concept ID to set inheritance status for
|
|
90
|
+
* @param isEnabled - Whether to enable or disable inheritance
|
|
91
|
+
* @param connectionTypeId - The connection type ID (default: 999)
|
|
92
|
+
* @returns Promise<boolean> - True if successful, false otherwise
|
|
93
|
+
*/
|
|
94
|
+
setAccessInheritanceStatus(conceptId: number, isEnabled: boolean, connectionTypeId?: number): Promise<boolean>;
|
|
95
|
+
/**
|
|
96
|
+
* Check if an entity is a super admin
|
|
97
|
+
*
|
|
98
|
+
* @param entityId - The entity ID to check
|
|
99
|
+
* @returns Promise<boolean> - True if super admin, false otherwise
|
|
100
|
+
*/
|
|
101
|
+
isSuperAdmin(entityId: number): Promise<boolean>;
|
|
102
|
+
/**
|
|
103
|
+
* Assign super admin access to an entity
|
|
104
|
+
*
|
|
105
|
+
* @param entityId - The entity ID to grant super admin access to
|
|
106
|
+
* @returns Promise<number> - The entity ID if successful, 0 otherwise
|
|
107
|
+
*/
|
|
108
|
+
assignSuperAdmin(entityId: number): Promise<number>;
|
|
109
|
+
/**
|
|
110
|
+
* Revoke super admin access from an entity
|
|
111
|
+
*
|
|
112
|
+
* @param entityId - The entity ID to revoke super admin access from
|
|
113
|
+
* @returns Promise<string> - Success message or error message
|
|
114
|
+
*/
|
|
115
|
+
revokeSuperAdmin(entityId: number): Promise<string>;
|
|
116
|
+
/**
|
|
117
|
+
* Internal method to check access via API
|
|
118
|
+
*
|
|
119
|
+
* @param accessId - The access ID to check
|
|
120
|
+
* @param permission - The permission to check
|
|
121
|
+
* @param entityId - Optional entity ID
|
|
122
|
+
* @returns Promise<boolean> - True if access is granted, false otherwise
|
|
123
|
+
*/
|
|
124
|
+
private checkAccessInternal;
|
|
125
|
+
/**
|
|
126
|
+
* Static method to check if an entity is a super admin
|
|
127
|
+
* Uses the default singleton instance
|
|
128
|
+
*
|
|
129
|
+
* @param entityId - The entity ID to check
|
|
130
|
+
* @returns Promise<boolean> - True if super admin, false otherwise
|
|
131
|
+
*/
|
|
132
|
+
static isSuperAdmin(entityId: number): Promise<boolean>;
|
|
133
|
+
/**
|
|
134
|
+
* Static method to assign super admin access
|
|
135
|
+
* Uses the default singleton instance
|
|
136
|
+
*
|
|
137
|
+
* @param entityId - The entity ID to grant super admin access to
|
|
138
|
+
* @returns Promise<number> - The entity ID if successful, 0 otherwise
|
|
139
|
+
*/
|
|
140
|
+
static assignSuperAdmin(entityId: number): Promise<number>;
|
|
141
|
+
/**
|
|
142
|
+
* Static method to revoke super admin access
|
|
143
|
+
* Uses the default singleton instance
|
|
144
|
+
*
|
|
145
|
+
* @param entityId - The entity ID to revoke super admin access from
|
|
146
|
+
* @returns Promise<string> - Success message or error message
|
|
147
|
+
*/
|
|
148
|
+
static revokeSuperAdmin(entityId: number): Promise<string>;
|
|
149
|
+
/**
|
|
150
|
+
* Static method to check access
|
|
151
|
+
* Uses the default singleton instance
|
|
152
|
+
*
|
|
153
|
+
* @param conceptId - The concept ID to check access for
|
|
154
|
+
* @param permission - The permission to check
|
|
155
|
+
* @param entityId - Optional entity ID
|
|
156
|
+
* @returns Promise<boolean> - True if access is granted, false otherwise
|
|
157
|
+
*/
|
|
158
|
+
static checkAccess(conceptId: number, permission: string, entityId?: number | null): Promise<boolean>;
|
|
190
159
|
/**
|
|
191
|
-
*
|
|
192
|
-
|
|
193
|
-
|
|
160
|
+
* Static method to assign access in bulk
|
|
161
|
+
* Uses the default singleton instance
|
|
162
|
+
*
|
|
163
|
+
* @param request - BulkConceptAccessRequest containing conceptIds and permissions
|
|
164
|
+
* @returns Promise<AccessResult[]> - Array of access results
|
|
165
|
+
*/
|
|
166
|
+
static assignAccess(request: BulkConceptAccessRequest): Promise<AccessResult[]>;
|
|
194
167
|
/**
|
|
195
|
-
*
|
|
196
|
-
*
|
|
168
|
+
* Static method to revoke access
|
|
169
|
+
* Uses the default singleton instance
|
|
170
|
+
*
|
|
171
|
+
* @param conceptId - The concept ID to revoke access for
|
|
172
|
+
* @param permission - The permission to revoke
|
|
173
|
+
* @param entityId - Optional entity ID
|
|
174
|
+
* @returns Promise<boolean> - True if successfully revoked, false otherwise
|
|
197
175
|
*/
|
|
198
|
-
static
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
*
|
|
203
|
-
* @param request -
|
|
176
|
+
static revokeAccess(conceptId: number, permission: string, entityId?: number | null): Promise<boolean>;
|
|
177
|
+
/**
|
|
178
|
+
* Static method to revoke concept access in bulk
|
|
179
|
+
* Uses the default singleton instance
|
|
180
|
+
*
|
|
181
|
+
* @param request - BulkConceptAccessRequest containing conceptIds and permissions
|
|
182
|
+
* @returns Promise<AccessResult[]> - Array of access results
|
|
204
183
|
*/
|
|
205
|
-
static
|
|
206
|
-
entityConceptId: number;
|
|
207
|
-
}): Promise<any>;
|
|
208
|
-
/**
|
|
209
|
-
* Gets super admin access info for an entity concept.
|
|
210
|
-
*/
|
|
211
|
-
static getSuperAdminAccess(entityConceptId: number): Promise<any>;
|
|
212
|
-
static isSuperAdmin(entityConceptId: number): Promise<any>;
|
|
213
|
-
private static get baseUrl();
|
|
214
|
-
private static _get;
|
|
215
|
-
private static _post;
|
|
216
|
-
private static _delete;
|
|
184
|
+
static revokeAccessBulk(request: BulkConceptAccessRequest): Promise<AccessResult[]>;
|
|
217
185
|
}
|
|
186
|
+
/**
|
|
187
|
+
* Get the default singleton instance of AccessControlService
|
|
188
|
+
*/
|
|
189
|
+
export declare function getAccessControlService(): AccessControlService;
|
|
190
|
+
/**
|
|
191
|
+
* Initialize the default singleton instance with custom configuration
|
|
192
|
+
*/
|
|
193
|
+
export declare function initializeAccessControlService(apiClient?: IAPIClientService): AccessControlService;
|
|
218
194
|
export default AccessControlService;
|
|
@@ -31,9 +31,9 @@ export declare class DependencyObserver {
|
|
|
31
31
|
fetched: boolean;
|
|
32
32
|
/** Output format (NORMAL, DATAID, JUSTDATA, etc.) */
|
|
33
33
|
format: number;
|
|
34
|
-
/** Map of concept IDs to their event handlers */
|
|
34
|
+
/** Map of concept IDs to their event handlers (string keys to support composite keys) */
|
|
35
35
|
eventHandlers: {
|
|
36
|
-
[key:
|
|
36
|
+
[key: string]: (event: Event) => void;
|
|
37
37
|
};
|
|
38
38
|
/**
|
|
39
39
|
* Listens to changes for a specific concept type and updates subscribers when new concepts of that type are created.
|
package/dist/types/app.d.ts
CHANGED
|
@@ -27,7 +27,7 @@ export { GetConnectionById } from './Services/GetConnections';
|
|
|
27
27
|
export { MakeTheTimestamp } from './Services/MakeTheTimestamp';
|
|
28
28
|
export { RecursiveSearchApi, RecursiveSearchApiWithInternalConnections, RecursiveSearchApiRaw, RecursiveSearchApiRawFullLinker, RecursiveSearchApiNewRawFullLinker } from './Api/RecursiveSearch';
|
|
29
29
|
export { GetCompositionBulkWithDataId, GetCompositionFromConnectionsWithDataIdFromConnections, GetCompositionFromConnectionsWithIndexFromConnections, GetCompositionBulk, GetCompositionFromConnectionsWithDataId } from './Services/GetCompositionBulk';
|
|
30
|
-
export { uploadAttachment, uploadFile, uploadImage, uploadImageV2, validDocumentFormats, validImageFormats } from './Services/Upload';
|
|
30
|
+
export { uploadAttachment, getUploadFileLimit, uploadFile, uploadImage, uploadImageV2, validDocumentFormats, validImageFormats } from './Services/Upload';
|
|
31
31
|
export { GetConceptBulk } from './Api/GetConceptBulk';
|
|
32
32
|
export { GetConnectionBulk } from './Api/GetConnectionBulk';
|
|
33
33
|
export { GetAllConnectionsOfCompositionBulk } from './Api/GetAllConnectionsOfCompositionBulk';
|