mftsccs-node 0.2.23 → 0.2.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +41 -29
- package/dist/bundle.js +1 -1
- package/dist/bundle.mjs +1 -0
- package/dist/types/Api/Create/CreateTheConnectionApi.d.ts +4 -9
- package/dist/types/Api/GetAllConcepts.d.ts +0 -4
- package/dist/types/Api/GetAllLinkerConnectionsFromTheConcept.d.ts +1 -1
- package/dist/types/Api/GetAllLinkerConnectionsToTheConcept.d.ts +1 -1
- package/dist/types/Api/GetAllPrefetchConnections.d.ts +0 -3
- package/dist/types/Api/GetConnections/GetConnectionsBetweenApi.d.ts +8 -0
- package/dist/types/Api/GetReservedConnectionIds.d.ts +1 -1
- package/dist/types/Api/RecursiveSearch.d.ts +1 -1
- package/dist/types/Api/Search/FreeschemaQueryApi.d.ts +6 -5
- package/dist/types/Api/Search/Search.d.ts +4 -3
- package/dist/types/Api/Search/SearchInternalApi.d.ts +5 -4
- package/dist/types/Api/Search/SearchLinkMultipleApi.d.ts +4 -4
- package/dist/types/Api/Search/SearchWithLinker.d.ts +5 -4
- package/dist/types/Api/SearchConcept/GetConceptByCharacterAndCategoryApi.d.ts +3 -2
- package/dist/types/Api/SearchConcept/GetConceptByCharacterAndCategoryDirect.d.ts +3 -2
- package/dist/types/Api/View/ViewInternalDataApi.d.ts +3 -4
- package/dist/types/DataStructures/BaseUrl.d.ts +5 -0
- package/dist/types/DataStructures/ConceptData.d.ts +14 -5
- package/dist/types/DataStructures/FetchConnection.d.ts +21 -0
- package/dist/types/DataStructures/ReservedIds.d.ts +11 -16
- package/dist/types/DataStructures/Search/FreeschemaQuery.d.ts +1 -0
- package/dist/types/DataStructures/Transaction/Transaction.d.ts +23 -0
- package/dist/types/DataStructures/User/UserBinaryTree.d.ts +1 -119
- package/dist/types/DataStructures/User/UserNode.d.ts +4 -146
- package/dist/types/Database/NoIndexDb.d.ts +32 -36
- package/dist/types/Services/Common/DecodeCountInfo.d.ts +4 -3
- package/dist/types/Services/Common/ErrorPosting.d.ts +5 -7
- package/dist/types/Services/CreateConnectionBetweenTwoConcepts.d.ts +4 -3
- package/dist/types/Services/CreateTheComposition.d.ts +2 -2
- package/dist/types/Services/CreateTheConnection.d.ts +9 -4
- package/dist/types/Services/CreateTheConnectionGeneral.d.ts +4 -4
- package/dist/types/Services/GetDataFromIndexDb.d.ts +8 -8
- package/dist/types/Services/Http/HttpClient.service.d.ts +7 -0
- package/dist/types/Services/MakeTheTimestamp.d.ts +2 -2
- package/dist/types/Services/PatchComposition.d.ts +10 -15
- package/dist/types/Services/UpdateComposition.d.ts +1 -1
- package/dist/types/app.d.ts +21 -21
- package/package.json +12 -1
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
**mftsccs-node** - Full Pack of Concept and Connection System
|
|
4
4
|
|
|
5
|
-
A powerful TypeScript library for building knowledge graphs and managing complex relationships between concepts. CCS-JS provides a complete solution for creating, querying, and managing concepts and connections with support for
|
|
5
|
+
A powerful TypeScript library for building knowledge graphs and managing complex relationships between concepts. CCS-JS provides a complete solution for creating, querying, and managing concepts and connections with support for transactions, runtime caching, and flexible schema querying.
|
|
6
6
|
|
|
7
7
|
[](https://www.npmjs.com/package/mftsccs-node)
|
|
8
8
|
[](https://opensource.org/licenses/ISC)
|
|
@@ -106,7 +106,7 @@ A **Composition** is a hierarchical structure of related concepts and connection
|
|
|
106
106
|
|
|
107
107
|
## ✨ Key Features
|
|
108
108
|
|
|
109
|
-
- 🔄 **
|
|
109
|
+
- 🔄 **Runtime Caching**: In-memory compatibility store and backend synchronization helpers
|
|
110
110
|
- 🔐 **Security & Access Control**: Fine-grained permissions per concept/connection
|
|
111
111
|
- 🌳 **Binary Tree Indexing**: O(log n) lookups by ID, character, and type
|
|
112
112
|
- 📦 **Transactions**: ACID-like operations with rollback support
|
|
@@ -149,8 +149,8 @@ updateAccessToken('new-access-token');
|
|
|
149
149
|
|
|
150
150
|
**Important**:
|
|
151
151
|
- Call `init()` once at application startup
|
|
152
|
-
-
|
|
153
|
-
-
|
|
152
|
+
- `init()` returns a Promise; await it before making API calls that depend on auth or hydrated caches
|
|
153
|
+
- `IdentifierFlags` are also updated for callers that poll readiness
|
|
154
154
|
|
|
155
155
|
```typescript
|
|
156
156
|
import { IdentifierFlags } from 'mftsccs-node';
|
|
@@ -912,31 +912,9 @@ const retrieved = await GetComposition(composition.id);
|
|
|
912
912
|
console.log(retrieved); // Full nested structure
|
|
913
913
|
```
|
|
914
914
|
|
|
915
|
-
### Local
|
|
915
|
+
### Local Compatibility APIs
|
|
916
916
|
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
```typescript
|
|
920
|
-
import {
|
|
921
|
-
CreateTheConceptLocal,
|
|
922
|
-
GetCompositionLocal,
|
|
923
|
-
MakeTheInstanceConceptLocal
|
|
924
|
-
} from 'mftsccs-node';
|
|
925
|
-
|
|
926
|
-
// Create local concept (survives offline)
|
|
927
|
-
const localConcept = await MakeTheInstanceConceptLocal(
|
|
928
|
-
"note",
|
|
929
|
-
"Offline note",
|
|
930
|
-
1,
|
|
931
|
-
4
|
|
932
|
-
);
|
|
933
|
-
|
|
934
|
-
// Retrieve from local storage
|
|
935
|
-
const composition = await GetCompositionLocal(
|
|
936
|
-
localConcept.id,
|
|
937
|
-
localConcept.userId
|
|
938
|
-
);
|
|
939
|
-
```
|
|
917
|
+
Frontend-origin local/offline helpers are not exported by the Node package. Server consumers should use the backend-backed concept, connection, and composition APIs instead of local concept creation helpers.
|
|
940
918
|
|
|
941
919
|
### Bulk Operations
|
|
942
920
|
|
|
@@ -1041,7 +1019,7 @@ ccs-js/
|
|
|
1041
1019
|
│ ├── Api/ # Backend API integration (45 files)
|
|
1042
1020
|
│ ├── Services/ # Business logic layer (73+ files)
|
|
1043
1021
|
│ ├── DataStructures/ # Core data models (70+ files)
|
|
1044
|
-
│ ├── Database/ #
|
|
1022
|
+
│ ├── Database/ # Node in-memory compatibility storage (4 files)
|
|
1045
1023
|
│ ├── Constants/ # Configuration (2 files)
|
|
1046
1024
|
│ ├── Helpers/ # Utility functions (3 files)
|
|
1047
1025
|
│ ├── Drawing/ # UI visualization (2 files)
|
|
@@ -1121,6 +1099,40 @@ const documents = await FreeschemaQueryApi(query, "token");
|
|
|
1121
1099
|
|
|
1122
1100
|
---
|
|
1123
1101
|
|
|
1102
|
+
## Local Package Testing
|
|
1103
|
+
|
|
1104
|
+
You can call `SchemaQueryListener` from this repository without creating another project.
|
|
1105
|
+
|
|
1106
|
+
1. Copy `scripts/.env.example` to `scripts/.env` and set `CCS_BASE_URL`, `CCS_ACCESS_TOKEN`, and optionally `CCS_SCHEMA_QUERY_FILE`.
|
|
1107
|
+
2. Edit `scripts/schema-query.example.json` or create another query JSON file.
|
|
1108
|
+
3. Run:
|
|
1109
|
+
|
|
1110
|
+
```bash
|
|
1111
|
+
npm run schemaquery:test
|
|
1112
|
+
```
|
|
1113
|
+
|
|
1114
|
+
To reuse an already-built `dist/bundle.js`, run:
|
|
1115
|
+
|
|
1116
|
+
```bash
|
|
1117
|
+
npm run schemaquery:test:built -- --query scripts/schema-query.example.json
|
|
1118
|
+
```
|
|
1119
|
+
|
|
1120
|
+
You can override values from the command line:
|
|
1121
|
+
|
|
1122
|
+
```bash
|
|
1123
|
+
npm run schemaquery:test -- --query scripts/schema-query.example.json --base-url https://your-api-url.com --token your-token --type YourTypeName --format DATAID
|
|
1124
|
+
```
|
|
1125
|
+
|
|
1126
|
+
The runner prints the full `SchemaQueryListener` result as JSON, including the top-level `count`.
|
|
1127
|
+
|
|
1128
|
+
If the backend returns an error, inspect the raw API response:
|
|
1129
|
+
|
|
1130
|
+
```bash
|
|
1131
|
+
npm run schemaquery:test:built -- --query scripts/schema-query.example.json --raw
|
|
1132
|
+
```
|
|
1133
|
+
|
|
1134
|
+
---
|
|
1135
|
+
|
|
1124
1136
|
## 🤝 Contributing
|
|
1125
1137
|
|
|
1126
1138
|
Contributions are welcome! Please follow these steps:
|