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,9 +1,93 @@
1
+ /**
2
+ * @fileoverview Defines the FilterSearch class for creating filter criteria in search queries.
3
+ * @module DataStructures/FilterSearch
4
+ */
5
+ /**
6
+ * Represents a single filter criterion for search operations.
7
+ * This class encapsulates the conditions for filtering search results based on
8
+ * specific fields, values, and logical operators.
9
+ *
10
+ * @class FilterSearch
11
+ *
12
+ * @example
13
+ * ```typescript
14
+ * const filter = new FilterSearch();
15
+ * filter.type = "age";
16
+ * filter.search = "25";
17
+ * filter.logicoperator = ">=";
18
+ * filter.index = 0;
19
+ * filter.composition = true;
20
+ * filter.name = "age_filter";
21
+ * filter.operateon = "value";
22
+ * ```
23
+ *
24
+ * @example
25
+ * ```typescript
26
+ * // String equality filter
27
+ * const nameFilter = new FilterSearch();
28
+ * nameFilter.type = "name";
29
+ * nameFilter.search = "John";
30
+ * nameFilter.logicoperator = "=";
31
+ * nameFilter.operateon = "text";
32
+ * ```
33
+ */
1
34
  export declare class FilterSearch {
35
+ /**
36
+ * The type or field name to filter on.
37
+ * Specifies which property of the entity should be evaluated by this filter.
38
+ *
39
+ * @type {string}
40
+ * @default ""
41
+ */
2
42
  type: string;
43
+ /**
44
+ * The search value or term to filter against.
45
+ * The value that will be compared with the specified field using the logic operator.
46
+ *
47
+ * @type {string}
48
+ * @default ""
49
+ */
3
50
  search: string;
51
+ /**
52
+ * The logical operator for comparison.
53
+ * Determines how the search value is compared with the field value.
54
+ * Common operators include: "=", "!=", ">", "<", ">=", "<=", "LIKE", "IN".
55
+ *
56
+ * @type {string}
57
+ * @default "="
58
+ */
4
59
  logicoperator: string;
60
+ /**
61
+ * The index or position of this filter in a filter array.
62
+ * Used for ordering and referencing filters in complex filter combinations.
63
+ *
64
+ * @type {number}
65
+ * @default 0
66
+ */
5
67
  index: number;
68
+ /**
69
+ * Flag indicating whether this filter applies to compositions.
70
+ * When true, the filter is evaluated within a composition context.
71
+ *
72
+ * @type {boolean}
73
+ * @default true
74
+ */
6
75
  composition: boolean;
76
+ /**
77
+ * A descriptive name for this filter.
78
+ * Useful for identifying and debugging filter operations.
79
+ *
80
+ * @type {string}
81
+ * @default ""
82
+ */
7
83
  name: string;
84
+ /**
85
+ * The operand type or target field for the filter operation.
86
+ * Specifies what kind of data or field the filter operates on
87
+ * (e.g., "value", "text", "date", "id").
88
+ *
89
+ * @type {string}
90
+ * @default ""
91
+ */
8
92
  operateon: string;
9
93
  }
@@ -1,11 +1,45 @@
1
+ /**
2
+ * @fileoverview IdentifierFlags module for tracking data loading states in CCS-JS.
3
+ * This module provides centralized flags for synchronizing data loading across different storage structures.
4
+ * @module DataStructures/IdentifierFlags
5
+ */
6
+ /**
7
+ * Centralized flags for tracking the loading state of various data structures.
8
+ * Used for synchronization when loading initial data from backend or local storage.
9
+ *
10
+ * @class IdentifierFlags
11
+ * @example
12
+ * ```typescript
13
+ * // Check if data is loaded
14
+ * if (IdentifierFlags.isDataLoaded) {
15
+ * console.log("Concept data ready");
16
+ * }
17
+ *
18
+ * // Set flag when loading completes
19
+ * IdentifierFlags.isDataLoaded = true;
20
+ * ```
21
+ *
22
+ * @remarks
23
+ * All properties are static flags (booleans) used across the application
24
+ * to coordinate asynchronous data loading operations.
25
+ */
1
26
  export declare class IdentifierFlags {
27
+ /** Flag indicating if the type tree has been loaded from backend */
2
28
  static isTypeLoaded: boolean;
29
+ /** Flag indicating if the character tree has been loaded from backend */
3
30
  static isCharacterLoaded: boolean;
31
+ /** Flag indicating if the main concept data has been loaded from backend */
4
32
  static isDataLoaded: boolean;
33
+ /** Flag indicating if local concept data has been loaded from IndexedDB */
5
34
  static isLocalDataLoaded: boolean;
35
+ /** Flag indicating if local character tree has been loaded from IndexedDB */
6
36
  static isLocalCharacterLoaded: boolean;
37
+ /** Flag indicating if local type tree has been loaded from IndexedDB */
7
38
  static isLocalTypeLoaded: boolean;
39
+ /** Flag indicating if connection data has been loaded from backend */
8
40
  static isConnectionLoaded: boolean;
41
+ /** Flag indicating if connection type tree has been loaded from backend */
9
42
  static isConnectionTypeLoaded: boolean;
43
+ /** Flag indicating if local connection data has been loaded from IndexedDB */
10
44
  static isLocalConnectionLoaded: boolean;
11
45
  }
