mftsccs-node 0.0.57 → 0.0.58

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 (180) hide show
  1. package/README.md +1148 -11
  2. package/dist/types/Api/Create/CreateTheCharacter.d.ts +42 -0
  3. package/dist/types/Api/Create/CreateTheConceptApi.d.ts +50 -0
  4. package/dist/types/Api/Create/CreateTheConnectionApi.d.ts +51 -0
  5. package/dist/types/Api/Create/CreateTheTextData.d.ts +56 -0
  6. package/dist/types/Api/Delete/DeleteConceptInBackend.d.ts +43 -0
  7. package/dist/types/Api/DeleteConnectionApiBulk.d.ts +55 -0
  8. package/dist/types/Api/DeleteTheConcept.d.ts +64 -0
  9. package/dist/types/Api/DeleteTheConnection.d.ts +76 -0
  10. package/dist/types/Api/GetAiData.d.ts +36 -0
  11. package/dist/types/Api/GetAllConcepts.d.ts +42 -0
  12. package/dist/types/Api/GetAllConceptsByType.d.ts +45 -0
  13. package/dist/types/Api/GetAllConnections.d.ts +48 -0
  14. package/dist/types/Api/GetAllConnectionsOfComposition.d.ts +79 -0
  15. package/dist/types/Api/GetAllConnectionsOfCompositionBulk.d.ts +90 -0
  16. package/dist/types/Api/GetAllLinkerConnectionsFromTheConcept.d.ts +52 -0
  17. package/dist/types/Api/GetAllLinkerConnectionsToTheConcept.d.ts +61 -0
  18. package/dist/types/Api/GetAllPrefetchConnections.d.ts +51 -0
  19. package/dist/types/Api/GetCharacterDataByCharacter.d.ts +31 -0
  20. package/dist/types/Api/GetCompositionConnectionsBetweenTwoConcepts.d.ts +39 -0
  21. package/dist/types/Api/GetConcept.d.ts +47 -0
  22. package/dist/types/Api/GetConceptBulk.d.ts +68 -0
  23. package/dist/types/Api/GetConceptByCharacterAndType.d.ts +75 -0
  24. package/dist/types/Api/GetConceptByCharacterValue.d.ts +47 -0
  25. package/dist/types/Api/GetConnection.d.ts +49 -0
  26. package/dist/types/Api/GetConnectionBulk.d.ts +46 -0
  27. package/dist/types/Api/GetConnectionOfTheConcept.d.ts +50 -0
  28. package/dist/types/Api/GetConnectionToTheConcept.d.ts +56 -0
  29. package/dist/types/Api/GetReservedConnectionIds.d.ts +36 -0
  30. package/dist/types/Api/GetReservedIds.d.ts +37 -0
  31. package/dist/types/Api/Login.d.ts +38 -0
  32. package/dist/types/Api/MakeTheNameInBackend.d.ts +39 -0
  33. package/dist/types/Api/MakeTheTypeConceptApi.d.ts +40 -0
  34. package/dist/types/Api/RecursiveSearch.d.ts +43 -0
  35. package/dist/types/Api/Search/FreeschemaQueryApi.d.ts +46 -0
  36. package/dist/types/Api/Search/Search.d.ts +67 -0
  37. package/dist/types/Api/Search/SearchInternalApi.d.ts +69 -0
  38. package/dist/types/Api/Search/SearchLinkMultipleApi.d.ts +90 -0
  39. package/dist/types/Api/Search/SearchWithLinker.d.ts +97 -0
  40. package/dist/types/Api/SearchConcept/GetConceptByCharacterAndCategoryApi.d.ts +39 -0
  41. package/dist/types/Api/SearchConcept/GetConceptByCharacterAndCategoryDirect.d.ts +47 -0
  42. package/dist/types/Api/Session/CreateSession.d.ts +45 -0
  43. package/dist/types/Api/Session/CreateSessionVisit.d.ts +43 -0
  44. package/dist/types/Api/Signin.d.ts +48 -0
  45. package/dist/types/Api/Signup.d.ts +44 -0
  46. package/dist/types/Api/View/ViewInternalDataApi.d.ts +50 -0
  47. package/dist/types/Constants/ApiConstants.d.ts +226 -0
  48. package/dist/types/Constants/FormatConstants.d.ts +80 -0
  49. package/dist/types/DataStructures/BaseUrl.d.ts +210 -0
  50. package/dist/types/DataStructures/BinaryCharacterTree.d.ts +211 -0
  51. package/dist/types/DataStructures/BinaryTree.d.ts +139 -0
  52. package/dist/types/DataStructures/BinaryTypeTree.d.ts +196 -0
  53. package/dist/types/DataStructures/CharacterRepository.d.ts +109 -0
  54. package/dist/types/DataStructures/Composition/Composition.d.ts +103 -0
  55. package/dist/types/DataStructures/Composition/CompositionBinaryTree.d.ts +104 -0
  56. package/dist/types/DataStructures/Composition/CompositionNode.d.ts +202 -0
  57. package/dist/types/DataStructures/Concept.d.ts +110 -0
  58. package/dist/types/DataStructures/ConceptData.d.ts +292 -0
  59. package/dist/types/DataStructures/ConceptsToDraw.d.ts +168 -0
  60. package/dist/types/DataStructures/Connection.d.ts +76 -0
  61. package/dist/types/DataStructures/ConnectionBinaryTree/ConnectionBinaryTree.d.ts +115 -0
  62. package/dist/types/DataStructures/ConnectionBinaryTree/ConnectionNode.d.ts +169 -0
  63. package/dist/types/DataStructures/ConnectionBinaryTree/ConnectionTypeTree.d.ts +82 -0
  64. package/dist/types/DataStructures/ConnectionData.d.ts +191 -0
  65. package/dist/types/DataStructures/Count/CountInfo.d.ts +73 -0
  66. package/dist/types/DataStructures/FilterSearch.d.ts +84 -0
  67. package/dist/types/DataStructures/IdentifierFlags.d.ts +34 -0
  68. package/dist/types/DataStructures/Local/LConcept.d.ts +105 -0
  69. package/dist/types/DataStructures/Local/LConnection.d.ts +83 -0
  70. package/dist/types/DataStructures/Local/LNode.d.ts +190 -0
  71. package/dist/types/DataStructures/Local/LocalBinaryCharacterTree.d.ts +133 -0
  72. package/dist/types/DataStructures/Local/LocalBinaryTree.d.ts +135 -0
  73. package/dist/types/DataStructures/Local/LocalBinaryTypeTree.d.ts +147 -0
  74. package/dist/types/DataStructures/Local/LocalConceptData.d.ts +100 -0
  75. package/dist/types/DataStructures/Local/LocalConnectionData.d.ts +109 -0
  76. package/dist/types/DataStructures/Local/LocalSyncData.d.ts +89 -0
  77. package/dist/types/DataStructures/PatcherStructure.d.ts +86 -0
  78. package/dist/types/DataStructures/ReferentInfo.d.ts +68 -0
  79. package/dist/types/DataStructures/ReservedIds.d.ts +101 -0
  80. package/dist/types/DataStructures/Responses/ErrorResponse.d.ts +184 -22
  81. package/dist/types/DataStructures/Responses/StandardResponses.d.ts +65 -0
  82. package/dist/types/DataStructures/Returner.d.ts +59 -0
  83. package/dist/types/DataStructures/Search/FreeschemaQuery.d.ts +165 -0
  84. package/dist/types/DataStructures/Search/SearchStructure.d.ts +69 -0
  85. package/dist/types/DataStructures/SearchQuery.d.ts +130 -0
  86. package/dist/types/DataStructures/Security/TokenStorage.d.ts +48 -0
  87. package/dist/types/DataStructures/Session/SessionData.d.ts +118 -0
  88. package/dist/types/DataStructures/SettingData.d.ts +32 -0
  89. package/dist/types/DataStructures/Settings.d.ts +27 -0
  90. package/dist/types/DataStructures/SigninModel.d.ts +50 -0
  91. package/dist/types/DataStructures/SignupModel.d.ts +50 -0
  92. package/dist/types/DataStructures/SyncData.d.ts +206 -0
  93. package/dist/types/DataStructures/TheCharacter.d.ts +87 -0
  94. package/dist/types/DataStructures/TheTexts.d.ts +92 -0
  95. package/dist/types/DataStructures/Transaction/Transaction.d.ts +294 -4
  96. package/dist/types/DataStructures/User/UserBinaryTree.d.ts +117 -0
  97. package/dist/types/DataStructures/User/UserNode.d.ts +130 -0
  98. package/dist/types/Database/GetConceptFromIndexDb.d.ts +9 -0
  99. package/dist/types/Database/NoIndexDb.d.ts +169 -0
  100. package/dist/types/Database/indexdblocal.d.ts +42 -0
  101. package/dist/types/Database/indexeddb.d.ts +43 -0
  102. package/dist/types/Drawing/ConceptDraw.d.ts +28 -0
  103. package/dist/types/Drawing/ConceptEvents.d.ts +46 -0
  104. package/dist/types/Helpers/CheckIfExists.d.ts +159 -0
  105. package/dist/types/Helpers/RemoveFromArray.d.ts +66 -0
  106. package/dist/types/Helpers/UniqueInsert.d.ts +28 -0
  107. package/dist/types/Services/CheckForConnectionDeletion.d.ts +190 -0
  108. package/dist/types/Services/Common/DecodeCountInfo.d.ts +54 -0
  109. package/dist/types/Services/Common/ErrorPosting.d.ts +49 -0
  110. package/dist/types/Services/Common/RegexFunction.d.ts +28 -0
  111. package/dist/types/Services/Composition/BuildComposition.d.ts +37 -0
  112. package/dist/types/Services/Composition/CompositionCache.d.ts +89 -0
  113. package/dist/types/Services/Composition/CreateCompositionCache.d.ts +43 -0
  114. package/dist/types/Services/Conversion/ConvertConcepts.d.ts +83 -0
  115. package/dist/types/Services/CreateBinaryTreeFromData.d.ts +38 -0
  116. package/dist/types/Services/CreateCharacterBinaryTreeFromData.d.ts +42 -0
  117. package/dist/types/Services/CreateConnectionBetweenTwoConcepts.d.ts +206 -0
  118. package/dist/types/Services/CreateDefaultConcept.d.ts +114 -0
  119. package/dist/types/Services/CreateTheComposition.d.ts +101 -0
  120. package/dist/types/Services/CreateTheConcept.d.ts +179 -0
  121. package/dist/types/Services/CreateTheConnection.d.ts +59 -0
  122. package/dist/types/Services/CreateTheConnectionGeneral.d.ts +127 -0
  123. package/dist/types/Services/CreateTypeTreeFromData.d.ts +43 -0
  124. package/dist/types/Services/Delete/DeleteConnectionByType.d.ts +52 -5
  125. package/dist/types/Services/Delete/GetAllConnectionByType.d.ts +57 -9
  126. package/dist/types/Services/DeleteConcept.d.ts +136 -0
  127. package/dist/types/Services/DeleteConnection.d.ts +194 -0
  128. package/dist/types/Services/FindConeceptsFromConnection.d.ts +179 -0
  129. package/dist/types/Services/FindConnectionsOfCompositionBulkInMemory.d.ts +157 -0
  130. package/dist/types/Services/GenerateHexNumber.d.ts +64 -0
  131. package/dist/types/Services/GetComposition.d.ts +331 -0
  132. package/dist/types/Services/GetCompositionBulk.d.ts +251 -3
  133. package/dist/types/Services/GetCompositionList.d.ts +130 -0
  134. package/dist/types/Services/GetConceptByCharacter.d.ts +84 -0
  135. package/dist/types/Services/GetConnections.d.ts +72 -0
  136. package/dist/types/Services/GetDataFromIndexDb.d.ts +79 -0
  137. package/dist/types/Services/GetLink.d.ts +104 -0
  138. package/dist/types/Services/GetLinkerConnectionFromConcept.d.ts +99 -0
  139. package/dist/types/Services/GetMaximumConnectionSyncTime.d.ts +57 -0
  140. package/dist/types/Services/GetRelation.d.ts +162 -0
  141. package/dist/types/Services/GetTheConcept.d.ts +71 -0
  142. package/dist/types/Services/GetTheReferent.d.ts +74 -0
  143. package/dist/types/Services/InitializeSystem.d.ts +119 -0
  144. package/dist/types/Services/Local/CreateDefaultLConcept.d.ts +48 -0
  145. package/dist/types/Services/Local/CreateLocalBinaryTreeFromData.d.ts +49 -0
  146. package/dist/types/Services/Local/CreateLocalBinaryTypeTreeFromData.d.ts +54 -0
  147. package/dist/types/Services/Local/CreateLocalCharacterBinaryTree.d.ts +60 -0
  148. package/dist/types/Services/Local/CreateTheCompositionLocal.d.ts +70 -0
  149. package/dist/types/Services/Local/CreateTheConceptLocal.d.ts +58 -0
  150. package/dist/types/Services/Local/CreateTheConnectionLocal.d.ts +56 -0
  151. package/dist/types/Services/Local/GetCompositionListLocal.d.ts +103 -0
  152. package/dist/types/Services/Local/GetCompositionLocal.d.ts +96 -0
  153. package/dist/types/Services/Local/GetConceptByCharacterLocal.d.ts +57 -0
  154. package/dist/types/Services/Local/MakeTheConceptLocal.d.ts +71 -0
  155. package/dist/types/Services/Local/MakeTheInstanceConceptLocal.d.ts +89 -0
  156. package/dist/types/Services/Local/MakeTheTypeLocal.d.ts +71 -0
  157. package/dist/types/Services/Local/UpdateCompositionLocal.d.ts +101 -0
  158. package/dist/types/Services/MakeTheCharacter.d.ts +74 -0
  159. package/dist/types/Services/MakeTheCharacterData.d.ts +65 -0
  160. package/dist/types/Services/MakeTheInstanceConcept.d.ts +75 -0
  161. package/dist/types/Services/MakeTheName.d.ts +81 -0
  162. package/dist/types/Services/MakeTheTimestamp.d.ts +68 -0
  163. package/dist/types/Services/MakeTheTypeConcept.d.ts +68 -0
  164. package/dist/types/Services/Mqtt/publishMessage.d.ts +27 -0
  165. package/dist/types/Services/Mqtt/subscribeMessage.d.ts +23 -0
  166. package/dist/types/Services/PatchComposition.d.ts +105 -0
  167. package/dist/types/Services/Search/DataIdFormat.d.ts +96 -24
  168. package/dist/types/Services/Search/FormatData.d.ts +92 -17
  169. package/dist/types/Services/Search/JustIdFormat.d.ts +91 -16
  170. package/dist/types/Services/Search/SearchLinkInternal.d.ts +28 -0
  171. package/dist/types/Services/Search/SearchLinkMultiple.d.ts +58 -0
  172. package/dist/types/Services/Search/SearchWithTypeAndLinker.d.ts +91 -24
  173. package/dist/types/Services/Search/orderingConnections.d.ts +34 -0
  174. package/dist/types/Services/SplitStrings.d.ts +50 -0
  175. package/dist/types/Services/UpdateComposition.d.ts +123 -0
  176. package/dist/types/Services/User/UserTranslation.d.ts +102 -0
  177. package/dist/types/Services/View/ViewInternalData.d.ts +32 -0
  178. package/dist/types/WrapperFunctions/SchemaQueryObservable.d.ts +140 -5
  179. package/dist/types/app.d.ts +71 -0
  180. package/package.json +1 -1
