mftsccs-node 0.2.6 → 0.2.8

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 (287) hide show
  1. package/README.md +1148 -11
  2. package/dist/bundle.js +1 -1
  3. package/dist/types/Api/Create/CreateTheCharacter.d.ts +42 -0
  4. package/dist/types/Api/Create/CreateTheConceptApi.d.ts +50 -0
  5. package/dist/types/Api/Create/CreateTheConnectionApi.d.ts +51 -0
  6. package/dist/types/Api/Create/CreateTheTextData.d.ts +56 -0
  7. package/dist/types/Api/Delete/DeleteConceptInBackend.d.ts +43 -0
  8. package/dist/types/Api/DeleteConnectionApiBulk.d.ts +55 -0
  9. package/dist/types/Api/DeleteTheConcept.d.ts +64 -0
  10. package/dist/types/Api/DeleteTheConnection.d.ts +76 -0
  11. package/dist/types/Api/GetAiData.d.ts +36 -0
  12. package/dist/types/Api/GetAllConcepts.d.ts +42 -0
  13. package/dist/types/Api/GetAllConceptsByType.d.ts +45 -0
  14. package/dist/types/Api/GetAllConnections.d.ts +48 -0
  15. package/dist/types/Api/GetAllConnectionsOfComposition.d.ts +79 -0
  16. package/dist/types/Api/GetAllConnectionsOfCompositionBulk.d.ts +90 -0
  17. package/dist/types/Api/GetAllLinkerConnectionsFromTheConcept.d.ts +52 -0
  18. package/dist/types/Api/GetAllLinkerConnectionsToTheConcept.d.ts +61 -0
  19. package/dist/types/Api/GetAllPrefetchConnections.d.ts +51 -0
  20. package/dist/types/Api/GetCharacterDataByCharacter.d.ts +31 -0
  21. package/dist/types/Api/GetCompositionConnectionsBetweenTwoConcepts.d.ts +39 -0
  22. package/dist/types/Api/GetConcept.d.ts +47 -0
  23. package/dist/types/Api/GetConceptBulk.d.ts +68 -0
  24. package/dist/types/Api/GetConceptByCharacterAndType.d.ts +75 -0
  25. package/dist/types/Api/GetConceptByCharacterValue.d.ts +47 -0
  26. package/dist/types/Api/GetConnection.d.ts +49 -0
  27. package/dist/types/Api/GetConnectionBulk.d.ts +46 -0
  28. package/dist/types/Api/GetConnectionOfTheConcept.d.ts +50 -0
  29. package/dist/types/Api/GetConnectionToTheConcept.d.ts +56 -0
  30. package/dist/types/Api/GetReservedConnectionIds.d.ts +36 -0
  31. package/dist/types/Api/GetReservedIds.d.ts +37 -0
  32. package/dist/types/Api/Login.d.ts +38 -0
  33. package/dist/types/Api/MakeTheNameInBackend.d.ts +39 -0
  34. package/dist/types/Api/MakeTheTypeConceptApi.d.ts +40 -0
  35. package/dist/types/Api/RecursiveSearch.d.ts +43 -0
  36. package/dist/types/Api/Search/FreeschemaQueryApi.d.ts +46 -0
  37. package/dist/types/Api/Search/Search.d.ts +67 -0
  38. package/dist/types/Api/Search/SearchInternalApi.d.ts +69 -0
  39. package/dist/types/Api/Search/SearchLinkMultipleApi.d.ts +90 -0
  40. package/dist/types/Api/Search/SearchWithLinker.d.ts +97 -0
  41. package/dist/types/Api/SearchConcept/GetConceptByCharacterAndCategoryApi.d.ts +39 -0
  42. package/dist/types/Api/SearchConcept/GetConceptByCharacterAndCategoryDirect.d.ts +47 -0
  43. package/dist/types/Api/Session/CreateSession.d.ts +45 -0
  44. package/dist/types/Api/Session/CreateSessionVisit.d.ts +43 -0
  45. package/dist/types/Api/Signin.d.ts +48 -0
  46. package/dist/types/Api/Signup.d.ts +44 -0
  47. package/dist/types/Api/View/ViewInternalDataApi.d.ts +50 -0
  48. package/dist/types/Constants/ApiConstants.d.ts +226 -0
  49. package/dist/types/Constants/FormatConstants.d.ts +81 -0
  50. package/dist/types/DataStructures/BaseUrl.d.ts +210 -0
  51. package/dist/types/DataStructures/BinaryCharacterTree.d.ts +211 -0
  52. package/dist/types/DataStructures/BinaryTree.d.ts +139 -0
  53. package/dist/types/DataStructures/BinaryTypeTree.d.ts +196 -0
  54. package/dist/types/DataStructures/CharacterRepository.d.ts +109 -0
  55. package/dist/types/DataStructures/Composition/Composition.d.ts +103 -0
  56. package/dist/types/DataStructures/Composition/CompositionBinaryTree.d.ts +104 -0
  57. package/dist/types/DataStructures/Composition/CompositionNode.d.ts +202 -0
  58. package/dist/types/DataStructures/Concept.d.ts +110 -0
  59. package/dist/types/DataStructures/ConceptData.d.ts +292 -0
  60. package/dist/types/DataStructures/ConceptsToDraw.d.ts +168 -0
  61. package/dist/types/DataStructures/Connection.d.ts +76 -0
  62. package/dist/types/DataStructures/ConnectionBinaryTree/ConnectionBinaryTree.d.ts +115 -0
  63. package/dist/types/DataStructures/ConnectionBinaryTree/ConnectionNode.d.ts +169 -0
  64. package/dist/types/DataStructures/ConnectionBinaryTree/ConnectionTypeTree.d.ts +82 -0
  65. package/dist/types/DataStructures/ConnectionData.d.ts +191 -0
  66. package/dist/types/DataStructures/Count/CountInfo.d.ts +73 -0
  67. package/dist/types/DataStructures/FilterSearch.d.ts +84 -0
  68. package/dist/types/DataStructures/IdentifierFlags.d.ts +34 -0
  69. package/dist/types/DataStructures/Local/LConcept.d.ts +105 -0
  70. package/dist/types/DataStructures/Local/LConnection.d.ts +83 -0
  71. package/dist/types/DataStructures/Local/LNode.d.ts +190 -0
  72. package/dist/types/DataStructures/Local/LocalBinaryCharacterTree.d.ts +133 -0
  73. package/dist/types/DataStructures/Local/LocalBinaryTree.d.ts +135 -0
  74. package/dist/types/DataStructures/Local/LocalBinaryTypeTree.d.ts +147 -0
  75. package/dist/types/DataStructures/Local/LocalConceptData.d.ts +100 -0
  76. package/dist/types/DataStructures/Local/LocalConnectionData.d.ts +109 -0
  77. package/dist/types/DataStructures/Local/LocalSyncData.d.ts +89 -0
  78. package/dist/types/DataStructures/PatcherStructure.d.ts +86 -0
  79. package/dist/types/DataStructures/ReferentInfo.d.ts +68 -0
  80. package/dist/types/DataStructures/ReservedIds.d.ts +101 -0
  81. package/dist/types/DataStructures/Responses/ErrorResponse.d.ts +184 -22
  82. package/dist/types/DataStructures/Responses/StandardResponses.d.ts +65 -0
  83. package/dist/types/DataStructures/Returner.d.ts +59 -0
  84. package/dist/types/DataStructures/Search/FreeschemaQuery.d.ts +165 -0
  85. package/dist/types/DataStructures/Search/SearchStructure.d.ts +69 -0
  86. package/dist/types/DataStructures/SearchQuery.d.ts +130 -0
  87. package/dist/types/DataStructures/Security/TokenStorage.d.ts +48 -0
  88. package/dist/types/DataStructures/Session/SessionData.d.ts +118 -0
  89. package/dist/types/DataStructures/SettingData.d.ts +32 -0
  90. package/dist/types/DataStructures/Settings.d.ts +27 -0
  91. package/dist/types/DataStructures/SigninModel.d.ts +50 -0
  92. package/dist/types/DataStructures/SignupModel.d.ts +50 -0
  93. package/dist/types/DataStructures/SyncData.d.ts +206 -0
  94. package/dist/types/DataStructures/TheCharacter.d.ts +87 -0
  95. package/dist/types/DataStructures/TheTexts.d.ts +92 -0
  96. package/dist/types/DataStructures/Transaction/Transaction.d.ts +294 -4
  97. package/dist/types/DataStructures/User/UserBinaryTree.d.ts +117 -0
  98. package/dist/types/DataStructures/User/UserNode.d.ts +130 -0
  99. package/dist/types/Database/GetConceptFromIndexDb.d.ts +9 -0
  100. package/dist/types/Database/NoIndexDb.d.ts +169 -0
  101. package/dist/types/Database/indexdblocal.d.ts +42 -0
  102. package/dist/types/Database/indexeddb.d.ts +43 -0
  103. package/dist/types/Drawing/ConceptDraw.d.ts +28 -0
  104. package/dist/types/Drawing/ConceptEvents.d.ts +46 -0
  105. package/dist/types/Helpers/CheckIfExists.d.ts +159 -0
  106. package/dist/types/Helpers/RemoveFromArray.d.ts +66 -0
  107. package/dist/types/Helpers/UniqueInsert.d.ts +28 -0
  108. package/dist/types/Services/CheckForConnectionDeletion.d.ts +190 -0
  109. package/dist/types/Services/Common/DecodeCountInfo.d.ts +54 -0
  110. package/dist/types/Services/Common/ErrorPosting.d.ts +49 -0
  111. package/dist/types/Services/Common/RegexFunction.d.ts +28 -0
  112. package/dist/types/Services/Composition/BuildComposition.d.ts +37 -0
  113. package/dist/types/Services/Composition/CompositionCache.d.ts +89 -0
  114. package/dist/types/Services/Composition/CreateCompositionCache.d.ts +43 -0
  115. package/dist/types/Services/Conversion/ConvertConcepts.d.ts +83 -0
  116. package/dist/types/Services/CreateBinaryTreeFromData.d.ts +38 -0
  117. package/dist/types/Services/CreateCharacterBinaryTreeFromData.d.ts +42 -0
  118. package/dist/types/Services/CreateConnectionBetweenTwoConcepts.d.ts +206 -0
  119. package/dist/types/Services/CreateDefaultConcept.d.ts +114 -0
  120. package/dist/types/Services/CreateTheComposition.d.ts +101 -0
  121. package/dist/types/Services/CreateTheConcept.d.ts +179 -0
  122. package/dist/types/Services/CreateTheConnection.d.ts +59 -0
  123. package/dist/types/Services/CreateTheConnectionGeneral.d.ts +127 -0
  124. package/dist/types/Services/CreateTypeTreeFromData.d.ts +43 -0
  125. package/dist/types/Services/Delete/DeleteConnectionByType.d.ts +52 -5
  126. package/dist/types/Services/Delete/GetAllConnectionByType.d.ts +57 -9
  127. package/dist/types/Services/DeleteConcept.d.ts +136 -0
  128. package/dist/types/Services/DeleteConnection.d.ts +194 -0
  129. package/dist/types/Services/FindConeceptsFromConnection.d.ts +179 -0
  130. package/dist/types/Services/FindConnectionsOfCompositionBulkInMemory.d.ts +157 -0
  131. package/dist/types/Services/GenerateHexNumber.d.ts +64 -0
  132. package/dist/types/Services/GetComposition.d.ts +331 -0
  133. package/dist/types/Services/GetCompositionBulk.d.ts +251 -3
  134. package/dist/types/Services/GetCompositionList.d.ts +130 -0
  135. package/dist/types/Services/GetConceptByCharacter.d.ts +84 -0
  136. package/dist/types/Services/GetConnections.d.ts +72 -0
  137. package/dist/types/Services/GetDataFromIndexDb.d.ts +79 -0
  138. package/dist/types/Services/GetLink.d.ts +104 -0
  139. package/dist/types/Services/GetLinkerConnectionFromConcept.d.ts +99 -0
  140. package/dist/types/Services/GetMaximumConnectionSyncTime.d.ts +57 -0
  141. package/dist/types/Services/GetRelation.d.ts +162 -0
  142. package/dist/types/Services/GetTheConcept.d.ts +71 -0
  143. package/dist/types/Services/GetTheReferent.d.ts +74 -0
  144. package/dist/types/Services/InitializeSystem.d.ts +119 -0
  145. package/dist/types/Services/Local/CreateDefaultLConcept.d.ts +48 -0
  146. package/dist/types/Services/Local/CreateLocalBinaryTreeFromData.d.ts +49 -0
  147. package/dist/types/Services/Local/CreateLocalBinaryTypeTreeFromData.d.ts +54 -0
  148. package/dist/types/Services/Local/CreateLocalCharacterBinaryTree.d.ts +60 -0
  149. package/dist/types/Services/Local/CreateTheCompositionLocal.d.ts +70 -0
  150. package/dist/types/Services/Local/CreateTheConceptLocal.d.ts +58 -0
  151. package/dist/types/Services/Local/CreateTheConnectionLocal.d.ts +56 -0
  152. package/dist/types/Services/Local/GetCompositionListLocal.d.ts +103 -0
  153. package/dist/types/Services/Local/GetCompositionLocal.d.ts +96 -0
  154. package/dist/types/Services/Local/GetConceptByCharacterLocal.d.ts +57 -0
  155. package/dist/types/Services/Local/MakeTheConceptLocal.d.ts +71 -0
  156. package/dist/types/Services/Local/MakeTheInstanceConceptLocal.d.ts +89 -0
  157. package/dist/types/Services/Local/MakeTheTypeLocal.d.ts +71 -0
  158. package/dist/types/Services/Local/UpdateCompositionLocal.d.ts +101 -0
  159. package/dist/types/Services/MakeTheCharacter.d.ts +74 -0
  160. package/dist/types/Services/MakeTheCharacterData.d.ts +65 -0
  161. package/dist/types/Services/MakeTheInstanceConcept.d.ts +75 -0
  162. package/dist/types/Services/MakeTheName.d.ts +81 -0
  163. package/dist/types/Services/MakeTheTimestamp.d.ts +68 -0
  164. package/dist/types/Services/MakeTheTypeConcept.d.ts +68 -0
  165. package/dist/types/Services/Mqtt/publishMessage.d.ts +27 -0
  166. package/dist/types/Services/Mqtt/subscribeMessage.d.ts +23 -0
  167. package/dist/types/Services/PatchComposition.d.ts +105 -0
  168. package/dist/types/Services/Search/DataIdFormat.d.ts +96 -24
  169. package/dist/types/Services/Search/FormatData.d.ts +92 -17
  170. package/dist/types/Services/Search/JustIdFormat.d.ts +91 -16
  171. package/dist/types/Services/Search/SearchLinkInternal.d.ts +28 -0
  172. package/dist/types/Services/Search/SearchLinkMultiple.d.ts +58 -0
  173. package/dist/types/Services/Search/SearchWithTypeAndLinker.d.ts +92 -24
  174. package/dist/types/Services/Search/orderingConnections.d.ts +34 -0
  175. package/dist/types/Services/SplitStrings.d.ts +50 -0
  176. package/dist/types/Services/UpdateComposition.d.ts +123 -0
  177. package/dist/types/Services/User/UserTranslation.d.ts +102 -0
  178. package/dist/types/Services/View/ViewInternalData.d.ts +32 -0
  179. package/dist/types/WrapperFunctions/SchemaQueryObservable.d.ts +140 -5
  180. package/dist/types/app.d.ts +72 -1
  181. package/package.json +1 -1
  182. package/dist/main.bundle.js +0 -2
  183. package/dist/main.bundle.js.LICENSE.txt +0 -1
  184. package/dist/serviceWorker.bundle.js +0 -2
  185. package/dist/serviceWorker.bundle.js.LICENSE.txt +0 -1
  186. package/dist/types/AccessTracker/accessTracker.d.ts +0 -67
  187. package/dist/types/Anomaly/anomaly.d.ts +0 -103
  188. package/dist/types/Api/Create/CreateTheGhostConceptApi.d.ts +0 -3
  189. package/dist/types/Api/Create/CreateTheGhostConnectionApi.d.ts +0 -2
  190. package/dist/types/Api/Delete/DeleteUserInBackend.d.ts +0 -1
  191. package/dist/types/Api/DeleteConnectionBulkApi.d.ts +0 -1
  192. package/dist/types/Api/GetConnections/GetConnectionsByTypeApi.d.ts +0 -3
  193. package/dist/types/Api/Images/GetImages.d.ts +0 -1
  194. package/dist/types/Api/Local/GetLocalConceptByCharacterValue.d.ts +0 -2
  195. package/dist/types/Api/Prototype/CreatePrototype.d.ts +0 -2
  196. package/dist/types/Api/Prototype/Selector.d.ts +0 -15
  197. package/dist/types/Api/Search/SearchWithTypeAndLinker.d.ts +0 -2
  198. package/dist/types/Api/SearchConcept/GetTypeConceptByBulk.d.ts +0 -2
  199. package/dist/types/Api/Translate/TranslateLocalToReal.d.ts +0 -2
  200. package/dist/types/Constants/AccessConstants.d.ts +0 -3
  201. package/dist/types/Constants/ckeditorCSS.d.ts +0 -1
  202. package/dist/types/Constants/general.const.d.ts +0 -6
  203. package/dist/types/Constants/page.const.d.ts +0 -5
  204. package/dist/types/DataStructures/ConnectionBinaryTree/ConnectionOfNode.d.ts +0 -10
  205. package/dist/types/DataStructures/ConnectionBinaryTree/ConnectionOfTheTree.d.ts +0 -24
  206. package/dist/types/DataStructures/ConnectionBinaryTree/ConnectionTypeNode.d.ts +0 -10
  207. package/dist/types/DataStructures/ConnectionBinaryTree/NodePrimitive.d.ts +0 -15
  208. package/dist/types/DataStructures/ConnectionByType/GetConnectionByType.d.ts +0 -4
  209. package/dist/types/DataStructures/Local/LocalGhostIdTree.d.ts +0 -11
  210. package/dist/types/DataStructures/Local/LocalId.d.ts +0 -19
  211. package/dist/types/DataStructures/Prototype/Prototype.d.ts +0 -19
  212. package/dist/types/DataStructures/Prototype/PrototypeOption.d.ts +0 -4
  213. package/dist/types/DataStructures/Prototype/QuerySelector.d.ts +0 -4
  214. package/dist/types/DataStructures/TypeLibrary.d.ts +0 -19
  215. package/dist/types/DataStructures/TypeNode.d.ts +0 -18
  216. package/dist/types/DataStructures/WidgetCache/WidgetCache.d.ts +0 -10
  217. package/dist/types/DataStructures/WidgetCache/WidgetDetails.d.ts +0 -9
  218. package/dist/types/DataStructures/WidgetCache/WidgetNode.d.ts +0 -18
  219. package/dist/types/Database/IndexUpdate.d.ts +0 -47
  220. package/dist/types/Middleware/ApplicationMonitor.d.ts +0 -14
  221. package/dist/types/Middleware/ErrorHandling.d.ts +0 -0
  222. package/dist/types/Middleware/logger.service.d.ts +0 -144
  223. package/dist/types/ServiceWorker/actions/connectionActions.d.ts +0 -2
  224. package/dist/types/ServiceWorker/actions/createActions.d.ts +0 -2
  225. package/dist/types/ServiceWorker/actions/deleteActions.d.ts +0 -2
  226. package/dist/types/ServiceWorker/actions/getActions.d.ts +0 -2
  227. package/dist/types/ServiceWorker/actions/index.d.ts +0 -15
  228. package/dist/types/ServiceWorker/actions/searchActions.d.ts +0 -2
  229. package/dist/types/ServiceWorker/actions/syncActions.d.ts +0 -2
  230. package/dist/types/ServiceWorker/actions/updateActions.d.ts +0 -2
  231. package/dist/types/ServiceWorker/index.d.ts +0 -11
  232. package/dist/types/Services/AccessControl/AccessControl.d.ts +0 -218
  233. package/dist/types/Services/Common/DelayFunction.d.ts +0 -7
  234. package/dist/types/Services/Common/MergeArrays.d.ts +0 -7
  235. package/dist/types/Services/Common/RemoveAllChild.d.ts +0 -1
  236. package/dist/types/Services/CreateConnection/CreateConnectionEntity.d.ts +0 -2
  237. package/dist/types/Services/DeleteConnectionByType.d.ts +0 -22
  238. package/dist/types/Services/GetConnectionBetweenTwoConceptsLinker.d.ts +0 -11
  239. package/dist/types/Services/Local/ConvertFromLConceptToConcept.d.ts +0 -2
  240. package/dist/types/Services/Local/ConvertFromLConnectionToConnection.d.ts +0 -2
  241. package/dist/types/Services/Local/CreateConnectionBetweenTwoConceptsLocal.d.ts +0 -3
  242. package/dist/types/Services/Local/DeleteConceptLocal.d.ts +0 -1
  243. package/dist/types/Services/Local/GetConnectionOfTheConceptLocal.d.ts +0 -2
  244. package/dist/types/Services/Local/GetRelationLocal.d.ts +0 -1
  245. package/dist/types/Services/Local/GetTheConceptLocal.d.ts +0 -9
  246. package/dist/types/Services/Logs/LogEvent.d.ts +0 -1
  247. package/dist/types/Services/Mail.d.ts +0 -18
  248. package/dist/types/Services/Transaction/LocalTransaction.d.ts +0 -45
  249. package/dist/types/Services/Upload.d.ts +0 -33
  250. package/dist/types/Services/User/UserFromLocalStorage.d.ts +0 -6
  251. package/dist/types/Services/assets/GetImageService.d.ts +0 -14
  252. package/dist/types/Services/automated/automated-concept-connection.d.ts +0 -7
  253. package/dist/types/Services/cacheService.d.ts +0 -1
  254. package/dist/types/Validator/constant.d.ts +0 -3
  255. package/dist/types/Validator/interface.d.ts +0 -19
  256. package/dist/types/Validator/utils.d.ts +0 -7
  257. package/dist/types/Validator/validator.d.ts +0 -37
  258. package/dist/types/Visualize/ConceptCircle.d.ts +0 -35
  259. package/dist/types/Visualize/ConceptCircleList.d.ts +0 -9
  260. package/dist/types/Visualize/ConnectionLine.d.ts +0 -21
  261. package/dist/types/Visualize/ConnectionLineList.d.ts +0 -6
  262. package/dist/types/Visualize/drawExistingConcepts.d.ts +0 -8
  263. package/dist/types/Visualize/helper.d.ts +0 -15
  264. package/dist/types/Visualize/index.d.ts +0 -0
  265. package/dist/types/Widgets/BaseObserver.d.ts +0 -22
  266. package/dist/types/Widgets/BaseWidget.d.ts +0 -24
  267. package/dist/types/Widgets/BuilderSpeceficFunctions.d.ts +0 -2
  268. package/dist/types/Widgets/BuilderStatefulWidget.d.ts +0 -42
  269. package/dist/types/Widgets/CacheWidget.service.d.ts +0 -17
  270. package/dist/types/Widgets/NormalizeStyles.service.d.ts +0 -1
  271. package/dist/types/Widgets/RenderPage.service.d.ts +0 -12
  272. package/dist/types/Widgets/RenderWidgetLibrary.service.d.ts +0 -14
  273. package/dist/types/Widgets/RenderWidgetService.d.ts +0 -50
  274. package/dist/types/Widgets/StatefulWidget.d.ts +0 -102
  275. package/dist/types/Widgets/WidgetBuild.d.ts +0 -4
  276. package/dist/types/Widgets/WidgetTree.d.ts +0 -29
  277. package/dist/types/Widgets/mainView.class.d.ts +0 -6
  278. package/dist/types/WrapperFunctions/DepenedencyObserver.d.ts +0 -73
  279. package/dist/types/WrapperFunctions/GetCompositionListObservable.d.ts +0 -19
  280. package/dist/types/WrapperFunctions/GetCompositionObservable.d.ts +0 -13
  281. package/dist/types/WrapperFunctions/GetLinkListObservable.d.ts +0 -28
  282. package/dist/types/WrapperFunctions/GetLinkObservable.d.ts +0 -32
  283. package/dist/types/WrapperFunctions/RecursiveSearchObservable.d.ts +0 -37
  284. package/dist/types/WrapperFunctions/SearchLinkMultipleAllObservable.d.ts +0 -15
  285. package/dist/types/prototype/getPrototype.service.d.ts +0 -2
  286. package/dist/types/prototype/prototype.service.d.ts +0 -25
  287. package/dist/types/service-worker.d.ts +0 -1
