mftsccs-browser 2.2.37-beta → 2.2.39-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 +33 -3
- package/dist/types/DataStructures/BaseUrl.d.ts +1 -0
- package/dist/types/Services/AccessControl/APIClientService.d.ts +76 -1
- package/dist/types/Services/AccessControl/AccessControl.d.ts +49 -145
- package/dist/types/Services/GetRelation.d.ts +1 -0
- package/dist/types/Services/Visualizations/VisualTree.d.ts +9 -0
- package/dist/types/Widgets/WidgetCacheManager.d.ts +17 -0
- package/dist/types/WrapperFunctions/QueryCacheManager.d.ts +10 -0
- package/dist/types/WrapperFunctions/SchemaQueryObservable.d.ts +2 -0
- package/dist/types/app.d.ts +2 -1
- package/package.json +1 -1
|
@@ -30,9 +30,9 @@ export interface BulkAccessRequest {
|
|
|
30
30
|
targets: BulkAccessTarget[];
|
|
31
31
|
}
|
|
32
32
|
export interface BulkCheckAccessRequest {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
33
|
+
accessIds: number[];
|
|
34
|
+
permission: string;
|
|
35
|
+
entityId?: number | null;
|
|
36
36
|
}
|
|
37
37
|
export interface AccessInheritanceRequest {
|
|
38
38
|
accessId?: number;
|
|
@@ -42,6 +42,36 @@ export interface AccessInheritanceRequest {
|
|
|
42
42
|
export interface SuperAdminRequest {
|
|
43
43
|
accessId?: number;
|
|
44
44
|
}
|
|
45
|
+
/**
|
|
46
|
+
* Request model for parent access inheritance operations
|
|
47
|
+
* Mirrors C# ParentAccessInheritanceRequest
|
|
48
|
+
*/
|
|
49
|
+
export interface ParentAccessInheritanceRequest {
|
|
50
|
+
parentAccessId: number;
|
|
51
|
+
childAccessId?: number | null;
|
|
52
|
+
}
|
|
53
|
+
export interface ParentAccessInheritanceWithConceptRequest {
|
|
54
|
+
parentConceptId: number;
|
|
55
|
+
childConceptId?: number | null;
|
|
56
|
+
}
|
|
57
|
+
export interface BulkParentAccessInheritanceWithConceptRequest {
|
|
58
|
+
parentConceptId: number;
|
|
59
|
+
childConceptIds: number[];
|
|
60
|
+
}
|
|
61
|
+
export interface BulkParentAccessInheritanceResult {
|
|
62
|
+
childConceptId: number;
|
|
63
|
+
accessId: number;
|
|
64
|
+
success: boolean;
|
|
65
|
+
message?: string;
|
|
66
|
+
}
|
|
67
|
+
export interface SuperAdminWithConceptRequest {
|
|
68
|
+
conceptId: number;
|
|
69
|
+
}
|
|
70
|
+
export interface AccessInheritanceWithConceptRequest {
|
|
71
|
+
conceptId: number;
|
|
72
|
+
connectionTypeId?: number;
|
|
73
|
+
enable?: boolean;
|
|
74
|
+
}
|
|
45
75
|
export interface ConceptAccessRequest {
|
|
46
76
|
conceptIds: number;
|
|
47
77
|
permission: string;
|
|
@@ -10,6 +10,7 @@ export declare class BaseUrl {
|
|
|
10
10
|
static DOCUMENTATION_WIDGET: number;
|
|
11
11
|
static isNearestCache: boolean;
|
|
12
12
|
static ACCESS_CONTROL_BASE_URL: string;
|
|
13
|
+
static isPwa: boolean;
|
|
13
14
|
static FLAGS: any;
|
|
14
15
|
static BASE_RANDOMIZER: number;
|
|
15
16
|
static setRandomizer(id: number): void;
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This is the TypeScript equivalent of the C# APIClientService class.
|
|
8
8
|
*/
|
|
9
|
-
import { AccessRequest, AccessResult, AccessControlAPIResponse, BulkAccessRequest, BulkCheckAccessRequest, AccessInheritanceRequest, SuperAdminRequest, BulkConceptAccessRequest, ConceptAccessRequest } from '../../DataStructures/AccessControl/AccessControlModels';
|
|
9
|
+
import { AccessRequest, AccessResult, AccessControlAPIResponse, BulkAccessRequest, BulkCheckAccessRequest, AccessInheritanceRequest, SuperAdminRequest, BulkConceptAccessRequest, ConceptAccessRequest, ParentAccessInheritanceRequest, ParentAccessInheritanceWithConceptRequest, BulkParentAccessInheritanceWithConceptRequest, BulkParentAccessInheritanceResult, SuperAdminWithConceptRequest, AccessInheritanceWithConceptRequest } from '../../DataStructures/AccessControl/AccessControlModels';
|
|
10
10
|
export interface IAPIClientService {
|
|
11
11
|
assignAccessAsync(request: AccessRequest): Promise<AccessControlAPIResponse<AccessResult>>;
|
|
12
12
|
checkAccessAsync(request: AccessRequest): Promise<AccessControlAPIResponse<AccessResult>>;
|
|
@@ -22,6 +22,21 @@ export interface IAPIClientService {
|
|
|
22
22
|
assignSuperAdminAccessAsync(request: SuperAdminRequest): Promise<AccessControlAPIResponse>;
|
|
23
23
|
revokeSuperAdminAccessAsync(request: SuperAdminRequest): Promise<AccessControlAPIResponse>;
|
|
24
24
|
checkSuperAdminStatusAsync(accessId: number): Promise<AccessControlAPIResponse>;
|
|
25
|
+
setParentAccessInheritanceAsync(request: ParentAccessInheritanceRequest): Promise<AccessControlAPIResponse>;
|
|
26
|
+
removeParentAccessInheritanceAsync(accessId: number, parentAccessId?: number): Promise<AccessControlAPIResponse>;
|
|
27
|
+
hasParentAccessInheritanceAsync(accessId: number, parentAccessId?: number): Promise<AccessControlAPIResponse>;
|
|
28
|
+
getParentAccessIdAsync(accessId: number): Promise<AccessControlAPIResponse>;
|
|
29
|
+
setParentAccessInheritanceByConceptAsync(request: ParentAccessInheritanceWithConceptRequest): Promise<AccessControlAPIResponse>;
|
|
30
|
+
setParentAccessInheritanceBulkByConceptAsync(request: BulkParentAccessInheritanceWithConceptRequest): Promise<AccessControlAPIResponse<BulkParentAccessInheritanceResult[]>>;
|
|
31
|
+
removeParentAccessInheritanceByConceptAsync(childConceptId: number, parentConceptId?: number): Promise<AccessControlAPIResponse>;
|
|
32
|
+
removeParentAccessInheritanceBulkByConceptAsync(request: BulkParentAccessInheritanceWithConceptRequest): Promise<AccessControlAPIResponse<BulkParentAccessInheritanceResult[]>>;
|
|
33
|
+
hasParentAccessInheritanceByConceptAsync(childConceptId: number, parentConceptId?: number): Promise<AccessControlAPIResponse>;
|
|
34
|
+
getParentAccessIdByConceptAsync(childConceptId: number): Promise<AccessControlAPIResponse>;
|
|
35
|
+
assignSuperAdminByConceptAsync(request: SuperAdminWithConceptRequest): Promise<AccessControlAPIResponse>;
|
|
36
|
+
revokeSuperAdminByConceptAsync(request: SuperAdminWithConceptRequest): Promise<AccessControlAPIResponse>;
|
|
37
|
+
checkSuperAdminByConceptAsync(conceptId: number): Promise<AccessControlAPIResponse>;
|
|
38
|
+
setAccessInheritanceByConceptAsync(request: AccessInheritanceWithConceptRequest): Promise<AccessControlAPIResponse>;
|
|
39
|
+
getAccessInheritanceStatusByConceptAsync(conceptId: number, connectionTypeId?: number): Promise<AccessControlAPIResponse>;
|
|
25
40
|
}
|
|
26
41
|
export declare class APIClientService implements IAPIClientService {
|
|
27
42
|
private static get baseUrl();
|
|
@@ -88,5 +103,65 @@ export declare class APIClientService implements IAPIClientService {
|
|
|
88
103
|
* Revoke access records for multiple concepts in bulk
|
|
89
104
|
*/
|
|
90
105
|
revokeConceptAccessBulkAsync(request: BulkConceptAccessRequest): Promise<AccessControlAPIResponse<AccessResult[]>>;
|
|
106
|
+
/**
|
|
107
|
+
* Set parent access inheritance link
|
|
108
|
+
*/
|
|
109
|
+
setParentAccessInheritanceAsync(request: ParentAccessInheritanceRequest): Promise<AccessControlAPIResponse>;
|
|
110
|
+
/**
|
|
111
|
+
* Remove parent access inheritance link
|
|
112
|
+
*/
|
|
113
|
+
removeParentAccessInheritanceAsync(accessId: number, parentAccessId?: number): Promise<AccessControlAPIResponse>;
|
|
114
|
+
/**
|
|
115
|
+
* Check if parent access inheritance link exists
|
|
116
|
+
*/
|
|
117
|
+
hasParentAccessInheritanceAsync(accessId: number, parentAccessId?: number): Promise<AccessControlAPIResponse>;
|
|
118
|
+
/**
|
|
119
|
+
* Get the parent access ID for a given access ID
|
|
120
|
+
*/
|
|
121
|
+
getParentAccessIdAsync(accessId: number): Promise<AccessControlAPIResponse>;
|
|
122
|
+
/**
|
|
123
|
+
* Set parent access inheritance by concept IDs (server resolves conceptId → accessId)
|
|
124
|
+
*/
|
|
125
|
+
setParentAccessInheritanceByConceptAsync(request: ParentAccessInheritanceWithConceptRequest): Promise<AccessControlAPIResponse>;
|
|
126
|
+
/**
|
|
127
|
+
* Set parent access inheritance for multiple children with one parent (concept-based)
|
|
128
|
+
*/
|
|
129
|
+
setParentAccessInheritanceBulkByConceptAsync(request: BulkParentAccessInheritanceWithConceptRequest): Promise<AccessControlAPIResponse<BulkParentAccessInheritanceResult[]>>;
|
|
130
|
+
/**
|
|
131
|
+
* Remove parent access inheritance by concept IDs
|
|
132
|
+
*/
|
|
133
|
+
removeParentAccessInheritanceByConceptAsync(childConceptId: number, parentConceptId?: number): Promise<AccessControlAPIResponse>;
|
|
134
|
+
/**
|
|
135
|
+
* Remove parent access inheritance for multiple children (concept-based)
|
|
136
|
+
*/
|
|
137
|
+
removeParentAccessInheritanceBulkByConceptAsync(request: BulkParentAccessInheritanceWithConceptRequest): Promise<AccessControlAPIResponse<BulkParentAccessInheritanceResult[]>>;
|
|
138
|
+
/**
|
|
139
|
+
* Check if parent access inheritance exists by concept IDs
|
|
140
|
+
*/
|
|
141
|
+
hasParentAccessInheritanceByConceptAsync(childConceptId: number, parentConceptId?: number): Promise<AccessControlAPIResponse>;
|
|
142
|
+
/**
|
|
143
|
+
* Get the parent access ID by child concept ID
|
|
144
|
+
*/
|
|
145
|
+
getParentAccessIdByConceptAsync(childConceptId: number): Promise<AccessControlAPIResponse>;
|
|
146
|
+
/**
|
|
147
|
+
* Assign super admin by concept ID
|
|
148
|
+
*/
|
|
149
|
+
assignSuperAdminByConceptAsync(request: SuperAdminWithConceptRequest): Promise<AccessControlAPIResponse>;
|
|
150
|
+
/**
|
|
151
|
+
* Revoke super admin by concept ID
|
|
152
|
+
*/
|
|
153
|
+
revokeSuperAdminByConceptAsync(request: SuperAdminWithConceptRequest): Promise<AccessControlAPIResponse>;
|
|
154
|
+
/**
|
|
155
|
+
* Check super admin status by concept ID
|
|
156
|
+
*/
|
|
157
|
+
checkSuperAdminByConceptAsync(conceptId: number): Promise<AccessControlAPIResponse>;
|
|
158
|
+
/**
|
|
159
|
+
* Set access inheritance by concept ID
|
|
160
|
+
*/
|
|
161
|
+
setAccessInheritanceByConceptAsync(request: AccessInheritanceWithConceptRequest): Promise<AccessControlAPIResponse>;
|
|
162
|
+
/**
|
|
163
|
+
* Get access inheritance status by concept ID
|
|
164
|
+
*/
|
|
165
|
+
getAccessInheritanceStatusByConceptAsync(conceptId: number, connectionTypeId?: number): Promise<AccessControlAPIResponse>;
|
|
91
166
|
}
|
|
92
167
|
export default APIClientService;
|
|
@@ -2,21 +2,22 @@
|
|
|
2
2
|
* AccessControlService
|
|
3
3
|
*
|
|
4
4
|
* This service provides access control functionality including:
|
|
5
|
-
* -
|
|
5
|
+
* - 5-phase bulk access check with BFS inheritance graph traversal
|
|
6
6
|
* - Assign and revoke access permissions
|
|
7
7
|
* - Bulk operations for access management
|
|
8
8
|
* - Super admin checks
|
|
9
|
-
* - Access inheritance management
|
|
9
|
+
* - Access inheritance management (including parent access inheritance)
|
|
10
10
|
*
|
|
11
|
-
* This is the TypeScript equivalent of the C# AccessControlService class.
|
|
11
|
+
* This is the TypeScript equivalent of the C# AccessControlService class (v3.4.0).
|
|
12
12
|
*/
|
|
13
|
-
import { AccessResult, BulkConceptAccessRequest } from '../../DataStructures/AccessControl/AccessControlModels';
|
|
13
|
+
import { AccessResult, BulkConceptAccessRequest, BulkParentAccessInheritanceResult } from '../../DataStructures/AccessControl/AccessControlModels';
|
|
14
14
|
import { IAPIClientService } from './APIClientService';
|
|
15
15
|
/**
|
|
16
16
|
* Interface for the Access Control Service
|
|
17
17
|
*/
|
|
18
18
|
export interface IAccessControlService {
|
|
19
19
|
checkAccess(conceptId: number, permission: string, entityId?: number | null): Promise<boolean>;
|
|
20
|
+
checkAccessBulk(conceptIds: number[], permission: string, entityId?: number | null): Promise<Map<number, boolean>>;
|
|
20
21
|
getConceptIdsWithPermission(permission: string, conceptIdsFilter: number[], entityId?: number | null): Promise<number[]>;
|
|
21
22
|
assignAccess(request: BulkConceptAccessRequest): Promise<AccessResult[]>;
|
|
22
23
|
revokeAccess(conceptId: number, permission: string, entityId?: number | null): Promise<boolean>;
|
|
@@ -24,6 +25,12 @@ export interface IAccessControlService {
|
|
|
24
25
|
setAccessInheritance(conceptId: number): Promise<boolean>;
|
|
25
26
|
getAccessInheritanceStatus(conceptId: number, connectionTypeId?: number): Promise<boolean>;
|
|
26
27
|
setAccessInheritanceStatus(conceptId: number, isEnabled: boolean, connectionTypeId?: number): Promise<boolean>;
|
|
28
|
+
setParentAccessInheritance(conceptId: number, parentConceptId: number): Promise<number>;
|
|
29
|
+
setParentAccessInheritanceBulk(childConceptIds: number[], parentConceptId: number): Promise<BulkParentAccessInheritanceResult[]>;
|
|
30
|
+
removeParentAccessInheritance(conceptId: number, parentConceptId?: number): Promise<string>;
|
|
31
|
+
removeParentAccessInheritanceBulk(childConceptIds: number[], parentConceptId?: number): Promise<BulkParentAccessInheritanceResult[]>;
|
|
32
|
+
hasParentAccessInheritance(conceptId: number, parentConceptId?: number): Promise<boolean>;
|
|
33
|
+
getParentAccessId(conceptId: number): Promise<number | null>;
|
|
27
34
|
isSuperAdmin(entityId: number): Promise<boolean>;
|
|
28
35
|
assignSuperAdmin(entityId: number): Promise<number>;
|
|
29
36
|
revokeSuperAdmin(entityId: number): Promise<string>;
|
|
@@ -32,172 +39,69 @@ export declare class AccessControlService implements IAccessControlService {
|
|
|
32
39
|
private readonly apiClient;
|
|
33
40
|
constructor(apiClient?: IAPIClientService);
|
|
34
41
|
/**
|
|
35
|
-
* Check whether a user/entity has the specified permission.
|
|
36
|
-
*
|
|
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
|
+
* Check whether a user/entity has the specified permission on a single concept.
|
|
43
|
+
* Delegates to checkAccessBulk for full inheritance + group resolution.
|
|
42
44
|
*/
|
|
43
45
|
checkAccess(conceptId: number, permission: string, entityId?: number | null): Promise<boolean>;
|
|
44
46
|
/**
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
+
* 5-phase bulk access check algorithm.
|
|
48
|
+
* Matches the C# AccessControlService.CheckAccessBulk implementation.
|
|
47
49
|
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
50
|
+
* Phase 1: Super-admin short-circuit
|
|
51
|
+
* Phase 2: Fast-path classification (owner, public, type concepts)
|
|
52
|
+
* Phase 3: BFS inheritance graph resolution (3 sources)
|
|
53
|
+
* Phase 4: Bulk access decision resolution (API)
|
|
54
|
+
* Phase 5: Grant-only merge per concept
|
|
52
55
|
*/
|
|
53
|
-
|
|
56
|
+
checkAccessBulk(conceptIds: number[], permission: string, entityId?: number | null): Promise<Map<number, boolean>>;
|
|
54
57
|
/**
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
* @param request - Bulk access request containing targets
|
|
58
|
-
* @returns Promise<AccessResult[]> - Array of access results
|
|
58
|
+
* Get all conceptIds which have a certain permission for an entity.
|
|
59
|
+
* Delegates to checkAccessBulk for full inheritance support.
|
|
59
60
|
*/
|
|
60
|
-
|
|
61
|
+
getConceptIdsWithPermission(permission: string, conceptIdsFilter: number[], entityId?: number | null): Promise<number[]>;
|
|
61
62
|
/**
|
|
62
|
-
*
|
|
63
|
+
* Resolve inheritance graph via 3-source BFS, depth-limited to MAX_BFS_DEPTH.
|
|
63
64
|
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
*
|
|
67
|
-
* @returns Promise<boolean> - True if successfully revoked, false otherwise
|
|
65
|
+
* Source 1: FreeSchema internal connections ("the_parent_access_inheritance")
|
|
66
|
+
* Source 2: Explicit parent access links (via Access API)
|
|
67
|
+
* Source 3: Concept-connection access inheritance
|
|
68
68
|
*/
|
|
69
|
+
private resolveBulkInheritanceGraph;
|
|
70
|
+
private resolveBulkDecisions;
|
|
71
|
+
private resolveSubjects;
|
|
72
|
+
private hasAnyGrant;
|
|
73
|
+
assignAccess(request: BulkConceptAccessRequest): Promise<AccessResult[]>;
|
|
69
74
|
revokeAccess(conceptId: number, permission: string, entityId?: number | null): Promise<boolean>;
|
|
70
75
|
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
76
|
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
77
|
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
78
|
setAccessInheritanceStatus(conceptId: number, isEnabled: boolean, connectionTypeId?: number): Promise<boolean>;
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
79
|
+
setParentAccessInheritance(conceptId: number, parentConceptId: number): Promise<number>;
|
|
80
|
+
setParentAccessInheritanceBulk(childConceptIds: number[], parentConceptId: number): Promise<BulkParentAccessInheritanceResult[]>;
|
|
81
|
+
removeParentAccessInheritance(conceptId: number, parentConceptId?: number): Promise<string>;
|
|
82
|
+
removeParentAccessInheritanceBulk(childConceptIds: number[], parentConceptId?: number): Promise<BulkParentAccessInheritanceResult[]>;
|
|
83
|
+
hasParentAccessInheritance(conceptId: number, parentConceptId?: number): Promise<boolean>;
|
|
84
|
+
getParentAccessId(conceptId: number): Promise<number | null>;
|
|
101
85
|
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
86
|
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
87
|
revokeSuperAdmin(entityId: number): Promise<string>;
|
|
116
|
-
|
|
117
|
-
|
|
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
|
-
private checkGroupAccessInternal;
|
|
126
|
-
/**
|
|
127
|
-
* Static method to check if an entity is a super admin
|
|
128
|
-
* Uses the default singleton instance
|
|
129
|
-
*
|
|
130
|
-
* @param entityId - The entity ID to check
|
|
131
|
-
* @returns Promise<boolean> - True if super admin, false otherwise
|
|
132
|
-
*/
|
|
88
|
+
makeConceptPrivate(conceptId: number): Promise<boolean>;
|
|
89
|
+
private static parseBoolData;
|
|
90
|
+
private static parseIntData;
|
|
133
91
|
static isSuperAdmin(entityId: number): Promise<boolean>;
|
|
134
|
-
/**
|
|
135
|
-
* Static method to assign super admin access
|
|
136
|
-
* Uses the default singleton instance
|
|
137
|
-
*
|
|
138
|
-
* @param entityId - The entity ID to grant super admin access to
|
|
139
|
-
* @returns Promise<number> - The entity ID if successful, 0 otherwise
|
|
140
|
-
*/
|
|
141
92
|
static assignSuperAdmin(entityId: number): Promise<number>;
|
|
142
|
-
/**
|
|
143
|
-
* Static method to revoke super admin access
|
|
144
|
-
* Uses the default singleton instance
|
|
145
|
-
*
|
|
146
|
-
* @param entityId - The entity ID to revoke super admin access from
|
|
147
|
-
* @returns Promise<string> - Success message or error message
|
|
148
|
-
*/
|
|
149
93
|
static revokeSuperAdmin(entityId: number): Promise<string>;
|
|
150
|
-
/**
|
|
151
|
-
* Static method to check access
|
|
152
|
-
* Uses the default singleton instance
|
|
153
|
-
*
|
|
154
|
-
* @param conceptId - The concept ID to check access for
|
|
155
|
-
* @param permission - The permission to check
|
|
156
|
-
* @param entityId - Optional entity ID
|
|
157
|
-
* @returns Promise<boolean> - True if access is granted, false otherwise
|
|
158
|
-
*/
|
|
159
94
|
static checkAccess(conceptId: number, permission: string, entityId?: number | null): Promise<boolean>;
|
|
160
|
-
|
|
161
|
-
* Static method to assign access in bulk
|
|
162
|
-
* Uses the default singleton instance
|
|
163
|
-
*
|
|
164
|
-
* @param request - BulkConceptAccessRequest containing conceptIds and permissions
|
|
165
|
-
* @returns Promise<AccessResult[]> - Array of access results
|
|
166
|
-
*/
|
|
95
|
+
static checkAccessBulk(conceptIds: number[], permission: string, entityId?: number | null): Promise<Map<number, boolean>>;
|
|
167
96
|
static assignAccess(request: BulkConceptAccessRequest): Promise<AccessResult[]>;
|
|
168
|
-
/**
|
|
169
|
-
* Static method to revoke access
|
|
170
|
-
* Uses the default singleton instance
|
|
171
|
-
*
|
|
172
|
-
* @param conceptId - The concept ID to revoke access for
|
|
173
|
-
* @param permission - The permission to revoke
|
|
174
|
-
* @param entityId - Optional entity ID
|
|
175
|
-
* @returns Promise<boolean> - True if successfully revoked, false otherwise
|
|
176
|
-
*/
|
|
177
97
|
static revokeAccess(conceptId: number, permission: string, entityId?: number | null): Promise<boolean>;
|
|
178
|
-
/**
|
|
179
|
-
* Static method to revoke concept access in bulk
|
|
180
|
-
* Uses the default singleton instance
|
|
181
|
-
*
|
|
182
|
-
* @param request - BulkConceptAccessRequest containing conceptIds and permissions
|
|
183
|
-
* @returns Promise<AccessResult[]> - Array of access results
|
|
184
|
-
*/
|
|
185
98
|
static revokeAccessBulk(request: BulkConceptAccessRequest): Promise<AccessResult[]>;
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
/**
|
|
193
|
-
* Make a concept private by assigning an accessId >= 10000 and granting the owner full permissions.
|
|
194
|
-
*
|
|
195
|
-
* - reads the current entity id from localStorage
|
|
196
|
-
* - verifies the logged-in entity is the concept owner
|
|
197
|
-
* - assigns read/write/execute/delete to the owner's entity id
|
|
198
|
-
* - ensures concept.accessId is >= 10000 and updates the local ConceptsData cache
|
|
199
|
-
*/
|
|
200
|
-
makeConceptPrivate(conceptId: number): Promise<boolean>;
|
|
99
|
+
static setParentAccessInheritance(conceptId: number, parentConceptId: number): Promise<number>;
|
|
100
|
+
static setParentAccessInheritanceBulk(childConceptIds: number[], parentConceptId: number): Promise<BulkParentAccessInheritanceResult[]>;
|
|
101
|
+
static removeParentAccessInheritance(conceptId: number, parentConceptId?: number): Promise<string>;
|
|
102
|
+
static removeParentAccessInheritanceBulk(childConceptIds: number[], parentConceptId?: number): Promise<BulkParentAccessInheritanceResult[]>;
|
|
103
|
+
static hasParentAccessInheritance(conceptId: number, parentConceptId?: number): Promise<boolean>;
|
|
104
|
+
static getParentAccessId(conceptId: number): Promise<number | null>;
|
|
201
105
|
}
|
|
202
106
|
/**
|
|
203
107
|
* Get the default singleton instance of AccessControlService
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
export declare function GetRelation(id: number, relation: string, inpage?: number, page?: number, reverse?: boolean): Promise<any>;
|
|
2
|
+
export declare function GetRelationNew(id: number, relation: string, inpage?: number, page?: number, reverse?: boolean): Promise<void>;
|
|
2
3
|
export declare function GetRelationRaw(id: number, relation: string, inpage?: number, page?: number, reverse?: boolean): Promise<any>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Concept, Connection, LocalTransaction } from "../../app";
|
|
2
|
+
export declare class VisualTree {
|
|
3
|
+
static concepts: Concept[];
|
|
4
|
+
static connections: Connection[];
|
|
5
|
+
static transactions: LocalTransaction[];
|
|
6
|
+
static setTransaction(transaction: LocalTransaction): void;
|
|
7
|
+
static renderVisualTree(): void;
|
|
8
|
+
static getLocalConcepts(): Promise<void>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare class WidgetCacheManager {
|
|
2
|
+
private static WIDGET_PREFIX;
|
|
3
|
+
private static LATEST_PREFIX;
|
|
4
|
+
private static RECENT_PREFIX;
|
|
5
|
+
static getWidget(id: number): any | null;
|
|
6
|
+
static setWidget(id: number, data: any): void;
|
|
7
|
+
static getLatest(id: number): any | null;
|
|
8
|
+
static setLatest(id: number, data: any): void;
|
|
9
|
+
static getRecent(id: number): any | null;
|
|
10
|
+
static setRecent(id: number, data: any): void;
|
|
11
|
+
static removeWidget(id: number): void;
|
|
12
|
+
static removeLatest(id: number): void;
|
|
13
|
+
static removeRecent(id: number): void;
|
|
14
|
+
static clearAll(): void;
|
|
15
|
+
private static _get;
|
|
16
|
+
private static _set;
|
|
17
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare class QueryCacheManager {
|
|
2
|
+
private static prefix;
|
|
3
|
+
static getHash(query: any): Promise<string>;
|
|
4
|
+
static get(hash: string): any | null;
|
|
5
|
+
static set(hash: string, data: any): void;
|
|
6
|
+
static subscribe(hash: string, callback: (data: any) => void): () => void;
|
|
7
|
+
static remove(hash: string): void;
|
|
8
|
+
static clearAll(): void;
|
|
9
|
+
}
|
|
10
|
+
export declare function hashJsonObject(obj: any): Promise<string>;
|
|
@@ -13,6 +13,8 @@ export declare class SearchLinkMultipleAllObservable extends DependencyObserver
|
|
|
13
13
|
order: string;
|
|
14
14
|
/** Total count of matching results */
|
|
15
15
|
totalCount: number;
|
|
16
|
+
/** Cleanup function for cache subscription */
|
|
17
|
+
private unsubscribeCache;
|
|
16
18
|
/**
|
|
17
19
|
* Creates a new schema query observable.
|
|
18
20
|
* @param query - FreeschemaQuery object with search parameters
|
package/dist/types/app.d.ts
CHANGED
|
@@ -43,7 +43,7 @@ export { GetCompositionWithCache, GetCompositionWithDataIdWithCache, GetComposit
|
|
|
43
43
|
export { CreateSession } from './Api/Session/CreateSession';
|
|
44
44
|
export { CreateSessionVisit } from './Api/Session/CreateSessionVisit';
|
|
45
45
|
export {} from './Api/GetConceptByCharacterAndType';
|
|
46
|
-
export { GetRelation, GetRelationRaw } from './Services/GetRelation';
|
|
46
|
+
export { GetRelation, GetRelationRaw, GetRelationNew } from './Services/GetRelation';
|
|
47
47
|
export { recursiveFetchNew } from './Services/Composition/BuildComposition';
|
|
48
48
|
export { CreateTheCompositionWithCache } from './Services/Composition/CreateCompositionCache';
|
|
49
49
|
export { CreateDefaultLConcept } from './Services/Local/CreateDefaultLConcept';
|
|
@@ -347,6 +347,7 @@ declare function init(url?: string, aiurl?: string, accessToken?: string, nodeUr
|
|
|
347
347
|
isTest?: boolean;
|
|
348
348
|
}, parameters?: {
|
|
349
349
|
logserver?: string;
|
|
350
|
+
isPwa?: boolean;
|
|
350
351
|
}, accessControlUrl?: string): Promise<true | undefined>;
|
|
351
352
|
/**
|
|
352
353
|
* Method to send message to the service worker from main thread
|