@@ -1,3 +1,11 @@
1
+ /**
2
+ * Main application module for the Concept Connection System (CCS-JS).
3
+ * This module serves as the primary entry point and exports all public-facing APIs,
4
+ * data structures, and utilities for managing concepts, connections, and compositions.
5
+ *
6
+ * @module app
7
+ * @see {@link https://documentation.freeschema.com} for detailed documentation
8
+ */
1
9
  export { init, updateAccessToken };
2
10
  export { SplitStrings } from './Services/SplitStrings';
3
11
  export { GetCompositionList, GetCompositionListWithId } from './Services/GetCompositionList';
@@ -87,5 +95,68 @@ export { FreeschemaQuery } from './DataStructures/Search/FreeschemaQuery';
87
95
  export { GiveConnection, GetAllTheConnectionsByTypeAndOfTheConcept } from './Services/Delete/GetAllConnectionByType';
88
96
  export { DATAID, NORMAL, JUSTDATA, ALLID, DATAIDDATE, RAW, LISTNORMAL } from './Constants/FormatConstants';
89
97
  export { Transaction } from './DataStructures/Transaction/Transaction';
98
+ /**
99
+ * Updates the bearer access token used for authenticating API requests to the backend.
100
+ * This token is stored globally and used by all API calls that require authentication.
101
+ *
102
+ * @param accessToken - The new bearer access token to use for API authentication. Defaults to empty string if not provided.
103
+ *
104
+ * @example
105
+ * ```typescript
106
+ * // Update the access token after user login
107
+ * updateAccessToken('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...');
108
+ * ```
109
+ *
110
+ * @see TokenStorage for token storage implementation
111
+ * @see https://documentation.freeschema.com for authentication details
112
+ */
90
113
  declare function updateAccessToken(accessToken?: string): void;