@@ -1,2 +1,132 @@
1
+ /**
2
+ * Composition List Retrieval Service
3
+ *
4
+ * This module provides functionality for retrieving multiple compositions of the same
5
+ * type in paginated batches. It's designed for scenarios where you need to fetch lists
6
+ * of structured data, such as "all user profiles", "all blog posts", or "all products".
7
+ *
8
+ * The module implements bulk prefetching optimizations to minimize API calls and
9
+ * improve performance when retrieving multiple compositions.
10
+ *
11
+ * @module GetCompositionList
12
+ */
13
+ /**
14
+ * Retrieves a paginated list of compositions by type name.
15
+ *
16
+ * This function fetches multiple compositions that share the same type (e.g., all "blog_post"
17
+ * compositions) with pagination support. It implements a bulk prefetch optimization strategy:
18
+ * first fetching all concepts of the given type, then bulk-prefetching all their connections,
19
+ * and finally reconstructing each composition from cached data.
20
+ *
21
+ * This approach is much more efficient than fetching compositions individually, especially
22
+ * for large lists.
23
+ *
24
+ * @param compositionName - The type name of compositions to retrieve (e.g., "blog_post", "user_profile")
25
+ * @param userId - The user ID who owns the compositions
26
+ * @param inpage - Number of items per page (default: 10)
27
+ * @param page - Page number, 1-indexed (default: 1)
28
+ *
29
+ * @returns A promise that resolves to an array of composition objects
30
+ *
31
+ * @example
32
+ * ```typescript
33
+ * // Get the first page of blog posts (10 items)
34
+ * const blogPosts = await GetCompositionList("blog_post", 999, 10, 1);
35
+ * console.log(`Retrieved ${blogPosts.length} blog posts`);
36
+ *
37
+ * blogPosts.forEach(post => {
38
+ * const postData = post["blog_post"];
39
+ * console.log("Title:", postData.title);
40
+ * console.log("Author:", postData.author);
41
+ * });
42
+ * ```
43
+ *
44
+ * @example
45
+ * ```typescript
46
+ * // Get the second page of user profiles (20 per page)
47
+ * const profiles = await GetCompositionList("user_profile", 456, 20, 2);
48
+ * // Returns profiles 21-40
49
+ * ```
50
+ *
51
+ * @example
52
+ * ```typescript
53
+ * // Implement pagination for all products
54
+ * const PAGE_SIZE = 25;
55
+ * let currentPage = 1;
56
+ * let products = [];
57
+ *
58
+ * do {
59
+ * const pageProducts = await GetCompositionList("product", 999, PAGE_SIZE, currentPage);
60
+ * products.push(...pageProducts);
61
+ * currentPage++;
62
+ * } while (pageProducts.length === PAGE_SIZE);
63
+ *
64
+ * console.log(`Total products: ${products.length}`);
65
+ * ```
66
+ *
67
+ * @remarks
68
+ * - Uses bulk prefetch optimization for better performance
69
+ * - First fetches all concepts of the specified type
70
+ * - Then bulk-prefetches all connections for the page
71
+ * - Finally reconstructs compositions from cached data
72
+ * - Pagination is 1-indexed (page 1 is the first page)
73
+ * - Returns empty array if composition type doesn't exist
74
+ * - Uses GetCompositionFromMemory for fast reconstruction
75
+ * - Efficient for large lists due to bulk operations
76
+ *
77
+ * @see {@link GetCompositionListWithId} for version that includes metadata
78
+ * @see {@link GetCompositionFromMemory} for individual composition retrieval
79
+ * @see {@link GetAllConceptsByType} for fetching concepts by type
80
+ * @see {@link GetAllConnectionsOfCompositionBulk} for bulk connection prefetch
81
+ */
1
82
  export declare function GetCompositionList(compositionName: string, userId: number, inpage?: number, page?: number): Promise<any>;
