@managemint-solutions/entities 1.34.0 → 1.35.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.
|
@@ -1,12 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AuditTrailEntityType } from "../enum";
|
|
2
2
|
export type GetAuditTrailDto = {
|
|
3
|
-
search?: string | null;
|
|
4
3
|
page: number;
|
|
5
4
|
page_size: number;
|
|
6
|
-
|
|
7
|
-
created_before?: string | null;
|
|
8
|
-
created_by?: string | null;
|
|
9
|
-
action?: AuditTrailAction | null;
|
|
5
|
+
search?: string | null;
|
|
10
6
|
entity_type?: AuditTrailEntityType | null;
|
|
11
|
-
entity_id?: string | null;
|
|
12
7
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AuditTrailEntityType = exports.AuditTrailAction = void 0;
|
|
3
|
+
exports.AuditTrailChangeType = exports.AuditTrailEntityType = exports.AuditTrailAction = void 0;
|
|
4
4
|
var AuditTrailAction;
|
|
5
5
|
(function (AuditTrailAction) {
|
|
6
6
|
AuditTrailAction["INSERT"] = "INSERT";
|
|
@@ -34,3 +34,10 @@ var AuditTrailEntityType;
|
|
|
34
34
|
AuditTrailEntityType["INVOICE"] = "invoices";
|
|
35
35
|
AuditTrailEntityType["NOTIFICATION"] = "notifications";
|
|
36
36
|
})(AuditTrailEntityType || (exports.AuditTrailEntityType = AuditTrailEntityType = {}));
|
|
37
|
+
var AuditTrailChangeType;
|
|
38
|
+
(function (AuditTrailChangeType) {
|
|
39
|
+
AuditTrailChangeType["TEXT"] = "text";
|
|
40
|
+
AuditTrailChangeType["DATE"] = "date";
|
|
41
|
+
AuditTrailChangeType["DATETIME"] = "datetime";
|
|
42
|
+
AuditTrailChangeType["REDACTED"] = "redacted";
|
|
43
|
+
})(AuditTrailChangeType || (exports.AuditTrailChangeType = AuditTrailChangeType = {}));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { UserIdentity } from "../users";
|
|
2
|
-
import { AuditTrailAction, AuditTrailEntityType } from "./enum";
|
|
2
|
+
import { AuditTrailAction, AuditTrailChangeType, AuditTrailEntityType } from "./enum";
|
|
3
3
|
export type AuditTrailEntity = {
|
|
4
4
|
mms_id: string;
|
|
5
5
|
created_at: Date;
|
|
@@ -14,3 +14,29 @@ export type AuditTrailEntity = {
|
|
|
14
14
|
related_entity_type: AuditTrailEntityType | null;
|
|
15
15
|
related_entity_id: string | null;
|
|
16
16
|
};
|
|
17
|
+
/**
|
|
18
|
+
* One changed field as a record's history shows it: the column, its readable label, and both
|
|
19
|
+
* sides already turned into display text (a status id into the status label, a boolean into
|
|
20
|
+
* Yes/No). `DATE` and `DATETIME` values stay ISO strings for the portal to format; `REDACTED`
|
|
21
|
+
* carries no values, only that the field changed.
|
|
22
|
+
*/
|
|
23
|
+
export type AuditTrailChange = {
|
|
24
|
+
field: string;
|
|
25
|
+
label: string;
|
|
26
|
+
type: AuditTrailChangeType;
|
|
27
|
+
old: string | null;
|
|
28
|
+
new: string | null;
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* One entry in a record's history. `entity_type` is what changed: the record itself, or a row
|
|
32
|
+
* that hangs off it (a note, a file, a timesheet entry, a user's permissions).
|
|
33
|
+
*/
|
|
34
|
+
export type AuditTrailHistoryEntry = {
|
|
35
|
+
mms_id: string;
|
|
36
|
+
created_at: Date;
|
|
37
|
+
created_by: UserIdentity | null;
|
|
38
|
+
action: AuditTrailAction;
|
|
39
|
+
entity_type: AuditTrailEntityType;
|
|
40
|
+
entity_id: string;
|
|
41
|
+
changes: AuditTrailChange[];
|
|
42
|
+
};
|
package/package.json
CHANGED