114
+ /**
115
+ * Initializes the Concept Connection System with backend URLs and authentication.
116
+ * This is the primary initialization function that must be called before using any CCS features.
117
+ * It performs the following operations asynchronously:
118
+ *
119
+ * 1. Sets up base URLs for the main API and AI services
120
+ * 2. Stores the authentication token for API requests
121
+ * 3. Initializes the system (database setup)
122
+ * 4. Creates binary trees from concept data for efficient querying (by ID, character, and type)
123
+ * 5. Creates local binary trees for offline/local concept management
124
+ * 6. Loads connection data from IndexedDB into memory
125
+ * 7. Loads local connection data for offline operations
126
+ *
127
+ * All data loading operations run in parallel for optimal performance. The IdentifierFlags
128
+ * are updated as each operation completes to indicate which data structures are ready for use.
129
+ *
130
+ * @param url - The base URL for the main backend API endpoint (e.g., 'https://api.example.com')
131
+ * @param aiurl - The base URL for the AI service endpoint (e.g., 'https://ai.example.com')
132
+ * @param accessToken - The bearer access token for authenticating API requests
133
+ *
134
+ * @example
135
+ * ```typescript
136
+ * // Initialize the system with backend URLs and auth token
137
+ * init(
138
+ * 'https://api.freeschema.com',
139
+ * 'https://ai.freeschema.com',
140
+ * 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...'
141
+ * );
142
+ *
143
+ * // After initialization, check if data is loaded before querying
144
+ * if (IdentifierFlags.isDataLoaded) {
145
+ * // Safe to query concepts
146
+ * }
147
+ * ```
148
+ *
149
+ * @remarks
150
+ * The initialization process is asynchronous but does not return a Promise. Instead,
151
+ * it uses IdentifierFlags to signal when different components are ready:
152
+ * - `isDataLoaded`, `isCharacterLoaded`, `isTypeLoaded` - Remote concept data ready
153
+ * - `isLocalDataLoaded`, `isLocalTypeLoaded`, `isLocalCharacterLoaded` - Local concept data ready
154
+ * - `isConnectionLoaded`, `isConnectionTypeLoaded` - Remote connection data ready
155
+ * - `isLocalConnectionLoaded` - Local connection data ready
156
+ *
157
+ * @see IdentifierFlags for checking initialization status
158
+ * @see InitializeSystem for database initialization details
159
+ * @see CreateBinaryTreeFromData for concept tree creation
160
+ * @see https://documentation.freeschema.com/#installation for setup guide
161
+ */
91
162
  declare function init(url?: string, aiurl?: string, accessToken?: string): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mftsccs-node",
3
- "version": "0.0.57",
3
+ "version": "0.0.58",
4
4
  "environment": "production",
5
5
  "description": "Full Pack of concept and connection system",
6
6
  "main": "dist/bundle.js",