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.
Files changed (117) hide show
  1. package/README.md +1073 -11
  2. package/dist/bundle.js +2 -0
  3. package/dist/bundle.js.LICENSE.txt +1 -0
  4. package/dist/main.bundle.js +1 -1
  5. package/dist/serviceWorker.bundle.js +1 -1
  6. package/dist/types/Api/Create/CreateTheCharacter.d.ts +21 -0
  7. package/dist/types/Api/Create/CreateTheConceptApi.d.ts +18 -0
  8. package/dist/types/Api/Create/CreateTheConnectionApi.d.ts +16 -0
  9. package/dist/types/Api/Create/CreateTheGhostConceptApi.d.ts +25 -0
  10. package/dist/types/Api/Create/CreateTheGhostConnectionApi.d.ts +16 -0
  11. package/dist/types/Api/Create/CreateTheTextData.d.ts +16 -0
  12. package/dist/types/Api/Delete/DeleteConceptInBackend.d.ts +13 -0
  13. package/dist/types/Api/Delete/DeleteUserInBackend.d.ts +18 -0
  14. package/dist/types/Api/DeleteConnectionApiBulk.d.ts +1 -0
  15. package/dist/types/Api/DeleteConnectionBulkApi.d.ts +19 -0
  16. package/dist/types/Api/DeleteTheConcept.d.ts +19 -0
  17. package/dist/types/Api/DeleteTheConnection.d.ts +19 -0
  18. package/dist/types/Api/GetAiData.d.ts +9 -0
  19. package/dist/types/Api/GetAllConcepts.d.ts +10 -0
  20. package/dist/types/Api/GetAllConceptsByType.d.ts +11 -0
  21. package/dist/types/Api/GetAllConnections.d.ts +10 -0
  22. package/dist/types/Api/GetAllConnectionsOfComposition.d.ts +20 -0
  23. package/dist/types/Api/GetAllConnectionsOfCompositionBulk.d.ts +20 -0
  24. package/dist/types/Api/GetAllLinkerConnectionsFromTheConcept.d.ts +10 -0
  25. package/dist/types/Api/GetAllLinkerConnectionsToTheConcept.d.ts +10 -0
  26. package/dist/types/Api/GetAllPrefetchConnections.d.ts +11 -0
  27. package/dist/types/Api/GetCharacterDataByCharacter.d.ts +10 -0
  28. package/dist/types/Api/GetCompositionConnectionsBetweenTwoConcepts.d.ts +12 -0
  29. package/dist/types/Api/GetConceptBulk.d.ts +10 -0
  30. package/dist/types/Api/GetConceptByCharacterAndType.d.ts +14 -0
  31. package/dist/types/Api/GetConceptByCharacterValue.d.ts +10 -0
  32. package/dist/types/Api/GetConnection.d.ts +13 -0
  33. package/dist/types/Api/GetConnectionOfTheConcept.d.ts +14 -0
  34. package/dist/types/Api/GetConnectionToTheConcept.d.ts +15 -0
  35. package/dist/types/Api/GetConnections/GetConnectionsByTypeApi.d.ts +12 -0
  36. package/dist/types/Api/GetReservedConnectionIds.d.ts +9 -0
  37. package/dist/types/Api/GetReservedIds.d.ts +9 -0
  38. package/dist/types/Api/Images/GetImages.d.ts +14 -0
  39. package/dist/types/Api/Local/GetLocalConceptByCharacterValue.d.ts +11 -0
  40. package/dist/types/Api/Login.d.ts +77 -0
  41. package/dist/types/Api/MakeTheNameInBackend.d.ts +13 -0
  42. package/dist/types/Api/Prototype/CreatePrototype.d.ts +12 -0
  43. package/dist/types/Api/Prototype/Selector.d.ts +11 -0
  44. package/dist/types/Api/RecursiveSearch.d.ts +61 -0
  45. package/dist/types/Api/Search/FreeschemaQueryApi.d.ts +16 -0
  46. package/dist/types/Api/Search/Search.d.ts +72 -0
  47. package/dist/types/Api/Search/SearchInternalApi.d.ts +25 -0
  48. package/dist/types/Api/Search/SearchLinkMultipleApi.d.ts +13 -0
  49. package/dist/types/Api/Search/SearchWithLinker.d.ts +14 -0
  50. package/dist/types/Api/Search/SearchWithTypeAndLinker.d.ts +12 -0
  51. package/dist/types/Api/SearchConcept/GetConceptByCharacterAndCategoryApi.d.ts +10 -0
  52. package/dist/types/Api/SearchConcept/GetConceptByCharacterAndCategoryDirect.d.ts +11 -0
  53. package/dist/types/Api/SearchConcept/GetTypeConceptByBulk.d.ts +13 -0
  54. package/dist/types/Api/Session/CreateSession.d.ts +14 -0
  55. package/dist/types/Api/Session/CreateSessionVisit.d.ts +11 -0
  56. package/dist/types/Api/Signin.d.ts +21 -0
  57. package/dist/types/Api/Signup.d.ts +53 -11
  58. package/dist/types/Api/Translate/TranslateLocalToReal.d.ts +10 -0
  59. package/dist/types/Api/View/ViewInternalDataApi.d.ts +14 -0
  60. package/dist/types/DataStructures/BaseUrl.d.ts +1 -0
  61. package/dist/types/DataStructures/Transaction/Transaction.d.ts +30 -0
  62. package/dist/types/Services/AccessControl/AccessControlCacheService.d.ts +19 -0
  63. package/dist/types/Services/AccessControl/AccessControlService.d.ts +267 -0
  64. package/dist/types/Services/AccessControl/PermissionSet.d.ts +8 -0
  65. package/dist/types/Services/CreateTheConcept.d.ts +118 -0
  66. package/dist/types/Services/CreateTheConnection.d.ts +59 -6
  67. package/dist/types/Services/Delete/DeleteConnectionByType.d.ts +13 -0
  68. package/dist/types/Services/Delete/GetAllConnectionByType.d.ts +16 -0
  69. package/dist/types/Services/GetComposition.d.ts +64 -7
  70. package/dist/types/Services/GetTheConcept.d.ts +91 -4
  71. package/dist/types/Services/Local/ConvertFromLConceptToConcept.d.ts +39 -0
  72. package/dist/types/Services/Local/ConvertFromLConnectionToConnection.d.ts +45 -0
  73. package/dist/types/Services/Local/CreateConnectionBetweenTwoConceptsLocal.d.ts +41 -0
  74. package/dist/types/Services/Local/CreateDefaultLConcept.d.ts +44 -0
  75. package/dist/types/Services/Local/CreateLocalBinaryTreeFromData.d.ts +6 -1
  76. package/dist/types/Services/Local/CreateLocalBinaryTypeTreeFromData.d.ts +8 -0
  77. package/dist/types/Services/Local/CreateLocalCharacterBinaryTree.d.ts +8 -0
  78. package/dist/types/Services/Local/CreateTheCompositionLocal.d.ts +100 -10
  79. package/dist/types/Services/Local/CreateTheConceptLocal.d.ts +80 -18
  80. package/dist/types/Services/Local/CreateTheConnectionLocal.d.ts +135 -11
  81. package/dist/types/Services/Local/DeleteConceptLocal.d.ts +46 -0
  82. package/dist/types/Services/Local/GetCompositionListLocal.d.ts +31 -8
  83. package/dist/types/Services/Local/GetCompositionLocal.d.ts +95 -0
  84. package/dist/types/Services/Local/GetConceptByCharacterLocal.d.ts +48 -2
  85. package/dist/types/Services/Local/GetConnectionOfTheConceptLocal.d.ts +17 -0
  86. package/dist/types/Services/Local/GetRelationLocal.d.ts +20 -0
  87. package/dist/types/Services/Local/GetTheConceptLocal.d.ts +60 -6
  88. package/dist/types/Services/Local/MakeTheConceptLocal.d.ts +20 -0
  89. package/dist/types/Services/Local/MakeTheInstanceConceptLocal.d.ts +160 -14
  90. package/dist/types/Services/Local/MakeTheTypeLocal.d.ts +29 -9
  91. package/dist/types/Services/Local/UpdateCompositionLocal.d.ts +39 -0
  92. package/dist/types/Services/MakeTheLocalConcept.d.ts +0 -0
  93. package/dist/types/Services/MakeTheName.d.ts +2 -0
  94. package/dist/types/Services/auth/AuthService.d.ts +1 -0
  95. package/dist/types/Widgets/BaseObserver.d.ts +14 -11
  96. package/dist/types/Widgets/BaseWidget.d.ts +24 -11
  97. package/dist/types/Widgets/BuilderSpeceficFunctions.d.ts +9 -0
  98. package/dist/types/Widgets/BuilderStatefulWidget.d.ts +352 -2
  99. package/dist/types/Widgets/CacheWidget.service.d.ts +60 -0
  100. package/dist/types/Widgets/NormalizeStyles.service.d.ts +9 -0
  101. package/dist/types/Widgets/RenderPage.service.d.ts +9 -4
  102. package/dist/types/Widgets/RenderWidgetLibrary.service.d.ts +12 -4
  103. package/dist/types/Widgets/RenderWidgetService.d.ts +158 -21
  104. package/dist/types/Widgets/StatefulWidget.d.ts +94 -29
  105. package/dist/types/Widgets/WidgetBuild.d.ts +41 -0
  106. package/dist/types/Widgets/WidgetTree.d.ts +31 -0
  107. package/dist/types/Widgets/mainView.class.d.ts +21 -0
  108. package/dist/types/WrapperFunctions/DepenedencyObserver.d.ts +48 -27
  109. package/dist/types/WrapperFunctions/GetCompositionListObservable.d.ts +34 -2
  110. package/dist/types/WrapperFunctions/GetCompositionObservable.d.ts +24 -2
  111. package/dist/types/WrapperFunctions/GetLinkListObservable.d.ts +38 -9
  112. package/dist/types/WrapperFunctions/GetLinkObservable.d.ts +30 -12
  113. package/dist/types/WrapperFunctions/RecursiveSearchObservable.d.ts +34 -16
  114. package/dist/types/WrapperFunctions/SchemaQueryObservable.d.ts +41 -5
  115. package/dist/types/WrapperFunctions/SearchLinkMultipleAllObservable.d.ts +24 -3
  116. package/dist/types/app.d.ts +183 -12
  117. package/package.json +1 -1
