mftsccs-node 0.0.69 → 0.0.71
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 +47 -35
- 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/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/ReservedIds.d.ts +1 -0
- 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 +3 -3
- package/dist/types/Services/CreateTheConnectionGeneral.d.ts +3 -3
- 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 +18 -22
- 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
|
|
@@ -139,8 +139,8 @@ updateAccessToken('new-access-token');
|
|
|
139
139
|
|
|
140
140
|
**Important**:
|
|
141
141
|
- Call `init()` once at application startup
|
|
142
|
-
-
|
|
143
|
-
-
|
|
142
|
+
- `init()` returns a Promise; await it before making API calls that depend on auth or hydrated caches
|
|
143
|
+
- `IdentifierFlags` are also updated for callers that poll readiness
|
|
144
144
|
|
|
145
145
|
```typescript
|
|
146
146
|
import { IdentifierFlags } from 'mftsccs-node';
|
|
@@ -902,31 +902,9 @@ const retrieved = await GetComposition(composition.id);
|
|
|
902
902
|
console.log(retrieved); // Full nested structure
|
|
903
903
|
```
|
|
904
904
|
|
|
905
|
-
### Local
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
```typescript
|
|
910
|
-
import {
|
|
911
|
-
CreateTheConceptLocal,
|
|
912
|
-
GetCompositionLocal,
|
|
913
|
-
MakeTheInstanceConceptLocal
|
|
914
|
-
} from 'mftsccs-node';
|
|
915
|
-
|
|
916
|
-
// Create local concept (survives offline)
|
|
917
|
-
const localConcept = await MakeTheInstanceConceptLocal(
|
|
918
|
-
"note",
|
|
919
|
-
"Offline note",
|
|
920
|
-
1,
|
|
921
|
-
4
|
|
922
|
-
);
|
|
923
|
-
|
|
924
|
-
// Retrieve from local storage
|
|
925
|
-
const composition = await GetCompositionLocal(
|
|
926
|
-
localConcept.id,
|
|
927
|
-
localConcept.userId
|
|
928
|
-
);
|
|
929
|
-
```
|
|
905
|
+
### Local Compatibility APIs
|
|
906
|
+
|
|
907
|
+
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.
|
|
930
908
|
|
|
931
909
|
### Bulk Operations
|
|
932
910
|
|
|
@@ -1031,7 +1009,7 @@ ccs-js/
|
|
|
1031
1009
|
│ ├── Api/ # Backend API integration (45 files)
|
|
1032
1010
|
│ ├── Services/ # Business logic layer (73+ files)
|
|
1033
1011
|
│ ├── DataStructures/ # Core data models (70+ files)
|
|
1034
|
-
│ ├── Database/ #
|
|
1012
|
+
│ ├── Database/ # Node in-memory compatibility storage (4 files)
|
|
1035
1013
|
│ ├── Constants/ # Configuration (2 files)
|
|
1036
1014
|
│ ├── Helpers/ # Utility functions (3 files)
|
|
1037
1015
|
│ ├── Drawing/ # UI visualization (2 files)
|
|
@@ -1109,11 +1087,45 @@ const query = {
|
|
|
1109
1087
|
const documents = await FreeschemaQueryApi(query, "token");
|
|
1110
1088
|
```
|
|
1111
1089
|
|
|
1112
|
-
---
|
|
1113
|
-
|
|
1114
|
-
##
|
|
1115
|
-
|
|
1116
|
-
|
|
1090
|
+
---
|
|
1091
|
+
|
|
1092
|
+
## Local Package Testing
|
|
1093
|
+
|
|
1094
|
+
You can call `SchemaQueryListener` from this repository without creating another project.
|
|
1095
|
+
|
|
1096
|
+
1. Copy `scripts/.env.example` to `scripts/.env` and set `CCS_BASE_URL`, `CCS_ACCESS_TOKEN`, and optionally `CCS_SCHEMA_QUERY_FILE`.
|
|
1097
|
+
2. Edit `scripts/schema-query.example.json` or create another query JSON file.
|
|
1098
|
+
3. Run:
|
|
1099
|
+
|
|
1100
|
+
```bash
|
|
1101
|
+
npm run schemaquery:test
|
|
1102
|
+
```
|
|
1103
|
+
|
|
1104
|
+
To reuse an already-built `dist/bundle.js`, run:
|
|
1105
|
+
|
|
1106
|
+
```bash
|
|
1107
|
+
npm run schemaquery:test:built -- --query scripts/schema-query.example.json
|
|
1108
|
+
```
|
|
1109
|
+
|
|
1110
|
+
You can override values from the command line:
|
|
1111
|
+
|
|
1112
|
+
```bash
|
|
1113
|
+
npm run schemaquery:test -- --query scripts/schema-query.example.json --base-url https://your-api-url.com --token your-token --type YourTypeName --format DATAID
|
|
1114
|
+
```
|
|
1115
|
+
|
|
1116
|
+
The runner prints the full `SchemaQueryListener` result as JSON, including the top-level `count`.
|
|
1117
|
+
|
|
1118
|
+
If the backend returns an error, inspect the raw API response:
|
|
1119
|
+
|
|
1120
|
+
```bash
|
|
1121
|
+
npm run schemaquery:test:built -- --query scripts/schema-query.example.json --raw
|
|
1122
|
+
```
|
|
1123
|
+
|
|
1124
|
+
---
|
|
1125
|
+
|
|
1126
|
+
## 🤝 Contributing
|
|
1127
|
+
|
|
1128
|
+
Contributions are welcome! Please follow these steps:
|
|
1117
1129
|
|
|
1118
1130
|
1. Fork the repository
|
|
1119
1131
|
2. Create a feature branch (`git checkout -b feature/amazing-feature`)
|