@managemint-solutions/entities 1.33.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.
- package/dist/audit-trail/dto/index.d.ts +2 -7
- package/dist/audit-trail/enum/index.d.ts +6 -0
- package/dist/audit-trail/enum/index.js +8 -1
- package/dist/audit-trail/index.d.ts +27 -1
- package/dist/supporting-files/dto/index.d.ts +6 -2
- package/dist/supporting-files/index.d.ts +9 -0
- package/package.json +1 -1
|
@@ -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
|
+
};
|
|
@@ -6,6 +6,10 @@ export type GetSupportingFilesDto = {
|
|
|
6
6
|
entity: SupportingFilesEntityTypes;
|
|
7
7
|
entityId: string;
|
|
8
8
|
};
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
/**
|
|
10
|
+
* The client file names of one upload: what the signed upload URLs are minted for, and, once
|
|
11
|
+
* the browser has put the bytes in the bucket, what is recorded.
|
|
12
|
+
*/
|
|
13
|
+
export type SupportingFileNamesDto = {
|
|
14
|
+
names: string[];
|
|
11
15
|
};
|
|
@@ -8,3 +8,12 @@ export type SupportingFilePresignedUrl = {
|
|
|
8
8
|
url: string;
|
|
9
9
|
ttl: number;
|
|
10
10
|
};
|
|
11
|
+
/**
|
|
12
|
+
* Where the browser puts one file's bytes: a signed upload URL into the private bucket, valid
|
|
13
|
+
* for two hours. One per requested name, in request order.
|
|
14
|
+
*/
|
|
15
|
+
export type SupportingFileUploadTarget = {
|
|
16
|
+
name: string;
|
|
17
|
+
extension: SupportingFilesExtensions;
|
|
18
|
+
url: string;
|
|
19
|
+
};
|
package/package.json
CHANGED