mftsccs-browser 2.2.20-beta → 2.2.22-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/README.md +1073 -11
- package/dist/bundle.js +2 -0
- package/dist/bundle.js.LICENSE.txt +1 -0
- package/dist/main.bundle.js +1 -1
- package/dist/serviceWorker.bundle.js +1 -1
- package/dist/types/Api/Create/CreateTheCharacter.d.ts +21 -0
- package/dist/types/Api/Create/CreateTheConceptApi.d.ts +18 -0
- package/dist/types/Api/Create/CreateTheConnectionApi.d.ts +16 -0
- package/dist/types/Api/Create/CreateTheGhostConceptApi.d.ts +25 -0
- package/dist/types/Api/Create/CreateTheGhostConnectionApi.d.ts +16 -0
- package/dist/types/Api/Create/CreateTheTextData.d.ts +16 -0
- package/dist/types/Api/Delete/DeleteConceptInBackend.d.ts +13 -0
- package/dist/types/Api/Delete/DeleteUserInBackend.d.ts +18 -0
- package/dist/types/Api/DeleteConnectionApiBulk.d.ts +1 -0
- package/dist/types/Api/DeleteConnectionBulkApi.d.ts +19 -0
- package/dist/types/Api/DeleteTheConcept.d.ts +19 -0
- package/dist/types/Api/DeleteTheConnection.d.ts +19 -0
- package/dist/types/Api/GetAiData.d.ts +9 -0
- package/dist/types/Api/GetAllConcepts.d.ts +10 -0
- package/dist/types/Api/GetAllConceptsByType.d.ts +11 -0
- package/dist/types/Api/GetAllConnections.d.ts +10 -0
- package/dist/types/Api/GetAllConnectionsOfComposition.d.ts +20 -0
- package/dist/types/Api/GetAllConnectionsOfCompositionBulk.d.ts +20 -0
- package/dist/types/Api/GetAllLinkerConnectionsFromTheConcept.d.ts +10 -0
- package/dist/types/Api/GetAllLinkerConnectionsToTheConcept.d.ts +10 -0
- package/dist/types/Api/GetAllPrefetchConnections.d.ts +11 -0
- package/dist/types/Api/GetCharacterDataByCharacter.d.ts +10 -0
- package/dist/types/Api/GetCompositionConnectionsBetweenTwoConcepts.d.ts +12 -0
- package/dist/types/Api/GetConceptBulk.d.ts +10 -0
- package/dist/types/Api/GetConceptByCharacterAndType.d.ts +14 -0
- package/dist/types/Api/GetConceptByCharacterValue.d.ts +10 -0
- package/dist/types/Api/GetConnection.d.ts +13 -0
- package/dist/types/Api/GetConnectionOfTheConcept.d.ts +14 -0
- package/dist/types/Api/GetConnectionToTheConcept.d.ts +15 -0
- package/dist/types/Api/GetConnections/GetConnectionsByTypeApi.d.ts +12 -0
- package/dist/types/Api/GetReservedConnectionIds.d.ts +9 -0
- package/dist/types/Api/GetReservedIds.d.ts +9 -0
- package/dist/types/Api/Images/GetImages.d.ts +14 -0
- package/dist/types/Api/Local/GetLocalConceptByCharacterValue.d.ts +11 -0
- package/dist/types/Api/Login.d.ts +77 -0
- package/dist/types/Api/MakeTheNameInBackend.d.ts +13 -0
- package/dist/types/Api/Prototype/CreatePrototype.d.ts +12 -0
- package/dist/types/Api/Prototype/Selector.d.ts +11 -0
- package/dist/types/Api/RecursiveSearch.d.ts +61 -0
- package/dist/types/Api/Search/FreeschemaQueryApi.d.ts +16 -0
- package/dist/types/Api/Search/Search.d.ts +72 -0
- package/dist/types/Api/Search/SearchInternalApi.d.ts +25 -0
- package/dist/types/Api/Search/SearchLinkMultipleApi.d.ts +13 -0
- package/dist/types/Api/Search/SearchWithLinker.d.ts +14 -0
- package/dist/types/Api/Search/SearchWithTypeAndLinker.d.ts +12 -0
- package/dist/types/Api/SearchConcept/GetConceptByCharacterAndCategoryApi.d.ts +10 -0
- package/dist/types/Api/SearchConcept/GetConceptByCharacterAndCategoryDirect.d.ts +11 -0
- package/dist/types/Api/SearchConcept/GetTypeConceptByBulk.d.ts +13 -0
- package/dist/types/Api/Session/CreateSession.d.ts +14 -0
- package/dist/types/Api/Session/CreateSessionVisit.d.ts +11 -0
- package/dist/types/Api/Signin.d.ts +21 -0
- package/dist/types/Api/Signup.d.ts +53 -11
- package/dist/types/Api/Translate/TranslateLocalToReal.d.ts +10 -0
- package/dist/types/Api/View/ViewInternalDataApi.d.ts +14 -0
- package/dist/types/DataStructures/BaseUrl.d.ts +1 -0
- package/dist/types/DataStructures/Transaction/Transaction.d.ts +30 -0
- package/dist/types/Services/AccessControl/AccessControlCacheService.d.ts +19 -0
- package/dist/types/Services/AccessControl/AccessControlService.d.ts +267 -0
- package/dist/types/Services/AccessControl/PermissionSet.d.ts +8 -0
- package/dist/types/Services/CreateTheConcept.d.ts +118 -0
- package/dist/types/Services/CreateTheConnection.d.ts +59 -6
- package/dist/types/Services/Delete/DeleteConnectionByType.d.ts +13 -0
- package/dist/types/Services/Delete/GetAllConnectionByType.d.ts +16 -0
- package/dist/types/Services/GetComposition.d.ts +64 -7
- package/dist/types/Services/GetTheConcept.d.ts +91 -4
- package/dist/types/Services/Local/ConvertFromLConceptToConcept.d.ts +39 -0
- package/dist/types/Services/Local/ConvertFromLConnectionToConnection.d.ts +45 -0
- package/dist/types/Services/Local/CreateConnectionBetweenTwoConceptsLocal.d.ts +41 -0
- package/dist/types/Services/Local/CreateDefaultLConcept.d.ts +44 -0
- package/dist/types/Services/Local/CreateLocalBinaryTreeFromData.d.ts +6 -1
- package/dist/types/Services/Local/CreateLocalBinaryTypeTreeFromData.d.ts +8 -0
- package/dist/types/Services/Local/CreateLocalCharacterBinaryTree.d.ts +8 -0
- package/dist/types/Services/Local/CreateTheCompositionLocal.d.ts +100 -10
- package/dist/types/Services/Local/CreateTheConceptLocal.d.ts +80 -18
- package/dist/types/Services/Local/CreateTheConnectionLocal.d.ts +135 -11
- package/dist/types/Services/Local/DeleteConceptLocal.d.ts +46 -0
- package/dist/types/Services/Local/GetCompositionListLocal.d.ts +31 -8
- package/dist/types/Services/Local/GetCompositionLocal.d.ts +95 -0
- package/dist/types/Services/Local/GetConceptByCharacterLocal.d.ts +48 -2
- package/dist/types/Services/Local/GetConnectionOfTheConceptLocal.d.ts +17 -0
- package/dist/types/Services/Local/GetRelationLocal.d.ts +20 -0
- package/dist/types/Services/Local/GetTheConceptLocal.d.ts +60 -6
- package/dist/types/Services/Local/MakeTheConceptLocal.d.ts +20 -0
- package/dist/types/Services/Local/MakeTheInstanceConceptLocal.d.ts +160 -14
- package/dist/types/Services/Local/MakeTheTypeLocal.d.ts +29 -9
- package/dist/types/Services/Local/UpdateCompositionLocal.d.ts +39 -0
- package/dist/types/Services/MakeTheLocalConcept.d.ts +0 -0
- package/dist/types/Services/MakeTheName.d.ts +2 -0
- package/dist/types/Services/auth/AuthService.d.ts +1 -0
- package/dist/types/Widgets/BaseObserver.d.ts +14 -11
- package/dist/types/Widgets/BaseWidget.d.ts +24 -11
- package/dist/types/Widgets/BuilderSpeceficFunctions.d.ts +9 -0
- package/dist/types/Widgets/BuilderStatefulWidget.d.ts +352 -2
- package/dist/types/Widgets/CacheWidget.service.d.ts +60 -0
- package/dist/types/Widgets/NormalizeStyles.service.d.ts +9 -0
- package/dist/types/Widgets/RenderPage.service.d.ts +9 -4
- package/dist/types/Widgets/RenderWidgetLibrary.service.d.ts +12 -4
- package/dist/types/Widgets/RenderWidgetService.d.ts +158 -21
- package/dist/types/Widgets/StatefulWidget.d.ts +94 -29
- package/dist/types/Widgets/WidgetBuild.d.ts +41 -0
- package/dist/types/Widgets/WidgetTree.d.ts +31 -0
- package/dist/types/Widgets/mainView.class.d.ts +21 -0
- package/dist/types/WrapperFunctions/DepenedencyObserver.d.ts +48 -27
- package/dist/types/WrapperFunctions/GetCompositionListObservable.d.ts +34 -2
- package/dist/types/WrapperFunctions/GetCompositionObservable.d.ts +24 -2
- package/dist/types/WrapperFunctions/GetLinkListObservable.d.ts +38 -9
- package/dist/types/WrapperFunctions/GetLinkObservable.d.ts +30 -12
- package/dist/types/WrapperFunctions/RecursiveSearchObservable.d.ts +34 -16
- package/dist/types/WrapperFunctions/SchemaQueryObservable.d.ts +41 -5
- package/dist/types/WrapperFunctions/SearchLinkMultipleAllObservable.d.ts +24 -3
- package/dist/types/app.d.ts +183 -12
- package/package.json +1 -1
|
@@ -1 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Authenticates a user with the backend API and obtains an access token.
|
|
3
|
+
*
|
|
4
|
+
* This is the primary authentication function that validates user credentials against the backend
|
|
5
|
+
* server and retrieves a JWT bearer token for subsequent API requests.
|
|
6
|
+
*
|
|
7
|
+
* **Authentication Flow:**
|
|
8
|
+
* 1. Sends email and password to backend login endpoint
|
|
9
|
+
* 2. Receives JWT token in response
|
|
10
|
+
* 3. Automatically stores token in TokenStorage.BearerAccessToken
|
|
11
|
+
* 4. Token is used for all subsequent authenticated API calls
|
|
12
|
+
* 5. Logs the authentication attempt for audit purposes
|
|
13
|
+
*
|
|
14
|
+
* **Features:**
|
|
15
|
+
* - Automatic token storage (no manual handling required)
|
|
16
|
+
* - Error handling and logging
|
|
17
|
+
* - Application-specific authentication
|
|
18
|
+
* - Performance and audit logging
|
|
19
|
+
*
|
|
20
|
+
* **Security Notes:**
|
|
21
|
+
* - Credentials are sent over HTTPS (ensure BaseUrl uses HTTPS)
|
|
22
|
+
* - Token is stored in memory (TokenStorage)
|
|
23
|
+
* - Token should be refreshed before expiration
|
|
24
|
+
* - Never log or expose the token in client-side code
|
|
25
|
+
*
|
|
26
|
+
* @param email - The user's email address. Must be a valid registered email.
|
|
27
|
+
* Used as the primary login identifier.
|
|
28
|
+
* @param password - The user's password. Sent to backend for verification.
|
|
29
|
+
* Should meet password complexity requirements.
|
|
30
|
+
* @param application - The application identifier for multi-tenant authentication.
|
|
31
|
+
* Defaults to "boomconsole.com". Used to scope authentication
|
|
32
|
+
* to specific applications in the system.
|
|
33
|
+
*
|
|
34
|
+
* @returns Promise resolving to the authentication result object containing:
|
|
35
|
+
* - data.token: The JWT bearer token
|
|
36
|
+
* - user information
|
|
37
|
+
* - session details
|
|
38
|
+
* Returns undefined on error
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* // Basic login
|
|
42
|
+
* const result = await LoginToBackend(
|
|
43
|
+
* "user@example.com",
|
|
44
|
+
* "securePassword123"
|
|
45
|
+
* );
|
|
46
|
+
* if (result) {
|
|
47
|
+
* console.log("Logged in successfully");
|
|
48
|
+
* console.log("Token:", result.data.token); // Now stored in TokenStorage
|
|
49
|
+
* }
|
|
50
|
+
*
|
|
51
|
+
* @example
|
|
52
|
+
* // Login for specific application
|
|
53
|
+
* const result = await LoginToBackend(
|
|
54
|
+
* "admin@company.com",
|
|
55
|
+
* "adminPass",
|
|
56
|
+
* "admin.company.com" // Custom application
|
|
57
|
+
* );
|
|
58
|
+
*
|
|
59
|
+
* @example
|
|
60
|
+
* // Use with other authenticated operations
|
|
61
|
+
* const loginResult = await LoginToBackend("user@example.com", "pass123");
|
|
62
|
+
* if (loginResult) {
|
|
63
|
+
* // Token is automatically available for subsequent calls
|
|
64
|
+
* const concepts = await SearchAllConcepts("", "search term", "", TokenStorage.BearerAccessToken);
|
|
65
|
+
* }
|
|
66
|
+
*
|
|
67
|
+
* @throws Does not throw but logs errors. Returns undefined on failure.
|
|
68
|
+
* Error scenarios include:
|
|
69
|
+
* - Invalid credentials (401 Unauthorized)
|
|
70
|
+
* - Network errors
|
|
71
|
+
* - Server errors (5xx)
|
|
72
|
+
* - Malformed request
|
|
73
|
+
*
|
|
74
|
+
* @see {@link Signin} for alternative sign-in function
|
|
75
|
+
* @see {@link Signup} for user registration
|
|
76
|
+
* @see {@link updateAccessToken} for manually updating the stored token
|
|
77
|
+
*/
|
|
1
78
|
export declare function LoginToBackend(email: string, password: string, application?: string): Promise<any>;
|
|
@@ -1 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Creates a name/referent association for a concept in the backend.
|
|
3
|
+
* Associates a human-readable name with a concept ID.
|
|
4
|
+
*
|
|
5
|
+
* @param newConceptId - ID of the concept to name
|
|
6
|
+
* @param referent - Human-readable name/referent string
|
|
7
|
+
* @param typeId - Type ID for the name association
|
|
8
|
+
* @param typeUserId - User ID who owns the type
|
|
9
|
+
* @returns void
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* await MakeTheNameInBackend(123, "John Doe", 5, 456);
|
|
13
|
+
*/
|
|
1
14
|
export declare function MakeTheNameInBackend(newConceptId: number, referent: string, typeId: number, typeUserId: number): Promise<void>;
|
|
@@ -1,2 +1,14 @@
|
|
|
1
1
|
import { Prototype } from "../../DataStructures/Prototype/Prototype";
|
|
2
|
+
/**
|
|
3
|
+
* Creates a new prototype in the backend.
|
|
4
|
+
* Prototypes serve as templates for creating similar concepts.
|
|
5
|
+
*
|
|
6
|
+
* @param prototype - Prototype object containing template definition
|
|
7
|
+
* @returns Created Concept object representing the prototype, or undefined on error
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* const prototype = new Prototype();
|
|
11
|
+
* prototype.name = "PersonTemplate";
|
|
12
|
+
* const result = await CreatePrototypeApi(prototype);
|
|
13
|
+
*/
|
|
2
14
|
export declare function CreatePrototypeApi(prototype: Prototype): Promise<any>;
|
|
@@ -1,4 +1,15 @@
|
|
|
1
1
|
import { StatefulWidget } from "../../app";
|
|
2
|
+
/**
|
|
3
|
+
* Selector widget for searchable dropdown selection.
|
|
4
|
+
* Provides a UI component with search filtering and freeschema query integration.
|
|
5
|
+
*
|
|
6
|
+
* **Complex Logic**: Builds a searchable select element that queries data using
|
|
7
|
+
* FreeschemaQuery, filters results dynamically, and populates options based on
|
|
8
|
+
* nested data structures.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* const selector = new Selector("person", "has_name", parentElement, "text", 10);
|
|
12
|
+
*/
|
|
2
13
|
export declare class Selector extends StatefulWidget {
|
|
3
14
|
selector: string;
|
|
4
15
|
mainType: string;
|
|
@@ -1,6 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Performs recursive search through composition hierarchy.
|
|
3
|
+
* Searches through nested compositions using linker relationships.
|
|
4
|
+
*
|
|
5
|
+
* **Complex Logic**: Constructs SearchQuery, fetches composition IDs and connections,
|
|
6
|
+
* processes internal/external connections, and builds composition objects from results.
|
|
7
|
+
*
|
|
8
|
+
* @param composition - Root composition ID to start search from (default: 0)
|
|
9
|
+
* @param listLinkers - Array of linker strings to traverse (default: [])
|
|
10
|
+
* @param textSearch - Text search filter (default: "")
|
|
11
|
+
* @param fullLinkers - Array of full linker paths (default: [])
|
|
12
|
+
* @returns Array of composition objects with connections
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* const results = await RecursiveSearchApi(123, ["has_child", "has_property"], "search text");
|
|
16
|
+
*/
|
|
1
17
|
export declare function RecursiveSearchApi(composition?: number, listLinkers?: string[], textSearch?: string, fullLinkers?: string[]): Promise<any>;
|
|
18
|
+
/**
|
|
19
|
+
* Performs recursive search returning results with internal connections.
|
|
20
|
+
* Similar to RecursiveSearchApi but uses different connection formatting.
|
|
21
|
+
*
|
|
22
|
+
* @param composition - Root composition ID to start search from (default: 0)
|
|
23
|
+
* @param listLinkers - Array of linker strings to traverse (default: [])
|
|
24
|
+
* @param textSearch - Text search filter (default: "")
|
|
25
|
+
* @returns Array of composition objects with internal connections
|
|
26
|
+
*/
|
|
2
27
|
export declare function RecursiveSearchApiWithInternalConnections(composition?: number, listLinkers?: string[], textSearch?: string): Promise<any>;
|
|
28
|
+
/**
|
|
29
|
+
* Performs recursive search returning raw API response.
|
|
30
|
+
* Returns unprocessed result with composition IDs and connection arrays.
|
|
31
|
+
*
|
|
32
|
+
* @param composition - Root composition ID (default: 0)
|
|
33
|
+
* @param listLinkers - Array of linker strings (default: [])
|
|
34
|
+
* @param textSearch - Text search filter (default: "")
|
|
35
|
+
* @param fullLinkers - Array of full linker paths (default: [])
|
|
36
|
+
* @returns Raw API response object with compositionIds, internalConnections, externalConnections
|
|
37
|
+
*/
|
|
3
38
|
export declare function RecursiveSearchApiRaw(composition?: number, listLinkers?: string[], textSearch?: string, fullLinkers?: string[]): Promise<any>;
|
|
39
|
+
/**
|
|
40
|
+
* Performs recursive search using full linker paths, returning raw response.
|
|
41
|
+
* Uses complete linker path specifications instead of partial linkers.
|
|
42
|
+
*
|
|
43
|
+
* @param composition - Root composition ID (default: 0)
|
|
44
|
+
* @param fullLinkers - Array of complete linker path strings (default: [])
|
|
45
|
+
* @param textSearch - Text search filter (default: "")
|
|
46
|
+
* @returns Raw API response object with compositionIds and connections
|
|
47
|
+
*/
|
|
4
48
|
export declare function RecursiveSearchApiRawFullLinker(composition?: number, fullLinkers?: string[], textSearch?: string): Promise<any>;
|
|
49
|
+
/**
|
|
50
|
+
* New version of recursive search with full linker paths.
|
|
51
|
+
* Alternative implementation of RecursiveSearchApiRawFullLinker.
|
|
52
|
+
*
|
|
53
|
+
* @param composition - Root composition ID (default: 0)
|
|
54
|
+
* @param fullLinkers - Array of complete linker path strings (default: [])
|
|
55
|
+
* @param textSearch - Text search filter (default: "")
|
|
56
|
+
* @returns Raw API response object with compositionIds and connections
|
|
57
|
+
*/
|
|
5
58
|
export declare function RecursiveSearchApiNewRawFullLinker(composition?: number, fullLinkers?: string[], textSearch?: string): Promise<any>;
|
|
59
|
+
/**
|
|
60
|
+
* Performs recursive search using local data only.
|
|
61
|
+
* Placeholder for local-only search implementation.
|
|
62
|
+
*
|
|
63
|
+
* @param composition - Root composition ID
|
|
64
|
+
* @param listLinkers - Array of linker strings (default: [])
|
|
65
|
+
* @param textSearch - Text search filter (default: "")
|
|
66
|
+
*/
|
|
6
67
|
export declare function RecursiveSearchLocal(composition: number, listLinkers?: string[], textSearch?: string): Promise<void>;
|
|
@@ -1,2 +1,18 @@
|
|
|
1
1
|
import { FreeschemaQuery } from "../../app";
|
|
2
|
+
/**
|
|
3
|
+
* Executes a freeschema query for flexible, schema-free data retrieval.
|
|
4
|
+
* Supports custom query structures with filters, pagination, and nested queries.
|
|
5
|
+
*
|
|
6
|
+
* @param query - FreeschemaQuery object containing query parameters, filters, and nested queries
|
|
7
|
+
* @param token - Authentication token (optional, defaults to empty string)
|
|
8
|
+
* @returns Query results array or empty array on error
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* const results = await FreeschemaQueryApi({
|
|
12
|
+
* type: "person",
|
|
13
|
+
* filters: [{ field: "name", operator: "like", value: "John" }],
|
|
14
|
+
* inpage: 10,
|
|
15
|
+
* page: 1
|
|
16
|
+
* }, "auth-token");
|
|
17
|
+
*/
|
|
2
18
|
export declare function FreeschemaQueryApi(query: FreeschemaQuery, token?: string): Promise<any>;
|
|
@@ -1 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Searches for concepts matching specified criteria with pagination support.
|
|
3
|
+
*
|
|
4
|
+
* This is the primary search function for querying concepts in the system. It performs a
|
|
5
|
+
* backend API search with multiple filter parameters and returns paginated results.
|
|
6
|
+
*
|
|
7
|
+
* **Search Capabilities:**
|
|
8
|
+
* - Text-based search on concept character values
|
|
9
|
+
* - Type filtering (search within specific concept types)
|
|
10
|
+
* - Composition filtering (search within specific compositions)
|
|
11
|
+
* - Pagination support (page size and page number)
|
|
12
|
+
* - Authenticated requests (requires valid access token)
|
|
13
|
+
*
|
|
14
|
+
* **Use Cases:**
|
|
15
|
+
* - Finding concepts by name or partial text match
|
|
16
|
+
* - Filtering results by concept type (e.g., only "Person" concepts)
|
|
17
|
+
* - Searching within a specific composition context
|
|
18
|
+
* - Building paginated search UIs
|
|
19
|
+
*
|
|
20
|
+
* @param type - The type filter for the search. Can be a type name (e.g., "Person", "Document")
|
|
21
|
+
* or empty string to search all types. Used to narrow results to specific concept types.
|
|
22
|
+
* @param search - The search query string. Searches against concept character values (names/titles).
|
|
23
|
+
* Can be partial matches depending on backend implementation.
|
|
24
|
+
* @param composition - Composition context filter. Can be a composition ID or identifier to limit
|
|
25
|
+
* search scope to concepts within a specific composition. Use empty string for global search.
|
|
26
|
+
* @param token - The JWT authentication token. Required for authorized access to backend search API.
|
|
27
|
+
* Should be the BearerAccessToken from TokenStorage.
|
|
28
|
+
* @param inpage - Number of results per page. Controls page size for pagination. Defaults to 10.
|
|
29
|
+
* Must be a positive integer.
|
|
30
|
+
* @param page - The page number to retrieve (1-indexed). Defaults to 1 (first page).
|
|
31
|
+
* Use for pagination: page 1, page 2, etc.
|
|
32
|
+
*
|
|
33
|
+
* @returns Promise resolving to an array of matching Concept objects, or empty array on error/no results
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* // Simple search for all concepts containing "Alice"
|
|
37
|
+
* const results = await SearchAllConcepts(
|
|
38
|
+
* "", // all types
|
|
39
|
+
* "Alice", // search term
|
|
40
|
+
* "", // all compositions
|
|
41
|
+
* accessToken, // auth token
|
|
42
|
+
* 10, // 10 per page
|
|
43
|
+
* 1 // first page
|
|
44
|
+
* );
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* // Search for "Person" type concepts with "Smith" in name
|
|
48
|
+
* const people = await SearchAllConcepts(
|
|
49
|
+
* "Person", // only Person types
|
|
50
|
+
* "Smith", // search term
|
|
51
|
+
* "", // all compositions
|
|
52
|
+
* accessToken,
|
|
53
|
+
* 20, // 20 per page
|
|
54
|
+
* 1
|
|
55
|
+
* );
|
|
56
|
+
*
|
|
57
|
+
* @example
|
|
58
|
+
* // Paginated search - get second page
|
|
59
|
+
* const page2 = await SearchAllConcepts(
|
|
60
|
+
* "",
|
|
61
|
+
* "Project",
|
|
62
|
+
* "",
|
|
63
|
+
* accessToken,
|
|
64
|
+
* 10,
|
|
65
|
+
* 2 // second page
|
|
66
|
+
* );
|
|
67
|
+
*
|
|
68
|
+
* @throws Returns empty array on error. Errors are logged via HandleHttpError and HandleInternalError
|
|
69
|
+
*
|
|
70
|
+
* @see {@link SearchWithLinker} for search with relationship filtering
|
|
71
|
+
* @see {@link SearchWithTypeAndLinker} for advanced search with type and linker filters
|
|
72
|
+
*/
|
|
1
73
|
export declare function SearchAllConcepts(type: string, search: string, composition: string, token: string, inpage?: number, page?: number): Promise<any>;
|
|
@@ -1,3 +1,28 @@
|
|
|
1
1
|
import { SearchStructure } from "../../app";
|
|
2
|
+
/**
|
|
3
|
+
* Searches internal compositions with authentication using query parameters.
|
|
4
|
+
* Performs authenticated search within a composition's internal data structure.
|
|
5
|
+
*
|
|
6
|
+
* @param search - Search structure containing composition, search text, internal composition, type, pagination
|
|
7
|
+
* @param token - Authentication token (optional, defaults to empty string)
|
|
8
|
+
* @returns Array of search results or empty array on error
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* const results = await SearchInternalApi({
|
|
12
|
+
* composition: 123,
|
|
13
|
+
* search: "example",
|
|
14
|
+
* internalComposition: 456,
|
|
15
|
+
* type: "text",
|
|
16
|
+
* inpage: 10,
|
|
17
|
+
* page: 1
|
|
18
|
+
* }, "auth-token");
|
|
19
|
+
*/
|
|
2
20
|
export declare function SearchInternalApi(search: SearchStructure, token?: string): Promise<any>;
|
|
21
|
+
/**
|
|
22
|
+
* Searches internal compositions without authentication.
|
|
23
|
+
* Similar to SearchInternalApi but for public/unauthenticated searches.
|
|
24
|
+
*
|
|
25
|
+
* @param search - Search structure containing composition, search text, internal composition, type, pagination
|
|
26
|
+
* @returns Array of search results or empty array on error
|
|
27
|
+
*/
|
|
3
28
|
export declare function SearchInternalAllApi(search: SearchStructure): Promise<any>;
|
|
@@ -1,2 +1,15 @@
|
|
|
1
1
|
import { SearchQuery } from '../../DataStructures/SearchQuery';
|
|
2
|
+
/**
|
|
3
|
+
* Searches for concepts using multiple linked queries with performance tracking.
|
|
4
|
+
* Executes complex multi-criteria searches across concept relationships.
|
|
5
|
+
*
|
|
6
|
+
* @param searchQuery - Array of SearchQuery objects defining linked search criteria
|
|
7
|
+
* @param token - Authentication token (optional, defaults to empty string)
|
|
8
|
+
* @returns Array of search results or empty array on error
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* const results = await SearchLinkMultipleApi([
|
|
12
|
+
* { composition: 123, linker: "has_property", value: "example" }
|
|
13
|
+
* ], "auth-token");
|
|
14
|
+
*/
|
|
2
15
|
export declare function SearchLinkMultipleApi(searchQuery: SearchQuery[], token?: string): Promise<any>;
|
|
@@ -1,2 +1,16 @@
|
|
|
1
1
|
import { SearchQuery } from '../../DataStructures/SearchQuery';
|
|
2
|
+
/**
|
|
3
|
+
* Searches concepts using multiple linker queries with authentication.
|
|
4
|
+
* Allows complex searches by combining multiple search query conditions.
|
|
5
|
+
*
|
|
6
|
+
* @param searchQuery - Array of search query objects defining search criteria
|
|
7
|
+
* @param token - Authentication token (optional, defaults to empty string)
|
|
8
|
+
* @returns Array of matching search results or empty array on error
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* const results = await SearchWithLinker([
|
|
12
|
+
* { linker: "has_name", value: "John" },
|
|
13
|
+
* { linker: "has_age", value: "30" }
|
|
14
|
+
* ], "auth-token");
|
|
15
|
+
*/
|
|
2
16
|
export declare function SearchWithLinker(searchQuery: SearchQuery[], token?: string): Promise<any>;
|
|
@@ -1,2 +1,14 @@
|
|
|
1
1
|
import { SearchQuery, SearchStructure } from "../../app";
|
|
2
|
+
/**
|
|
3
|
+
* Searches concepts by type with additional linker query filters.
|
|
4
|
+
* Combines type-based search with linker queries for refined results.
|
|
5
|
+
*
|
|
6
|
+
* **Complex Logic**: Constructs URL with search structure parameters, then applies
|
|
7
|
+
* linker queries as POST body for multi-dimensional filtering.
|
|
8
|
+
*
|
|
9
|
+
* @param searchStructure - Structure containing search text, type, pagination, and auth flag
|
|
10
|
+
* @param searchQuery - Array of linker query objects for additional filtering
|
|
11
|
+
* @param token - Authentication token (optional, defaults to empty string)
|
|
12
|
+
* @returns Array of concepts matching both type and linker criteria, or empty array on error
|
|
13
|
+
*/
|
|
2
14
|
export declare function SearchWithTypeAndLinkerApi(searchStructure: SearchStructure, searchQuery: SearchQuery[], token?: string): Promise<any>;
|
|
@@ -1,2 +1,12 @@
|
|
|
1
1
|
import { Concept } from "../../DataStructures/Concept";
|
|
2
|
+
/**
|
|
3
|
+
* Retrieves a concept by character value with category filtering.
|
|
4
|
+
* Fetches concept matching character and adds type information.
|
|
5
|
+
*
|
|
6
|
+
* @param characterValue - Character value string to search for
|
|
7
|
+
* @returns Concept object or default concept if not found
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* const concept = await GetConceptByCharacterAndCategoryApi("the_person");
|
|
11
|
+
*/
|
|
2
12
|
export declare function GetConceptByCharacterAndCategoryApi(characterValue: string): Promise<Concept | undefined>;
|
|
@@ -1,2 +1,13 @@
|
|
|
1
1
|
import { Concept } from "./../../DataStructures/Concept";
|
|
2
|
+
/**
|
|
3
|
+
* Retrieves a concept by character value and specific category ID.
|
|
4
|
+
* Direct API call with explicit category filtering.
|
|
5
|
+
*
|
|
6
|
+
* @param characterValue - Character value string to search for
|
|
7
|
+
* @param category_id - Category ID to filter by
|
|
8
|
+
* @returns Promise resolving to Concept object or default concept if not found
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* const concept = await GetConceptByCharacterAndCategoryDirectApi("the_person", 5);
|
|
12
|
+
*/
|
|
2
13
|
export declare function GetConceptByCharacterAndCategoryDirectApi(characterValue: string, category_id: number): Promise<Concept>;
|
|
@@ -1,2 +1,15 @@
|
|
|
1
1
|
import { Concept } from "../../app";
|
|
2
|
+
/**
|
|
3
|
+
* Retrieves type concepts for multiple character values in bulk.
|
|
4
|
+
* Optimizes fetching by batching character lookups in one request.
|
|
5
|
+
*
|
|
6
|
+
* **Complex Logic**: First fetches concept IDs for all character strings,
|
|
7
|
+
* then bulk-fetches the full concept objects.
|
|
8
|
+
*
|
|
9
|
+
* @param characters - Array of character value strings
|
|
10
|
+
* @returns Array of Concept objects matching the character values
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* const concepts = await GetTypeConceptByBulk(["the_person", "the_place", "the_thing"]);
|
|
14
|
+
*/
|
|
2
15
|
export declare function GetTypeConceptByBulk(characters: string[]): Promise<Concept[]>;
|
|
@@ -1,2 +1,16 @@
|
|
|
1
1
|
import { SessionData } from "../../app";
|
|
2
|
+
/**
|
|
3
|
+
* Creates a new session for tracking user activity.
|
|
4
|
+
* Records session metadata including user agent, IP, and timestamp.
|
|
5
|
+
*
|
|
6
|
+
* @param sessionData - SessionData object containing session information
|
|
7
|
+
* @returns Session object with generated ID, or null on error
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* const session = await CreateSession({
|
|
11
|
+
* userAgent: navigator.userAgent,
|
|
12
|
+
* ipAddress: "192.168.1.1",
|
|
13
|
+
* userId: 123
|
|
14
|
+
* });
|
|
15
|
+
*/
|
|
2
16
|
export declare function CreateSession(sessionData: SessionData): Promise<any>;
|
|
@@ -1 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Records a URL visit within an existing session.
|
|
3
|
+
* Tracks page navigation and user journey through the application.
|
|
4
|
+
*
|
|
5
|
+
* @param sessionId - ID of the session to associate the visit with
|
|
6
|
+
* @param url - URL being visited
|
|
7
|
+
* @returns Session visit object or null on error
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* await CreateSessionVisit(456, "/dashboard/profile");
|
|
11
|
+
*/
|
|
1
12
|
export declare function CreateSessionVisit(sessionId: number, url: string): Promise<any>;
|
|
@@ -1,3 +1,24 @@
|
|
|
1
1
|
import { FreeschemaResponse } from "../DataStructures/Responses/StandardResponses";
|
|
2
2
|
import { SigninModel } from "../DataStructures/SigninModel";
|
|
3
|
+
/**
|
|
4
|
+
* Alternative sign-in function using SigninModel structure.
|
|
5
|
+
*
|
|
6
|
+
* Similar to LoginToBackend but returns FreeschemaResponse format and
|
|
7
|
+
* does NOT automatically store the token. You must manually handle the token.
|
|
8
|
+
*
|
|
9
|
+
* @param signinInfo - SigninModel object containing email and password
|
|
10
|
+
* @returns FreeschemaResponse with {status, statusCode, message, data} structure
|
|
11
|
+
* data contains user information and token (not auto-stored)
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* const result = await Signin({
|
|
15
|
+
* email: "user@example.com",
|
|
16
|
+
* password: "password123"
|
|
17
|
+
* });
|
|
18
|
+
* if (result.status) {
|
|
19
|
+
* const token = result.data.token; // Manual token handling required
|
|
20
|
+
* }
|
|
21
|
+
*
|
|
22
|
+
* @see {@link LoginToBackend} for auto-token-storage version
|
|
23
|
+
*/
|
|
3
24
|
export default function Signin(signinInfo: SigninModel): Promise<FreeschemaResponse | undefined>;
|
|
@@ -1,19 +1,61 @@
|
|
|
1
1
|
import { FreeschemaResponse } from "../DataStructures/Responses/StandardResponses";
|
|
2
2
|
import { SignupModel } from "../DataStructures/SignupModel";
|
|
3
|
+
/**
|
|
4
|
+
* Registers a new user account on the backend server.
|
|
5
|
+
*
|
|
6
|
+
* Creates a new user with provided signup information including email, password,
|
|
7
|
+
* username, and profile details.
|
|
8
|
+
*
|
|
9
|
+
* @param signupModel - SignupModel object containing:
|
|
10
|
+
* - email: User's email address
|
|
11
|
+
* - password: User's password
|
|
12
|
+
* - username: Unique username
|
|
13
|
+
* - fname: First name
|
|
14
|
+
* - lname: Last name
|
|
15
|
+
* - title: Title/gender
|
|
16
|
+
* - type: User type
|
|
17
|
+
* @returns FreeschemaResponse with signup result (status, message, data)
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* const result = await Signup({
|
|
21
|
+
* email: "newuser@example.com",
|
|
22
|
+
* password: "securePass123",
|
|
23
|
+
* username: "newuser",
|
|
24
|
+
* fname: "John",
|
|
25
|
+
* lname: "Doe"
|
|
26
|
+
* });
|
|
27
|
+
* if (result.status) {
|
|
28
|
+
* console.log("Account created successfully");
|
|
29
|
+
* }
|
|
30
|
+
*/
|
|
3
31
|
export default function Signup(signupModel: SignupModel): Promise<FreeschemaResponse | undefined>;
|
|
4
32
|
/**
|
|
33
|
+
* Registers a new entity (organization/company account) on the backend.
|
|
34
|
+
*
|
|
35
|
+
* Creates entity-type accounts (different from regular user accounts).
|
|
36
|
+
* Includes timestamp for registration tracking.
|
|
37
|
+
*
|
|
38
|
+
* @param signupData - Signup data object containing:
|
|
39
|
+
* - type: Entity type
|
|
40
|
+
* - username: Unique username
|
|
41
|
+
* - title: Title/designation
|
|
42
|
+
* - email: Entity email
|
|
43
|
+
* - password: Account password
|
|
44
|
+
* - timestamp: Registration timestamp (ISO string)
|
|
45
|
+
* - fname: First name / Entity name
|
|
46
|
+
* - lname: Last name / Additional info
|
|
47
|
+
* @returns Response JSON with entity creation result
|
|
48
|
+
* @throws Error if signup fails (404, 500, or other HTTP errors)
|
|
5
49
|
*
|
|
6
|
-
* @
|
|
7
|
-
*
|
|
8
|
-
* type:
|
|
9
|
-
* username:
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
* password: passwordValue,
|
|
50
|
+
* @example
|
|
51
|
+
* const result = await SignupEntity({
|
|
52
|
+
* type: "organization",
|
|
53
|
+
* username: "acme_corp",
|
|
54
|
+
* email: "admin@acme.com",
|
|
55
|
+
* password: "securePass",
|
|
13
56
|
* timestamp: new Date().toISOString(),
|
|
14
|
-
* fname:
|
|
15
|
-
* lname:
|
|
16
|
-
* };
|
|
17
|
-
* @returns
|
|
57
|
+
* fname: "ACME Corporation",
|
|
58
|
+
* lname: "Inc."
|
|
59
|
+
* });
|
|
18
60
|
*/
|
|
19
61
|
export declare function SignupEntity(signupData: any): Promise<any>;
|
|
@@ -1,2 +1,12 @@
|
|
|
1
1
|
import { Concept } from "../../app";
|
|
2
|
+
/**
|
|
3
|
+
* Translates a local concept ID to its real backend concept.
|
|
4
|
+
* Fetches the actual concept from backend and caches it in ConceptsData.
|
|
5
|
+
*
|
|
6
|
+
* @param conceptId - Local concept ID to translate
|
|
7
|
+
* @returns Real Concept object from backend, or default concept on error
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* const realConcept = await TranslateLocalToReal(123);
|
|
11
|
+
*/
|
|
2
12
|
export declare function TranslateLocalToReal(conceptId: number): Promise<Concept>;
|
|
@@ -1 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Retrieves internal data (connections and concepts) for multiple compositions.
|
|
3
|
+
* Returns a dictionary mapping composition IDs to their internal connection arrays.
|
|
4
|
+
*
|
|
5
|
+
* **Complex Logic**: For each composition ID, fetches connections and related concepts,
|
|
6
|
+
* builds a dictionary structure, and bulk-loads concepts for efficiency.
|
|
7
|
+
*
|
|
8
|
+
* @param ids - Array of composition IDs to fetch internal data for
|
|
9
|
+
* @returns Dictionary mapping composition ID to Connection arrays, or empty array on error
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* const internalData = await ViewInternalDataApi([123, 456, 789]);
|
|
13
|
+
* // Returns: { 123: [...connections], 456: [...connections], 789: [...connections] }
|
|
14
|
+
*/
|
|
1
15
|
export declare function ViewInternalDataApi(ids: number[]): Promise<any>;
|
|
@@ -78,6 +78,7 @@ export declare class BaseUrl {
|
|
|
78
78
|
static sendBulkMail(): string;
|
|
79
79
|
static getWidgetData(): string;
|
|
80
80
|
static getLatestWidgetData(): string;
|
|
81
|
+
static getRecentWidgetData(): string;
|
|
81
82
|
static getConnectionsByTypes(): string;
|
|
82
83
|
static CreatePrototypeUrl(): string;
|
|
83
84
|
static GetCachedImage(ImageName: string): string;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Concept } from "../Concept";
|
|
2
|
+
import { Connection } from "../Connection";
|
|
3
|
+
export declare class Transaction {
|
|
4
|
+
protected transactionId: string;
|
|
5
|
+
actions: InnerActions;
|
|
6
|
+
protected success: boolean;
|
|
7
|
+
constructor();
|
|
8
|
+
initialize(): Promise<void>;
|
|
9
|
+
/**
|
|
10
|
+
* Method to move concepts and connection to transaction collection
|
|
11
|
+
* @param concept Concept
|
|
12
|
+
*/
|
|
13
|
+
protected markAction(): Promise<void>;
|
|
14
|
+
/**
|
|
15
|
+
* Method to rollback all the tranctions occured
|
|
16
|
+
*/
|
|
17
|
+
rollbackTransaction(): Promise<void>;
|
|
18
|
+
commitTransaction(): Promise<void>;
|
|
19
|
+
/**
|
|
20
|
+
* Concepts
|
|
21
|
+
*/
|
|
22
|
+
MakeTheInstanceConcept(type: string, referent: string, composition: boolean | undefined, userId: number, accessId: number, sessionInformationId?: number, referentId?: number): Promise<Concept>;
|
|
23
|
+
CreateConnection(ofTheConcept: Concept, toTheConcept: Concept, typeConnection: string): Promise<Connection>;
|
|
24
|
+
MakeTheTypeConcept(typeString: string, sessionId: number, sessionUserId: number, userId: number): Promise<Concept>;
|
|
25
|
+
CreateTheConnectionGeneral(ofTheConceptId: number, ofTheConceptUserId: number, toTheConceptId: number, toTheConceptUserId: number, typeId: number, sessionInformationId: number, sessionInformationUserId: number, orderId?: number, accessId?: number, passedUserId?: number): Promise<Connection>;
|
|
26
|
+
}
|
|
27
|
+
export interface InnerActions {
|
|
28
|
+
concepts: Concept[];
|
|
29
|
+
connections: Connection[];
|
|
30
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { PermissionSet } from './PermissionSet';
|
|
2
|
+
export declare class AccessControlCacheService {
|
|
3
|
+
private readonly userAccessCache;
|
|
4
|
+
private readonly publicAccessCache;
|
|
5
|
+
private readonly baseUrl;
|
|
6
|
+
constructor();
|
|
7
|
+
loadCacheFromApi(entityId?: number): Promise<void>;
|
|
8
|
+
loadCacheFromJson(jsonData: any): void;
|
|
9
|
+
hasAccess(entityId: number, conceptId: number, required: PermissionSet): Promise<boolean>;
|
|
10
|
+
getAccessibleConcepts(entityId: number, conceptIds: number[], required: PermissionSet): Promise<number[]>;
|
|
11
|
+
getAccessByUser(entityId: number): Promise<Map<number, PermissionSet>>;
|
|
12
|
+
getAccessByConcept(conceptId: number): Promise<Map<number, PermissionSet>>;
|
|
13
|
+
deleteRecordByUserId(entityId: number): void;
|
|
14
|
+
deletePublicAccessRecordById(conceptId: number): void;
|
|
15
|
+
clearCache(): void;
|
|
16
|
+
getConceptsByPublicAccess(): Promise<Record<number, string[]>>;
|
|
17
|
+
hasPublicAccess(conceptId: number, required: PermissionSet): Promise<boolean>;
|
|
18
|
+
getConceptsWithPublicAccess(conceptIds: number[], required: PermissionSet): Promise<number[]>;
|
|
19
|
+
}
|