@@ -1,3 +1,24 @@
1
1
  import { Returner } from "../../DataStructures/Returner";
2
2
  import { TheCharacter } from "../../DataStructures/TheCharacter";
3
+ /**
4
+ * Creates a character on the backend server with local caching.
5
+ *
6
+ * **Logic**:
7
+ * 1. Checks CharacterRepository for existing character by data value
8
+ * 2. If exists locally: Returns existing character ID
9
+ * 3. If not exists: Creates on server and adds to local repository
10
+ *
11
+ * Character data represents string values used across the system with deduplication.
12
+ *
13
+ * @param characterData - TheCharacter object to create
14
+ * @returns Returner object with character ID and metadata
15
+ * @throws Error if HTTP request fails
16
+ *
17
+ * @example
18
+ * const char = await CreateTheCharacter({
19
+ * data: "user@example.com",
20
+ * userId: 42
21
+ * });
22
+ * // If "user@example.com" already exists, returns existing ID
23
+ */
3
24
  export declare function CreateTheCharacter(characterData: TheCharacter): Promise<Returner>;
@@ -1,2 +1,20 @@
1
1
  import { Concept } from "../../DataStructures/Concept";
2
+ /**
3
+ * Creates a concept on the backend server via API.
4
+ *
5
+ * Sends concept data to the backend server for creation. Returns the created
6
+ * concept with server-assigned positive ID.
7
+ *
8
+ * @param conceptData - Concept data to create (can be partial concept object)
9
+ * @returns Created Concept object with server-assigned ID
10
+ * @throws Error if HTTP request fails or server returns error status
11
+ *
12
+ * @example
13
+ * const newConcept = await CreateTheConceptApi({
14
+ * characterValue: "Alice",
15
+ * typeId: 100,
16
+ * userId: 42
17
+ * });
18
+ * console.log(newConcept.id); // Positive ID from server (e.g., 12345)
19
+ */
2
20
  export declare function CreateTheConceptApi(conceptData: any): Promise<Concept | undefined>;