83
+ /**
84
+ * Retrieves a paginated list of compositions with metadata wrappers.
85
+ *
86
+ * Similar to GetCompositionList, but each composition in the returned array includes
87
+ * metadata (ID, creation timestamp) in addition to the composition data. This is useful
88
+ * when you need to track or reference individual compositions by their IDs.
89
+ *
90
+ * The function uses the same bulk prefetch optimization strategy for efficient retrieval.
91
+ *
92
+ * @param compositionName - The type name of compositions to retrieve
93
+ * @param userId - The user ID who owns the compositions
94
+ * @param inpage - Number of items per page (default: 10)
95
+ * @param page - Page number, 1-indexed (default: 1)
96
+ *
97
+ * @returns A promise that resolves to an array of objects with id, created_at, and data fields
98
+ *
99
+ * @example
100
+ * ```typescript
101
+ * // Get blog posts with IDs and timestamps
102
+ * const posts = await GetCompositionListWithId("blog_post", 999, 10, 1);
103
+ *
104
+ * posts.forEach(post => {
105
+ * console.log("Post ID:", post.id);
106
+ * console.log("Created:", post.created_at);
107
+ * console.log("Title:", post.data["blog_post"].title);
108
+ * });
109
+ * ```
110
+ *
111
+ * @example
112
+ * ```typescript
113
+ * // Build a list of editable items with their IDs
114
+ * const items = await GetCompositionListWithId("task", 456, 50, 1);
115
+ *
116
+ * const editableList = items.map(item => ({
117
+ * id: item.id,
118
+ * name: item.data["task"].name,
119
+ * editUrl: `/edit/${item.id}`
120
+ * }));
121
+ * ```
122
+ *
123
+ * @remarks
124
+ * - Each item includes: { id, created_at, data }
125
+ * - Uses bulk prefetch for performance
126
+ * - Uses GetCompositionWithIdFromMemory for reconstruction
127
+ * - Otherwise identical to GetCompositionList
128
+ *
129
+ * @see {@link GetCompositionList} for version without metadata
130
+ * @see {@link GetCompositionWithIdFromMemory} for individual composition with ID
131
+ */
2
132
  export declare function GetCompositionListWithId(compositionName: string, userId: number, inpage?: number, page?: number): Promise<any>;