@@ -1,21 +1,126 @@
1
+ /**
2
+ * @fileoverview Local Concept data structure for the Concept Connection System.
3
+ * This module defines the LConcept class which represents a local concept entity
4
+ * with various identifiers, timestamps, and metadata properties.
5
+ * @module DataStructures/Local/LConcept
6
+ */
1
7
  import { Concept } from "../Concept";
8
+ /**
9
+ * Represents a Local Concept in the Concept Connection System.
10
+ * A local concept is a data structure that stores concept information locally
11
+ * before or instead of synchronizing with a remote server.
12
+ *
13
+ * @class LConcept
14
+ * @export
15
+ */
2
16
  export declare class LConcept {
17
+ /**
18
+ * Unique identifier for the concept.
19
+ * @type {number}
20
+ */
3
21
  id: number;
22
+ /**
23
+ * Ghost identifier for tracking purposes.
24
+ * @type {number}
25
+ */
4
26
  ghostId: number;
27
+ /**
28
+ * Identifier of the user who owns this concept.
29
+ * @type {number}
30
+ */
5
31
  userId: number;
32
+ /**
33
+ * Type identifier that classifies this concept.
34
+ * @type {number}
35
+ */
6
36
  typeId: number;
37
+ /**
38
+ * Category identifier for grouping concepts.
39
+ * @type {number}
40
+ */
7
41
  categoryId: number;
42
+ /**
43
+ * Access control identifier determining permissions.
44
+ * @type {number}
45
+ */
8
46
  accessId: number;
47
+ /**
48
+ * The character or text value representing this concept.
49
+ * @type {string}
50
+ */
9
51
  characterValue: string;
52
+ /**
53
+ * Character representation of the type.
54
+ * @type {string}
55
+ */
10
56
  typeCharacter: string;
57
+ /**
58
+ * Timestamp when this concept was created or entered.
59
+ * @type {Date | string}
60
+ */
11
61
  entryTimeStamp: Date | string;
62
+ /**
63
+ * Identifier for the referent data.
64
+ * @type {number}
65
+ */
12
66
  referentId: number;
67
+ /**
68
+ * Timestamp when this concept was last updated.
69
+ * @type {Date | string}
70
+ */
13
71
  updatedTimeStamp: Date | string;
72
+ /**
73
+ * Reference to the type concept (can be LConcept or Concept).
74
+ * @type {LConcept | null | void | Concept}
75
+ */
14
76
  type: LConcept | null | void | Concept;
77
+ /**
78
+ * Indicates whether this concept is newly created.
79
+ * @type {boolean}
80
+ */
15
81
  isNew: boolean;
82
+ /**
83
+ * Indicates whether this concept is a composition.
84
+ * @type {boolean}
85
+ * @default false
86
+ */
16
87
  isComposition: boolean;
88
+ /**
89
+ * Indicates whether this concept is temporary.
90
+ * @type {boolean}
91
+ * @default false
92
+ */
17
93
  isTemp: boolean;
94
+ /**
95
+ * Application identifier for multi-application support.
96
+ * @type {number}
97
+ * @default 999
98
+ */
18
99
  applicationId: number;
100
+ /**
101
+ * Creates a new LConcept instance.
102
+ *
103
+ * @constructor
104
+ * @param {number} id - Unique identifier for the concept
105
+ * @param {number} userId - Identifier of the user who owns this concept
106
+ * @param {number} typeId - Type identifier that classifies this concept
107
+ * @param {number} categoryId - Category identifier for grouping concepts
108
+ * @param {number} accessId - Access control identifier
109
+ * @param {string} characterValue - The character or text value of this concept
110
+ * @param {string} typeCharacter - Character representation of the type
111
+ * @param {boolean} [isNew=false] - Whether this concept is newly created
112
+ * @param {Date | string} entryTimeStamp - Creation timestamp
113
+ * @param {Date | string} updatedTimeStamp - Last update timestamp
114
+ * @param {number} referentId - Identifier for the referent data
115
+ * @param {number} [applicationId=999] - Application identifier
116
+ */
19
117
  constructor(id: number, userId: number, typeId: number, categoryId: number, accessId: number, characterValue: string, typeCharacter: string, isNew: boolean | undefined, entryTimeStamp: Date | string, updatedTimeStamp: Date | string, referentId: number, applicationId?: number);
118
+ /**
119
+ * Logs the type identifier of this concept to the console.
120
+ * Used primarily for debugging purposes.
121
+ *
122
+ * @method getType
123
+ * @returns {void}
124
+ */
20
125
  getType(): void;
21
126
  }
