mftsccs-browser 2.1.239-dev → 2.1.240-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 +404 -95
- package/dist/main.bundle.js.map +1 -1
- package/dist/serviceWorker.bundle.js +398 -94
- package/dist/serviceWorker.bundle.js.map +1 -1
- package/dist/types/AccessTracker/accessTracker.d.ts +67 -0
- package/dist/types/Anomaly/anomaly.d.ts +103 -0
- package/dist/types/Api/Create/CreateTheCharacter.d.ts +24 -0
- package/dist/types/Api/Create/CreateTheConceptApi.d.ts +20 -0
- package/dist/types/Api/Create/CreateTheConnectionApi.d.ts +18 -0
- package/dist/types/Api/Create/CreateTheGhostConceptApi.d.ts +28 -0
- package/dist/types/Api/Create/CreateTheGhostConnectionApi.d.ts +18 -0
- package/dist/types/Api/Create/CreateTheTextData.d.ts +18 -0
- package/dist/types/Api/Delete/DeleteConceptInBackend.d.ts +14 -0
- package/dist/types/Api/Delete/DeleteUserInBackend.d.ts +19 -0
- package/dist/types/Api/DeleteConnectionBulkApi.d.ts +20 -0
- package/dist/types/Api/DeleteTheConcept.d.ts +20 -0
- package/dist/types/Api/DeleteTheConnection.d.ts +20 -0
- package/dist/types/Api/GetAiData.d.ts +10 -0
- package/dist/types/Api/GetAllConceptsByType.d.ts +12 -0
- package/dist/types/Api/GetAllConnectionsOfComposition.d.ts +23 -0
- package/dist/types/Api/GetAllConnectionsOfCompositionBulk.d.ts +23 -0
- package/dist/types/Api/GetAllLinkerConnectionsFromTheConcept.d.ts +12 -0
- package/dist/types/Api/GetAllLinkerConnectionsToTheConcept.d.ts +12 -0
- package/dist/types/Api/GetCharacterDataByCharacter.d.ts +12 -0
- package/dist/types/Api/GetCompositionConnectionsBetweenTwoConcepts.d.ts +13 -0
- package/dist/types/Api/GetConcept.d.ts +6 -0
- package/dist/types/Api/GetConceptBulk.d.ts +20 -0
- package/dist/types/Api/GetConceptByCharacterAndType.d.ts +15 -0
- package/dist/types/Api/GetConceptByCharacterValue.d.ts +12 -0
- package/dist/types/Api/GetConnection.d.ts +15 -0
- package/dist/types/Api/GetConnectionBulk.d.ts +7 -0
- package/dist/types/Api/GetConnectionOfTheConcept.d.ts +15 -0
- package/dist/types/Api/GetConnectionToTheConcept.d.ts +17 -0
- package/dist/types/Api/GetConnections/GetConnectionsBetweenApi.d.ts +40 -0
- package/dist/types/Api/GetConnections/GetConnectionsByTypeApi.d.ts +15 -0
- package/dist/types/Api/GetInstanceConceptByCharacterType.d.ts +9 -0
- package/dist/types/Api/GetReservedConnectionIds.d.ts +10 -0
- package/dist/types/Api/GetReservedIds.d.ts +10 -0
- package/dist/types/Api/Images/GetImages.d.ts +15 -0
- package/dist/types/Api/Local/GetLocalConceptByCharacterValue.d.ts +13 -0
- package/dist/types/Api/Login.d.ts +78 -0
- package/dist/types/Api/MakeTheNameInBackend.d.ts +14 -0
- package/dist/types/Api/MakeTheTypeConceptApi.d.ts +9 -0
- package/dist/types/Api/Prototype/Selector.d.ts +26 -0
- package/dist/types/Api/RecursiveSearch.d.ts +67 -0
- package/dist/types/Api/Search/FreeschemaQueryApi.d.ts +18 -0
- package/dist/types/Api/Search/Search.d.ts +73 -0
- package/dist/types/Api/Search/SearchInternalApi.d.ts +28 -0
- package/dist/types/Api/Search/SearchLinkMultipleApi.d.ts +15 -0
- package/dist/types/Api/Search/SearchWithLinker.d.ts +16 -0
- package/dist/types/Api/Search/SearchWithTypeAndLinker.d.ts +14 -0
- package/dist/types/Api/SearchConcept/GetConceptByCharacterAndCategoryApi.d.ts +12 -0
- package/dist/types/Api/SearchConcept/GetConceptByCharacterAndCategoryDirect.d.ts +13 -0
- package/dist/types/Api/SearchConcept/GetTypeConceptByBulk.d.ts +15 -0
- package/dist/types/Api/Session/CreateSession.d.ts +16 -0
- package/dist/types/Api/Session/CreateSessionVisit.d.ts +12 -0
- package/dist/types/Api/Signin.d.ts +24 -0
- package/dist/types/Api/Signup.d.ts +61 -0
- package/dist/types/Api/Translate/TranslateLocalToReal.d.ts +12 -0
- package/dist/types/Api/View/ViewInternalDataApi.d.ts +15 -0
- package/dist/types/Constants/AccessConstants.d.ts +3 -0
- package/dist/types/Constants/ApiConstants.d.ts +23 -0
- package/dist/types/Constants/FormatConstants.d.ts +8 -0
- package/dist/types/Constants/ckeditorCSS.d.ts +1 -0
- package/dist/types/Constants/general.const.d.ts +6 -0
- package/dist/types/Constants/page.const.d.ts +5 -0
- package/dist/types/DataStructures/BaseUrl.d.ts +94 -0
- package/dist/types/DataStructures/BinaryCharacterTree.d.ts +16 -0
- package/dist/types/DataStructures/BinaryTree.d.ts +77 -0
- package/dist/types/DataStructures/BinaryTypeTree.d.ts +17 -0
- package/dist/types/DataStructures/CharacterRepository.d.ts +8 -0
- package/dist/types/DataStructures/Composition/Composition.d.ts +14 -0
- package/dist/types/DataStructures/Composition/CompositionBinaryTree.d.ts +10 -0
- package/dist/types/DataStructures/Composition/CompositionNode.d.ts +21 -0
- package/dist/types/DataStructures/Concept.d.ts +25 -0
- package/dist/types/DataStructures/ConceptData.d.ts +30 -0
- package/dist/types/DataStructures/ConceptsToDraw.d.ts +11 -0
- package/dist/types/DataStructures/Connection.d.ts +23 -0
- package/dist/types/DataStructures/ConnectionBinaryTree/ConnectionBinaryTree.d.ts +81 -0
- package/dist/types/DataStructures/ConnectionBinaryTree/ConnectionNode.d.ts +27 -0
- package/dist/types/DataStructures/ConnectionBinaryTree/ConnectionOfNode.d.ts +10 -0
- package/dist/types/DataStructures/ConnectionBinaryTree/ConnectionOfTheTree.d.ts +24 -0
- package/dist/types/DataStructures/ConnectionBinaryTree/ConnectionTypeNode.d.ts +10 -0
- package/dist/types/DataStructures/ConnectionBinaryTree/ConnectionTypeTree.d.ts +20 -0
- package/dist/types/DataStructures/ConnectionBinaryTree/NodePrimitive.d.ts +15 -0
- package/dist/types/DataStructures/ConnectionByType/GetConnectionByType.d.ts +4 -0
- package/dist/types/DataStructures/ConnectionData.d.ts +26 -0
- package/dist/types/DataStructures/Count/CountInfo.d.ts +6 -0
- package/dist/types/DataStructures/FetchConnection.d.ts +64 -0
- package/dist/types/DataStructures/FilterSearch.d.ts +9 -0
- package/dist/types/DataStructures/IdentifierFlags.d.ts +11 -0
- package/dist/types/DataStructures/Local/LConcept.d.ts +23 -0
- package/dist/types/DataStructures/Local/LConnection.d.ts +18 -0
- package/dist/types/DataStructures/Local/LNode.d.ts +29 -0
- package/dist/types/DataStructures/Local/LocalBinaryCharacterTree.d.ts +13 -0
- package/dist/types/DataStructures/Local/LocalBinaryTree.d.ts +13 -0
- package/dist/types/DataStructures/Local/LocalBinaryTypeTree.d.ts +13 -0
- package/dist/types/DataStructures/Local/LocalConceptData.d.ts +21 -0
- package/dist/types/DataStructures/Local/LocalConnectionData.d.ts +20 -0
- package/dist/types/DataStructures/Local/LocalGhostIdTree.d.ts +11 -0
- package/dist/types/DataStructures/Local/LocalId.d.ts +19 -0
- package/dist/types/DataStructures/Local/LocalSyncData.d.ts +33 -0
- package/dist/types/DataStructures/Node.d.ts +30 -0
- package/dist/types/DataStructures/PatcherStructure.d.ts +8 -0
- package/dist/types/DataStructures/Prototype/Prototype.d.ts +19 -0
- package/dist/types/DataStructures/Prototype/PrototypeOption.d.ts +4 -0
- package/dist/types/DataStructures/Prototype/QuerySelector.d.ts +4 -0
- package/dist/types/DataStructures/ReservedIds.d.ts +10 -0
- package/dist/types/DataStructures/Responses/ErrorResponse.d.ts +74 -0
- package/dist/types/DataStructures/Responses/StandardResponses.d.ts +6 -0
- package/dist/types/DataStructures/Returner.d.ts +7 -0
- package/dist/types/DataStructures/Search/FreeschemaQuery.d.ts +25 -0
- package/dist/types/DataStructures/Search/SearchStructure.d.ts +10 -0
- package/dist/types/DataStructures/SearchQuery.d.ts +17 -0
- package/dist/types/DataStructures/Security/SecureStorage.d.ts +14 -0
- package/dist/types/DataStructures/Security/TokenStorage.d.ts +24 -0
- package/dist/types/DataStructures/Session/SessionData.d.ts +13 -0
- package/dist/types/DataStructures/SettingData.d.ts +5 -0
- package/dist/types/DataStructures/Settings.d.ts +4 -0
- package/dist/types/DataStructures/SigninModel.d.ts +4 -0
- package/dist/types/DataStructures/SignupModel.d.ts +4 -0
- package/dist/types/DataStructures/SyncData.d.ts +14 -0
- package/dist/types/DataStructures/TheCharacter.d.ts +13 -0
- package/dist/types/DataStructures/TheTexts.d.ts +14 -0
- package/dist/types/DataStructures/TypeLibrary.d.ts +19 -0
- package/dist/types/DataStructures/TypeNode.d.ts +18 -0
- package/dist/types/DataStructures/User/UserBinaryTree.d.ts +13 -0
- package/dist/types/DataStructures/User/UserNode.d.ts +18 -0
- package/dist/types/DataStructures/WidgetCache/WidgetCache.d.ts +10 -0
- package/dist/types/DataStructures/WidgetCache/WidgetDetails.d.ts +9 -0
- package/dist/types/DataStructures/WidgetCache/WidgetNode.d.ts +18 -0
- package/dist/types/DataStructures/environments/environments.d.ts +48 -0
- package/dist/types/Database/CacheDatabase.d.ts +57 -0
- package/dist/types/Database/IndexUpdate.d.ts +47 -0
- package/dist/types/Database/NoIndexDb.d.ts +9 -0
- package/dist/types/Database/indexdblocal.d.ts +43 -0
- package/dist/types/Database/indexeddb.d.ts +58 -0
- package/dist/types/Helpers/CheckIfExists.d.ts +9 -0
- package/dist/types/Helpers/RemoveFromArray.d.ts +5 -0
- package/dist/types/Helpers/UniqueInsert.d.ts +1 -0
- package/dist/types/Middleware/ApplicationMonitor.d.ts +14 -0
- package/dist/types/Middleware/logger.service.d.ts +144 -0
- package/dist/types/ServiceWorker/actions/connectionActions.d.ts +2 -0
- package/dist/types/ServiceWorker/actions/createActions.d.ts +2 -0
- package/dist/types/ServiceWorker/actions/deleteActions.d.ts +2 -0
- package/dist/types/ServiceWorker/actions/getActions.d.ts +2 -0
- package/dist/types/ServiceWorker/actions/index.d.ts +15 -0
- package/dist/types/ServiceWorker/actions/searchActions.d.ts +2 -0
- package/dist/types/ServiceWorker/actions/syncActions.d.ts +2 -0
- package/dist/types/ServiceWorker/actions/updateActions.d.ts +2 -0
- package/dist/types/ServiceWorker/index.d.ts +11 -0
- package/dist/types/Services/CacheClear.d.ts +7 -0
- package/dist/types/Services/CheckForConnectionDeletion.d.ts +3 -0
- package/dist/types/Services/Common/DecodeCountInfo.d.ts +3 -0
- package/dist/types/Services/Common/DelayFunction.d.ts +7 -0
- package/dist/types/Services/Common/ErrorPosting.d.ts +10 -0
- package/dist/types/Services/Common/MergeArrays.d.ts +7 -0
- package/dist/types/Services/Common/RegexFunction.d.ts +1 -0
- package/dist/types/Services/Common/RemoveAllChild.d.ts +1 -0
- package/dist/types/Services/Composition/BuildComposition.d.ts +3 -0
- package/dist/types/Services/Composition/CompositionCache.d.ts +4 -0
- package/dist/types/Services/Composition/CreateCompositionCache.d.ts +3 -0
- package/dist/types/Services/ConceptFinding/GetConceptByCharacterAndCategory.d.ts +5 -0
- package/dist/types/Services/Conversion/ConvertConcepts.d.ts +5 -0
- package/dist/types/Services/CreateBinaryTreeFromData.d.ts +5 -0
- package/dist/types/Services/CreateConnection/CreateConnectionEntity.d.ts +2 -0
- package/dist/types/Services/CreateConnectionBetweenTwoConcepts.d.ts +5 -0
- package/dist/types/Services/CreateDefaultConcept.d.ts +3 -0
- package/dist/types/Services/CreateTheComposition.d.ts +1 -0
- package/dist/types/Services/CreateTheConcept.d.ts +122 -0
- package/dist/types/Services/CreateTheConnection.d.ts +63 -0
- package/dist/types/Services/CreateTheConnectionGeneral.d.ts +2 -0
- package/dist/types/Services/DeleteConcept.d.ts +2 -0
- package/dist/types/Services/DeleteConnection.d.ts +2 -0
- package/dist/types/Services/DeleteConnectionByType.d.ts +22 -0
- package/dist/types/Services/FindConeceptsFromConnection.d.ts +6 -0
- package/dist/types/Services/FindConnectionsOfCompositionBulkInMemory.d.ts +1 -0
- package/dist/types/Services/GetComposition.d.ts +205 -0
- package/dist/types/Services/GetCompositionBulk.d.ts +100 -0
- package/dist/types/Services/GetCompositionList.d.ts +7 -0
- package/dist/types/Services/GetConceptByCharacter.d.ts +2 -0
- package/dist/types/Services/GetConnectionBetweenTwoConceptsLinker.d.ts +11 -0
- package/dist/types/Services/GetConnections.d.ts +1 -0
- package/dist/types/Services/GetDataFromIndexDb.d.ts +2 -0
- package/dist/types/Services/GetLink.d.ts +3 -0
- package/dist/types/Services/GetLinkerConnectionFromConcept.d.ts +3 -0
- package/dist/types/Services/GetRelation.d.ts +3 -0
- package/dist/types/Services/GetTheConcept.d.ts +96 -0
- package/dist/types/Services/InitializeSystem.d.ts +2 -0
- package/dist/types/Services/Local/ConvertFromLConceptToConcept.d.ts +41 -0
- package/dist/types/Services/Local/ConvertFromLConnectionToConnection.d.ts +47 -0
- package/dist/types/Services/Local/CreateConnectionBetweenTwoConceptsLocal.d.ts +44 -0
- package/dist/types/Services/Local/CreateDefaultLConcept.d.ts +46 -0
- package/dist/types/Services/Local/CreateLocalBinaryTreeFromData.d.ts +34 -0
- package/dist/types/Services/Local/CreateTheCompositionLocal.d.ts +104 -0
- package/dist/types/Services/Local/CreateTheConceptLocal.d.ts +84 -0
- package/dist/types/Services/Local/CreateTheConnectionLocal.d.ts +140 -0
- package/dist/types/Services/Local/DeleteConceptLocal.d.ts +47 -0
- package/dist/types/Services/Local/GetCompositionListLocal.d.ts +37 -0
- package/dist/types/Services/Local/GetCompositionLocal.d.ts +97 -0
- package/dist/types/Services/Local/GetConceptByCharacterLocal.d.ts +56 -0
- package/dist/types/Services/Local/GetConnectionOfTheConceptLocal.d.ts +19 -0
- package/dist/types/Services/Local/GetRelationLocal.d.ts +21 -0
- package/dist/types/Services/Local/GetTheConceptLocal.d.ts +63 -0
- package/dist/types/Services/Local/MakeTheConceptLocal.d.ts +22 -0
- package/dist/types/Services/Local/MakeTheInstanceConceptLocal.d.ts +164 -0
- package/dist/types/Services/Local/MakeTheTypeLocal.d.ts +36 -0
- package/dist/types/Services/Local/UpdateCompositionLocal.d.ts +42 -0
- package/dist/types/Services/Logs/LogEvent.d.ts +1 -0
- package/dist/types/Services/Mail.d.ts +41 -0
- package/dist/types/Services/MakeTheCharacter.d.ts +2 -0
- package/dist/types/Services/MakeTheCharacterData.d.ts +2 -0
- package/dist/types/Services/MakeTheConcept.d.ts +2 -0
- package/dist/types/Services/MakeTheInstanceConcept.d.ts +15 -0
- package/dist/types/Services/MakeTheTimestamp.d.ts +1 -0
- package/dist/types/Services/MakeTheTypeConcept.d.ts +1 -0
- package/dist/types/Services/Mqtt/publishMessage.d.ts +1 -0
- package/dist/types/Services/Search/DataIdFormat.d.ts +32 -0
- package/dist/types/Services/Search/FormatData.d.ts +36 -0
- package/dist/types/Services/Search/JustIdFormat.d.ts +23 -0
- package/dist/types/Services/Search/NewFormat.d.ts +4 -0
- package/dist/types/Services/Search/SearchLinkInternal.d.ts +3 -0
- package/dist/types/Services/Search/SearchLinkMultiple.d.ts +55 -0
- package/dist/types/Services/Search/SearchWithTypeAndLinker.d.ts +82 -0
- package/dist/types/Services/Search/orderingConnections.d.ts +2 -0
- package/dist/types/Services/Security/GetRequestHeader.d.ts +6 -0
- package/dist/types/Services/SplitStrings.d.ts +1 -0
- package/dist/types/Services/Transaction/LocalTransaction.d.ts +117 -0
- package/dist/types/Services/UpdateComposition.d.ts +2 -0
- package/dist/types/Services/Upload.d.ts +111 -0
- package/dist/types/Services/User/UserFromLocalStorage.d.ts +10 -0
- package/dist/types/Services/User/UserTranslation.d.ts +3 -0
- package/dist/types/Services/View/ViewInternalData.d.ts +1 -0
- package/dist/types/Services/assets/GetImageService.d.ts +14 -0
- package/dist/types/Services/automated/automated-concept-connection.d.ts +7 -0
- package/dist/types/Services/cacheService.d.ts +1 -0
- package/dist/types/Validator/constant.d.ts +3 -0
- package/dist/types/Validator/interface.d.ts +19 -0
- package/dist/types/Validator/utils.d.ts +7 -0
- package/dist/types/Validator/validator.d.ts +37 -0
- package/dist/types/Visualize/ConceptCircle.d.ts +35 -0
- package/dist/types/Visualize/ConceptCircleList.d.ts +9 -0
- package/dist/types/Visualize/ConnectionLine.d.ts +21 -0
- package/dist/types/Visualize/ConnectionLineList.d.ts +6 -0
- package/dist/types/Visualize/drawExistingConcepts.d.ts +8 -0
- package/dist/types/Visualize/helper.d.ts +15 -0
- package/dist/types/Widgets/BaseObserver.d.ts +25 -0
- package/dist/types/Widgets/BaseWidget.d.ts +37 -0
- package/dist/types/Widgets/BuilderSpeceficFunctions.d.ts +11 -0
- package/dist/types/Widgets/BuilderStatefulWidget.d.ts +392 -0
- package/dist/types/Widgets/CacheWidget.service.d.ts +77 -0
- package/dist/types/Widgets/NormalizeStyles.service.d.ts +10 -0
- package/dist/types/Widgets/RenderPage.service.d.ts +17 -0
- package/dist/types/Widgets/RenderWidgetLibrary.service.d.ts +22 -0
- package/dist/types/Widgets/RenderWidgetService.d.ts +187 -0
- package/dist/types/Widgets/StatefulWidget.d.ts +167 -0
- package/dist/types/Widgets/WidgetBuild.d.ts +45 -0
- package/dist/types/Widgets/WidgetCacheManager.d.ts +108 -0
- package/dist/types/Widgets/WidgetTree.d.ts +61 -0
- package/dist/types/WrapperFunctions/DepenedencyObserver.d.ts +95 -0
- package/dist/types/WrapperFunctions/GetCompositionListObservable.d.ts +51 -0
- package/dist/types/WrapperFunctions/GetCompositionObservable.d.ts +35 -0
- package/dist/types/WrapperFunctions/GetLinkListObservable.d.ts +57 -0
- package/dist/types/WrapperFunctions/GetLinkObservable.d.ts +50 -0
- package/dist/types/WrapperFunctions/QueryCacheManager.d.ts +107 -0
- package/dist/types/WrapperFunctions/RecursiveSearchObservable.d.ts +55 -0
- package/dist/types/WrapperFunctions/SchemaQueryObservable.d.ts +60 -0
- package/dist/types/WrapperFunctions/SearchLinkMultipleAllObservable.d.ts +36 -0
- package/dist/types/app.d.ts +381 -0
- package/dist/types/prototype/prototype.service.d.ts +25 -0
- package/dist/types/service-worker.d.ts +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { Connection } from "../DataStructures/Connection";
|
|
2
|
+
/**
|
|
3
|
+
* ## Format JUSTDATA ##
|
|
4
|
+
* Function converts the conceptIds to json (compositions)
|
|
5
|
+
* This function takes in the conceptIds and returns a list of compositions related to those concepts.
|
|
6
|
+
* @param conceptIds list of concept ids that are compositions.
|
|
7
|
+
* @returns compositions
|
|
8
|
+
*/
|
|
9
|
+
export declare function GetCompositionBulk(conceptIds?: number[]): Promise<any[]>;
|
|
10
|
+
/**
|
|
11
|
+
* ## FORMAT DATAIDDATE ##
|
|
12
|
+
* Function converts the conceptIds to json (compositions)
|
|
13
|
+
* @param conceptIds this is the list of concept ids that should be converted to compostions in data - id format.
|
|
14
|
+
* @returns list of compositions in the data - id format.
|
|
15
|
+
*/
|
|
16
|
+
export declare function GetCompositionBulkWithDataId(conceptIds?: number[]): Promise<any[]>;
|
|
17
|
+
/**
|
|
18
|
+
* ## FORMAT DATAIDDATE ##
|
|
19
|
+
* This function converts the conceptIds and internal connectionIds to compositions in data-Id format.
|
|
20
|
+
* @param conceptIds This is the list of concept ids that need to be converted to compositions.
|
|
21
|
+
* @param connectionIds These are the internal connectionIds that need to be passed to create the compositions.
|
|
22
|
+
* @returns list of compositions created from the passed conceptIds and connectionIds.
|
|
23
|
+
*/
|
|
24
|
+
export declare function GetCompositionFromConnectionsWithDataId(conceptIds?: number[], connectionIds?: number[]): Promise<any>;
|
|
25
|
+
/**
|
|
26
|
+
* ## FORMAT DATAIDDATE ##
|
|
27
|
+
* This is just a different version of GetCompositionFromConnectionsWithDataId, This has the added functionality that
|
|
28
|
+
* it also prints out internal connections.
|
|
29
|
+
* This function converts the conceptIds and internal connectionIds to compositions in data-Id format.
|
|
30
|
+
* @param conceptIds This is the list of concept ids that need to be converted to compositions.
|
|
31
|
+
* @param connectionIds These are the internal connectionIds that need to be passed to create the compositions.
|
|
32
|
+
* @returns list of compositions created from the passed conceptIds and connectionIds.
|
|
33
|
+
*/
|
|
34
|
+
export declare function GetCompositionFromConnectionsWithDataIdFromConnections(conceptIds?: number[], connectionIds?: number[]): Promise<any>;
|
|
35
|
+
/**
|
|
36
|
+
* ## Format DATAIDDATE ##
|
|
37
|
+
* This function converts the conceptIds and internal connectionIds to compositions in data-Id format with index(conceptId).
|
|
38
|
+
* @param conceptIds This is the list of concept ids that need to be converted to compositions.
|
|
39
|
+
* @param connectionIds These are the internal connectionIds that need to be passed to create the compositions.
|
|
40
|
+
* @returns dictionary of compositions created from the passed conceptIds and connectionIds with conceptId as its index .
|
|
41
|
+
*/
|
|
42
|
+
export declare function GetCompositionFromConnectionsWithDataIdIndex(conceptIds?: number[], connectionIds?: number[]): Promise<any>;
|
|
43
|
+
/**
|
|
44
|
+
* ## Format is dictionary with key as concept id and value as data (json) ##
|
|
45
|
+
* This function converts the conceptIds and internal connectionIds to compositions format with index(conceptId).
|
|
46
|
+
* @param conceptIds This is the list of concept ids that need to be converted to compositions.
|
|
47
|
+
* @param connectionIds These are the internal connectionIds that need to be passed to create the compositions.
|
|
48
|
+
* @returns dictionary of compositions created from the passed conceptIds and connectionIds with conceptId as its index .
|
|
49
|
+
*/
|
|
50
|
+
export declare function GetCompositionFromConnectionsWithIndex(conceptIds?: number[], connectionIds?: number[]): Promise<any>;
|
|
51
|
+
/**
|
|
52
|
+
* ## FORMAT DATAIDDATE ##
|
|
53
|
+
* This is just a different version of GetCompositionFromConnectionsWithDataId, This has the added functionality that
|
|
54
|
+
* it also prints out internal connections.
|
|
55
|
+
* This function converts the conceptIds and internal connectionIds to compositions in data-Id format.
|
|
56
|
+
* @param conceptIds This is the list of concept ids that need to be converted to compositions.
|
|
57
|
+
* @param connectionIds These are the internal connectionIds that need to be passed to create the compositions.
|
|
58
|
+
* @returns list of compositions created from the passed conceptIds and connectionIds.
|
|
59
|
+
*/
|
|
60
|
+
export declare function GetCompositionFromConnectionsWithIndexFromConnections(conceptIds?: number[], connectionIds?: number[]): Promise<any>;
|
|
61
|
+
/**
|
|
62
|
+
* Used to prefetch all the connections and their related concepts.
|
|
63
|
+
* @param connectionIds these are the connection ids that are used to fetch all the connections and also their related concepts.
|
|
64
|
+
* @returns all the connections that are passed as ids.
|
|
65
|
+
*/
|
|
66
|
+
export declare function GetConnectionDataPrefetch(connectionIds: number[]): Promise<Connection[]>;
|
|
67
|
+
/**
|
|
68
|
+
* ## Format DATAIDDATE ##
|
|
69
|
+
* This function converts the conceptIds and internal connections to create compositions.
|
|
70
|
+
* Format is of a dictionary with ids as the key and value is the composition data.
|
|
71
|
+
* @param conceptIds these are the concept ids that need to be fetched to create their compositions
|
|
72
|
+
* @param connections these are the connections that are used to create the structure.
|
|
73
|
+
* @returns a dictionary / object that has key as their conceptId and the value as their composition object.
|
|
74
|
+
*/
|
|
75
|
+
export declare function GetCompositionFromConnectionsWithDataIdInObject(conceptIds?: number[], connections?: number[]): Promise<any>;
|
|
76
|
+
/**
|
|
77
|
+
* ## Format DATAIDDATE ##
|
|
78
|
+
* ## duplicate ##
|
|
79
|
+
* This function converts the conceptIds and internal connections to create compositions.
|
|
80
|
+
* @param conceptIds these are the concept ids that need to be fetched to create their compositions
|
|
81
|
+
* @param connections these are the connections that are used to create the structure.
|
|
82
|
+
* @returns a dictionary / object that has key as their conceptId and the value as their composition object.
|
|
83
|
+
*/
|
|
84
|
+
export declare function GetCompositionFromConnectionsWithDataIdInObjectNew(conceptIds?: number[], connections?: number[]): Promise<any>;
|
|
85
|
+
/**
|
|
86
|
+
* ## Format justdata ##
|
|
87
|
+
* This function converts the conceptIds and internal connections to create compositions.
|
|
88
|
+
* @param conceptIds these are the concept ids that need to be fetched to create their compositions
|
|
89
|
+
* @param connections these are the connections that are used to create the structure.
|
|
90
|
+
* @returns a dictionary / object that has key as their conceptId and the value as their composition object.
|
|
91
|
+
*/
|
|
92
|
+
export declare function GetCompositionFromConnectionsInObject(conceptIds?: number[], connections?: number[]): Promise<any>;
|
|
93
|
+
/**
|
|
94
|
+
* ## Format Normal ##
|
|
95
|
+
* This function converts the conceptIds and internal connections to create compositions.
|
|
96
|
+
* @param conceptIds these are the concept ids that need to be fetched to create their compositions
|
|
97
|
+
* @param connections these are the connections that are used to create the structure.
|
|
98
|
+
* @returns a dictionary / object that has key as their conceptId and the value as their composition object.
|
|
99
|
+
*/
|
|
100
|
+
export declare function GetCompositionFromConnectionsInObjectNormal(conceptIds?: number[], connections?: number[]): Promise<any>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Concept } from "../app";
|
|
2
|
+
export declare function GetCompositionList(compositionName: string, userId: number, inpage?: number, page?: number): Promise<any>;
|
|
3
|
+
export declare function GetCompositionListAll(compositionName: string, userId: number, inpage?: number, page?: number): Promise<any[]>;
|
|
4
|
+
export declare function GetCompositionListAllWithId(compositionName: string, userId: number, inpage?: number, page?: number): Promise<any>;
|
|
5
|
+
export declare function GetCompositionListWithId(compositionName: string, userId: number, inpage?: number, page?: number): Promise<any>;
|
|
6
|
+
export declare function GetCompositionListWithIdUpdated(compositionName: string, userId: number, inpage?: number, page?: number): Promise<any>;
|
|
7
|
+
export declare function FormatTheConcepts(conceptList: Concept[], localConceptList: Concept[], inpage?: number, page?: number): Promise<any[]>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Concept } from "../app";
|
|
2
|
+
/**
|
|
3
|
+
* This function will give you all the connections between two concepts by their linker or fullLinker
|
|
4
|
+
* @param ofTheConcept start of the connecction
|
|
5
|
+
* @param toTheConcept end of the connection
|
|
6
|
+
* @param linker the primitive linkers with type connection (16) these are the old type of linkers (if you want full linker then put this as empty string)
|
|
7
|
+
* @param fullLinker fullLinker is the modern linker (if you want linker then put this as empty string)
|
|
8
|
+
* @param forward if you want to get the forward relation in the primitive linker put true else for backward linker false.
|
|
9
|
+
* @returns list of connections
|
|
10
|
+
*/
|
|
11
|
+
export declare function GetConnectionBetweenTwoConceptsLinker(ofTheConcept: Concept, toTheConcept: Concept, linker: string, fullLinker: string, forward?: boolean): Promise<any>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function GetConnectionById(id: number): Promise<any>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { Concept } from "./../DataStructures/Concept";
|
|
2
|
+
export declare function GetLink(id: number, linker: string, inpage?: number, page?: number): Promise<any>;
|
|
3
|
+
export declare function GetLinkRaw(id: number, linker: string, inpage?: number, page?: number): Promise<Concept[]>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare function GetRelation(id: number, relation: string, inpage?: number, page?: number, reverse?: boolean): Promise<any>;
|
|
2
|
+
export declare function GetRelationNew(id: number, relation: string, inpage?: number, page?: number, reverse?: boolean): Promise<void>;
|
|
3
|
+
export declare function GetRelationRaw(id: number, relation: string, inpage?: number, page?: number, reverse?: boolean): Promise<any>;
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { Concept } from "../DataStructures/Concept";
|
|
2
|
+
/**
|
|
3
|
+
* Retrieves a concept by its ID with intelligent caching and multi-source lookup.
|
|
4
|
+
*
|
|
5
|
+
* This is the primary function for fetching concepts in the system. It implements a sophisticated
|
|
6
|
+
* multi-level retrieval strategy:
|
|
7
|
+
*
|
|
8
|
+
* **Retrieval Strategy:**
|
|
9
|
+
* 1. Checks in-memory promise cache to prevent duplicate requests
|
|
10
|
+
* 2. For negative IDs: Fetches from local IndexedDB (LocalConceptsData)
|
|
11
|
+
* 3. For positive IDs: Checks local ConceptsData cache first
|
|
12
|
+
* 4. If not in cache: Fetches from backend API
|
|
13
|
+
* 5. Automatically resolves and attaches the concept's type information
|
|
14
|
+
* 6. Routes through service worker if enabled for better performance
|
|
15
|
+
*
|
|
16
|
+
* **Features:**
|
|
17
|
+
* - Promise caching prevents duplicate concurrent requests for the same concept
|
|
18
|
+
* - Automatic type resolution (fetches and attaches type concept)
|
|
19
|
+
* - Access tracking integration (increments access counter if enabled)
|
|
20
|
+
* - Service worker support for background processing
|
|
21
|
+
* - Error logging and performance monitoring
|
|
22
|
+
* - Supports both server concepts (positive IDs) and local concepts (negative IDs)
|
|
23
|
+
*
|
|
24
|
+
* @param id - The unique identifier of the concept to retrieve.
|
|
25
|
+
* Positive IDs = server concepts, Negative IDs = local-only concepts
|
|
26
|
+
* @param userId - The ID of the user requesting the concept. Used for access tracking
|
|
27
|
+
* and audit logging. Defaults to 999 (system/anonymous user)
|
|
28
|
+
*
|
|
29
|
+
* @returns Promise resolving to the Concept object if found, or a default empty Concept if not found
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* // Get a server concept
|
|
33
|
+
* const concept = await GetTheConcept(12345, 101);
|
|
34
|
+
* console.log(concept.characterValue); // "Alice Smith"
|
|
35
|
+
* console.log(concept.type?.characterValue); // "Person" (auto-resolved)
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* // Get a local concept (negative ID)
|
|
39
|
+
* const localConcept = await GetTheConcept(-5, 101);
|
|
40
|
+
* console.log(localConcept.characterValue); // "Local Draft"
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* // Multiple concurrent calls use the same promise (efficient)
|
|
44
|
+
* const [c1, c2, c3] = await Promise.all([
|
|
45
|
+
* GetTheConcept(123),
|
|
46
|
+
* GetTheConcept(123), // Same ID - uses cached promise
|
|
47
|
+
* GetTheConcept(123) // Same ID - uses cached promise
|
|
48
|
+
* ]);
|
|
49
|
+
* // Only one actual fetch is performed
|
|
50
|
+
*
|
|
51
|
+
* @throws Will log errors but returns a default empty concept instead of throwing
|
|
52
|
+
*
|
|
53
|
+
* @see {@link CreateTheConcept} for creating new concepts
|
|
54
|
+
* @see {@link GetConceptBulk} for fetching multiple concepts efficiently
|
|
55
|
+
* @see {@link AddTypeConcept} for manually adding type information to a concept
|
|
56
|
+
*/
|
|
57
|
+
export default function GetTheConcept(id: number, userId?: number): Promise<Concept>;
|
|
58
|
+
/**
|
|
59
|
+
* Fetches and attaches type information to a concept if not already present.
|
|
60
|
+
*
|
|
61
|
+
* This utility function ensures that a concept has its type information loaded and attached.
|
|
62
|
+
* Every concept has a `typeId` that references another concept representing its type
|
|
63
|
+
* (e.g., a person concept might have typeId=1 which points to a "Person" type concept).
|
|
64
|
+
*
|
|
65
|
+
* **Process:**
|
|
66
|
+
* 1. Checks if concept.type is already set (if yes, does nothing)
|
|
67
|
+
* 2. Attempts to fetch type concept from local cache (ConceptsData)
|
|
68
|
+
* 3. If not in cache and typeId is valid: fetches from backend API
|
|
69
|
+
* 4. Attaches the type concept to concept.type property
|
|
70
|
+
* 5. Routes through service worker if enabled
|
|
71
|
+
*
|
|
72
|
+
* **Type Concept:**
|
|
73
|
+
* A type concept is a special concept that represents a classification or category.
|
|
74
|
+
* For example: "Person", "Document", "Organization" are type concepts.
|
|
75
|
+
*
|
|
76
|
+
* @param concept - The concept object to which type information should be added.
|
|
77
|
+
* The concept must have a valid `typeId` property.
|
|
78
|
+
*
|
|
79
|
+
* @returns Promise that resolves when type information has been attached (or confirmed present)
|
|
80
|
+
*
|
|
81
|
+
* @example
|
|
82
|
+
* const concept = await GetTheConcept(12345);
|
|
83
|
+
* console.log(concept.type); // might be null
|
|
84
|
+
*
|
|
85
|
+
* await AddTypeConcept(concept);
|
|
86
|
+
* console.log(concept.type?.characterValue); // "Person"
|
|
87
|
+
*
|
|
88
|
+
* @example
|
|
89
|
+
* // Ensure multiple concepts have their types loaded
|
|
90
|
+
* const concepts = await GetConceptBulk([1, 2, 3, 4, 5]);
|
|
91
|
+
* await Promise.all(concepts.map(c => AddTypeConcept(c)));
|
|
92
|
+
* // All concepts now have their type information
|
|
93
|
+
*
|
|
94
|
+
* @see {@link GetTheConcept} which automatically calls this function
|
|
95
|
+
*/
|
|
96
|
+
export declare function AddTypeConcept(concept: Concept): Promise<Concept | undefined>;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { Concept } from "../../DataStructures/Concept";
|
|
2
|
+
/**
|
|
3
|
+
* Converts a local concept (LConcept) to a standard Concept format.
|
|
4
|
+
*
|
|
5
|
+
* This function is part of the local/server concept conversion system. Currently, it
|
|
6
|
+
* performs a passthrough as LConcept and Concept share the same structure. This function
|
|
7
|
+
* exists for:
|
|
8
|
+
* - API consistency and symmetry with convertFromConceptToLConcept
|
|
9
|
+
* - Future extensibility if conversion logic is needed
|
|
10
|
+
* - Type clarity in code (explicit conversion intent)
|
|
11
|
+
*
|
|
12
|
+
* **LConcept vs Concept:**
|
|
13
|
+
* - LConcept: Local-only concepts stored in IndexedDB (negative IDs)
|
|
14
|
+
* - Concept: Server-synced concepts (positive IDs)
|
|
15
|
+
* - Both use the same Concept class structure
|
|
16
|
+
*
|
|
17
|
+
* **When to Use:**
|
|
18
|
+
* - Preparing local concepts for backend sync
|
|
19
|
+
* - Converting local concepts to server format
|
|
20
|
+
* - Type-safe conversion in TypeScript
|
|
21
|
+
* - Maintaining code clarity and intent
|
|
22
|
+
*
|
|
23
|
+
* @param lconcept - The local concept to convert
|
|
24
|
+
*
|
|
25
|
+
* @returns The concept in standard Concept format (currently identical to input)
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* // Convert local concept before syncing
|
|
29
|
+
* const localConcept = await CreateTheConceptLocal('Draft', 'the_note', 101, 1, 3, 2);
|
|
30
|
+
* const serverConcept = ConvertFromLConceptToConcept(localConcept);
|
|
31
|
+
* // Now ready for backend sync
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* // Type-safe conversion
|
|
35
|
+
* const lconcepts = await GetAllLocalConcepts();
|
|
36
|
+
* const concepts = lconcepts.map(lc => ConvertFromLConceptToConcept(lc));
|
|
37
|
+
*
|
|
38
|
+
* @see {@link convertFromConceptToLConcept} for the reverse conversion
|
|
39
|
+
* @see {@link CreateTheConceptLocal} for creating local concepts
|
|
40
|
+
*/
|
|
41
|
+
export declare function ConvertFromLConceptToConcept(lconcept: Concept): Concept;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { Connection } from "../../DataStructures/Connection";
|
|
2
|
+
/**
|
|
3
|
+
* Converts a local connection (LConnection) to a standard Connection format.
|
|
4
|
+
*
|
|
5
|
+
* This function extracts the essential properties from a local connection and creates
|
|
6
|
+
* a new Connection object. It's part of the local/server conversion system used when
|
|
7
|
+
* preparing local connections for backend sync.
|
|
8
|
+
*
|
|
9
|
+
* **Properties Transferred:**
|
|
10
|
+
* - id: Connection identifier
|
|
11
|
+
* - ofTheConceptId: Source concept ID
|
|
12
|
+
* - toTheConceptId: Target concept ID
|
|
13
|
+
* - typeId: Connection type ID
|
|
14
|
+
* - orderId: Order for sorting connections
|
|
15
|
+
*
|
|
16
|
+
* **LConnection vs Connection:**
|
|
17
|
+
* - LConnection: Local-only connections stored in IndexedDB (negative IDs)
|
|
18
|
+
* - Connection: Server-synced connections (positive IDs)
|
|
19
|
+
* - Both use the same Connection class structure
|
|
20
|
+
*
|
|
21
|
+
* **Use Cases:**
|
|
22
|
+
* - Preparing local connections for backend sync
|
|
23
|
+
* - Converting local data to server format
|
|
24
|
+
* - Data export and serialization
|
|
25
|
+
* - Maintaining consistency across local and server data
|
|
26
|
+
*
|
|
27
|
+
* @param lconnection - The local connection to convert
|
|
28
|
+
*
|
|
29
|
+
* @returns A new Connection object with properties copied from the local connection
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* // Convert local connection before syncing
|
|
33
|
+
* const localConn = await CreateTheConnectionLocal(fromId, toId, typeId, 1);
|
|
34
|
+
* const serverConn = ConvertFromLConnectionToConnection(localConn);
|
|
35
|
+
* // Now ready for backend sync
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* // Batch conversion
|
|
39
|
+
* const localConnections = await GetAllLocalConnections();
|
|
40
|
+
* const serverConnections = localConnections.map(lc =>
|
|
41
|
+
* ConvertFromLConnectionToConnection(lc)
|
|
42
|
+
* );
|
|
43
|
+
*
|
|
44
|
+
* @see {@link CreateTheConnectionLocal} for creating local connections
|
|
45
|
+
* @see {@link ConvertFromLConceptToConcept} for concept conversion
|
|
46
|
+
*/
|
|
47
|
+
export declare function ConvertFromLConnectionToConnection(lconnection: Connection): Connection;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { Concept } from "../../app";
|
|
2
|
+
import { InnerActions } from "../../Constants/general.const";
|
|
3
|
+
/**
|
|
4
|
+
* Creates a named connection between two concepts with optional bidirectional linking.
|
|
5
|
+
*
|
|
6
|
+
* **Complex Naming Logic**:
|
|
7
|
+
* - Forward connection type: "{ofType}_s_{linker}_s" (e.g., "person_s_knows_s")
|
|
8
|
+
* - Backward connection type: "{toType}_s_{linker}_by" (e.g., "person_s_knows_by")
|
|
9
|
+
* - Uses type.characterValue from concepts to build meaningful connection names
|
|
10
|
+
*
|
|
11
|
+
* **Bidirectional Mode (both=true)**:
|
|
12
|
+
* - Creates two connections: A→B and B→A
|
|
13
|
+
* - Forward: ofTheConcept → toTheConcept with "{ofType}_s_{linker}_s"
|
|
14
|
+
* - Backward: toTheConcept → ofTheConcept with "{toType}_s_{linker}_by"
|
|
15
|
+
*
|
|
16
|
+
* @param ofTheConcept - Source concept (connection starts here)
|
|
17
|
+
* @param toTheConcept - Target concept (connection points here)
|
|
18
|
+
* @param linker - Relationship name (e.g., "knows", "works_at", "has")
|
|
19
|
+
* @param both - If true, creates bidirectional connection (both A→B and B→A)
|
|
20
|
+
* @param actions - Action tracking for batch operations
|
|
21
|
+
* @returns The forward connection object
|
|
22
|
+
* @throws Error if connection creation fails
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* // Create unidirectional "Alice knows Bob"
|
|
26
|
+
* const conn = await CreateConnectionBetweenTwoConceptsLocal(
|
|
27
|
+
* aliceConcept,
|
|
28
|
+
* bobConcept,
|
|
29
|
+
* "knows",
|
|
30
|
+
* false
|
|
31
|
+
* );
|
|
32
|
+
* // Creates: person_s_knows_s connection from Alice to Bob
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* // Create bidirectional "Alice friends Bob" (both directions)
|
|
36
|
+
* await CreateConnectionBetweenTwoConceptsLocal(
|
|
37
|
+
* aliceConcept,
|
|
38
|
+
* bobConcept,
|
|
39
|
+
* "friends",
|
|
40
|
+
* true
|
|
41
|
+
* );
|
|
42
|
+
* // Creates: person_s_friends_s (Alice→Bob) AND person_s_friends_by (Bob→Alice)
|
|
43
|
+
*/
|
|
44
|
+
export declare function CreateConnectionBetweenTwoConceptsLocal(ofTheConcept: Concept, toTheConcept: Concept, linker: string, both?: boolean, actions?: InnerActions): Promise<any>;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { Concept } from "../../DataStructures/Concept";
|
|
2
|
+
/**
|
|
3
|
+
* Creates a default empty local concept with all properties set to zero/default values.
|
|
4
|
+
*
|
|
5
|
+
* This utility function generates a blank Concept object that can be used as a placeholder
|
|
6
|
+
* or default return value when a concept is not found. All IDs and values are set to 0
|
|
7
|
+
* or empty defaults.
|
|
8
|
+
*
|
|
9
|
+
* **Default Values:**
|
|
10
|
+
* - id: 0 (indicates empty/not found)
|
|
11
|
+
* - userId: 0
|
|
12
|
+
* - typeId: 0
|
|
13
|
+
* - categoryId: 0
|
|
14
|
+
* - referentId: 0
|
|
15
|
+
* - characterValue: "0"
|
|
16
|
+
* - accessId: 0
|
|
17
|
+
* - isNew: false
|
|
18
|
+
* - entryTimeStamp: current date
|
|
19
|
+
* - updatedTimeStamp: current date
|
|
20
|
+
* - typeCharacter: "0"
|
|
21
|
+
*
|
|
22
|
+
* **Use Cases:**
|
|
23
|
+
* - Default return value when concept not found
|
|
24
|
+
* - Placeholder for conditional logic
|
|
25
|
+
* - Initial state before loading data
|
|
26
|
+
* - Template for creating new concepts
|
|
27
|
+
*
|
|
28
|
+
* @returns A Concept object with all properties set to default/zero values
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* // Use as default return
|
|
32
|
+
* let concept = await GetTheConceptLocal(id);
|
|
33
|
+
* if (concept.id === 0) {
|
|
34
|
+
* concept = CreateDefaultLConcept();
|
|
35
|
+
* }
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* // Check if concept is valid
|
|
39
|
+
* const concept = CreateDefaultLConcept();
|
|
40
|
+
* console.log(concept.id); // 0
|
|
41
|
+
* console.log(concept.characterValue); // "0"
|
|
42
|
+
*
|
|
43
|
+
* @see {@link CreateTheConceptLocal} for creating actual local concepts
|
|
44
|
+
* @see {@link GetTheConceptLocal} for retrieving local concepts
|
|
45
|
+
*/
|
|
46
|
+
export declare function CreateDefaultLConcept(): Concept;
|
|
@@ -0,0 +1,34 @@
|
|
|
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>;
|
|
@@ -0,0 +1,104 @@
|
|
|
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>;
|
|
@@ -0,0 +1,84 @@
|
|
|
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>;
|