@@ -1,2 +1,18 @@
1
1
  import { Connection } from "../../DataStructures/Connection";
2
+ /**
3
+ * Creates connections on the backend server via API.
4
+ *
5
+ * Sends an array of connection objects to the backend for bulk creation.
6
+ * Used for creating multiple connections in a single API call.
7
+ *
8
+ * @param connectionData - Array of Connection objects to create
9
+ * @returns Connection object (note: current implementation returns default connection)
10
+ * @throws Error if HTTP request fails
11
+ *
12
+ * @example
13
+ * const connections = await CreateTheConnectionApi([
14
+ * { ofTheConceptId: 100, toTheConceptId: 200, typeId: 42, ... },
15
+ * { ofTheConceptId: 100, toTheConceptId: 300, typeId: 42, ... }
16
+ * ]);
17
+ */
2
18
  export declare function CreateTheConnectionApi(connectionData: Connection[]): Promise<Connection>;
@@ -1,3 +1,28 @@
1
1
  import { Concept } from "../../DataStructures/Concept";
2
2
  import { Connection } from "../../app";
3
+ /**
4
+ * Syncs local concepts and connections to the backend server in bulk (batch sync).
5
+ *
6
+ * **Complex Logic**:
7
+ * 1. Strips type objects from data to reduce payload size
8
+ * 2. If total items ≤2000: Sends in single request
9
+ * 3. If total items >2000: Chunks into 1000-item batches and sends in parallel
10
+ * 4. Returns arrays of created concepts and connections with real server IDs
11
+ *
12
+ * "Ghost" refers to preserving original local IDs (negative) as ghostId while assigning real positive IDs.
13
+ *
14
+ * @param conceptData - Array of Concept objects to sync (can include local negative IDs)
15
+ * @param connectionData - Array of Connection objects to sync
16
+ * @param withAuth - Whether to use authentication (default: true)
17
+ * @returns Object with {concepts: Concept[], connections: Connection[]} containing synced items
18
+ * @throws Error if any batch request fails
19
+ *
20
+ * @example
21
+ * const result = await CreateTheGhostConceptApi(
22
+ * [concept1, concept2],
23
+ * [connection1, connection2]
24
+ * );
25
+ * // result.concepts contains concepts with real server IDs
26
+ * // result.connections contains connections with real server IDs
27
+ */
3
28
  export declare function CreateTheGhostConceptApi(conceptData: Concept[], connectionData: Connection[], withAuth?: boolean): Promise<any>;