@@ -1,3 +1,87 @@
1
+ /**
2
+ * @module GetConceptByCharacter
3
+ * @description Retrieves concepts by their character value in the Concept Connection System (CCS).
4
+ * This module provides functions to look up concepts based on character strings,
5
+ * utilizing both local cache (ConceptsData) and remote API calls for comprehensive
6
+ * concept retrieval with automatic fallback mechanisms.
7
+ */
1
8
  import { Concept } from "../DataStructures/Concept";
9
+ /**
10
+ * Retrieves a concept by its character value.
11
+ *
12
+ * This function performs a two-tier lookup strategy to find concepts:
13
+ * 1. First checks the local ConceptsData cache for the concept
14
+ * 2. If not found or has invalid ID, calls the API to fetch from remote storage
15
+ * 3. After API call, checks the cache again as API updates the cache
16
+ *
17
+ * This approach optimizes performance by using cached data when available while
18
+ * ensuring data consistency through API fallback.
19
+ *
20
+ * @param characterValue - The character string to search for (e.g., "the_user", "hello")
21
+ *
22
+ * @returns Promise resolving to the found Concept, or a Concept with id=0 if not found
23
+ *
24
+ * @remarks
25
+ * - Uses ConceptsData.GetConceptByCharacter for local cache lookup
26
+ * - Falls back to GetConceptByCharacterValue API when cache misses
27
+ * - API call updates the local cache automatically
28
+ * - Returns null-safe with Concept having id=0 when not found
29
+ * - Template literal ensures characterValue is treated as string
30
+ *
31
+ * @example
32
+ * ```typescript
33
+ * // Retrieve a type concept
34
+ * const userType = await GetConceptByCharacter("the_user");
35
+ * if (userType.id > 0) {
36
+ * console.log("Found user type:", userType);
37
+ * }
38
+ *
39
+ * // Search for a specific name
40
+ * const name = await GetConceptByCharacter("John Doe");
41
+ *
42
+ * // Check for non-existent concept
43
+ * const missing = await GetConceptByCharacter("nonexistent");
44
+ * console.log(missing.id); // 0
45
+ * ```
46
+ *
47
+ * @see {@link GetConceptByCharacterUpdated} - Alternative implementation with same behavior
48
+ * @see {@link ConceptsData.GetConceptByCharacter} - Local cache lookup
49
+ * @see {@link GetConceptByCharacterValue} - Remote API lookup
50
+ */
2
51
  export default function GetConceptByCharacter(characterValue: string): Promise<Concept>;