@@ -1,18 +1,101 @@
1
+ /**
2
+ * @fileoverview Local Connection data structure for the Concept Connection System.
3
+ * This module defines the LConnection class which represents a connection between
4
+ * concepts in the local storage system.
5
+ * @module DataStructures/Local/LConnection
6
+ */
1
7
  import { LConcept } from "./LConcept";
8
+ /**
9
+ * Represents a Local Connection between concepts in the Concept Connection System.
10
+ * A local connection links two concepts and stores metadata about that relationship.
11
+ *
12
+ * @class LConnection
13
+ * @export
14
+ */
2
15
  export declare class LConnection {
16
+ /**
17
+ * Unique identifier for the connection.
18
+ * @type {number}
19
+ */
3
20
  id: number;
21
+ /**
22
+ * Ghost identifier for tracking purposes.
23
+ * @type {number}
24
+ */
4
25
  ghostId: number;
26
+ /**
27
+ * Identifier of the source concept (from concept).
28
+ * @type {number}
29
+ */
5
30
  ofTheConceptId: number;
31
+ /**
32
+ * Identifier of the target concept (to concept).
33
+ * @type {number}
34
+ */
6
35
  toTheConceptId: number;
36
+ /**
37
+ * Timestamp when this connection was created or entered.
38
+ * @type {Date | string}
39
+ */
7
40
  entryTimeStamp: Date | string;
41
+ /**
42
+ * Date and time when this connection is terminated or expires.
43
+ * @type {Date}
44
+ */
8
45
  terminationDateTime: Date;
46
+ /**
47
+ * Access control identifier determining permissions.
48
+ * @type {number}
49
+ */
9
50
  accessId: number;
51
+ /**
52
+ * Type identifier that classifies this connection.
53
+ * @type {number}
54
+ */
10
55
  typeId: number;
56
+ /**
57
+ * Order identifier for sequencing connections.
58
+ * @type {number}
59
+ */
11
60
  orderId: number;
61
+ /**
62
+ * Character representation of the connection type.
63
+ * @type {string}
64
+ */
12
65
  typeCharacter: string;
66
+ /**
67
+ * Timestamp of the last local synchronization.
68
+ * @type {Date}
69
+ */
13
70
  localSyncTime: Date;
71
+ /**
72
+ * Indicates whether this connection is temporary.
73
+ * @type {boolean}
74
+ * @default false
75
+ */
14
76
  isTemp: boolean;
77
+ /**
78
+ * Application identifier for multi-application support.
79
+ * @type {number}
80
+ * @default 999
81
+ */
15
82
  applicationId: number;
83
+ /**
84
+ * Reference to the type concept for this connection.
85
+ * @type {LConcept}
86
+ */
16
87
  type: LConcept;
88
+ /**
89
+ * Creates a new LConnection instance.
90
+ *
91
+ * @constructor
92
+ * @param {number} [id=0] - Unique identifier for the connection
93
+ * @param {number} ofTheConceptId - Identifier of the source concept
94
+ * @param {number} toTheConceptId - Identifier of the target concept
95
+ * @param {number} typeId - Type identifier that classifies this connection
96
+ * @param {number} orderId - Order identifier for sequencing
97
+ * @param {number} accessId - Access control identifier
98
+ * @param {number} [applicationId=999] - Application identifier
99
+ */
17
100
  constructor(id: number | undefined, ofTheConceptId: number, toTheConceptId: number, typeId: number, orderId: number, accessId: number, applicationId?: number);
18
101
  }