@@ -1,2 +1,18 @@
1
1
  import { Connection } from "../../app";
2
+ /**
3
+ * Syncs local connections to the backend server preserving ghost IDs.
4
+ *
5
+ * Creates connections on server while maintaining ghostId for local ID tracking.
6
+ * Used for syncing locally-created connections (negative IDs) to the backend.
7
+ *
8
+ * @param connectionData - Array of Connection objects to sync
9
+ * @returns Array of created Connection objects with server-assigned positive IDs
10
+ * @throws Error if HTTP request fails
11
+ *
12
+ * @example
13
+ * const synced = await CreateTheGhostConnectionApi([
14
+ * { id: -123, ofTheConceptId: -100, toTheConceptId: -200, ... }
15
+ * ]);
16
+ * // Returns: [{ id: 5001, ghostId: -123, ofTheConceptId: 1001, toTheConceptId: 2001, ... }]
17
+ */
2
18
  export declare function CreateTheGhostConnectionApi(connectionData: Connection[]): Promise<Connection[] | undefined>;
@@ -1,2 +1,18 @@
1
1
  import { TheTexts } from "../../DataStructures/TheTexts";
2
+ /**
3
+ * Creates text data on the backend server via API.
4
+ *
5
+ * Stores long-form text content (>255 characters) separately from concepts.
6
+ * Used for text values that exceed the characterValue field length limit.
7
+ *
8
+ * @param textData - TheTexts object containing text data to store
9
+ * @returns Created TheTexts object with server-assigned ID
10
+ * @throws Error if HTTP request fails or server returns error status
11
+ *
12
+ * @example
13
+ * const longText = await CreateTextData({
14
+ * data: "Very long text content that exceeds 255 characters...",
15
+ * userId: 42
16
+ * });
17
+ */
2
18
  export declare function CreateTextData(textData: TheTexts): Promise<TheTexts>;
@@ -1 +1,14 @@
1
+ /**
2
+ * Deletes (trashes) a concept from the backend with explicit token auth.
3
+ *
4
+ * Alternative delete function that requires manual token passing.
5
+ * Similar to DeleteTheConcept but with explicit authentication parameter.
6
+ *
7
+ * @param id - The concept ID to delete
8
+ * @param token - Bearer authentication token
9
+ * @throws Error if deletion fails
10
+ *
11
+ * @example
12
+ * await TrashTheConcept(12345, userToken);
13
+ */
1
14
  export declare function TrashTheConcept(id: number, token: string): Promise<void>;
@@ -1 +1,19 @@
1
+ /**
2
+ * Deletes a user account from the backend server.
3
+ *
4
+ * **Process**:
5
+ * 1. Sends delete request with user concept ID and API key
6
+ * 2. Backend deletes user and returns email concept ID
7
+ * 3. Deletes the associated email concept locally
8
+ *
9
+ * Used for complete user account removal including associated data.
10
+ *
11
+ * @param id - The user concept ID to delete
12
+ * @returns Email concept ID that was deleted, or undefined if error
13
+ * @throws Error if deletion fails
14
+ *
15
+ * @example
16
+ * const emailConceptId = await DeleteUserInBackend(userId);
17
+ * console.log("Deleted user and email concept:", emailConceptId);
18
+ */
1
19
  export declare function DeleteUserInBackend(id: number): Promise<number | undefined>;