52
+ /**
53
+ * Retrieves a concept by its character value (updated variant).
54
+ *
55
+ * This function is functionally identical to GetConceptByCharacter, providing
56
+ * an alternative export for the same lookup behavior. It follows the same
57
+ * two-tier strategy of checking local cache first, then falling back to API.
58
+ *
59
+ * The "Updated" suffix may indicate a versioning strategy or future enhancement
60
+ * point, but currently implements the same logic as the default export.
61
+ *
62
+ * @param characterValue - The character string to search for (e.g., "the_user", "hello")
63
+ *
64
+ * @returns Promise resolving to the found Concept, or a Concept with id=0 if not found
65
+ *
66
+ * @remarks
67
+ * - Identical implementation to GetConceptByCharacter
68
+ * - Exported as named export rather than default
69
+ * - May be used for API versioning or compatibility
70
+ * - Follows same cache-first, API-fallback pattern
71
+ *
72
+ * @example
73
+ * ```typescript
74
+ * import { GetConceptByCharacterUpdated } from './GetConceptByCharacter';
75
+ *
76
+ * // Use updated variant explicitly
77
+ * const concept = await GetConceptByCharacterUpdated("the_post");
78
+ * if (concept.id > 0) {
79
+ * console.log("Found concept:", concept);
80
+ * }
81
+ * ```
82
+ *
83
+ * @see {@link GetConceptByCharacter} - Default export with identical behavior
84
+ * @see {@link ConceptsData.GetConceptByCharacter} - Local cache lookup
85
+ * @see {@link GetConceptByCharacterValue} - Remote API lookup
86
+ */
3
87
  export declare function GetConceptByCharacterUpdated(characterValue: string): Promise<Concept>;
