@memberjunction/external-change-detection 4.0.0 → 4.2.0

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 (2) hide show
  1. package/README.md +26 -3
  2. package/package.json +5 -5
package/README.md CHANGED
@@ -1,10 +1,33 @@
1
- # MemberJunction External Change Detection
1
+ # @memberjunction/external-change-detection
2
2
 
3
- A powerful library for detecting and reconciling changes made to entities by external systems or integrations in MemberJunction applications.
3
+ Detects and reconciles changes made to MemberJunction entities by external systems, third-party integrations, or direct database modifications that bypass the MemberJunction application layer.
4
4
 
5
5
  ## Overview
6
6
 
7
- The `@memberjunction/external-change-detection` package provides functionality to detect when records in your MemberJunction entities have been modified by external systems, third-party integrations, or direct database changes that bypass the MemberJunction application logic. This helps maintain data integrity and ensures that your application can react appropriately to external modifications.
7
+ The `@memberjunction/external-change-detection` package detects when records have been modified outside of MemberJunction, generates detailed change reports with field-level differences, and can replay those changes through the MemberJunction entity system to trigger all business logic, validations, and audit tracking.
8
+
9
+ ```mermaid
10
+ graph TD
11
+ A["ExternalChangeDetectorEngine<br/>(Singleton)"] --> B["Create Detection"]
12
+ A --> C["Update Detection"]
13
+ A --> D["Delete Detection"]
14
+
15
+ B --> E["Records without<br/>Create in RecordChanges"]
16
+ C --> F["__mj_UpdatedAt newer than<br/>latest RecordChange"]
17
+ D --> G["RecordChanges entries<br/>with no matching record"]
18
+
19
+ A --> H["ReplayChanges"]
20
+ H --> I["Load Entity via MJ"]
21
+ I --> J["Save/Delete with ReplayOnly"]
22
+ J --> K["Business Logic<br/>Audit Trail<br/>Triggers"]
23
+
24
+ style A fill:#2d6a9f,stroke:#1a4971,color:#fff
25
+ style B fill:#2d8659,stroke:#1a5c3a,color:#fff
26
+ style C fill:#2d8659,stroke:#1a5c3a,color:#fff
27
+ style D fill:#2d8659,stroke:#1a5c3a,color:#fff
28
+ style H fill:#7c5295,stroke:#563a6b,color:#fff
29
+ style K fill:#b8762f,stroke:#8a5722,color:#fff
30
+ ```
8
31
 
9
32
  ## Key Features
10
33
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@memberjunction/external-change-detection",
3
3
  "type": "module",
4
- "version": "4.0.0",
4
+ "version": "4.2.0",
5
5
  "description": "Library used by server side applications to determine if changes have been made to entities by external systems/integrations",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
@@ -20,10 +20,10 @@
20
20
  "typescript": "^5.9.3"
21
21
  },
22
22
  "dependencies": {
23
- "@memberjunction/core": "4.0.0",
24
- "@memberjunction/core-entities": "4.0.0",
25
- "@memberjunction/global": "4.0.0",
26
- "@memberjunction/sqlserver-dataprovider": "4.0.0"
23
+ "@memberjunction/core": "4.2.0",
24
+ "@memberjunction/core-entities": "4.2.0",
25
+ "@memberjunction/global": "4.2.0",
26
+ "@memberjunction/sqlserver-dataprovider": "4.2.0"
27
27
  },
28
28
  "repository": {
29
29
  "type": "git",