@@ -0,0 +1 @@
1
+ export default function DeleteTheConnectionBulkApi(ids: number[]): Promise<boolean>;
@@ -1 +1,20 @@
1
+ /**
2
+ * Deletes multiple connections from the backend in a single bulk operation.
3
+ *
4
+ * **Process**:
5
+ * 1. Sends array of connection IDs to backend for bulk deletion
6
+ * 2. If successful: Marks all connections as deleted in local ConnectionData
7
+ * 3. Returns overall deletion success status
8
+ *
9
+ * More efficient than calling DeleteTheConnection multiple times.
10
+ *
11
+ * @param ids - Array of connection IDs to delete
12
+ * @returns boolean - true if bulk deletion successful, false otherwise
13
+ *
14
+ * @example
15
+ * const deleted = await DeleteTheConnectionBulkApi([5001, 5002, 5003]);
16
+ * if (deleted) {
17
+ * console.log("All 3 connections deleted successfully");
18
+ * }
19
+ */
1
20
  export default function DeleteTheConnectionBulkApi(ids: number[]): Promise<boolean>;
@@ -1 +1,20 @@
1
+ /**
2
+ * Deletes a concept from the backend server by ID.
3
+ *
4
+ * **Process**:
5
+ * 1. Sends delete request to backend with concept ID
6
+ * 2. If successful: Marks concept as deleted in local ConceptsData (NPC list)
7
+ * 3. Returns deletion success status
8
+ *
9
+ * NPC (Non-Present Concept) list tracks deleted concept IDs to prevent reuse.
10
+ *
11
+ * @param id - The concept ID to delete
12
+ * @returns boolean - true if successfully deleted, false otherwise
13
+ *
14
+ * @example
15
+ * const deleted = await DeleteTheConcept(12345);
16
+ * if (deleted) {
17
+ * console.log("Concept deleted successfully");
18
+ * }
19
+ */
1
20
  export default function DeleteTheConcept(id: number): Promise<boolean>;
@@ -1 +1,20 @@
1
+ /**
2
+ * Deletes a connection from the backend server by ID.
3
+ *
4
+ * **Process**:
5
+ * 1. Sends delete request to backend with connection ID
6
+ * 2. If successful: Marks connection as deleted in local ConnectionData (NpConn list)
7
+ * 3. Returns deletion success status
8
+ *
9
+ * NpConn (Non-Present Connection) list tracks deleted connection IDs.
10
+ *
11
+ * @param id - The connection ID to delete
12
+ * @returns boolean - true if successfully deleted, false otherwise
13
+ *
14
+ * @example
15
+ * const deleted = await DeleteTheConnection(5001);
16
+ * if (deleted) {
17
+ * console.log("Connection deleted successfully");
18
+ * }
19
+ */
1
20
  export default function DeleteTheConnection(id: number): Promise<boolean>;
@@ -1 +1,10 @@
1
+ /**
2
+ * Fetches all AI-related concept data from the backend.
3
+ * Loads AI concepts into local ConceptsData cache and triggers database update.
4
+ *
5
+ * @returns void - Updates ConceptsData in-place with AI concepts
6
+ *
7
+ * @example
8
+ * await GetAiData(); // Loads all AI concepts into cache
9
+ */
1
10
  export declare function GetAiData(): Promise<void>;
@@ -1 +1,11 @@
1
+ /**
2
+ * Retrieves all concepts belonging to a specific user.
3
+ * Fetches user's concepts from backend and caches them in ConceptsData.
4
+ *
5
+ * @param userId - ID of the user whose concepts to retrieve
6
+ * @returns void - Updates ConceptsData cache with user's concepts
7
+ *
8
+ * @example
9
+ * await GetAllUserConcepts(123); // Loads all concepts for user 123
10
+ */
1
11
  export declare function GetAllUserConcepts(userId: number): Promise<void>;
@@ -1 +1,12 @@
1
+ /**
2
+ * Retrieves all concepts of a specific type for a user.
3
+ * Fetches concepts filtered by type string and user ID.
4
+ *
5
+ * @param type - Type string to filter concepts by
6
+ * @param userId - User ID to filter by
7
+ * @returns void - Updates ConceptsData cache with matching concepts
8
+ *
9
+ * @example
10
+ * await GetAllConceptsByType("person", 123);
11
+ */
1
12
  export declare function GetAllConceptsByType(type: string, userId: number): Promise<void>;