@@ -1,2 +1,74 @@
1
+ /**
2
+ * Connection Retrieval Service
3
+ *
4
+ * This module provides functions for retrieving connection objects from the system.
5
+ * It implements a caching strategy that checks local memory first before falling
6
+ * back to API calls, similar to concept retrieval.
7
+ *
8
+ * @module GetConnections
9
+ */
1
10
  import { Connection } from "../DataStructures/Connection";
11
+ /**
12
+ * Retrieves a connection by its ID with automatic caching.
13
+ *
14
+ * This function implements a two-tier lookup strategy for connection retrieval:
15
+ * 1. First checks the local cache (ConnectionData)
16
+ * 2. Falls back to an API call (GetConnection) if not found in cache
17
+ *
18
+ * The function ensures that valid connections are returned when available, and
19
+ * handles cases where connections don't exist or retrieval fails gracefully.
20
+ *
21
+ * @param id - The ID of the connection to retrieve
22
+ *
23
+ * @returns A promise that resolves to the Connection object, or a connection with id=0 if not found
24
+ *
25
+ * @example
26
+ * ```typescript
27
+ * // Retrieve a connection and check its type
28
+ * const connection = await GetConnectionById(12345);
29
+ *
30
+ * if (connection.id === 0) {
31
+ * console.log("Connection not found");
32
+ * } else {
33
+ * console.log("Connection from:", connection.ofTheConceptId);
34
+ * console.log("Connection to:", connection.toTheConceptId);
35
+ * console.log("Connection type:", connection.typeId);
36
+ * }
37
+ * ```
38
+ *
39
+ * @example
40
+ * ```typescript
41
+ * // Use in a connection validation scenario
42
+ * const connectionIds = [123, 456, 789];
43
+ * const connections = await Promise.all(
44
+ * connectionIds.map(id => GetConnectionById(id))
45
+ * );
46
+ *
47
+ * const validConnections = connections.filter(conn => conn.id !== 0);
48
+ * console.log(`Found ${validConnections.length} valid connections`);
49
+ * ```
50
+ *
51
+ * @example
52
+ * ```typescript
53
+ * // Retrieve connection and navigate to connected concepts
54
+ * const connection = await GetConnectionById(555);
55
+ * if (connection.id !== 0) {
56
+ * const fromConcept = await GetTheConcept(connection.ofTheConceptId);
57
+ * const toConcept = await GetTheConcept(connection.toTheConceptId);
58
+ * console.log(`${fromConcept.characterValue} -> ${toConcept.characterValue}`);
59
+ * }
60
+ * ```
61
+ *
62
+ * @remarks
63
+ * - First checks ConnectionData cache for optimal performance
64
+ * - Makes an API call only if connection is not in cache or has id=0
65
+ * - Returns a connection with id=0 if retrieval fails at all levels
66
+ * - The function validates that id is not null or undefined before API call
67
+ * - Connections are automatically cached by the GetConnection API call
68
+ * - This function is null-safe for ID checks but may throw if API fails
69
+ *
70
+ * @see {@link ConnectionData.GetConnection} for cache lookup
71
+ * @see {@link GetConnection} for API-based retrieval
72
+ * @see {@link Connection} for the connection data structure
73
+ */
2
74
  export declare function GetConnectionById(id: number): Promise<Connection>;
@@ -1,2 +1,81 @@
1
+ /**
2
+ * IndexedDB Data Retrieval Service
3
+ *
4
+ * This module provides comprehensive functionality for loading data from IndexedDB into
5
+ * in-memory data structures. It handles both regular and local database data, loading
6
+ * connections and concepts into their respective memory structures for efficient access.
7
+ *
8
+ * The service supports two data contexts:
9
+ * - Global/synced data: Loaded from standard IndexedDB stores
10
+ * - Local data: Loaded from local-only IndexedDB stores for offline or user-specific data
11
+ *
12
+ * @module GetDataFromIndexDb
13
+ */
14
+ /**
15
+ * Loads data from the standard IndexedDB stores into memory.
16
+ *
17
+ * This is the main entry point for initializing the application's in-memory data structures
18
+ * from persisted database records. Currently focuses on loading connections, with concept
19
+ * loading functionality commented out for optimization or architectural reasons.
20
+ *
21
+ * The function delegates to specialized helpers to load different data types, ensuring
22
+ * proper separation of concerns and maintainability.
23
+ *
24
+ * @returns A promise that resolves when all data has been loaded into memory
25
+ *
26
+ * @example
27
+ * ```typescript
28
+ * // Initialize application data from IndexedDB
29
+ * await GetDataFromIndexDb();
30
+ * console.log('Global data loaded successfully');
31
+ *
32
+ * // Access loaded connections
33
+ * const connections = ConnectionData.getAllConnections();
34
+ * console.log('Loaded connections:', connections.length);
35
+ * ```
36
+ *
37
+ * @remarks
38
+ * - Concept loading is currently disabled (commented out lines 11-21)
39
+ * - Only connections are actively loaded into memory
40
+ * - This function is typically called during application initialization
41
+ * - Loads from the standard database, not the local-only database
42
+ *
43
+ * @see {@link GetConnectionsFromIndexDb} for connection loading implementation
44
+ * @see {@link GetDataFromIndexDbLocal} for local database equivalent
45
+ * @see {@link ConnectionData.AddConnectionToMemory} for how connections are stored
46
+ */
1
47
  export declare function GetDataFromIndexDb(): Promise<void>;
48
+ /**
49
+ * Loads data from the local IndexedDB stores into memory.
50
+ *
51
+ * This function serves as the local database equivalent of GetDataFromIndexDb, handling
52
+ * data that is stored in local-only database stores. This is typically used for user-specific
53
+ * data, offline data, or data that should not be synchronized across devices.
54
+ *
55
+ * Like its global counterpart, concept loading is currently disabled, with only connection
56
+ * data being actively loaded into the LocalConnectionData memory structure.
57
+ *
58
+ * @returns A promise that resolves when all local data has been loaded into memory
59
+ *
60
+ * @example
61
+ * ```typescript
62
+ * // Initialize local application data from IndexedDB
63
+ * await GetDataFromIndexDbLocal();
64
+ * console.log('Local data loaded successfully');
65
+ *
66
+ * // Access loaded local connections
67
+ * const localConnections = LocalConnectionData.getAllConnections();
68
+ * console.log('Loaded local connections:', localConnections.length);
69
+ * ```
70
+ *
71
+ * @remarks
72
+ * - Concept loading is currently disabled (commented out lines 25-33)
73
+ * - Only local connections are actively loaded into memory
74
+ * - Uses getAllFromLocalDb instead of getFromDatabaseWithTypeOld for local stores
75
+ * - Typically called during initialization for applications supporting offline mode
76
+ *
77
+ * @see {@link GetConnectionsFromIndexDbLocal} for local connection loading implementation
78
+ * @see {@link GetDataFromIndexDb} for standard database equivalent
79
+ * @see {@link LocalConnectionData.AddConnection} for how local connections are stored
80
+ */
2
81
  export declare function GetDataFromIndexDbLocal(): Promise<void>;
