mftsccs-browser 2.1.238-beta → 2.1.239-dev
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 +43918 -2
- package/dist/main.bundle.js.map +1 -0
- package/dist/serviceWorker.bundle.js +44844 -2
- package/dist/serviceWorker.bundle.js.map +1 -0
- package/package.json +4 -1
- package/dist/main.bundle.js.LICENSE.txt +0 -1
- package/dist/serviceWorker.bundle.js.LICENSE.txt +0 -1
- package/dist/types/AccessTracker/accessTracker.d.ts +0 -67
- package/dist/types/Anomaly/anomaly.d.ts +0 -103
- package/dist/types/Api/Create/CreateTheCharacter.d.ts +0 -24
- package/dist/types/Api/Create/CreateTheConceptApi.d.ts +0 -20
- package/dist/types/Api/Create/CreateTheConnectionApi.d.ts +0 -18
- package/dist/types/Api/Create/CreateTheGhostConceptApi.d.ts +0 -28
- package/dist/types/Api/Create/CreateTheGhostConnectionApi.d.ts +0 -18
- package/dist/types/Api/Create/CreateTheTextData.d.ts +0 -18
- package/dist/types/Api/Delete/DeleteConceptInBackend.d.ts +0 -14
- package/dist/types/Api/Delete/DeleteUserInBackend.d.ts +0 -19
- package/dist/types/Api/DeleteConnectionBulkApi.d.ts +0 -20
- package/dist/types/Api/DeleteTheConcept.d.ts +0 -20
- package/dist/types/Api/DeleteTheConnection.d.ts +0 -20
- package/dist/types/Api/GetAiData.d.ts +0 -10
- package/dist/types/Api/GetAllConceptsByType.d.ts +0 -12
- package/dist/types/Api/GetAllConnectionsOfComposition.d.ts +0 -23
- package/dist/types/Api/GetAllConnectionsOfCompositionBulk.d.ts +0 -23
- package/dist/types/Api/GetAllLinkerConnectionsFromTheConcept.d.ts +0 -12
- package/dist/types/Api/GetAllLinkerConnectionsToTheConcept.d.ts +0 -12
- package/dist/types/Api/GetCharacterDataByCharacter.d.ts +0 -12
- package/dist/types/Api/GetCompositionConnectionsBetweenTwoConcepts.d.ts +0 -13
- package/dist/types/Api/GetConcept.d.ts +0 -6
- package/dist/types/Api/GetConceptBulk.d.ts +0 -20
- package/dist/types/Api/GetConceptByCharacterAndType.d.ts +0 -15
- package/dist/types/Api/GetConceptByCharacterValue.d.ts +0 -12
- package/dist/types/Api/GetConnection.d.ts +0 -15
- package/dist/types/Api/GetConnectionBulk.d.ts +0 -7
- package/dist/types/Api/GetConnectionOfTheConcept.d.ts +0 -15
- package/dist/types/Api/GetConnectionToTheConcept.d.ts +0 -17
- package/dist/types/Api/GetConnections/GetConnectionsBetweenApi.d.ts +0 -40
- package/dist/types/Api/GetConnections/GetConnectionsByTypeApi.d.ts +0 -15
- package/dist/types/Api/GetInstanceConceptByCharacterType.d.ts +0 -9
- package/dist/types/Api/GetReservedConnectionIds.d.ts +0 -10
- package/dist/types/Api/GetReservedIds.d.ts +0 -10
- package/dist/types/Api/Images/GetImages.d.ts +0 -15
- package/dist/types/Api/Local/GetLocalConceptByCharacterValue.d.ts +0 -13
- package/dist/types/Api/Login.d.ts +0 -78
- package/dist/types/Api/MakeTheNameInBackend.d.ts +0 -14
- package/dist/types/Api/MakeTheTypeConceptApi.d.ts +0 -9
- package/dist/types/Api/Prototype/Selector.d.ts +0 -26
- package/dist/types/Api/RecursiveSearch.d.ts +0 -67
- package/dist/types/Api/Search/FreeschemaQueryApi.d.ts +0 -18
- package/dist/types/Api/Search/Search.d.ts +0 -73
- package/dist/types/Api/Search/SearchInternalApi.d.ts +0 -28
- package/dist/types/Api/Search/SearchLinkMultipleApi.d.ts +0 -15
- package/dist/types/Api/Search/SearchWithLinker.d.ts +0 -16
- package/dist/types/Api/Search/SearchWithTypeAndLinker.d.ts +0 -14
- package/dist/types/Api/SearchConcept/GetConceptByCharacterAndCategoryApi.d.ts +0 -12
- package/dist/types/Api/SearchConcept/GetConceptByCharacterAndCategoryDirect.d.ts +0 -13
- package/dist/types/Api/SearchConcept/GetTypeConceptByBulk.d.ts +0 -15
- package/dist/types/Api/Session/CreateSession.d.ts +0 -16
- package/dist/types/Api/Session/CreateSessionVisit.d.ts +0 -12
- package/dist/types/Api/Signin.d.ts +0 -24
- package/dist/types/Api/Signup.d.ts +0 -61
- package/dist/types/Api/Translate/TranslateLocalToReal.d.ts +0 -12
- package/dist/types/Api/View/ViewInternalDataApi.d.ts +0 -15
- package/dist/types/Constants/AccessConstants.d.ts +0 -3
- package/dist/types/Constants/ApiConstants.d.ts +0 -23
- package/dist/types/Constants/FormatConstants.d.ts +0 -8
- package/dist/types/Constants/ckeditorCSS.d.ts +0 -1
- package/dist/types/Constants/general.const.d.ts +0 -6
- package/dist/types/Constants/page.const.d.ts +0 -5
- package/dist/types/DataStructures/BaseUrl.d.ts +0 -89
- package/dist/types/DataStructures/BinaryCharacterTree.d.ts +0 -16
- package/dist/types/DataStructures/BinaryTree.d.ts +0 -77
- package/dist/types/DataStructures/BinaryTypeTree.d.ts +0 -17
- package/dist/types/DataStructures/CharacterRepository.d.ts +0 -8
- package/dist/types/DataStructures/Composition/Composition.d.ts +0 -14
- package/dist/types/DataStructures/Composition/CompositionBinaryTree.d.ts +0 -10
- package/dist/types/DataStructures/Composition/CompositionNode.d.ts +0 -21
- package/dist/types/DataStructures/Concept.d.ts +0 -25
- package/dist/types/DataStructures/ConceptData.d.ts +0 -30
- package/dist/types/DataStructures/ConceptsToDraw.d.ts +0 -11
- package/dist/types/DataStructures/Connection.d.ts +0 -23
- package/dist/types/DataStructures/ConnectionBinaryTree/ConnectionBinaryTree.d.ts +0 -81
- package/dist/types/DataStructures/ConnectionBinaryTree/ConnectionNode.d.ts +0 -27
- package/dist/types/DataStructures/ConnectionBinaryTree/ConnectionOfNode.d.ts +0 -10
- package/dist/types/DataStructures/ConnectionBinaryTree/ConnectionOfTheTree.d.ts +0 -24
- package/dist/types/DataStructures/ConnectionBinaryTree/ConnectionTypeNode.d.ts +0 -10
- package/dist/types/DataStructures/ConnectionBinaryTree/ConnectionTypeTree.d.ts +0 -20
- package/dist/types/DataStructures/ConnectionBinaryTree/NodePrimitive.d.ts +0 -15
- package/dist/types/DataStructures/ConnectionByType/GetConnectionByType.d.ts +0 -4
- package/dist/types/DataStructures/ConnectionData.d.ts +0 -26
- package/dist/types/DataStructures/Count/CountInfo.d.ts +0 -6
- package/dist/types/DataStructures/FetchConnection.d.ts +0 -64
- package/dist/types/DataStructures/FilterSearch.d.ts +0 -9
- package/dist/types/DataStructures/IdentifierFlags.d.ts +0 -11
- package/dist/types/DataStructures/Local/LConcept.d.ts +0 -23
- package/dist/types/DataStructures/Local/LConnection.d.ts +0 -18
- package/dist/types/DataStructures/Local/LNode.d.ts +0 -29
- package/dist/types/DataStructures/Local/LocalBinaryCharacterTree.d.ts +0 -13
- package/dist/types/DataStructures/Local/LocalBinaryTree.d.ts +0 -13
- package/dist/types/DataStructures/Local/LocalBinaryTypeTree.d.ts +0 -13
- package/dist/types/DataStructures/Local/LocalConceptData.d.ts +0 -21
- package/dist/types/DataStructures/Local/LocalConnectionData.d.ts +0 -20
- package/dist/types/DataStructures/Local/LocalGhostIdTree.d.ts +0 -11
- package/dist/types/DataStructures/Local/LocalId.d.ts +0 -19
- package/dist/types/DataStructures/Local/LocalSyncData.d.ts +0 -33
- package/dist/types/DataStructures/Node.d.ts +0 -30
- package/dist/types/DataStructures/PatcherStructure.d.ts +0 -8
- package/dist/types/DataStructures/Prototype/Prototype.d.ts +0 -19
- package/dist/types/DataStructures/Prototype/PrototypeOption.d.ts +0 -4
- package/dist/types/DataStructures/Prototype/QuerySelector.d.ts +0 -4
- package/dist/types/DataStructures/ReservedIds.d.ts +0 -10
- package/dist/types/DataStructures/Responses/ErrorResponse.d.ts +0 -74
- package/dist/types/DataStructures/Responses/StandardResponses.d.ts +0 -6
- package/dist/types/DataStructures/Returner.d.ts +0 -7
- package/dist/types/DataStructures/Search/FreeschemaQuery.d.ts +0 -25
- package/dist/types/DataStructures/Search/SearchStructure.d.ts +0 -10
- package/dist/types/DataStructures/SearchQuery.d.ts +0 -17
- package/dist/types/DataStructures/Security/SecureStorage.d.ts +0 -14
- package/dist/types/DataStructures/Security/TokenStorage.d.ts +0 -24
- package/dist/types/DataStructures/Session/SessionData.d.ts +0 -13
- package/dist/types/DataStructures/SettingData.d.ts +0 -5
- package/dist/types/DataStructures/Settings.d.ts +0 -4
- package/dist/types/DataStructures/SigninModel.d.ts +0 -4
- package/dist/types/DataStructures/SignupModel.d.ts +0 -4
- package/dist/types/DataStructures/SyncData.d.ts +0 -14
- package/dist/types/DataStructures/TheCharacter.d.ts +0 -13
- package/dist/types/DataStructures/TheTexts.d.ts +0 -14
- package/dist/types/DataStructures/TypeLibrary.d.ts +0 -19
- package/dist/types/DataStructures/TypeNode.d.ts +0 -18
- package/dist/types/DataStructures/User/UserBinaryTree.d.ts +0 -13
- package/dist/types/DataStructures/User/UserNode.d.ts +0 -18
- package/dist/types/DataStructures/WidgetCache/WidgetCache.d.ts +0 -10
- package/dist/types/DataStructures/WidgetCache/WidgetDetails.d.ts +0 -9
- package/dist/types/DataStructures/WidgetCache/WidgetNode.d.ts +0 -18
- package/dist/types/DataStructures/environments/environments.d.ts +0 -48
- package/dist/types/Database/CacheDatabase.d.ts +0 -57
- package/dist/types/Database/IndexUpdate.d.ts +0 -47
- package/dist/types/Database/NoIndexDb.d.ts +0 -9
- package/dist/types/Database/indexdblocal.d.ts +0 -43
- package/dist/types/Database/indexeddb.d.ts +0 -58
- package/dist/types/Helpers/CheckIfExists.d.ts +0 -9
- package/dist/types/Helpers/RemoveFromArray.d.ts +0 -5
- package/dist/types/Helpers/UniqueInsert.d.ts +0 -1
- package/dist/types/Middleware/ApplicationMonitor.d.ts +0 -14
- package/dist/types/Middleware/logger.service.d.ts +0 -144
- package/dist/types/ServiceWorker/actions/connectionActions.d.ts +0 -2
- package/dist/types/ServiceWorker/actions/createActions.d.ts +0 -2
- package/dist/types/ServiceWorker/actions/deleteActions.d.ts +0 -2
- package/dist/types/ServiceWorker/actions/getActions.d.ts +0 -2
- package/dist/types/ServiceWorker/actions/index.d.ts +0 -15
- package/dist/types/ServiceWorker/actions/searchActions.d.ts +0 -2
- package/dist/types/ServiceWorker/actions/syncActions.d.ts +0 -2
- package/dist/types/ServiceWorker/actions/updateActions.d.ts +0 -2
- package/dist/types/ServiceWorker/index.d.ts +0 -11
- package/dist/types/Services/CacheClear.d.ts +0 -7
- package/dist/types/Services/CheckForConnectionDeletion.d.ts +0 -3
- package/dist/types/Services/Common/DecodeCountInfo.d.ts +0 -3
- package/dist/types/Services/Common/DelayFunction.d.ts +0 -7
- package/dist/types/Services/Common/ErrorPosting.d.ts +0 -10
- package/dist/types/Services/Common/MergeArrays.d.ts +0 -7
- package/dist/types/Services/Common/RegexFunction.d.ts +0 -1
- package/dist/types/Services/Common/RemoveAllChild.d.ts +0 -1
- package/dist/types/Services/Composition/BuildComposition.d.ts +0 -3
- package/dist/types/Services/Composition/CompositionCache.d.ts +0 -4
- package/dist/types/Services/Composition/CreateCompositionCache.d.ts +0 -3
- package/dist/types/Services/ConceptFinding/GetConceptByCharacterAndCategory.d.ts +0 -5
- package/dist/types/Services/Conversion/ConvertConcepts.d.ts +0 -5
- package/dist/types/Services/CreateBinaryTreeFromData.d.ts +0 -5
- package/dist/types/Services/CreateConnection/CreateConnectionEntity.d.ts +0 -2
- package/dist/types/Services/CreateConnectionBetweenTwoConcepts.d.ts +0 -5
- package/dist/types/Services/CreateDefaultConcept.d.ts +0 -3
- package/dist/types/Services/CreateTheComposition.d.ts +0 -1
- package/dist/types/Services/CreateTheConcept.d.ts +0 -122
- package/dist/types/Services/CreateTheConnection.d.ts +0 -63
- package/dist/types/Services/CreateTheConnectionGeneral.d.ts +0 -2
- package/dist/types/Services/DeleteConcept.d.ts +0 -2
- package/dist/types/Services/DeleteConnection.d.ts +0 -2
- package/dist/types/Services/DeleteConnectionByType.d.ts +0 -22
- package/dist/types/Services/FindConeceptsFromConnection.d.ts +0 -6
- package/dist/types/Services/FindConnectionsOfCompositionBulkInMemory.d.ts +0 -1
- package/dist/types/Services/GetComposition.d.ts +0 -205
- package/dist/types/Services/GetCompositionBulk.d.ts +0 -100
- package/dist/types/Services/GetCompositionList.d.ts +0 -7
- package/dist/types/Services/GetConceptByCharacter.d.ts +0 -2
- package/dist/types/Services/GetConnectionBetweenTwoConceptsLinker.d.ts +0 -11
- package/dist/types/Services/GetConnections.d.ts +0 -1
- package/dist/types/Services/GetDataFromIndexDb.d.ts +0 -2
- package/dist/types/Services/GetLink.d.ts +0 -3
- package/dist/types/Services/GetLinkerConnectionFromConcept.d.ts +0 -3
- package/dist/types/Services/GetRelation.d.ts +0 -3
- package/dist/types/Services/GetTheConcept.d.ts +0 -96
- package/dist/types/Services/InitializeSystem.d.ts +0 -2
- package/dist/types/Services/Local/ConvertFromLConceptToConcept.d.ts +0 -41
- package/dist/types/Services/Local/ConvertFromLConnectionToConnection.d.ts +0 -47
- package/dist/types/Services/Local/CreateConnectionBetweenTwoConceptsLocal.d.ts +0 -44
- package/dist/types/Services/Local/CreateDefaultLConcept.d.ts +0 -46
- package/dist/types/Services/Local/CreateLocalBinaryTreeFromData.d.ts +0 -34
- package/dist/types/Services/Local/CreateTheCompositionLocal.d.ts +0 -104
- package/dist/types/Services/Local/CreateTheConceptLocal.d.ts +0 -84
- package/dist/types/Services/Local/CreateTheConnectionLocal.d.ts +0 -140
- package/dist/types/Services/Local/DeleteConceptLocal.d.ts +0 -47
- package/dist/types/Services/Local/GetCompositionListLocal.d.ts +0 -37
- package/dist/types/Services/Local/GetCompositionLocal.d.ts +0 -97
- package/dist/types/Services/Local/GetConceptByCharacterLocal.d.ts +0 -56
- package/dist/types/Services/Local/GetConnectionOfTheConceptLocal.d.ts +0 -19
- package/dist/types/Services/Local/GetRelationLocal.d.ts +0 -21
- package/dist/types/Services/Local/GetTheConceptLocal.d.ts +0 -63
- package/dist/types/Services/Local/MakeTheConceptLocal.d.ts +0 -22
- package/dist/types/Services/Local/MakeTheInstanceConceptLocal.d.ts +0 -164
- package/dist/types/Services/Local/MakeTheTypeLocal.d.ts +0 -36
- package/dist/types/Services/Local/UpdateCompositionLocal.d.ts +0 -42
- package/dist/types/Services/Logs/LogEvent.d.ts +0 -1
- package/dist/types/Services/Mail.d.ts +0 -18
- package/dist/types/Services/MakeTheCharacter.d.ts +0 -2
- package/dist/types/Services/MakeTheCharacterData.d.ts +0 -2
- package/dist/types/Services/MakeTheConcept.d.ts +0 -2
- package/dist/types/Services/MakeTheInstanceConcept.d.ts +0 -15
- package/dist/types/Services/MakeTheTimestamp.d.ts +0 -1
- package/dist/types/Services/MakeTheTypeConcept.d.ts +0 -1
- package/dist/types/Services/Mqtt/publishMessage.d.ts +0 -1
- package/dist/types/Services/Search/DataIdFormat.d.ts +0 -32
- package/dist/types/Services/Search/FormatData.d.ts +0 -36
- package/dist/types/Services/Search/JustIdFormat.d.ts +0 -23
- package/dist/types/Services/Search/NewFormat.d.ts +0 -4
- package/dist/types/Services/Search/SearchLinkInternal.d.ts +0 -3
- package/dist/types/Services/Search/SearchLinkMultiple.d.ts +0 -55
- package/dist/types/Services/Search/SearchWithTypeAndLinker.d.ts +0 -82
- package/dist/types/Services/Search/orderingConnections.d.ts +0 -2
- package/dist/types/Services/Security/GetRequestHeader.d.ts +0 -6
- package/dist/types/Services/SplitStrings.d.ts +0 -1
- package/dist/types/Services/Transaction/LocalTransaction.d.ts +0 -117
- package/dist/types/Services/UpdateComposition.d.ts +0 -2
- package/dist/types/Services/Upload.d.ts +0 -34
- package/dist/types/Services/User/UserFromLocalStorage.d.ts +0 -10
- package/dist/types/Services/User/UserTranslation.d.ts +0 -3
- package/dist/types/Services/View/ViewInternalData.d.ts +0 -1
- package/dist/types/Services/assets/GetImageService.d.ts +0 -14
- package/dist/types/Services/automated/automated-concept-connection.d.ts +0 -7
- package/dist/types/Services/cacheService.d.ts +0 -1
- package/dist/types/Validator/constant.d.ts +0 -3
- package/dist/types/Validator/interface.d.ts +0 -19
- package/dist/types/Validator/utils.d.ts +0 -7
- package/dist/types/Validator/validator.d.ts +0 -37
- package/dist/types/Visualize/ConceptCircle.d.ts +0 -35
- package/dist/types/Visualize/ConceptCircleList.d.ts +0 -9
- package/dist/types/Visualize/ConnectionLine.d.ts +0 -21
- package/dist/types/Visualize/ConnectionLineList.d.ts +0 -6
- package/dist/types/Visualize/drawExistingConcepts.d.ts +0 -8
- package/dist/types/Visualize/helper.d.ts +0 -15
- package/dist/types/Widgets/BaseObserver.d.ts +0 -25
- package/dist/types/Widgets/BaseWidget.d.ts +0 -37
- package/dist/types/Widgets/BuilderSpeceficFunctions.d.ts +0 -11
- package/dist/types/Widgets/BuilderStatefulWidget.d.ts +0 -392
- package/dist/types/Widgets/CacheWidget.service.d.ts +0 -77
- package/dist/types/Widgets/NormalizeStyles.service.d.ts +0 -10
- package/dist/types/Widgets/RenderPage.service.d.ts +0 -17
- package/dist/types/Widgets/RenderWidgetLibrary.service.d.ts +0 -22
- package/dist/types/Widgets/RenderWidgetService.d.ts +0 -187
- package/dist/types/Widgets/StatefulWidget.d.ts +0 -167
- package/dist/types/Widgets/WidgetBuild.d.ts +0 -45
- package/dist/types/Widgets/WidgetCacheManager.d.ts +0 -108
- package/dist/types/Widgets/WidgetTree.d.ts +0 -61
- package/dist/types/WrapperFunctions/DepenedencyObserver.d.ts +0 -95
- package/dist/types/WrapperFunctions/GetCompositionListObservable.d.ts +0 -51
- package/dist/types/WrapperFunctions/GetCompositionObservable.d.ts +0 -35
- package/dist/types/WrapperFunctions/GetLinkListObservable.d.ts +0 -57
- package/dist/types/WrapperFunctions/GetLinkObservable.d.ts +0 -50
- package/dist/types/WrapperFunctions/QueryCacheManager.d.ts +0 -107
- package/dist/types/WrapperFunctions/RecursiveSearchObservable.d.ts +0 -55
- package/dist/types/WrapperFunctions/SchemaQueryObservable.d.ts +0 -60
- package/dist/types/WrapperFunctions/SearchLinkMultipleAllObservable.d.ts +0 -36
- package/dist/types/app.d.ts +0 -377
- package/dist/types/prototype/prototype.service.d.ts +0 -25
- package/dist/types/service-worker.d.ts +0 -1
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Loads local concepts from IndexedDB into memory-based binary tree for fast lookup.
|
|
3
|
-
*
|
|
4
|
-
* Retrieves all stored local concepts from IndexedDB and adds them to LocalConceptsData
|
|
5
|
-
* in-memory structure. Sets flags indicating local data is ready for use.
|
|
6
|
-
*
|
|
7
|
-
* @throws Error if IndexedDB read fails (retries after 2s delay)
|
|
8
|
-
*/
|
|
9
|
-
export default function CreateLocalBinaryTreeFromIndexDb(): Promise<void>;
|
|
10
|
-
/**
|
|
11
|
-
* We have designed our system to use local concepts and connections with its own local ids(negative ids) that
|
|
12
|
-
* is only valid for the browser that creates this. We have a translator in our node server.
|
|
13
|
-
* We cannot keep on using the indexdb to get the new data so we populate the data from indexdb to our memory
|
|
14
|
-
* then we use these ids from memory and update the indexdb with the latest id frequently.
|
|
15
|
-
* This function does this process in initlization from indexdb to memory.
|
|
16
|
-
*
|
|
17
|
-
* Here we have locked this function so that other processes cannot access this process in the case that this process is ongoing
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*/
|
|
21
|
-
export declare function PopulateTheLocalConceptsToMemory(): Promise<void>;
|
|
22
|
-
/**
|
|
23
|
-
* We have designed our system to use local concepts and connections with its own local ids(negative ids) that
|
|
24
|
-
* is only valid for the browser that creates this. We have a translator in our node server.
|
|
25
|
-
* We cannot keep on using the indexdb to get the new data so we populate the data from indexdb to our memory
|
|
26
|
-
* then we use these ids from memory and update the indexdb with the latest id frequently.
|
|
27
|
-
* This function does this process in initlization from indexdb to memory.
|
|
28
|
-
*
|
|
29
|
-
* This function locked so that no two parallel process can access this functionality at the same time.
|
|
30
|
-
* That might cause some ids to be repeated.
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*/
|
|
34
|
-
export declare function PopulateTheLocalConnectionToMemory(): Promise<void>;
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
import { InnerActions } from "../../app";
|
|
2
|
-
/**
|
|
3
|
-
* Converts a JSON object into a local composition structure with concepts and connections.
|
|
4
|
-
*
|
|
5
|
-
* This powerful function recursively transforms any JSON object into the concept-connection
|
|
6
|
-
* system, creating local concepts for each key-value pair and establishing connections
|
|
7
|
-
* between them to preserve the hierarchical structure.
|
|
8
|
-
*
|
|
9
|
-
* **JSON to Composition Conversion:**
|
|
10
|
-
* - JSON keys become type concepts (e.g., "name", "email")
|
|
11
|
-
* - JSON string/number values become instance concepts
|
|
12
|
-
* - Nested objects/arrays create sub-compositions
|
|
13
|
-
* - Connections preserve parent-child relationships
|
|
14
|
-
* - All data stored locally (IndexedDB) for offline use
|
|
15
|
-
*
|
|
16
|
-
* **Recursive Process:**
|
|
17
|
-
* 1. Iterates through each key in JSON object
|
|
18
|
-
* 2. For nested objects/arrays: Creates composition concept + recurse
|
|
19
|
-
* 3. For primitive values: Creates instance concept
|
|
20
|
-
* 4. Creates connections from parent to child concepts
|
|
21
|
-
* 5. Returns the main/root concept
|
|
22
|
-
*
|
|
23
|
-
* **Example Transformation:**
|
|
24
|
-
* ```javascript
|
|
25
|
-
* Input JSON:
|
|
26
|
-
* {
|
|
27
|
-
* name: "Alice",
|
|
28
|
-
* email: "alice@example.com",
|
|
29
|
-
* address: {
|
|
30
|
-
* city: "NYC",
|
|
31
|
-
* zip: "10001"
|
|
32
|
-
* }
|
|
33
|
-
* }
|
|
34
|
-
*
|
|
35
|
-
* Creates:
|
|
36
|
-
* - Concept: "name" (type) → "Alice" (instance)
|
|
37
|
-
* - Concept: "email" (type) → "alice@example.com" (instance)
|
|
38
|
-
* - Concept: "address" (composition concept)
|
|
39
|
-
* - Concept: "city" → "NYC"
|
|
40
|
-
* - Concept: "zip" → "10001"
|
|
41
|
-
* - Connections linking all concepts in hierarchy
|
|
42
|
-
* ```
|
|
43
|
-
*
|
|
44
|
-
* @param json - The JSON object/array to convert to composition structure.
|
|
45
|
-
* Can be any depth of nesting.
|
|
46
|
-
* @param ofTheConceptId - Parent concept ID if this is a sub-composition.
|
|
47
|
-
* Null for root composition. Used for connecting to parent.
|
|
48
|
-
* @param ofTheConceptUserId - User ID of the parent concept.
|
|
49
|
-
* Used for ownership tracking in nested structures.
|
|
50
|
-
* @param mainKey - The main composition ID (root concept ID).
|
|
51
|
-
* Used as typeId for internal connections. Null for root.
|
|
52
|
-
* @param userId - User ID of the creator. Defaults to 999 (system).
|
|
53
|
-
* @param accessId - Access control level. Defaults to 999 (system).
|
|
54
|
-
* @param sessionInformationId - Session ID. Defaults to 999 (system).
|
|
55
|
-
* @param automaticSync - Reserved for future automatic sync feature.
|
|
56
|
-
* Currently not fully implemented.
|
|
57
|
-
* @param actions - Action tracking object that accumulates all created concepts
|
|
58
|
-
* and connections for batch operations. Defaults to empty arrays.
|
|
59
|
-
*
|
|
60
|
-
* @returns Promise resolving to the main/root Concept of the composition
|
|
61
|
-
*
|
|
62
|
-
* @example
|
|
63
|
-
* // Simple flat object
|
|
64
|
-
* const json = { name: "Alice", age: 30 };
|
|
65
|
-
* const mainConcept = await CreateTheCompositionLocal(
|
|
66
|
-
* json,
|
|
67
|
-
* null, // No parent
|
|
68
|
-
* null,
|
|
69
|
-
* null,
|
|
70
|
-
* 101, // userId
|
|
71
|
-
* 2, // accessId
|
|
72
|
-
* 999
|
|
73
|
-
* );
|
|
74
|
-
* console.log(mainConcept.id); // Root concept ID
|
|
75
|
-
*
|
|
76
|
-
* @example
|
|
77
|
-
* // Nested object with action tracking
|
|
78
|
-
* const actions = { concepts: [], connections: [] };
|
|
79
|
-
* const userData = {
|
|
80
|
-
* profile: {
|
|
81
|
-
* firstName: "Alice",
|
|
82
|
-
* lastName: "Smith"
|
|
83
|
-
* },
|
|
84
|
-
* settings: {
|
|
85
|
-
* theme: "dark"
|
|
86
|
-
* }
|
|
87
|
-
* };
|
|
88
|
-
* const root = await CreateTheCompositionLocal(
|
|
89
|
-
* userData,
|
|
90
|
-
* null, null, null,
|
|
91
|
-
* 101, 2, 999,
|
|
92
|
-
* false,
|
|
93
|
-
* actions
|
|
94
|
-
* );
|
|
95
|
-
* console.log(actions.concepts.length); // Total concepts created
|
|
96
|
-
* console.log(actions.connections.length); // Total connections created
|
|
97
|
-
*
|
|
98
|
-
* @throws Logs errors but does not throw. Returns created concepts even on partial failure.
|
|
99
|
-
*
|
|
100
|
-
* @see {@link MakeTheInstanceConceptLocal} for individual concept creation
|
|
101
|
-
* @see {@link CreateTheConnectionLocal} for connection creation
|
|
102
|
-
* @see {@link GetCompositionLocal} for retrieving created compositions
|
|
103
|
-
*/
|
|
104
|
-
export declare function CreateTheCompositionLocal(json: any, ofTheConceptId?: number | null, ofTheConceptUserId?: number | null, mainKey?: number | null, userId?: number | null, accessId?: number | null, sessionInformationId?: number | null, automaticSync?: boolean, actions?: InnerActions): Promise<any>;
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import { InnerActions } from "../../app";
|
|
2
|
-
/**
|
|
3
|
-
* Creates a concept in local storage (IndexedDB) without syncing to the backend.
|
|
4
|
-
*
|
|
5
|
-
* This is the primary function for creating offline-first concepts. The concept is stored
|
|
6
|
-
* locally in IndexedDB and memory, but NOT immediately sent to the backend. Sync happens
|
|
7
|
-
* later via the LocalSyncData class.
|
|
8
|
-
*
|
|
9
|
-
* **Virtual ID System:**
|
|
10
|
-
* - Generates a negative ID (e.g., -12345) to indicate local/virtual status
|
|
11
|
-
* - id and ghostId are initially equal and both negative
|
|
12
|
-
* - After backend sync: id becomes positive (real backend ID)
|
|
13
|
-
* - ghostId remains negative (preserves original local ID)
|
|
14
|
-
* - Mapping is stored in LocalGhostIdTree for future lookups
|
|
15
|
-
*
|
|
16
|
-
* **Sync Process:**
|
|
17
|
-
* 1. Create locally with negative ID
|
|
18
|
-
* 2. Use LocalSyncData to sync to backend
|
|
19
|
-
* 3. Backend returns positive ID
|
|
20
|
-
* 4. Update local concept with positive ID
|
|
21
|
-
* 5. Preserve negative ID as ghostId
|
|
22
|
-
* 6. Store mapping in LocalGhostIdTree
|
|
23
|
-
*
|
|
24
|
-
* **Special Case:**
|
|
25
|
-
* If referent is "the", returns a special concept with id=1 (system concept).
|
|
26
|
-
*
|
|
27
|
-
* @param referent - The character value (text/name) of the concept.
|
|
28
|
-
* This is the human-readable content (e.g., "Draft Note", "Local Task")
|
|
29
|
-
* @param typecharacter - The type name as a string (e.g., "the_note", "the_person").
|
|
30
|
-
* Used for display and classification.
|
|
31
|
-
* @param userId - The ID of the user creating this concept. Used for ownership.
|
|
32
|
-
* @param categoryId - The category classification ID for further classification within type.
|
|
33
|
-
* @param typeId - The type classification ID. Must correspond to typecharacter.
|
|
34
|
-
* @param accessId - Access control level (e.g., 1=Public, 2=Private).
|
|
35
|
-
* Usually matches the user's access level.
|
|
36
|
-
* @param isComposition - Set to true if this concept represents a composition root.
|
|
37
|
-
* Defaults to false.
|
|
38
|
-
* @param referentId - Optional reference to another concept ID. Used for instance relationships.
|
|
39
|
-
* Defaults to 0 (no reference).
|
|
40
|
-
* @param actions - Action tracking object that accumulates created concepts and connections.
|
|
41
|
-
* Used for batch operations and rollback. Defaults to empty arrays.
|
|
42
|
-
*
|
|
43
|
-
* @returns Promise resolving to the created Concept object with negative ID
|
|
44
|
-
*
|
|
45
|
-
* @example
|
|
46
|
-
* // Create a local draft note
|
|
47
|
-
* const draftNote = await CreateTheConceptLocal(
|
|
48
|
-
* "Meeting Notes - Draft", // referent
|
|
49
|
-
* "the_note", // typecharacter
|
|
50
|
-
* 101, // userId
|
|
51
|
-
* 1, // categoryId
|
|
52
|
-
* 3, // typeId
|
|
53
|
-
* 2 // accessId (Private)
|
|
54
|
-
* );
|
|
55
|
-
* console.log(draftNote.id); // -12345 (negative = local)
|
|
56
|
-
* console.log(draftNote.ghostId); // -12345 (same initially)
|
|
57
|
-
*
|
|
58
|
-
* @example
|
|
59
|
-
* // Create with composition flag
|
|
60
|
-
* const project = await CreateTheConceptLocal(
|
|
61
|
-
* "Local Project",
|
|
62
|
-
* "the_project",
|
|
63
|
-
* 101,
|
|
64
|
-
* 1,
|
|
65
|
-
* 5,
|
|
66
|
-
* 2,
|
|
67
|
-
* true // isComposition = true
|
|
68
|
-
* );
|
|
69
|
-
*
|
|
70
|
-
* @example
|
|
71
|
-
* // Track actions for batch operations
|
|
72
|
-
* const actions = { concepts: [], connections: [] };
|
|
73
|
-
* const concept1 = await CreateTheConceptLocal("Item 1", "the_item", 101, 1, 4, 2, false, 0, actions);
|
|
74
|
-
* const concept2 = await CreateTheConceptLocal("Item 2", "the_item", 101, 1, 4, 2, false, 0, actions);
|
|
75
|
-
* console.log(actions.concepts.length); // 2
|
|
76
|
-
* // All created concepts tracked in actions array
|
|
77
|
-
*
|
|
78
|
-
* @throws Logs errors and re-throws for handling by caller
|
|
79
|
-
*
|
|
80
|
-
* @see {@link GetTheConceptLocal} for retrieving local concepts
|
|
81
|
-
* @see {@link LocalSyncData} for syncing local concepts to backend
|
|
82
|
-
* @see {@link CreateTheConcept} for creating server-synced concepts directly
|
|
83
|
-
*/
|
|
84
|
-
export default function CreateTheConceptLocal(referent: string, typecharacter: string, userId: number, categoryId: number, typeId: number, accessId: number, isComposition?: boolean, referentId?: number | null, actions?: InnerActions): Promise<any>;
|
|
@@ -1,140 +0,0 @@
|
|
|
1
|
-
import { Concept, InnerActions } from "../../app";
|
|
2
|
-
/**
|
|
3
|
-
* Creates a connection in local storage (IndexedDB) without syncing to the backend.
|
|
4
|
-
*
|
|
5
|
-
* This is the primary function for creating offline-first connections. The connection is stored
|
|
6
|
-
* locally in IndexedDB and memory, but NOT immediately sent to the backend. Sync happens
|
|
7
|
-
* later via LocalSyncData.SyncDataOnline().
|
|
8
|
-
*
|
|
9
|
-
* **Virtual ID System:**
|
|
10
|
-
* - Generates a negative ID (e.g., -67890) to indicate local/virtual status
|
|
11
|
-
* - id and ghostId are initially equal and both negative
|
|
12
|
-
* - After backend sync: id becomes positive (real backend ID)
|
|
13
|
-
* - ghostId remains negative (preserves original local ID)
|
|
14
|
-
* - Mapping is stored in backend and LocalGhostIdTree
|
|
15
|
-
*
|
|
16
|
-
* **Connection Types:**
|
|
17
|
-
* - **Internal Connections**: orderId < 3 (within a composition)
|
|
18
|
-
* - typeId is typically the composition ID
|
|
19
|
-
* - **External Connections**: orderId >= 999 (between different entities)
|
|
20
|
-
* - typeId is a type concept ID
|
|
21
|
-
* - typeString provides human-readable type name
|
|
22
|
-
*
|
|
23
|
-
* **Self-Connection Prevention:**
|
|
24
|
-
* If ofTheConceptId equals toTheConceptId, returns an empty connection (prevents loops).
|
|
25
|
-
*
|
|
26
|
-
* @param ofTheConceptId - Source concept ID (FROM). The connection originates here.
|
|
27
|
-
* Can be negative (local) or positive (server) ID.
|
|
28
|
-
* @param toTheConceptId - Target concept ID (TO). The connection points here.
|
|
29
|
-
* Can be negative (local) or positive (server) ID.
|
|
30
|
-
* @param typeId - The type classification for this connection.
|
|
31
|
-
* - For internal connections: composition ID
|
|
32
|
-
* - For external connections: type concept ID
|
|
33
|
-
* @param orderId - Order identifier for sorting multiple connections.
|
|
34
|
-
* - < 3: Internal connection
|
|
35
|
-
* - >= 999: External connection
|
|
36
|
-
* - Defaults to 1
|
|
37
|
-
* @param typeString - Human-readable type name (e.g., "the_person_email").
|
|
38
|
-
* Used primarily for external connections. Defaults to empty string.
|
|
39
|
-
* @param userId - The ID of the user creating this connection. Defaults to 999 (system).
|
|
40
|
-
* @param actions - Action tracking object that accumulates created concepts and connections.
|
|
41
|
-
* Used for batch operations and rollback. Defaults to empty arrays.
|
|
42
|
-
*
|
|
43
|
-
* @returns Promise resolving to the created Connection object with negative ID.
|
|
44
|
-
* Returns empty connection (all IDs = 0) if self-connection attempted.
|
|
45
|
-
*
|
|
46
|
-
* @example
|
|
47
|
-
* // Create internal connection (within composition)
|
|
48
|
-
* const internalConn = await CreateTheConnectionLocal(
|
|
49
|
-
* projectId, // -12345
|
|
50
|
-
* taskId, // -67890
|
|
51
|
-
* compositionId,// -11111
|
|
52
|
-
* 1, // orderId < 3 = internal
|
|
53
|
-
* "", // no typeString needed
|
|
54
|
-
* 101 // userId
|
|
55
|
-
* );
|
|
56
|
-
* console.log(internalConn.id); // -99999 (negative = local)
|
|
57
|
-
*
|
|
58
|
-
* @example
|
|
59
|
-
* // Create external connection (between entities)
|
|
60
|
-
* const externalConn = await CreateTheConnectionLocal(
|
|
61
|
-
* personId, // 123
|
|
62
|
-
* emailId, // 456
|
|
63
|
-
* emailTypeId, // 789
|
|
64
|
-
* 1000, // orderId >= 999 = external
|
|
65
|
-
* "the_person_email", // typeString for external
|
|
66
|
-
* 101
|
|
67
|
-
* );
|
|
68
|
-
*
|
|
69
|
-
* @example
|
|
70
|
-
* // Track actions for batch operations
|
|
71
|
-
* const actions = { concepts: [], connections: [] };
|
|
72
|
-
* await CreateTheConnectionLocal(id1, id2, typeId, 1, "", 101, actions);
|
|
73
|
-
* await CreateTheConnectionLocal(id2, id3, typeId, 1, "", 101, actions);
|
|
74
|
-
* console.log(actions.connections.length); // 2
|
|
75
|
-
* // All created connections tracked for potential rollback
|
|
76
|
-
*
|
|
77
|
-
* @example
|
|
78
|
-
* // Self-connection prevention
|
|
79
|
-
* const selfConn = await CreateTheConnectionLocal(123, 123, 5, 1);
|
|
80
|
-
* console.log(selfConn.id); // 0 (empty connection, prevented)
|
|
81
|
-
*
|
|
82
|
-
* @throws Logs errors and re-throws for handling by caller
|
|
83
|
-
*
|
|
84
|
-
* @see {@link CreateConnection} for simplified connection creation with concepts
|
|
85
|
-
* @see {@link LocalSyncData} for syncing local connections to backend
|
|
86
|
-
* @see {@link createTheConnection} for creating server-synced connections directly
|
|
87
|
-
*/
|
|
88
|
-
export declare function CreateTheConnectionLocal(ofTheConceptId: number, toTheConceptId: number, typeId: number, orderId?: number, typeString?: string, userId?: number, actions?: InnerActions): Promise<any>;
|
|
89
|
-
/**
|
|
90
|
-
* Simplified connection creator that accepts concepts and a type string.
|
|
91
|
-
*
|
|
92
|
-
* This is a convenience wrapper around CreateTheConnectionLocal that:
|
|
93
|
-
* 1. Accepts Concept objects instead of IDs
|
|
94
|
-
* 2. Creates the connection type concept if it doesn't exist
|
|
95
|
-
* 3. Extracts necessary IDs automatically
|
|
96
|
-
* 4. Sets appropriate defaults for local connections
|
|
97
|
-
*
|
|
98
|
-
* **Advantages:**
|
|
99
|
-
* - More intuitive API (pass concepts, not IDs)
|
|
100
|
-
* - Automatic type concept creation/retrieval
|
|
101
|
-
* - Less boilerplate code
|
|
102
|
-
* - Type-safe with TypeScript
|
|
103
|
-
*
|
|
104
|
-
* **Process:**
|
|
105
|
-
* 1. Creates/retrieves type concept from connectionTypeString
|
|
106
|
-
* 2. Extracts userId from source concept
|
|
107
|
-
* 3. Calls CreateTheConnectionLocal with extracted IDs
|
|
108
|
-
* 4. Returns the created connection
|
|
109
|
-
*
|
|
110
|
-
* @param ofTheConcept - The source Concept object (FROM)
|
|
111
|
-
* @param toTheConcept - The target Concept object (TO)
|
|
112
|
-
* @param connectionTypeString - Type name as string (e.g., "the_person_email").
|
|
113
|
-
* A type concept will be created if it doesn't exist.
|
|
114
|
-
* @param actions - Action tracking object for batch operations. Defaults to empty arrays.
|
|
115
|
-
*
|
|
116
|
-
* @returns Promise resolving to the created Connection object
|
|
117
|
-
*
|
|
118
|
-
* @example
|
|
119
|
-
* // Simple usage with concepts
|
|
120
|
-
* const person = await CreateTheConceptLocal('Alice', 'the_person', 101, 1, 1, 2);
|
|
121
|
-
* const email = await CreateTheConceptLocal('alice@example.com', 'the_email', 101, 1, 2, 2);
|
|
122
|
-
*
|
|
123
|
-
* const connection = await CreateConnection(person, email, 'the_person_email');
|
|
124
|
-
* // Connection created with:
|
|
125
|
-
* // - ofTheConceptId: person.id
|
|
126
|
-
* // - toTheConceptId: email.id
|
|
127
|
-
* // - typeId: auto-generated from 'the_person_email'
|
|
128
|
-
* // - orderId: 1000 (external connection)
|
|
129
|
-
*
|
|
130
|
-
* @example
|
|
131
|
-
* // With action tracking
|
|
132
|
-
* const actions = { concepts: [], connections: [] };
|
|
133
|
-
* const conn1 = await CreateConnection(concept1, concept2, 'links_to', actions);
|
|
134
|
-
* const conn2 = await CreateConnection(concept2, concept3, 'links_to', actions);
|
|
135
|
-
* console.log(actions.connections.length); // 2
|
|
136
|
-
*
|
|
137
|
-
* @see {@link CreateTheConnectionLocal} for the underlying implementation
|
|
138
|
-
* @see {@link MakeTheTypeConceptLocal} for type concept creation
|
|
139
|
-
*/
|
|
140
|
-
export declare function CreateConnection(ofTheConcept: Concept, toTheConcept: Concept, connectionTypeString: string, actions?: InnerActions): Promise<any>;
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Deletes a concept from local storage (IndexedDB).
|
|
3
|
-
*
|
|
4
|
-
* This function removes a concept from LocalConceptsData, effectively deleting it
|
|
5
|
-
* from the local IndexedDB cache. This is a local-only delete - it does NOT sync
|
|
6
|
-
* the deletion to the backend.
|
|
7
|
-
*
|
|
8
|
-
* **Important Notes:**
|
|
9
|
-
* - Only deletes from local storage (IndexedDB)
|
|
10
|
-
* - Does NOT delete from backend server
|
|
11
|
-
* - Does NOT automatically delete related connections
|
|
12
|
-
* - For full deletion including backend, use DeleteConceptById
|
|
13
|
-
* - Works with both negative (local) and positive (synced) IDs
|
|
14
|
-
*
|
|
15
|
-
* **Use Cases:**
|
|
16
|
-
* - Cleaning up local draft concepts
|
|
17
|
-
* - Removing concepts before they're synced
|
|
18
|
-
* - Local cache management
|
|
19
|
-
* - Testing and development
|
|
20
|
-
*
|
|
21
|
-
* **Process:**
|
|
22
|
-
* 1. Fetches the concept via GetTheConceptLocal
|
|
23
|
-
* 2. Removes it from LocalConceptsData
|
|
24
|
-
* 3. Updates IndexedDB
|
|
25
|
-
*
|
|
26
|
-
* @param id - The concept ID to delete (negative for local, positive for synced)
|
|
27
|
-
*
|
|
28
|
-
* @returns Promise that resolves when deletion is complete
|
|
29
|
-
*
|
|
30
|
-
* @example
|
|
31
|
-
* // Delete a local concept
|
|
32
|
-
* await DeleteConceptLocal(-12345);
|
|
33
|
-
* console.log("Local concept deleted");
|
|
34
|
-
*
|
|
35
|
-
* @example
|
|
36
|
-
* // Delete after checking existence
|
|
37
|
-
* const concept = await GetTheConceptLocal(-67890);
|
|
38
|
-
* if (concept.id !== 0) {
|
|
39
|
-
* await DeleteConceptLocal(concept.id);
|
|
40
|
-
* console.log("Deleted:", concept.characterValue);
|
|
41
|
-
* }
|
|
42
|
-
*
|
|
43
|
-
* @see {@link DeleteConceptById} for full deletion including backend
|
|
44
|
-
* @see {@link GetTheConceptLocal} for retrieving concepts before deletion
|
|
45
|
-
* @see {@link LocalConceptsData.RemoveConcept} for the underlying removal operation
|
|
46
|
-
*/
|
|
47
|
-
export declare function DeleteConceptLocal(id: number): Promise<any>;
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Retrieves all compositions of a specific type from local storage.
|
|
3
|
-
*
|
|
4
|
-
* **Process Flow**:
|
|
5
|
-
* 1. Finds the type concept by compositionName (e.g., "the_project")
|
|
6
|
-
* 2. Queries all concepts with that typeId belonging to the user
|
|
7
|
-
* 3. Fetches full composition for each concept
|
|
8
|
-
* 4. Returns array of complete compositions
|
|
9
|
-
*
|
|
10
|
-
* @param compositionName - The type name of compositions to retrieve (e.g., "the_project", "the_person")
|
|
11
|
-
* @param userId - User ID to filter compositions by ownership
|
|
12
|
-
* @returns Array of composition objects (empty array if type not found)
|
|
13
|
-
* @throws Error if lookup or composition fetching fails
|
|
14
|
-
*
|
|
15
|
-
* @example
|
|
16
|
-
* // Get all local projects for a user
|
|
17
|
-
* const projects = await GetCompositionListLocal("the_project", 101);
|
|
18
|
-
* // Returns: [{id: -1, data: {...}}, {id: -2, data: {...}}]
|
|
19
|
-
*/
|
|
20
|
-
export declare function GetCompositionListLocal(compositionName: string, userId: number): Promise<any>;
|
|
21
|
-
/**
|
|
22
|
-
* Retrieves all compositions of a specific type with DATAID format (includes concept ID).
|
|
23
|
-
*
|
|
24
|
-
* Same as GetCompositionListLocal but returns compositions in data-id wrapper format,
|
|
25
|
-
* which includes both the composition data and its concept ID for easier reference.
|
|
26
|
-
*
|
|
27
|
-
* @param compositionName - The type name of compositions to retrieve
|
|
28
|
-
* @param userId - User ID to filter compositions by ownership
|
|
29
|
-
* @returns Array of composition objects in {id, data} format
|
|
30
|
-
* @throws Error if lookup or composition fetching fails
|
|
31
|
-
*
|
|
32
|
-
* @example
|
|
33
|
-
* // Get all local projects with IDs
|
|
34
|
-
* const projects = await GetCompositionListLocalWithId("the_project", 101);
|
|
35
|
-
* // Returns: [{id: -1, data: {the_name: "Project A"}}, {id: -2, data: {...}}]
|
|
36
|
-
*/
|
|
37
|
-
export declare function GetCompositionListLocalWithId(compositionName: string, userId: number): Promise<any>;
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Retrieves a complete composition structure from local storage (IndexedDB).
|
|
3
|
-
*
|
|
4
|
-
* This function fetches a composition using local-only data, building a hierarchical
|
|
5
|
-
* structure from local connections and concepts. If the concept has been synced to the
|
|
6
|
-
* backend, it can automatically fall back to fetching from the server.
|
|
7
|
-
*
|
|
8
|
-
* **Process:**
|
|
9
|
-
* 1. Fetches all local connections for the composition
|
|
10
|
-
* 2. Identifies all connected concept IDs
|
|
11
|
-
* 3. Retrieves the main concept from LocalConceptsData
|
|
12
|
-
* 4. If concept not found locally, checks if it's been synced (TranslateLocalToReal)
|
|
13
|
-
* 5. Falls back to server GetComposition if concept is synced
|
|
14
|
-
* 6. Recursively builds composition tree from local data
|
|
15
|
-
* 7. Organizes output by concept type
|
|
16
|
-
*
|
|
17
|
-
* **Local vs Server:**
|
|
18
|
-
* - Prioritizes local data (IndexedDB)
|
|
19
|
-
* - Automatic fallback to server if concept synced
|
|
20
|
-
* - Uses LocalConnectionData for connections
|
|
21
|
-
* - Uses LocalConceptsData for concepts
|
|
22
|
-
*
|
|
23
|
-
* **Output Format (JUSTDATA):**
|
|
24
|
-
* Returns an object keyed by the main concept's type:
|
|
25
|
-
* ```
|
|
26
|
-
* {
|
|
27
|
-
* "Person": {
|
|
28
|
-
* name: "Alice",
|
|
29
|
-
* email: {...},
|
|
30
|
-
* projects: {...}
|
|
31
|
-
* }
|
|
32
|
-
* }
|
|
33
|
-
* ```
|
|
34
|
-
*
|
|
35
|
-
* @param id - The concept ID (can be negative for local or positive for synced)
|
|
36
|
-
*
|
|
37
|
-
* @returns Promise resolving to composition data organized by concept type
|
|
38
|
-
*
|
|
39
|
-
* @example
|
|
40
|
-
* // Get local composition
|
|
41
|
-
* const localComp = await GetCompositionLocal(-12345);
|
|
42
|
-
* console.log(localComp["Project"]);
|
|
43
|
-
* // Returns all data connected to this local project
|
|
44
|
-
*
|
|
45
|
-
* @example
|
|
46
|
-
* // Get synced concept (automatically falls back to server)
|
|
47
|
-
* const syncedComp = await GetCompositionLocal(-67890);
|
|
48
|
-
* // If concept synced to server, fetches from there
|
|
49
|
-
*
|
|
50
|
-
* @throws Re-throws errors for handling by caller
|
|
51
|
-
*
|
|
52
|
-
* @see {@link GetCompositionLocalWithId} for composition with ID and data wrapper
|
|
53
|
-
* @see {@link GetComposition} for server-only composition retrieval
|
|
54
|
-
* @see {@link recursiveFetchLocal} for the recursive building logic
|
|
55
|
-
*/
|
|
56
|
-
export declare function GetCompositionLocal(id: number): Promise<any>;
|
|
57
|
-
/**
|
|
58
|
-
* Retrieves a local composition with ID and data wrapper (DATAID format).
|
|
59
|
-
*
|
|
60
|
-
* This is a variant of GetCompositionLocal that returns the composition data
|
|
61
|
-
* wrapped in an object that includes both the data and the concept ID. This format
|
|
62
|
-
* is useful for tracking which concept the data belongs to.
|
|
63
|
-
*
|
|
64
|
-
* **Output Format (DATAID):**
|
|
65
|
-
* ```
|
|
66
|
-
* {
|
|
67
|
-
* data: {
|
|
68
|
-
* "Person": {
|
|
69
|
-
* name: "Alice",
|
|
70
|
-
* email: {...}
|
|
71
|
-
* }
|
|
72
|
-
* },
|
|
73
|
-
* id: 12345
|
|
74
|
-
* }
|
|
75
|
-
* ```
|
|
76
|
-
*
|
|
77
|
-
* **Differences from GetCompositionLocal:**
|
|
78
|
-
* - Returns { data, id } wrapper object
|
|
79
|
-
* - Same local data retrieval process
|
|
80
|
-
* - Same recursive building logic
|
|
81
|
-
* - No automatic server fallback
|
|
82
|
-
*
|
|
83
|
-
* @param id - The concept ID (negative for local, positive for synced)
|
|
84
|
-
*
|
|
85
|
-
* @returns Promise resolving to object with { data, id } structure
|
|
86
|
-
*
|
|
87
|
-
* @example
|
|
88
|
-
* const result = await GetCompositionLocalWithId(-12345);
|
|
89
|
-
* console.log(result.id); // -12345
|
|
90
|
-
* console.log(result.data.Project); // Composition data
|
|
91
|
-
*
|
|
92
|
-
* @throws Re-throws errors for handling by caller
|
|
93
|
-
*
|
|
94
|
-
* @see {@link GetCompositionLocal} for standard format without ID wrapper
|
|
95
|
-
* @see {@link GetCompositionWithId} for server version
|
|
96
|
-
*/
|
|
97
|
-
export declare function GetCompositionLocalWithId(id: number): Promise<any>;
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { Concept } from "../../app";
|
|
2
|
-
/**
|
|
3
|
-
* Retrieves a local concept by character value with typeId=51 (standard type).
|
|
4
|
-
*
|
|
5
|
-
* Simple lookup in LocalConceptsData for concepts matching the character value
|
|
6
|
-
* and having typeId of 51.
|
|
7
|
-
*
|
|
8
|
-
* @param characterValue - The character value to search for
|
|
9
|
-
* @returns Concept matching the character and type, or empty concept if not found
|
|
10
|
-
*/
|
|
11
|
-
export default function GetConceptByCharacterLocal(characterValue: string): Promise<Concept>;
|
|
12
|
-
/**
|
|
13
|
-
* Retrieves a local concept by character value, handling hierarchical type names.
|
|
14
|
-
*
|
|
15
|
-
* **Complex Logic**: For compound names (e.g., "the_person_email"):
|
|
16
|
-
* 1. Splits string by underscore
|
|
17
|
-
* 2. Recursively processes first part to get category ID
|
|
18
|
-
* 3. Searches using character value and derived category
|
|
19
|
-
* 4. Falls back to simple character search for single words
|
|
20
|
-
*
|
|
21
|
-
* **Special Case**: Returns concept with id=1 for character value "the".
|
|
22
|
-
*
|
|
23
|
-
* @param character - The character value to find (e.g., "the_status", "the_person_email")
|
|
24
|
-
* @returns Concept associated with the character value
|
|
25
|
-
*
|
|
26
|
-
* @example
|
|
27
|
-
* const concept = await GetConceptByCharacterAndCategoryLocal("the_person_email");
|
|
28
|
-
* // Splits into "the_person" (category) and searches with that context
|
|
29
|
-
*/
|
|
30
|
-
export declare function GetConceptByCharacterAndCategoryLocal(character: string): Promise<any>;
|
|
31
|
-
/**
|
|
32
|
-
* Retrieves a concept by character value and category ID from local memory.
|
|
33
|
-
*
|
|
34
|
-
* Direct lookup in LocalConceptsData without server fallback.
|
|
35
|
-
*
|
|
36
|
-
* @param value - The character value to search for
|
|
37
|
-
* @param categoryId - The category ID to filter by
|
|
38
|
-
* @returns Concept matching the character and category, or empty concept if not found
|
|
39
|
-
*/
|
|
40
|
-
export declare function GetConceptByCategoryAndCharacterLocalMemory(value: string, categoryId: number): Promise<Concept>;
|
|
41
|
-
/**
|
|
42
|
-
* Retrieves a concept by character value with automatic server fallback.
|
|
43
|
-
*
|
|
44
|
-
* **Complex Logic**:
|
|
45
|
-
* 1. First checks LocalConceptsData for existing concept
|
|
46
|
-
* 2. If not found (id==0 or null), fetches from server via GetLocalConceptByCharacterValue
|
|
47
|
-
* 3. After server fetch, rechecks LocalConceptsData (now populated)
|
|
48
|
-
* 4. Returns the concept or throws error
|
|
49
|
-
*
|
|
50
|
-
* Use this when you need guaranteed concept retrieval with server sync.
|
|
51
|
-
*
|
|
52
|
-
* @param characterValue - The character value to search for
|
|
53
|
-
* @returns Concept from local storage, fetching from server if needed
|
|
54
|
-
* @throws Error if server fetch fails
|
|
55
|
-
*/
|
|
56
|
-
export declare function GetConceptByCharacterLocalFull(characterValue: string): Promise<Concept>;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Connection } from "../../app";
|
|
2
|
-
/**
|
|
3
|
-
* Retrieves all connections originating from a specific concept with a given type.
|
|
4
|
-
*
|
|
5
|
-
* Searches local storage (IndexedDB) for connections where:
|
|
6
|
-
* - ofTheConceptId matches the provided concept ID
|
|
7
|
-
* - typeId matches the provided type
|
|
8
|
-
*
|
|
9
|
-
* @param ofTheConcept - The source concept ID (connections originating from this concept)
|
|
10
|
-
* @param typeId - The connection type ID to filter by
|
|
11
|
-
* @param userId - User ID (currently not used in filtering)
|
|
12
|
-
* @returns Array of Connection objects matching the criteria (empty array if none found)
|
|
13
|
-
* @throws Error if local storage query fails
|
|
14
|
-
*
|
|
15
|
-
* @example
|
|
16
|
-
* // Get all "has_property" connections from a person concept
|
|
17
|
-
* const connections = await GetConnectionOfTheConceptLocal(personId, 42, userId);
|
|
18
|
-
*/
|
|
19
|
-
export declare function GetConnectionOfTheConceptLocal(ofTheConcept: number, typeId: number, userId: number): Promise<Connection[]>;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Retrieves all related compositions from local storage by relation name.
|
|
3
|
-
*
|
|
4
|
-
* **Process Flow (Complex Logic)**:
|
|
5
|
-
* 1. Converts relation string to type concept (e.g., "the_email" → type concept)
|
|
6
|
-
* 2. Finds all connections from source concept with that relation type
|
|
7
|
-
* 3. For each connection, retrieves the target composition
|
|
8
|
-
* 4. Returns array of all related compositions
|
|
9
|
-
*
|
|
10
|
-
* @param id - The source concept ID to get relations from
|
|
11
|
-
* @param relation - The relation name (e.g., "the_email", "the_address")
|
|
12
|
-
* @param userId - User ID for permissions
|
|
13
|
-
* @returns Array of composition objects representing related entities
|
|
14
|
-
* @throws Error if relation lookup or composition retrieval fails
|
|
15
|
-
*
|
|
16
|
-
* @example
|
|
17
|
-
* // Get all email addresses related to a person
|
|
18
|
-
* const emails = await GetRelationLocal(personId, "the_email", userId);
|
|
19
|
-
* // Returns: [emailComposition1, emailComposition2, ...]
|
|
20
|
-
*/
|
|
21
|
-
export declare function GetRelationLocal(id: number, relation: string, userId: number): Promise<any>;
|