@@ -1 +1,11 @@
1
+ /**
2
+ * Retrieves all connections belonging to a specific user.
3
+ * Fetches user's connections from backend and caches them in ConnectionData.
4
+ *
5
+ * @param userId - ID of the user whose connections to retrieve
6
+ * @returns void - Updates ConnectionData cache with user's connections
7
+ *
8
+ * @example
9
+ * await GetAllUserConnections(123); // Loads all connections for user 123
10
+ */
1
11
  export declare function GetAllUserConnections(userId: number): Promise<void>;
@@ -1,3 +1,23 @@
1
1
  import { Connection } from '../DataStructures/Connection';
2
+ /**
3
+ * Retrieves all connections belonging to a specific composition.
4
+ * Checks local cache first, then fetches from backend if needed.
5
+ *
6
+ * **Complex Logic**: First checks ConnectionData cache, then fetches from API,
7
+ * compares with cached data to detect deletions, and updates cache.
8
+ *
9
+ * @param composition_id - ID of the composition whose connections to retrieve
10
+ * @returns Array of Connection objects for the composition
11
+ *
12
+ * @example
13
+ * const connections = await GetAllConnectionsOfComposition(456);
14
+ */
2
15
  export declare function GetAllConnectionsOfComposition(composition_id: number): Promise<Connection[]>;
16
+ /**
17
+ * Fetches connections for a composition directly from the backend.
18
+ * Internal helper function for GetAllConnectionsOfComposition.
19
+ *
20
+ * @param composition_id - ID of the composition
21
+ * @returns Array of Connection objects from backend
22
+ */
3
23
  export declare function GetAllConnectionsOfCompositionOnline(composition_id: number): Promise<Connection[] | undefined>;
@@ -1,3 +1,23 @@
1
1
  import { Connection } from '../DataStructures/Connection';
2
+ /**
3
+ * Retrieves connections for multiple compositions in bulk.
4
+ * Optimizes fetching by batching multiple composition IDs in one request.
5
+ *
6
+ * **Complex Logic**: Checks in-memory cache, fetches from API, detects deletions
7
+ * by comparing old and new data, and bulk-fetches related concepts.
8
+ *
9
+ * @param composition_ids - Array of composition IDs to fetch connections for
10
+ * @returns Array of Connection objects for all compositions
11
+ *
12
+ * @example
13
+ * const connections = await GetAllConnectionsOfCompositionBulk([123, 456, 789]);
14
+ */
2
15
  export declare function GetAllConnectionsOfCompositionBulk(composition_ids?: number[]): Promise<any>;
16
+ /**
17
+ * Fetches connections for multiple compositions directly from backend.
18
+ * Internal helper function for GetAllConnectionsOfCompositionBulk.
19
+ *
20
+ * @param composition_ids - Array of composition IDs
21
+ * @returns Array of Connection objects from backend
22
+ */
3
23
  export declare function GetAllConnectionsOfCompositionOnline(composition_ids?: number[]): Promise<Connection[] | undefined>;
@@ -1,2 +1,12 @@
1
1
  import { Connection } from "../DataStructures/Connection";
2
+ /**
3
+ * Retrieves all linker connections originating from a specific concept.
4
+ * Fetches connections where the concept is the source/origin.
5
+ *
6
+ * @param conceptId - ID of the concept to get linker connections from
7
+ * @returns Array of Connection objects originating from the concept
8
+ *
9
+ * @example
10
+ * const connections = await GetAllLinkerConnectionsFromTheConcept(123);
11
+ */
2
12
  export declare function GetAllLinkerConnectionsFromTheConcept(conceptId: number): Promise<Connection[]>;
@@ -1,2 +1,12 @@
1
1
  import { Connection } from "../DataStructures/Connection";
2
+ /**
3
+ * Retrieves all linker connections pointing to a specific concept.
4
+ * Fetches connections where the concept is the target/destination.
5
+ *
6
+ * @param conceptId - ID of the concept to get linker connections to
7
+ * @returns Array of Connection objects pointing to the concept
8
+ *
9
+ * @example
10
+ * const connections = await GetAllLinkerConnectionsToTheConcept(123);
11
+ */
2
12
  export declare function GetAllLinkerConnectionsToTheConcept(conceptId: number): Promise<Connection[]>;
@@ -1 +1,12 @@
1
+ /**
2
+ * Prefetches connections for a user with pagination.
3
+ * Loads connections into local storage for improved performance.
4
+ *
5
+ * @param userId - ID of the user whose connections to prefetch
6
+ * @param inpage - Number of connections per page
7
+ * @returns void - Updates ConnectionData storage with prefetched connections
8
+ *
9
+ * @example
10
+ * await GetAllPrefetchConnections(123, 50); // Prefetch 50 connections for user 123
11
+ */
1
12
  export declare function GetAllPrefetchConnections(userId: number, inpage: number): Promise<void>;