@@ -1,3 +1,107 @@
1
+ /**
2
+ * @module GetLink
3
+ * @description Retrieves linked concepts in the Concept Connection System (CCS).
4
+ * This module provides functions to traverse concept relationships through linkers,
5
+ * supporting pagination and both composition-based and raw concept retrieval.
6
+ * Linkers are special concepts that define typed relationships between concepts.
7
+ */
1
8
  import { Concept } from "./../DataStructures/Concept";
9
+ /**
10
+ * Retrieves linked concepts as compositions through a specified linker.
11
+ *
12
+ * This function follows a multi-step process to retrieve related concepts:
13
+ * 1. Gets the source concept by ID
14
+ * 2. Constructs a linker string from the concept's type and provided linker name
15
+ * 3. Finds the linker concept (type 16)
16
+ * 4. Retrieves all connections using that linker from the source concept
17
+ * 5. Prefetches all target concepts for performance
18
+ * 6. Converts each target concept to its composition representation
19
+ *
20
+ * The linker string format is: "{type}_s_{linker}" (e.g., "user_s_posts").
21
+ *
22
+ * @param id - The ID of the source concept to find links from
23
+ * @param linker - The name of the linker relationship (e.g., "posts", "comments", "likes")
24
+ * @param inpage - Number of results per page (default: 10)
25
+ * @param page - Page number to retrieve (default: 1)
26
+ *
27
+ * @returns Promise resolving to an array of compositions representing linked concepts
28
+ *
29
+ * @remarks
30
+ * - Linker concepts have type ID 16
31
+ * - Uses bulk prefetching for performance optimization
32
+ * - Returns compositions with full connection data
33
+ * - Empty array if linker concept not found
34
+ * - Linker format: "{source_type}_s_{linker_name}"
35
+ * - The "_s" suffix indicates a plural/collection relationship
36
+ *
37
+ * @example
38
+ * ```typescript
39
+ * // Get all posts linked to a user (page 1, 10 per page)
40
+ * const userPosts = await GetLink(123, "posts");
41
+ *
42
+ * // Get comments with custom pagination
43
+ * const comments = await GetLink(456, "comments", 20, 2);
44
+ *
45
+ * // Get likes for a post
46
+ * const likes = await GetLink(789, "likes", 50, 1);
47
+ *
48
+ * // Each result is a composition with connections
49
+ * userPosts.forEach(post => {
50
+ * console.log("Post composition:", post);
51
+ * });
52
+ * ```
53
+ *
54
+ * @see {@link GetLinkRaw} - Returns raw concepts instead of compositions
55
+ * @see {@link GetTheConcept} - Retrieves individual concepts
56
+ * @see {@link GetCompositionWithIdAndDateFromMemory} - Converts concepts to compositions
57
+ * @see {@link GetConnectionOfTheConcept} - Retrieves connections
58
+ */
2
59
  export declare function GetLink(id: number, linker: string, inpage?: number, page?: number): Promise<any[]>;
60
+ /**
61
+ * Retrieves linked concepts in raw form through a specified linker.
62
+ *
63
+ * This function is similar to GetLink but returns raw Concept objects instead
64
+ * of compositions. It follows the same linker-based traversal but skips the
65
+ * composition conversion step, making it more lightweight when only concept
66
+ * data is needed without full connection details.
67
+ *
68
+ * Unlike GetLink, this function does not call GetAllConnectionsOfCompositionBulk
69
+ * since it doesn't need to build compositions.
70
+ *
71
+ * @param id - The ID of the source concept to find links from
72
+ * @param linker - The name of the linker relationship (e.g., "posts", "comments", "likes")
73
+ * @param inpage - Number of results per page (default: 10)
74
+ * @param page - Page number to retrieve (default: 1)
75
+ *
76
+ * @returns Promise resolving to an array of raw Concept objects
77
+ *
78
+ * @remarks
79
+ * - Returns Concept objects directly without composition wrapper
80
+ * - More lightweight than GetLink - use when compositions not needed
81
+ * - Does not prefetch connection data
82
+ * - Same linker string format: "{source_type}_s_{linker_name}"
83
+ * - Empty array if linker concept not found
84
+ * - Better performance for simple concept retrieval
85
+ *
86
+ * @example
87
+ * ```typescript
88
+ * // Get raw post concepts
89
+ * const posts = await GetLinkRaw(123, "posts");
90
+ * posts.forEach(post => {
91
+ * console.log("Post ID:", post.id);
92
+ * console.log("Post Type:", post.type);
93
+ * });
94
+ *
95
+ * // Get comments without composition overhead
96
+ * const comments = await GetLinkRaw(456, "comments", 20, 2);
97
+ *
98
+ * // Quick check for existence
99
+ * const likes = await GetLinkRaw(789, "likes", 1, 1);
100
+ * const hasLikes = likes.length > 0;
101
+ * ```
102
+ *
103
+ * @see {@link GetLink} - Returns full compositions instead of raw concepts
104
+ * @see {@link GetTheConcept} - Retrieves individual concepts
105
+ * @see {@link GetConnectionOfTheConcept} - Retrieves connections
106
+ */
3
107
  export declare function GetLinkRaw(id: number, linker: string, inpage?: number, page?: number): Promise<Concept[]>;
@@ -1,3 +1,102 @@
1
+ /**
2
+ * @module GetLinkerConnectionFromConcept
3
+ * @description Retrieves linker connections in the Concept Connection System (CCS).
4
+ * This module provides functions to fetch all linker-type connections associated with
5
+ * a concept, supporting both outgoing (from) and incoming (to) directions. Linker
6
+ * connections are special connections that use linker concepts to define typed
7
+ * collection relationships between concepts.
8
+ */
1
9
  import { Connection } from "../DataStructures/Connection";
