mftsccs-browser 2.1.242-dev → 2.1.244-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.
Files changed (271) hide show
  1. package/README.md +1 -1
  2. package/dist/main.bundle.js +2 -44551
  3. package/dist/main.bundle.js.LICENSE.txt +1 -0
  4. package/dist/serviceWorker.bundle.js +2 -45399
  5. package/dist/serviceWorker.bundle.js.LICENSE.txt +1 -0
  6. package/dist/types/AccessTracker/accessTracker.d.ts +72 -0
  7. package/dist/types/Anomaly/anomaly.d.ts +103 -0
  8. package/dist/types/Api/Create/CreateTheCharacter.d.ts +24 -0
  9. package/dist/types/Api/Create/CreateTheConceptApi.d.ts +20 -0
  10. package/dist/types/Api/Create/CreateTheConnectionApi.d.ts +18 -0
  11. package/dist/types/Api/Create/CreateTheGhostConceptApi.d.ts +28 -0
  12. package/dist/types/Api/Create/CreateTheGhostConnectionApi.d.ts +18 -0
  13. package/dist/types/Api/Create/CreateTheTextData.d.ts +18 -0
  14. package/dist/types/Api/Delete/DeleteConceptInBackend.d.ts +14 -0
  15. package/dist/types/Api/Delete/DeleteUserInBackend.d.ts +19 -0
  16. package/dist/types/Api/DeleteConnectionBulkApi.d.ts +20 -0
  17. package/dist/types/Api/DeleteTheConcept.d.ts +20 -0
  18. package/dist/types/Api/DeleteTheConnection.d.ts +20 -0
  19. package/dist/types/Api/GetAiData.d.ts +10 -0
  20. package/dist/types/Api/GetAllConceptsByType.d.ts +12 -0
  21. package/dist/types/Api/GetAllConnectionsOfComposition.d.ts +23 -0
  22. package/dist/types/Api/GetAllConnectionsOfCompositionBulk.d.ts +23 -0
  23. package/dist/types/Api/GetAllLinkerConnectionsFromTheConcept.d.ts +12 -0
  24. package/dist/types/Api/GetAllLinkerConnectionsToTheConcept.d.ts +12 -0
  25. package/dist/types/Api/GetCharacterDataByCharacter.d.ts +12 -0
  26. package/dist/types/Api/GetCompositionConnectionsBetweenTwoConcepts.d.ts +13 -0
  27. package/dist/types/Api/GetConcept.d.ts +6 -0
  28. package/dist/types/Api/GetConceptBulk.d.ts +20 -0
  29. package/dist/types/Api/GetConceptByCharacterAndType.d.ts +15 -0
  30. package/dist/types/Api/GetConceptByCharacterValue.d.ts +12 -0
  31. package/dist/types/Api/GetConnection.d.ts +15 -0
  32. package/dist/types/Api/GetConnectionBulk.d.ts +7 -0
  33. package/dist/types/Api/GetConnectionOfTheConcept.d.ts +15 -0
  34. package/dist/types/Api/GetConnectionToTheConcept.d.ts +17 -0
  35. package/dist/types/Api/GetConnections/GetConnectionsBetweenApi.d.ts +40 -0
  36. package/dist/types/Api/GetConnections/GetConnectionsByTypeApi.d.ts +15 -0
  37. package/dist/types/Api/GetInstanceConceptByCharacterType.d.ts +9 -0
  38. package/dist/types/Api/GetReservedConnectionIds.d.ts +10 -0
  39. package/dist/types/Api/GetReservedIds.d.ts +10 -0
  40. package/dist/types/Api/Images/GetImages.d.ts +15 -0
  41. package/dist/types/Api/Local/GetLocalConceptByCharacterValue.d.ts +13 -0
  42. package/dist/types/Api/Login.d.ts +78 -0
  43. package/dist/types/Api/MakeTheNameInBackend.d.ts +14 -0
  44. package/dist/types/Api/MakeTheTypeConceptApi.d.ts +9 -0
  45. package/dist/types/Api/Prototype/Selector.d.ts +26 -0
  46. package/dist/types/Api/RecursiveSearch.d.ts +67 -0
  47. package/dist/types/Api/Search/FreeschemaQueryApi.d.ts +18 -0
  48. package/dist/types/Api/Search/Search.d.ts +73 -0
  49. package/dist/types/Api/Search/SearchInternalApi.d.ts +28 -0
  50. package/dist/types/Api/Search/SearchLinkMultipleApi.d.ts +15 -0
  51. package/dist/types/Api/Search/SearchWithLinker.d.ts +16 -0
  52. package/dist/types/Api/Search/SearchWithTypeAndLinker.d.ts +14 -0
  53. package/dist/types/Api/SearchConcept/GetConceptByCharacterAndCategoryApi.d.ts +12 -0
  54. package/dist/types/Api/SearchConcept/GetConceptByCharacterAndCategoryDirect.d.ts +13 -0
  55. package/dist/types/Api/SearchConcept/GetTypeConceptByBulk.d.ts +15 -0
  56. package/dist/types/Api/Session/CreateSession.d.ts +16 -0
  57. package/dist/types/Api/Session/CreateSessionVisit.d.ts +12 -0
  58. package/dist/types/Api/Signin.d.ts +24 -0
  59. package/dist/types/Api/Signup.d.ts +61 -0
  60. package/dist/types/Api/Translate/TranslateLocalToReal.d.ts +12 -0
  61. package/dist/types/Api/View/ViewInternalDataApi.d.ts +15 -0
  62. package/dist/types/Constants/AccessConstants.d.ts +3 -0
  63. package/dist/types/Constants/ApiConstants.d.ts +23 -0
  64. package/dist/types/Constants/FormatConstants.d.ts +8 -0
  65. package/dist/types/Constants/ckeditorCSS.d.ts +1 -0
  66. package/dist/types/Constants/general.const.d.ts +11 -0
  67. package/dist/types/Constants/page.const.d.ts +5 -0
  68. package/dist/types/DataStructures/AccessControl/AccessControlModels.d.ts +84 -0
  69. package/dist/types/DataStructures/BaseUrl.d.ts +95 -0
  70. package/dist/types/DataStructures/BinaryCharacterTree.d.ts +16 -0
  71. package/dist/types/DataStructures/BinaryTree.d.ts +78 -0
  72. package/dist/types/DataStructures/BinaryTypeTree.d.ts +17 -0
  73. package/dist/types/DataStructures/CharacterRepository.d.ts +8 -0
  74. package/dist/types/DataStructures/Composition/Composition.d.ts +14 -0
  75. package/dist/types/DataStructures/Composition/CompositionBinaryTree.d.ts +10 -0
  76. package/dist/types/DataStructures/Composition/CompositionNode.d.ts +21 -0
  77. package/dist/types/DataStructures/Concept.d.ts +25 -0
  78. package/dist/types/DataStructures/ConceptData.d.ts +30 -0
  79. package/dist/types/DataStructures/Connection.d.ts +23 -0
  80. package/dist/types/DataStructures/ConnectionBinaryTree/ConnectionBinaryTree.d.ts +81 -0
  81. package/dist/types/DataStructures/ConnectionBinaryTree/ConnectionNode.d.ts +27 -0
  82. package/dist/types/DataStructures/ConnectionBinaryTree/ConnectionOfNode.d.ts +10 -0
  83. package/dist/types/DataStructures/ConnectionBinaryTree/ConnectionOfTheTree.d.ts +24 -0
  84. package/dist/types/DataStructures/ConnectionBinaryTree/ConnectionTypeNode.d.ts +10 -0
  85. package/dist/types/DataStructures/ConnectionBinaryTree/ConnectionTypeTree.d.ts +20 -0
  86. package/dist/types/DataStructures/ConnectionBinaryTree/NodePrimitive.d.ts +15 -0
  87. package/dist/types/DataStructures/ConnectionByType/GetConnectionByType.d.ts +4 -0
  88. package/dist/types/DataStructures/ConnectionData.d.ts +26 -0
  89. package/dist/types/DataStructures/Count/CountInfo.d.ts +6 -0
  90. package/dist/types/DataStructures/FetchConnection.d.ts +64 -0
  91. package/dist/types/DataStructures/FilterSearch.d.ts +9 -0
  92. package/dist/types/DataStructures/IdentifierFlags.d.ts +11 -0
  93. package/dist/types/DataStructures/Local/LConcept.d.ts +23 -0
  94. package/dist/types/DataStructures/Local/LConnection.d.ts +18 -0
  95. package/dist/types/DataStructures/Local/LNode.d.ts +29 -0
  96. package/dist/types/DataStructures/Local/LocalBinaryCharacterTree.d.ts +13 -0
  97. package/dist/types/DataStructures/Local/LocalBinaryTree.d.ts +13 -0
  98. package/dist/types/DataStructures/Local/LocalBinaryTypeTree.d.ts +13 -0
  99. package/dist/types/DataStructures/Local/LocalConceptData.d.ts +21 -0
  100. package/dist/types/DataStructures/Local/LocalConnectionData.d.ts +20 -0
  101. package/dist/types/DataStructures/Local/LocalGhostIdTree.d.ts +11 -0
  102. package/dist/types/DataStructures/Local/LocalId.d.ts +19 -0
  103. package/dist/types/DataStructures/Local/LocalSyncData.d.ts +33 -0
  104. package/dist/types/DataStructures/Node.d.ts +30 -0
  105. package/dist/types/DataStructures/PatcherStructure.d.ts +8 -0
  106. package/dist/types/DataStructures/Prototype/Prototype.d.ts +19 -0
  107. package/dist/types/DataStructures/Prototype/PrototypeOption.d.ts +4 -0
  108. package/dist/types/DataStructures/Prototype/QuerySelector.d.ts +4 -0
  109. package/dist/types/DataStructures/ReservedIds.d.ts +10 -0
  110. package/dist/types/DataStructures/Responses/ErrorResponse.d.ts +74 -0
  111. package/dist/types/DataStructures/Responses/StandardResponses.d.ts +6 -0
  112. package/dist/types/DataStructures/Returner.d.ts +7 -0
  113. package/dist/types/DataStructures/Search/FreeschemaQuery.d.ts +25 -0
  114. package/dist/types/DataStructures/Search/SearchStructure.d.ts +10 -0
  115. package/dist/types/DataStructures/SearchQuery.d.ts +17 -0
  116. package/dist/types/DataStructures/Security/SecureStorage.d.ts +14 -0
  117. package/dist/types/DataStructures/Security/TokenStorage.d.ts +24 -0
  118. package/dist/types/DataStructures/Session/SessionData.d.ts +13 -0
  119. package/dist/types/DataStructures/SettingData.d.ts +5 -0
  120. package/dist/types/DataStructures/Settings.d.ts +4 -0
  121. package/dist/types/DataStructures/SigninModel.d.ts +4 -0
  122. package/dist/types/DataStructures/SignupModel.d.ts +4 -0
  123. package/dist/types/DataStructures/SyncData.d.ts +14 -0
  124. package/dist/types/DataStructures/TheCharacter.d.ts +13 -0
  125. package/dist/types/DataStructures/TheTexts.d.ts +14 -0
  126. package/dist/types/DataStructures/TypeLibrary.d.ts +19 -0
  127. package/dist/types/DataStructures/TypeNode.d.ts +18 -0
  128. package/dist/types/DataStructures/User/UserBinaryTree.d.ts +13 -0
  129. package/dist/types/DataStructures/User/UserNode.d.ts +18 -0
  130. package/dist/types/DataStructures/WidgetCache/WidgetCache.d.ts +10 -0
  131. package/dist/types/DataStructures/WidgetCache/WidgetDetails.d.ts +9 -0
  132. package/dist/types/DataStructures/WidgetCache/WidgetNode.d.ts +18 -0
  133. package/dist/types/DataStructures/environments/environments.d.ts +48 -0
  134. package/dist/types/Database/CacheDatabase.d.ts +57 -0
  135. package/dist/types/Database/IndexUpdate.d.ts +47 -0
  136. package/dist/types/Database/NoIndexDb.d.ts +9 -0
  137. package/dist/types/Database/indexdblocal.d.ts +43 -0
  138. package/dist/types/Database/indexeddb.d.ts +58 -0
  139. package/dist/types/Helpers/CheckIfExists.d.ts +9 -0
  140. package/dist/types/Helpers/RemoveFromArray.d.ts +5 -0
  141. package/dist/types/Helpers/UniqueInsert.d.ts +1 -0
  142. package/dist/types/Middleware/ApplicationMonitor.d.ts +25 -0
  143. package/dist/types/Middleware/logger.service.d.ts +144 -0
  144. package/dist/types/ServiceWorker/actions/connectionActions.d.ts +2 -0
  145. package/dist/types/ServiceWorker/actions/createActions.d.ts +2 -0
  146. package/dist/types/ServiceWorker/actions/deleteActions.d.ts +2 -0
  147. package/dist/types/ServiceWorker/actions/getActions.d.ts +2 -0
  148. package/dist/types/ServiceWorker/actions/index.d.ts +15 -0
  149. package/dist/types/ServiceWorker/actions/searchActions.d.ts +2 -0
  150. package/dist/types/ServiceWorker/actions/syncActions.d.ts +2 -0
  151. package/dist/types/ServiceWorker/actions/updateActions.d.ts +2 -0
  152. package/dist/types/ServiceWorker/index.d.ts +11 -0
  153. package/dist/types/Services/AccessControl/APIClientService.d.ts +167 -0
  154. package/dist/types/Services/AccessControl/AccessControl.d.ts +114 -0
  155. package/dist/types/Services/CacheClear.d.ts +7 -0
  156. package/dist/types/Services/CheckForConnectionDeletion.d.ts +3 -0
  157. package/dist/types/Services/Common/DecodeCountInfo.d.ts +3 -0
  158. package/dist/types/Services/Common/DelayFunction.d.ts +7 -0
  159. package/dist/types/Services/Common/ErrorPosting.d.ts +10 -0
  160. package/dist/types/Services/Common/MergeArrays.d.ts +7 -0
  161. package/dist/types/Services/Common/RegexFunction.d.ts +1 -0
  162. package/dist/types/Services/Common/RemoveAllChild.d.ts +1 -0
  163. package/dist/types/Services/Composition/BuildComposition.d.ts +3 -0
  164. package/dist/types/Services/Composition/CompositionCache.d.ts +4 -0
  165. package/dist/types/Services/Composition/CreateCompositionCache.d.ts +3 -0
  166. package/dist/types/Services/ConceptFinding/GetConceptByCharacterAndCategory.d.ts +5 -0
  167. package/dist/types/Services/Conversion/ConvertConcepts.d.ts +5 -0
  168. package/dist/types/Services/CreateBinaryTreeFromData.d.ts +5 -0
  169. package/dist/types/Services/CreateConnection/CreateConnectionEntity.d.ts +2 -0
  170. package/dist/types/Services/CreateConnectionBetweenTwoConcepts.d.ts +5 -0
  171. package/dist/types/Services/CreateDefaultConcept.d.ts +3 -0
  172. package/dist/types/Services/CreateTheComposition.d.ts +1 -0
  173. package/dist/types/Services/CreateTheConcept.d.ts +122 -0
  174. package/dist/types/Services/CreateTheConnection.d.ts +63 -0
  175. package/dist/types/Services/CreateTheConnectionGeneral.d.ts +2 -0
  176. package/dist/types/Services/DeleteConcept.d.ts +2 -0
  177. package/dist/types/Services/DeleteConnection.d.ts +2 -0
  178. package/dist/types/Services/DeleteConnectionByType.d.ts +22 -0
  179. package/dist/types/Services/FindConeceptsFromConnection.d.ts +6 -0
  180. package/dist/types/Services/FindConnectionsOfCompositionBulkInMemory.d.ts +1 -0
  181. package/dist/types/Services/GetComposition.d.ts +205 -0
  182. package/dist/types/Services/GetCompositionBulk.d.ts +100 -0
  183. package/dist/types/Services/GetCompositionList.d.ts +7 -0
  184. package/dist/types/Services/GetConceptByCharacter.d.ts +2 -0
  185. package/dist/types/Services/GetConnectionBetweenTwoConceptsLinker.d.ts +11 -0
  186. package/dist/types/Services/GetConnections.d.ts +1 -0
  187. package/dist/types/Services/GetDataFromIndexDb.d.ts +2 -0
  188. package/dist/types/Services/GetLink.d.ts +3 -0
  189. package/dist/types/Services/GetLinkerConnectionFromConcept.d.ts +3 -0
  190. package/dist/types/Services/GetRelation.d.ts +3 -0
  191. package/dist/types/Services/GetTheConcept.d.ts +96 -0
  192. package/dist/types/Services/InitializeSystem.d.ts +2 -0
  193. package/dist/types/Services/Local/ConvertFromLConceptToConcept.d.ts +41 -0
  194. package/dist/types/Services/Local/ConvertFromLConnectionToConnection.d.ts +47 -0
  195. package/dist/types/Services/Local/CreateConnectionBetweenTwoConceptsLocal.d.ts +44 -0
  196. package/dist/types/Services/Local/CreateDefaultLConcept.d.ts +46 -0
  197. package/dist/types/Services/Local/CreateLocalBinaryTreeFromData.d.ts +34 -0
  198. package/dist/types/Services/Local/CreateTheCompositionLocal.d.ts +104 -0
  199. package/dist/types/Services/Local/CreateTheConceptLocal.d.ts +84 -0
  200. package/dist/types/Services/Local/CreateTheConnectionLocal.d.ts +140 -0
  201. package/dist/types/Services/Local/DeleteConceptLocal.d.ts +47 -0
  202. package/dist/types/Services/Local/GetCompositionListLocal.d.ts +37 -0
  203. package/dist/types/Services/Local/GetCompositionLocal.d.ts +97 -0
  204. package/dist/types/Services/Local/GetConceptByCharacterLocal.d.ts +56 -0
  205. package/dist/types/Services/Local/GetConnectionOfTheConceptLocal.d.ts +19 -0
  206. package/dist/types/Services/Local/GetRelationLocal.d.ts +21 -0
  207. package/dist/types/Services/Local/GetTheConceptLocal.d.ts +63 -0
  208. package/dist/types/Services/Local/MakeTheConceptLocal.d.ts +22 -0
  209. package/dist/types/Services/Local/MakeTheInstanceConceptLocal.d.ts +164 -0
  210. package/dist/types/Services/Local/MakeTheTypeLocal.d.ts +36 -0
  211. package/dist/types/Services/Local/UpdateCompositionLocal.d.ts +42 -0
  212. package/dist/types/Services/Logs/LogEvent.d.ts +1 -0
  213. package/dist/types/Services/Mail.d.ts +41 -0
  214. package/dist/types/Services/MakeTheCharacter.d.ts +2 -0
  215. package/dist/types/Services/MakeTheCharacterData.d.ts +2 -0
  216. package/dist/types/Services/MakeTheConcept.d.ts +2 -0
  217. package/dist/types/Services/MakeTheInstanceConcept.d.ts +15 -0
  218. package/dist/types/Services/MakeTheTimestamp.d.ts +1 -0
  219. package/dist/types/Services/MakeTheTypeConcept.d.ts +1 -0
  220. package/dist/types/Services/Mqtt/publishMessage.d.ts +1 -0
  221. package/dist/types/Services/Search/DataIdFormat.d.ts +32 -0
  222. package/dist/types/Services/Search/FormatData.d.ts +36 -0
  223. package/dist/types/Services/Search/JustIdFormat.d.ts +23 -0
  224. package/dist/types/Services/Search/NewFormat.d.ts +4 -0
  225. package/dist/types/Services/Search/SearchLinkInternal.d.ts +3 -0
  226. package/dist/types/Services/Search/SearchLinkMultiple.d.ts +55 -0
  227. package/dist/types/Services/Search/SearchWithTypeAndLinker.d.ts +82 -0
  228. package/dist/types/Services/Search/orderingConnections.d.ts +2 -0
  229. package/dist/types/Services/Security/GetRequestHeader.d.ts +7 -0
  230. package/dist/types/Services/SplitStrings.d.ts +1 -0
  231. package/dist/types/Services/Transaction/LocalTransaction.d.ts +117 -0
  232. package/dist/types/Services/UpdateComposition.d.ts +2 -0
  233. package/dist/types/Services/Upload.d.ts +111 -0
  234. package/dist/types/Services/User/UserFromLocalStorage.d.ts +10 -0
  235. package/dist/types/Services/User/UserTranslation.d.ts +3 -0
  236. package/dist/types/Services/View/ViewInternalData.d.ts +1 -0
  237. package/dist/types/Services/assets/GetImageService.d.ts +14 -0
  238. package/dist/types/Services/automated/automated-concept-connection.d.ts +7 -0
  239. package/dist/types/Services/cacheService.d.ts +1 -0
  240. package/dist/types/Validator/constant.d.ts +3 -0
  241. package/dist/types/Validator/interface.d.ts +19 -0
  242. package/dist/types/Validator/utils.d.ts +7 -0
  243. package/dist/types/Validator/validator.d.ts +37 -0
  244. package/dist/types/Widgets/BaseObserver.d.ts +25 -0
  245. package/dist/types/Widgets/BaseWidget.d.ts +37 -0
  246. package/dist/types/Widgets/BuilderSpeceficFunctions.d.ts +11 -0
  247. package/dist/types/Widgets/BuilderStatefulWidget.d.ts +392 -0
  248. package/dist/types/Widgets/CacheWidget.service.d.ts +77 -0
  249. package/dist/types/Widgets/NormalizeStyles.service.d.ts +10 -0
  250. package/dist/types/Widgets/RenderPage.service.d.ts +17 -0
  251. package/dist/types/Widgets/RenderWidgetLibrary.service.d.ts +22 -0
  252. package/dist/types/Widgets/RenderWidgetService.d.ts +187 -0
  253. package/dist/types/Widgets/StatefulWidget.d.ts +167 -0
  254. package/dist/types/Widgets/WidgetBuild.d.ts +45 -0
  255. package/dist/types/Widgets/WidgetCacheManager.d.ts +108 -0
  256. package/dist/types/Widgets/WidgetTree.d.ts +61 -0
  257. package/dist/types/WrapperFunctions/DepenedencyObserver.d.ts +116 -0
  258. package/dist/types/WrapperFunctions/GetCompositionListObservable.d.ts +51 -0
  259. package/dist/types/WrapperFunctions/GetCompositionObservable.d.ts +35 -0
  260. package/dist/types/WrapperFunctions/GetLinkListObservable.d.ts +57 -0
  261. package/dist/types/WrapperFunctions/GetLinkObservable.d.ts +50 -0
  262. package/dist/types/WrapperFunctions/QueryCacheManager.d.ts +107 -0
  263. package/dist/types/WrapperFunctions/RecursiveSearchObservable.d.ts +55 -0
  264. package/dist/types/WrapperFunctions/SchemaQueryObservable.d.ts +64 -0
  265. package/dist/types/WrapperFunctions/SearchLinkMultipleAllObservable.d.ts +36 -0
  266. package/dist/types/app.d.ts +385 -0
  267. package/dist/types/prototype/prototype.service.d.ts +25 -0
  268. package/dist/types/service-worker.d.ts +1 -0
  269. package/package.json +2 -2
  270. package/dist/main.bundle.js.map +0 -1
  271. package/dist/serviceWorker.bundle.js.map +0 -1