@@ -1,2 +1,12 @@
1
1
  import { TheCharacter } from "../DataStructures/TheCharacter";
2
+ /**
3
+ * Retrieves character data by character value string.
4
+ * Fetches TheCharacter object containing character metadata.
5
+ *
6
+ * @param characterValue - String value of the character to retrieve
7
+ * @returns TheCharacter object or undefined on error
8
+ *
9
+ * @example
10
+ * const char = await GetCharacterByCharacter("the_person");
11
+ */
2
12
  export declare function GetCharacterByCharacter(characterValue: string): Promise<TheCharacter | undefined>;
@@ -1 +1,13 @@
1
+ /**
2
+ * Retrieves composition connections between two concepts.
3
+ * Fetches connections linking two concepts filtered by a main key.
4
+ *
5
+ * @param ofConceptId - Source concept ID
6
+ * @param toConcept - Target concept ID
7
+ * @param mainKey - Main key to filter connections
8
+ * @returns Array of Connection objects between the two concepts
9
+ *
10
+ * @example
11
+ * const connections = await GetCompositionConnectionsBetweenTwoConcepts(123, 456, 789);
12
+ */
1
13
  export declare function GetCompositionConnectionsBetweenTwoConcepts(ofConceptId: number, toConcept: number, mainKey: number): Promise<any>;
@@ -7,4 +7,14 @@ import { Concept } from "./../DataStructures/Concept";
7
7
  * @returns list of concepts
8
8
  */
9
9
  export declare function GetConceptBulk(passedConcepts: number[]): Promise<Concept[]>;
10
+ /**
11
+ * Alternative API for fetching multiple concepts by IDs.
12
+ * Simpler version without caching logic, directly fetches from backend.
13
+ *
14
+ * @param bulkConceptFetch - Array of concept IDs to fetch
15
+ * @returns Array of Concept objects
16
+ *
17
+ * @example
18
+ * const concepts = await BulkConceptGetterApi([1, 2, 3, 4, 5]);
19
+ */
10
20
  export declare function BulkConceptGetterApi(bulkConceptFetch: number[]): Promise<Concept[]>;
@@ -1 +1,15 @@
1
+ /**
2
+ * Retrieves a concept by character value and type ID.
3
+ * Checks local cache first, then fetches from backend if not found.
4
+ *
5
+ * **Complex Logic**: Checks local ConceptsData cache, falls back to API,
6
+ * supports service worker for offline capability.
7
+ *
8
+ * @param characterValue - Character value string to search for
9
+ * @param typeId - Type ID to filter by
10
+ * @returns Concept object or null if not found
11
+ *
12
+ * @example
13
+ * const concept = await GetConceptByCharacterAndType("the_person", 5);
14
+ */
1
15
  export declare function GetConceptByCharacterAndType(characterValue: string, typeId: number): Promise<any>;
@@ -1,2 +1,12 @@
1
1
  import { Concept } from "../DataStructures/Concept";
2
+ /**
3
+ * Retrieves a concept by its character value.
4
+ * Fetches concept matching the character string 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 GetConceptByCharacterValue("the_person");
11
+ */
2
12
  export declare function GetConceptByCharacterValue(characterValue: string): Promise<Concept>;
@@ -1,2 +1,15 @@
1
1
  import { Connection } from "../DataStructures/Connection";
2
+ /**
3
+ * Retrieves a connection by its ID.
4
+ * Checks local cache first, then fetches from backend if needed.
5
+ *
6
+ * **Complex Logic**: Checks ConnectionData cache, falls back to API request,
7
+ * supports cache server fallback for resilience.
8
+ *
9
+ * @param id - Connection ID to retrieve
10
+ * @returns Connection object or default connection if not found
11
+ *
12
+ * @example
13
+ * const connection = await GetConnection(789);
14
+ */
2
15
  export declare function GetConnection(id: number): Promise<Connection | undefined>;
@@ -1 +1,15 @@
1
+ /**
2
+ * Retrieves connections originating from a specific concept.
3
+ * Fetches connections filtered by type, concept, user, and pagination.
4
+ *
5
+ * @param typeId - Type ID to filter connections by
6
+ * @param ofTheConceptId - Concept ID that is the source of connections
7
+ * @param userId - User ID to filter by
8
+ * @param inpage - Number of results per page (default: 10)
9
+ * @param page - Page number (default: 1)
10
+ * @returns Array of Connection objects
11
+ *
12
+ * @example
13
+ * const connections = await GetConnectionOfTheConcept(5, 123, 456, 20, 1);
14
+ */
1
15
  export declare function GetConnectionOfTheConcept(typeId: number, ofTheConceptId: number, userId: number, inpage?: number, page?: number): Promise<any>;