10
+ /**
11
+ * Retrieves all linker connections originating from a concept.
12
+ *
13
+ * This function fetches all connections where the specified concept is the source
14
+ * (ofTheConcept) and the connection type is a linker concept. It enriches each
15
+ * connection by fetching and attaching the full type concept, allowing inspection
16
+ * of what kind of linker relationship is being used.
17
+ *
18
+ * Linker connections typically represent collection relationships like "user_s_posts"
19
+ * where the "_s" indicates a plural/collection relationship defined by a linker concept.
20
+ *
21
+ * @param id - The ID of the concept to get linker connections from
22
+ *
23
+ * @returns Promise resolving to an array of Connection objects with type concepts attached
24
+ *
25
+ * @remarks
26
+ * - Fetches all linker connections without pagination
27
+ * - Each connection's type property is populated with the full Concept
28
+ * - Linker connections have special type concepts (typically type ID 16)
29
+ * - Iterates through all connections to enrich with type data
30
+ * - Connection.type will be a fully populated Concept object
31
+ * - Used for traversing collection-based relationships
32
+ *
33
+ * @example
34
+ * ```typescript
35
+ * // Get all linker connections from a user
36
+ * const userLinkers = await GetLinkerConnectionFromConcepts(123);
37
+ * userLinkers.forEach(connection => {
38
+ * console.log("Linker type:", connection.type?.characterValue);
39
+ * console.log("Points to:", connection.toTheConceptId);
40
+ * console.log("Connection ID:", connection.id);
41
+ * });
42
+ *
43
+ * // Find all collection relationships a concept participates in
44
+ * const conceptLinkers = await GetLinkerConnectionFromConcepts(456);
45
+ * const linkerTypes = conceptLinkers.map(c => c.type?.characterValue);
46
+ * console.log("This concept has linkers:", linkerTypes);
47
+ * // Output: ["user_s_posts", "user_s_comments", ...]
48
+ * ```
49
+ *
50
+ * @see {@link GetLinkerConnectionToConcepts} - Gets linker connections pointing to a concept
51
+ * @see {@link GetAllLinkerConnectionsFromTheConcept} - API function for fetching connections
52
+ * @see {@link GetTheConcept} - Fetches the type concept for each connection
53
+ */
2
54
  export declare function GetLinkerConnectionFromConcepts(id: number): Promise<Connection[]>;
55
+ /**
56
+ * Retrieves all linker connections pointing to a concept.
57
+ *
58
+ * This function fetches all connections where the specified concept is the target
59
+ * (toTheConcept) and the connection type is a linker concept. It enriches each
60
+ * connection by fetching and attaching the full type concept, allowing inspection
61
+ * of what kind of linker relationship is being used.
62
+ *
63
+ * This is the inverse of GetLinkerConnectionFromConcepts - it finds all collection
64
+ * relationships where this concept is included as a member of the collection.
65
+ *
66
+ * @param id - The ID of the concept to get linker connections to
67
+ *
68
+ * @returns Promise resolving to an array of Connection objects with type concepts attached
69
+ *
70
+ * @remarks
71
+ * - Fetches all incoming linker connections without pagination
72
+ * - Each connection's type property is populated with the full Concept
73
+ * - Useful for finding all collections that include this concept
74
+ * - Connection.type will be a fully populated Concept object
75
+ * - Reverse direction of GetLinkerConnectionFromConcepts
76
+ * - Used for reverse traversal of collection relationships
77
+ *
78
+ * @example
79
+ * ```typescript
80
+ * // Find all collections that include this post
81
+ * const postInCollections = await GetLinkerConnectionToConcepts(789);
82
+ * postInCollections.forEach(connection => {
83
+ * console.log("Included in collection:", connection.type?.characterValue);
84
+ * console.log("Collection owner:", connection.ofTheConceptId);
85
+ * });
86
+ *
87
+ * // Check if a concept is part of any linker collections
88
+ * const incomingLinkers = await GetLinkerConnectionToConcepts(456);
89
+ * const isInCollections = incomingLinkers.length > 0;
90
+ * console.log("Is part of collections:", isInCollections);
91
+ *
92
+ * // Find what users have this comment in their collection
93
+ * const commentCollections = await GetLinkerConnectionToConcepts(123);
94
+ * const ownerIds = commentCollections.map(c => c.ofTheConceptId);
95
+ * console.log("Owned by concepts:", ownerIds);
96
+ * ```
97
+ *
98
+ * @see {@link GetLinkerConnectionFromConcepts} - Gets linker connections from a concept
99
+ * @see {@link GetAllLinkerConnectionsToTheConcept} - API function for fetching connections
100
+ * @see {@link GetTheConcept} - Fetches the type concept for each connection
101
+ */
3
102
  export declare function GetLinkerConnectionToConcepts(id: number): Promise<Connection[]>;
@@ -1,2 +1,59 @@
1
+ /**
2
+ * @module GetMaximumConnectionSyncTime
3
+ * @description Utility for finding maximum sync times in the Concept Connection System (CCS).
4
+ * This module provides functionality to determine the most recent synchronization time
5
+ * from a collection of connections, enabling efficient incremental synchronization and
6
+ * tracking of data freshness across the distributed concept system.
7
+ */
1
8
  import { Connection } from "../DataStructures/Connection";
9
+ /**
10
+ * Finds the maximum (most recent) local sync time from an array of connections.
11
+ *
12
+ * This function iterates through all provided connections and identifies the most
13
+ * recent localSyncTime value. This is useful for incremental synchronization operations
14
+ * where you need to know when the last sync occurred to fetch only newer data.
15
+ *
16
+ * The function compares Date objects and returns the maximum timestamp, which can
17
+ * then be used as a "since" parameter in subsequent sync operations to fetch only
18
+ * connections that have been modified after this time.
19
+ *
20
+ * @param connections - Array of Connection objects to examine for sync times
21
+ *
22
+ * @returns The most recent Date found in the connections' localSyncTime fields,
23
+ * or Date(0) (January 1, 1970) if no connections or all have earlier times
24
+ *
25
+ * @remarks
26
+ * - Initializes maxTime to Date(0) (Unix epoch: January 1, 1970, 00:00:00 UTC)
27
+ * - Compares Date objects directly using > operator
28
+ * - Returns Date(0) if connections array is empty
29
+ * - Useful for implementing incremental sync strategies
30
+ * - localSyncTime represents when the connection was last synchronized locally
31
+ *
32
+ * @example
33
+ * ```typescript
34
+ * // Get max sync time from user's connections
35
+ * const userConnections = await GetConnectionsForUser(123);
36
+ * const lastSyncTime = GetMaximumConnectionSyncTime(userConnections);
37
+ * console.log("Last sync occurred at:", lastSyncTime);
38
+ *
39
+ * // Use for incremental sync
40
+ * const connections = await GetAllConnections();
41
+ * const maxTime = GetMaximumConnectionSyncTime(connections);
42
+ * // Fetch only newer connections
43
+ * const newConnections = await GetConnectionsSince(maxTime);
44
+ *
45
+ * // Check if any connections exist
46
+ * const emptyArray: Connection[] = [];
47
+ * const emptyMaxTime = GetMaximumConnectionSyncTime(emptyArray);
48
+ * console.log(emptyMaxTime.getTime()); // 0 (epoch)
49
+ *
50
+ * // Track sync status
51
+ * const connections = await GetConceptConnections(456);
52
+ * const lastSync = GetMaximumConnectionSyncTime(connections);
53
+ * const hoursSinceSync = (Date.now() - lastSync.getTime()) / (1000 * 60 * 60);
54
+ * console.log(`Last synced ${hoursSinceSync} hours ago`);
55
+ * ```
56
+ *
57
+ * @see {@link Connection} - Connection data structure with localSyncTime property
58
+ */
2
59
  export declare function GetMaximumConnectionSyncTime(connections: Connection[]): Date;