@@ -1,27 +1,217 @@
1
+ /**
2
+ * @fileoverview Local Node data structure for binary tree operations.
3
+ * This module defines the LNode class which represents a node in an AVL
4
+ * (self-balancing) binary tree for storing and managing LConcept instances.
5
+ * @module DataStructures/Local/LNode
6
+ */
1
7
  import { LConcept } from "./LConcept";
8
+ /**
9
+ * Represents a node in an AVL binary tree for local concepts.
10
+ * This class implements self-balancing tree operations including rotations,
11
+ * insertions, deletions, and lookups for efficient concept management.
12
+ *
13
+ * @class LNode
14
+ * @export
15
+ */
2
16
  export declare class LNode {
17
+ /**
18
+ * The key used for tree ordering (can be number or string).
19
+ * @type {any}
20
+ */
3
21
  key: any;
22
+ /**
23
+ * The concept value stored in this node.
24
+ * @type {LConcept}
25
+ */
4
26
  value: LConcept;
27
+ /**
28
+ * Reference to the left child node.
29
+ * @type {LNode | null}
30
+ */
5
31
  leftNode: LNode | null;
32
+ /**
33
+ * Reference to the right child node.
34
+ * @type {LNode | null}
35
+ */
6
36
  rightNode: LNode | null;
37
+ /**
38
+ * Reference to current node for linking nodes with same key.
39
+ * @type {LNode | null}
40
+ */
7
41
  currentNode: LNode | null;
42
+ /**
43
+ * Array of variant nodes with same key but different properties.
44
+ * @type {LNode[]}
45
+ * @default []
46
+ */
8
47
  variants: LNode[];
48
+ /**
49
+ * Height of the node in the tree for AVL balancing.
50
+ * @type {number}
51
+ * @default 1
52
+ */
9
53
  height: number;
54
+ /**
55
+ * Creates a new LNode instance.
56
+ *
57
+ * @constructor
58
+ * @param {any} key - The key used for tree ordering
59
+ * @param {LConcept} value - The concept value to store
60
+ * @param {LNode | null} leftNode - Reference to left child
61
+ * @param {LNode | null} rightNode - Reference to right child
62
+ */
10
63
  constructor(key: any, value: LConcept, leftNode: LNode | null, rightNode: LNode | null);
64
+ /**
65
+ * Adds a current node to the chain based on typeId.
66
+ * This method links nodes with different typeIds.
67
+ *
68
+ * @method addCurrentNode
69
+ * @param {LNode} passedNode - The node to add
70
+ * @param {LNode | null} node - The current node in the chain
71
+ * @returns {LNode | null} The updated node chain
72
+ */
11
73
  addCurrentNode(passedNode: LNode, node: LNode | null): LNode;
74
+ /**
75
+ * Adds a node as a variant if it has the same key but different id.
76
+ * This method manages variants (nodes with same key but different properties).
77
+ *
78
+ * @method addCurrentNodeType
79
+ * @param {LNode} passedNode - The node to add as variant
80
+ * @param {LNode | null} node - The current node
81
+ * @returns {LNode | null} The updated node
82
+ */
12
83
  addCurrentNodeType(passedNode: LNode, node: LNode | null): LNode;
84
+ /**
85
+ * Adds a node to the AVL tree with automatic balancing.
86
+ * This method performs standard AVL insertion with rotations.
87
+ *
88
+ * @method addNode
89
+ * @param {LNode} passedNode - The node to insert
90
+ * @param {LNode | null} node - The current node in traversal
91
+ * @param {number} height - Current height for balancing
92
+ * @returns {LNode | null} The root of the updated subtree
93
+ */
13
94
  addNode(passedNode: LNode, node: LNode | null, height: number): LNode | null;
95
+ /**
96
+ * Adds a character node to the tree with variant management.
97
+ * Handles nodes with character keys and manages variants for duplicate keys.
98
+ *
99
+ * @method addCharacterNode
100
+ * @param {LNode} passedNode - The node to insert
101
+ * @param {LNode | null} node - The current node in traversal
102
+ * @param {number} height - Current height for balancing
103
+ * @returns {LNode | null} The root of the updated subtree
104
+ */
14
105
  addCharacterNode(passedNode: LNode, node: LNode | null, height: number): LNode | null;
106
+ /**
107
+ * Adds a type node to the tree with variant management.
108
+ * Handles nodes with typeId keys and manages variants for duplicate typeIds.
109
+ *
110
+ * @method addTypeNode
111
+ * @param {LNode} passedNode - The node to insert
112
+ * @param {LNode | null} node - The current node in traversal
113
+ * @param {number} height - Current height for balancing
114
+ * @returns {LNode | null} The root of the updated subtree
115
+ */
15
116
  addTypeNode(passedNode: LNode, node: LNode | null, height: number): LNode | null;
117
+ /**
118
+ * Performs a right rotation for AVL tree balancing.
119
+ *
120
+ * @method rightRotate
121
+ * @param {LNode | null} y - The node to rotate
122
+ * @returns {LNode | null} The new root of the rotated subtree
123
+ */
16
124
  rightRotate(y: LNode | null): LNode | null;
125
+ /**
126
+ * Performs a left rotation for AVL tree balancing.
127
+ *
128
+ * @method leftRotate
129
+ * @param {LNode | null} x - The node to rotate
130
+ * @returns {LNode | null} The new root of the rotated subtree
131
+ */
17
132
  leftRotate(x: LNode | null): LNode | null;
133
+ /**
134
+ * Gets the height of a node.
135
+ *
136
+ * @method getHeight
137
+ * @param {LNode | null} node - The node to get height from
138
+ * @returns {number} The height of the node, or 0 if null
139
+ */
18
140
  getHeight(node: LNode | null): number;
141
+ /**
142
+ * Calculates the balance factor of a node.
143
+ * Balance factor = height(left subtree) - height(right subtree)
144
+ *
145
+ * @method getBalanceFactor
146
+ * @param {LNode | null} N - The node to calculate balance factor for
147
+ * @returns {number} The balance factor (-2, -1, 0, 1, or 2)
148
+ */
19
149
  getBalanceFactor(N: LNode | null): number;
150
+ /**
151
+ * Searches for a node by numeric id.
152
+ *
153
+ * @method getFromNode
154
+ * @param {number} id - The id to search for
155
+ * @param {LNode | null} node - The current node in traversal
156
+ * @returns {LNode | null} The found node or null
157
+ */
20
158
  getFromNode(id: number, node: LNode | null): LNode | null;
159
+ /**
160
+ * Searches for a node by character value.
161
+ *
162
+ * @method getCharacterFromNode
163
+ * @param {string} value - The character value to search for
164
+ * @param {LNode | null} node - The current node in traversal
165
+ * @returns {LNode | null} The found node or null
166
+ */
21
167
  getCharacterFromNode(value: string, node: LNode | null): LNode | null;
168
+ /**
169
+ * Searches for a node by both character value and type id.
170
+ * This method also searches through variants to find exact matches.
171
+ *
172
+ * @method getFromNodeWithCharacterAndType
173
+ * @param {string} value - The character value to search for
174
+ * @param {number} typeId - The type identifier to match
175
+ * @param {LNode | null} node - The current node in traversal
176
+ * @returns {LNode | null} The found node or null
177
+ */
22
178
  getFromNodeWithCharacterAndType(value: string, typeId: number, node: LNode | null): LNode | null;
179
+ /**
180
+ * Removes a node from the tree by id.
181
+ * Uses standard BST deletion with in-order successor replacement.
182
+ *
183
+ * @method removeNode
184
+ * @param {LNode | null} passedNode - The current node in traversal
185
+ * @param {number} id - The id of the node to remove
186
+ * @returns {LNode | null} The root of the updated subtree
187
+ */
23
188
  removeNode(passedNode: LNode | null, id: number): LNode | null;
189
+ /**
190
+ * Removes a node with variant management.
191
+ * If the node has variants, replaces the removed node with first variant.
192
+ *
193
+ * @method removeNodeWithVariants
194
+ * @param {LNode | null} passedNode - The current node in traversal
195
+ * @param {any} typeIdentifier - The type identifier (key) to search for
196
+ * @param {number} conceptId - The concept id to remove
197
+ * @returns {LNode | null} The root of the updated subtree
198
+ */
24
199
  removeNodeWithVariants(passedNode: LNode | null, typeIdentifier: any, conceptId: number): LNode | null;
200
+ /**
201
+ * Counts the total number of nodes in the subtree.
202
+ *
203
+ * @method countNodeBelow
204
+ * @param {LNode | null} root - The root of the subtree
205
+ * @returns {number} The total count of nodes
206
+ */
25
207
  countNodeBelow(root: LNode | null): number;
208
+ /**
209
+ * Finds the in-order successor (leftmost node in right subtree).
210
+ * Used during node deletion.
211
+ *
212
+ * @method inOrderSuccessor
213
+ * @param {LNode} root - The root to find successor from
214
+ * @returns {LNode} The in-order successor node
215
+ */
26
216
  inOrderSuccessor(root: LNode): LNode;
27
217
  }