@@ -1,2 +1,17 @@
1
1
  import { Connection } from "../DataStructures/Connection";
2
+ /**
3
+ * Retrieves connections pointing to a specific concept.
4
+ * Fetches connections filtered by type, target concept, user, and pagination.
5
+ *
6
+ * @param typeId - Type ID to filter connections by
7
+ * @param toTheConceptId - Concept ID that is the target of connections
8
+ * @param userId - User ID to filter by
9
+ * @param inpage - Number of results per page (default: 10)
10
+ * @param page - Page number (default: 1)
11
+ * @returns Array of Connection objects
12
+ * @throws Error if fetch fails
13
+ *
14
+ * @example
15
+ * const connections = await GetConnectionToTheConcept(5, 123, 456, 20, 1);
16
+ */
2
17
  export declare function GetConnectionToTheConcept(typeId: number, toTheConceptId: number, userId: number, inpage?: number, page?: number): Promise<Connection[]>;
@@ -1,3 +1,15 @@
1
1
  import { Connection } from "../../app";
2
2
  import { GetConnectionsByTypes } from "../../DataStructures/ConnectionByType/GetConnectionByType";
3
+ /**
4
+ * Retrieves connections filtered by multiple connection type criteria.
5
+ * Fetches connections matching the specified type filters.
6
+ *
7
+ * @param connectionTypes - GetConnectionsByTypes object containing type filter criteria
8
+ * @returns Array of Connection objects matching the type filters
9
+ *
10
+ * @example
11
+ * const types = new GetConnectionsByTypes();
12
+ * types.typeIds = [1, 2, 3];
13
+ * const connections = await GetConnectionsByApiTypes(types);
14
+ */
3
15
  export declare function GetConnectionsByApiTypes(connectionTypes: GetConnectionsByTypes): Promise<Connection[]>;
@@ -1 +1,10 @@
1
+ /**
2
+ * Fetches reserved connection IDs from the backend.
3
+ * Loads system-reserved connection IDs into ReservedConnectionIds cache.
4
+ *
5
+ * @returns void - Updates ReservedConnectionIds cache with reserved IDs
6
+ *
7
+ * @example
8
+ * await GetReservedConnectionIds(); // Loads reserved connection IDs
9
+ */
1
10
  export declare function GetReservedConnectionIds(): Promise<void>;
@@ -1 +1,10 @@
1
+ /**
2
+ * Fetches reserved concept IDs from the backend.
3
+ * Loads system-reserved concept IDs into ReservedIds cache.
4
+ *
5
+ * @returns void - Updates ReservedIds cache with reserved concept IDs
6
+ *
7
+ * @example
8
+ * await GetReservedIds(); // Loads reserved concept IDs
9
+ */
1
10
  export declare function GetReservedIds(): Promise<void>;
@@ -1 +1,15 @@
1
+ /**
2
+ * Retrieves an image by name from the cached images endpoint.
3
+ * Returns a readable stream for the image data.
4
+ *
5
+ * @param imageName - Name/identifier of the image to retrieve
6
+ * @returns Promise resolving to ReadableStream of image data, or null/undefined on error
7
+ * @throws Image stream on error (legacy behavior)
8
+ *
9
+ * @example
10
+ * const imageStream = await GetImageApi("profile-pic-123.jpg");
11
+ * if (imageStream) {
12
+ * // Process image stream
13
+ * }
14
+ */
1
15
  export declare function GetImageApi(imageName: string): Promise<ReadableStream<Uint8Array> | null | undefined>;
@@ -1,2 +1,13 @@
1
1
  import { Concept } from "../../DataStructures/Concept";
2
+ /**
3
+ * Retrieves a local concept by its character value.
4
+ * Fetches from backend and caches in LocalConceptsData.
5
+ *
6
+ * @param characterValue - Character value string to search for
7
+ * @returns Local Concept object or default local concept if not found
8
+ * @throws Default concept on error (legacy behavior)
9
+ *
10
+ * @example
11
+ * const localConcept = await GetLocalConceptByCharacterValue("the_local_person");
12
+ */
2
13
  export declare function GetLocalConceptByCharacterValue(characterValue: string): Promise<Concept>;