@@ -0,0 +1,47 @@
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>;
@@ -0,0 +1,37 @@
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>;
@@ -0,0 +1,97 @@
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>;
@@ -0,0 +1,56 @@
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>;
@@ -0,0 +1,19 @@
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[]>;
@@ -0,0 +1,21 @@
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>;
@@ -0,0 +1,63 @@
1
+ /**
2
+ * Retrieves a concept by ID with support for both local (virtual) and server concepts.
3
+ *
4
+ * This is the primary function for fetching concepts in offline/local mode. It intelligently
5
+ * handles three types of concept IDs and retrieves from appropriate sources:
6
+ *
7
+ * **ID Types Handled:**
8
+ * 1. **Negative IDs (Virtual/Local)**: Concepts created locally not yet synced
9
+ * - Stored in LocalConceptsData (IndexedDB)
10
+ * - Return negative IDs
11
+ *
12
+ * 2. **Synced Virtual IDs**: Originally local concepts now synced to backend
13
+ * - Looked up via LocalGhostIdTree (maps negative to positive IDs)
14
+ * - Returns positive (real) ID with ghostId reference
15
+ *
16
+ * 3. **Positive IDs (Server)**: Real backend concepts
17
+ * - Fetched via GetTheConcept from backend
18
+ * - Converted to LConcept format
19
+ * - May have undefined ghostId
20
+ *
21
+ * **Retrieval Strategy:**
22
+ * - If id < 0: Check LocalConceptsData → Check LocalGhostIdTree
23
+ * - If id >= 0: Fetch from backend → Convert to LConcept
24
+ * - Routes through service worker if enabled
25
+ * - Returns default empty concept if not found
26
+ *
27
+ * **Ghost ID System:**
28
+ * - ghostId: Original negative ID (preserved after sync)
29
+ * - id: Current ID (negative if local, positive if synced)
30
+ * - LocalGhostIdTree maintains the mapping
31
+ *
32
+ * @param id - The concept ID to retrieve. Can be:
33
+ * - Negative (e.g., -12345) for local-only concepts
34
+ * - Positive (e.g., 789) for server concepts
35
+ *
36
+ * @returns Promise resolving to a Concept object in LConcept format.
37
+ * Returns default concept (id=0) if not found.
38
+ *
39
+ * @example
40
+ * // Get a local concept (negative ID)
41
+ * const localConcept = await GetTheConceptLocal(-12345);
42
+ * console.log(localConcept.id); // -12345
43
+ * console.log(localConcept.characterValue); // "Draft Note"
44
+ *
45
+ * @example
46
+ * // Get a synced concept (originally local, now on server)
47
+ * const syncedConcept = await GetTheConceptLocal(-12345);
48
+ * console.log(syncedConcept.id); // 789 (now positive, synced)
49
+ * console.log(syncedConcept.ghostId); // -12345 (original ID preserved)
50
+ *
51
+ * @example
52
+ * // Get a server concept
53
+ * const serverConcept = await GetTheConceptLocal(456);
54
+ * console.log(serverConcept.id); // 456
55
+ * // Converted to LConcept format for consistency
56
+ *
57
+ * @throws Logs errors but returns default concept instead of throwing
58
+ *
59
+ * @see {@link CreateTheConceptLocal} for creating local concepts
60
+ * @see {@link GetTheConcept} for fetching server concepts only
61
+ * @see {@link convertFromConceptToLConcept} for format conversion
62
+ */
63
+ export declare function GetTheConceptLocal(id: number): Promise<any>;
@@ -0,0 +1,22 @@
1
+ import { InnerActions } from "../../app";
2
+ /**
3
+ * Gets or creates a local concept - implements get-or-create pattern.
4
+ *
5
+ * Checks LocalConceptsData for existing concept matching referent and typeId.
6
+ * If found, returns existing concept. If not found, creates new local concept.
7
+ *
8
+ * **Special Case**: If typeCharacter is "the", sets categoryId to 1 (system category).
9
+ *
10
+ * @param referent - The character value/name of the concept
11
+ * @param typeCharacter - Type name string (e.g., "the_name")
12
+ * @param userId - User ID creating the concept
13
+ * @param categoryId - Category classification ID
14
+ * @param typeId - Type classification ID
15
+ * @param actions - Action tracking for batch operations
16
+ * @returns Existing or newly created Concept
17
+ *
18
+ * @example
19
+ * const concept = await MakeTheConceptLocal("Active", "the_status", 101, 1, 5);
20
+ * // Returns existing "Active" status or creates new one
21
+ */
22
+ export default function MakeTheConceptLocal(referent: string, typeCharacter: string, userId: number, categoryId: number, typeId: number, actions?: InnerActions): Promise<any>;
@@ -0,0 +1,164 @@
1
+ import { InnerActions } from "../../Constants/general.const";
2
+ /**
3
+ * Creates or retrieves an instance concept locally - the core building block of the concept-connection system.
4
+ *
5
+ * This is THE fundamental function for creating concepts in local storage. It implements an intelligent
6
+ * get-or-create pattern that checks for existing concepts before creating new ones, preventing duplicates
7
+ * while supporting both unique instances and composition concepts.
8
+ *
9
+ * **Core Behaviors:**
10
+ * 1. **Composition Mode (composition=true)**: Always creates a new concept
11
+ * - Used for containers/objects that need unique instances
12
+ * - Marks concept with isComposition flag
13
+ * - Example: Each "Project" is unique, even with same name
14
+ *
15
+ * 2. **Instance Mode (composition=false)**: Get-or-create pattern
16
+ * - Checks if concept with same type and value exists
17
+ * - Returns existing if found (deduplication)
18
+ * - Creates new only if not found
19
+ * - Example: "Published" status concept reused across items
20
+ *
21
+ * 3. **Long Text Handling**: Values >255 characters always create new
22
+ * - Prevents expensive lookups on large text
23
+ * - Each long text gets unique concept
24
+ *
25
+ * **Type String Processing:**
26
+ * - **Best Practice**: Always pass type with "the_" prefix (e.g., "the_name", "the_email")
27
+ * - Auto-correction: If missing, "the_" is automatically added internally
28
+ * - "name" → "the_name" (auto-corrected)
29
+ * - "email" → "the_email" (auto-corrected)
30
+ * - "the_status" → "the_status" (already correct)
31
+ * - Creates type concept if it doesn't exist
32
+ * - **Recommendation**: Use explicit "the_" prefix for code clarity and consistency
33
+ *
34
+ * **Sync and Storage:**
35
+ * - Adds concept to LocalSyncData queue for backend sync
36
+ * - Stores in LocalConceptsData (IndexedDB)
37
+ * - Tracks in actions parameter for batch operations
38
+ * - Assigns negative ID (virtual/local)
39
+ *
40
+ * **Process Flow:**
41
+ * 1. Normalizes type string (adds "the_" prefix)
42
+ * 2. Creates/retrieves type concept via MakeTheTypeConceptLocal
43
+ * 3. If composition=true: Creates new concept immediately
44
+ * 4. If referent length >255: Creates new concept
45
+ * 5. If regular instance: Checks for existing by type+value
46
+ * 6. Returns existing or creates new
47
+ * 7. Attaches type information
48
+ * 8. Adds to sync queue
49
+ *
50
+ * @param type - The type/key of the concept. **Should follow the format "the_xyz"**.
51
+ * Represents what kind of data this is.
52
+ * Examples: "the_name", "the_email", "the_status", "the_first_name"
53
+ *
54
+ * **Note**: If you pass without "the_" prefix (e.g., "name"), the code will
55
+ * automatically add it internally (becomes "the_name"). However, best practice
56
+ * is to always include the "the_" prefix for clarity and consistency.
57
+ *
58
+ * @param referent - The actual value/content of the concept.
59
+ * The human-readable data (e.g., "Alice", "alice@example.com", "Active").
60
+ * Can be empty string for composition concepts.
61
+ *
62
+ * @param composition - Boolean flag determining creation behavior.
63
+ * - true: Always creates new concept (unique instances)
64
+ * - false: Get-or-create pattern (reuses existing)
65
+ * Defaults to false.
66
+ *
67
+ * @param userId - The ID of the user creating this concept. Used for ownership and permissions.
68
+ *
69
+ * @param accessId - Access control level. Typically 4 (default internal access).
70
+ * Controls who can view/modify this concept.
71
+ *
72
+ * @param sessionInformationId - Session identifier for tracking. Defaults to 999 (system).
73
+ * Used for audit logging and session management.
74
+ *
75
+ * @param referentId - Optional reference to another concept ID.
76
+ * Used when this concept is an instance of or refers to another concept.
77
+ * Defaults to 0 (no reference).
78
+ *
79
+ * @param actions - Action tracking object that accumulates all created concepts and connections.
80
+ * Used for batch operations, rollback, and sync management.
81
+ * Structure: { concepts: Concept[], connections: Connection[] }
82
+ *
83
+ * @returns Promise resolving to the created or retrieved Concept object with:
84
+ * - Negative ID if newly created locally
85
+ * - Attached type information (concept.type)
86
+ * - All standard concept properties
87
+ *
88
+ * @example
89
+ * // Create a reusable status concept (get-or-create)
90
+ * const status = await MakeTheInstanceConceptLocal(
91
+ * "the_status", // type (with "the_" prefix - best practice)
92
+ * "Active", // value
93
+ * false, // not composition - will reuse if exists
94
+ * 101, // userId
95
+ * 4, // accessId
96
+ * 999, // sessionId
97
+ * 0 // no referent
98
+ * );
99
+ * // First call creates, subsequent calls return same concept
100
+ *
101
+ * @example
102
+ * // Create a composition concept (always new)
103
+ * const project = await MakeTheInstanceConceptLocal(
104
+ * "the_project", // type (with "the_" prefix)
105
+ * "Project Alpha", // value
106
+ * true, // composition - always creates new
107
+ * 101,
108
+ * 4,
109
+ * 999,
110
+ * 0
111
+ * );
112
+ * // Each project is unique, even with same name
113
+ * console.log(project.isComposition); // true
114
+ *
115
+ * @example
116
+ * // Type prefix is added automatically if missing (but prefer explicit)
117
+ * const email = await MakeTheInstanceConceptLocal(
118
+ * "email", // Missing "the_" - will become "the_email" internally
119
+ * "alice@example.com",
120
+ * false,
121
+ * 101, 4
122
+ * );
123
+ * console.log(email.typeCharacter); // "the_email" (auto-prefixed)
124
+ *
125
+ * // RECOMMENDED: Always include "the_" prefix explicitly
126
+ * const emailBetter = await MakeTheInstanceConceptLocal(
127
+ * "the_email", // Explicit prefix - clearer and more consistent
128
+ * "bob@example.com",
129
+ * false,
130
+ * 101, 4
131
+ * );
132
+ *
133
+ * @example
134
+ * // Long text always creates new concept
135
+ * const longDescription = "Lorem ipsum...".repeat(100); // >255 chars
136
+ * const concept = await MakeTheInstanceConceptLocal(
137
+ * "the_description", // type with "the_" prefix
138
+ * longDescription,
139
+ * false, // Even with false, creates new due to length
140
+ * 101, 4
141
+ * );
142
+ *
143
+ * @example
144
+ * // Track actions for batch operations
145
+ * const actions = { concepts: [], connections: [] };
146
+ * await MakeTheInstanceConceptLocal("the_name", "Alice", false, 101, 4, 999, 0, actions);
147
+ * await MakeTheInstanceConceptLocal("the_email", "alice@ex.com", false, 101, 4, 999, 0, actions);
148
+ * console.log(actions.concepts.length); // 2 (plus any type concepts created)
149
+ *
150
+ * @example
151
+ * // Deduplication in action
152
+ * const status1 = await MakeTheInstanceConceptLocal("the_status", "Published", false, 101, 4);
153
+ * const status2 = await MakeTheInstanceConceptLocal("the_status", "Published", false, 101, 4);
154
+ * console.log(status1.id === status2.id); // true - same concept reused
155
+ *
156
+ * @throws Logs errors and re-throws for handling by caller.
157
+ * Common issues: Type concept creation failures, IndexedDB errors.
158
+ *
159
+ * @see {@link CreateTheConceptLocal} for the underlying creation function
160
+ * @see {@link MakeTheTypeConceptLocal} for type concept creation/retrieval
161
+ * @see {@link LocalConceptsData.GetConceptByCharacterAndTypeLocal} for existence check
162
+ * @see {@link LocalSyncData.AddConcept} for sync queue management
163
+ */
164
+ export declare function MakeTheInstanceConceptLocal(type: string, referent: string, composition: boolean | undefined, userId: number, accessId: number, sessionInformationId?: number, referentId?: number, actions?: InnerActions): Promise<any>;
@@ -0,0 +1,36 @@
1
+ import { Concept } from "../../DataStructures/Concept";
2
+ import { InnerActions } from "../../Constants/general.const";
3
+ /**
4
+ * Creates or retrieves a type concept locally - handles hierarchical type system.
5
+ *
6
+ * Type concepts are placeholders/templates (e.g., "the_first_name", "the_email") that define
7
+ * what kind of data a concept represents. They have no actual value themselves.
8
+ *
9
+ * **Hierarchical Processing (Complex Logic)**:
10
+ * - Single word (e.g., "status"): Creates simple type concept with typeId=51
11
+ * - Compound words (e.g., "the_person_email"): Splits into parts and creates hierarchy:
12
+ * 1. Creates category concept from first part ("the_person")
13
+ * 2. Creates type concept from second part ("email")
14
+ * 3. Creates final concept with category and type linked
15
+ * **Uses recursion** to build multi-level type hierarchies
16
+ *
17
+ * Always checks for existing type concept before creating to prevent duplicates.
18
+ *
19
+ * @param typeString - The type name to create (e.g., "the_status", "the_person_email")
20
+ * @param sessionId - Session identifier (typically 999)
21
+ * @param sessionUserId - Session user ID (typically 999, not used)
22
+ * @param userId - User creating the type concept
23
+ * @param actions - Action tracking for batch operations
24
+ * @returns Type Concept (existing or newly created)
25
+ *
26
+ * @example
27
+ * // Simple type
28
+ * const statusType = await MakeTheTypeConceptLocal("the_status", 999, 999, 101);
29
+ * // Creates: "the_status" type concept
30
+ *
31
+ * @example
32
+ * // Hierarchical type (recursive processing)
33
+ * const emailType = await MakeTheTypeConceptLocal("the_person_email", 999, 999, 101);
34
+ * // Creates: "the_person" (category) + "email" (type) + "the_person_email" (combined)
35
+ */
36
+ export declare function MakeTheTypeConceptLocal(typeString: string, sessionId: number, sessionUserId: number, userId: number, actions?: InnerActions): Promise<Concept>;
@@ -0,0 +1,42 @@
1
+ import { PatcherStructure } from "../../DataStructures/PatcherStructure";
2
+ import { InnerActions } from "../../app";
3
+ /**
4
+ * Updates/patches a composition in local storage with new or modified properties.
5
+ *
6
+ * **Complex Patching Logic** (197 lines):
7
+ * 1. Fetches latest composition data from backend (all connections and concepts)
8
+ * 2. Iterates through patchObject properties to add/update
9
+ * 3. For each property:
10
+ * - If value is object/array: Creates composition concept and nested composition
11
+ * - If value is primitive: Creates instance concept with value
12
+ * - Checks if concept type already exists in composition
13
+ * - If exists: Marks old connections for deletion (replaces old value)
14
+ * - If new: Simply adds new connection
15
+ * 4. Creates connections between parent composition and new/updated concepts
16
+ * 5. Deletes old connections (cleanup)
17
+ * 6. Syncs changes to backend
18
+ *
19
+ * **Use Case**: Updating fields in an existing composition without recreating it entirely.
20
+ *
21
+ * @param patcherStructure - Object containing:
22
+ * - compositionId: The composition to update
23
+ * - ofTheCompositionId: Optional parent composition for nested updates
24
+ * - patchObject: Object with key-value pairs to add/update
25
+ * - userId, sessionId, accessId: User context
26
+ * @param actions - Action tracking for batch operations and rollback
27
+ *
28
+ * @example
29
+ * // Update a person's email and phone
30
+ * await UpdateCompositionLocal({
31
+ * compositionId: personId,
32
+ * patchObject: {
33
+ * the_email: "newemail@example.com",
34
+ * the_phone: "555-1234"
35
+ * },
36
+ * userId: 101,
37
+ * sessionId: 999,
38
+ * accessId: 4
39
+ * });
40
+ * // Old email connection deleted, new email connection created
41
+ */
42
+ export declare function UpdateCompositionLocal(patcherStructure: PatcherStructure, actions?: InnerActions): Promise<any>;
@@ -0,0 +1 @@
1
+ export declare function LogEvent(EventName: string, EventDescription: string, event: any): void;
@@ -0,0 +1,41 @@
1
+ export interface EmailBody {
2
+ toAddress: string;
3
+ heading: string;
4
+ body?: string;
5
+ attachments?: Array<string>;
6
+ CaptchaToken?: string;
7
+ recaptchaAction?: string;
8
+ }
9
+ export interface BulkEmailBody extends Omit<EmailBody, 'toAddress'> {
10
+ toAddress?: string;
11
+ ccAddresses: Array<string>;
12
+ }
13
+ export interface RecaptchaOptions {
14
+ token: string;
15
+ action?: string;
16
+ fieldName?: string;
17
+ actionFieldName?: string;
18
+ headerName?: string;
19
+ }
20
+ export interface SendEmailOptions {
21
+ bulk?: boolean;
22
+ personal?: boolean;
23
+ recaptcha?: string | RecaptchaOptions;
24
+ }
25
+ /**
26
+ * Method to send Email to user
27
+ * @param body FormData | EmailBody
28
+ * @param token string
29
+ * @param bulkOrOptions boolean | SendEmailOptions
30
+ * @param recaptchaToken string
31
+ * @returns JSON | string | null
32
+ */
33
+ export declare const sendEmail: (body: FormData | EmailBody | BulkEmailBody, token: string, bulkOrOptions?: boolean | SendEmailOptions, recaptchaToken?: string) => Promise<any>;
34
+ /**
35
+ * Method to send a personal Email to user.
36
+ * @param body FormData | EmailBody
37
+ * @param token string
38
+ * @param options SendEmailOptions
39
+ * @returns JSON | string | null
40
+ */
41
+ export declare const sendPersonalEmail: (body: FormData | EmailBody, token: string, options?: Omit<SendEmailOptions, "personal" | "bulk">) => Promise<any>;
@@ -0,0 +1,2 @@
1
+ import { Concept } from "../DataStructures/Concept";
2
+ export default function MakeTheCharacter(the_character_data: string, userId: number, securityId: number, accessId: number, accessUserId: number, sessionId: number): Promise<Concept>;
@@ -0,0 +1,2 @@
1
+ import { Returner } from "../DataStructures/Returner";
2
+ export default function MakeTheCharacterData(the_character_data: string, userId: number, securityId: number, accessId: number, sessionId: number): Promise<Returner>;
@@ -0,0 +1,2 @@
1
+ import { Concept } from "../DataStructures/Concept";
2
+ export default function MakeTheConcept(referent: string, userId: number, categoryId: number, typeId: number, referentId: number, accessId: number, typeCharacter: string): Promise<Concept>;