@x12i/memorix-relationship-store
v3.0.2
Published
Logical RelationshipStore contract, deterministic IDs, in-memory oracle, and production Mongo Candidate C adapter (Phase 5E).
Readme
@x12i/memorix-relationship-store
Logical RelationshipStore contract, deterministic relationship ids, in-memory oracle (tests), and production Mongo adapter (Candidate C: central per-category relationships collections).
Stores four-field links only — never related payloads.
Install
npm install @x12i/[email protected]| Audience | Use this package? |
|----------|-------------------|
| Remote app | No — use /api/relationships |
| Platform / engines | Yes (data plane + relationships engine) |
| Unit tests | In-memory oracle without Mongo |
Link shape
{
relationshipId: string;
relationshipDefinitionId: string;
fromRecordId: string;
toRecordId: string;
}Exports
import {
createInMemoryRelationshipStore,
createMongoRelationshipStore,
computeRelationshipId,
ensureRelationshipIndexes,
FORBIDDEN_LINK_FIELDS,
} from "@x12i/memorix-relationship-store";
// Mongo-only entry also available:
import { createMongoRelationshipStore } from "@x12i/memorix-relationship-store/mongo";| Export | Role |
|--------|------|
| createInMemoryRelationshipStore | Test oracle |
| createMongoRelationshipStore | Candidate C Mongo adapter |
| computeRelationshipId | Deterministic link id |
| FORBIDDEN_LINK_FIELDS | Reject payload fields on links |
Typical store operations: put/get/list by endpoint, batch upsert, delete by id — all org-scoped.
Related
| Need | Use |
|------|-----|
| Discover / materialize / verify | @x12i/memorix-relationships |
| Read expansion on content | @x12i/memorix-data reader include options |
| HTTP | /api/relationships/* (no ad-hoc link PUT/DELETE) |
Docs
npm test