@htlkg/core 0.0.15 → 0.0.17
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 +5 -0
- package/dist/types/index.d.ts +19 -1
- package/package.json +11 -12
- package/src/types/index.ts +19 -0
package/README.md
CHANGED
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
Core utilities, types, authentication, and constants for Hotelinking applications.
|
|
4
4
|
|
|
5
|
+
## Changelog
|
|
6
|
+
|
|
7
|
+
### 0.0.16
|
|
8
|
+
- Added `ActivityLog` type for the admin activity audit trail (immutable entries tracking create/update/delete actions across all models)
|
|
9
|
+
|
|
5
10
|
## Installation
|
|
6
11
|
|
|
7
12
|
```bash
|
package/dist/types/index.d.ts
CHANGED
|
@@ -127,6 +127,24 @@ interface Contact {
|
|
|
127
127
|
legacyId?: string;
|
|
128
128
|
createdAt?: string;
|
|
129
129
|
updatedAt?: string;
|
|
130
|
+
deletedAt?: string | null;
|
|
131
|
+
deletedBy?: string | null;
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* ActivityLog interface representing an immutable audit trail entry
|
|
135
|
+
*/
|
|
136
|
+
interface ActivityLog {
|
|
137
|
+
id: string;
|
|
138
|
+
userId: string;
|
|
139
|
+
userEmail: string;
|
|
140
|
+
accountId?: string;
|
|
141
|
+
brandId?: string;
|
|
142
|
+
action: "create" | "update" | "delete" | "restore" | "permanent_delete";
|
|
143
|
+
resourceType: string;
|
|
144
|
+
resourceId: string;
|
|
145
|
+
resourceName?: string;
|
|
146
|
+
changes?: Record<string, any>;
|
|
147
|
+
createdAt: string;
|
|
130
148
|
}
|
|
131
149
|
|
|
132
|
-
export type { Account, AuthUser, Brand, BrandUser, Contact, Product, ProductInstance, SystemSettings, User };
|
|
150
|
+
export type { Account, ActivityLog, AuthUser, Brand, BrandUser, Contact, Product, ProductInstance, SystemSettings, User };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@htlkg/core",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.17",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -36,16 +36,6 @@
|
|
|
36
36
|
"src",
|
|
37
37
|
"dist"
|
|
38
38
|
],
|
|
39
|
-
"scripts": {
|
|
40
|
-
"build": "tsup",
|
|
41
|
-
"dev": "tsup --watch",
|
|
42
|
-
"test": "vitest run",
|
|
43
|
-
"test:watch": "vitest",
|
|
44
|
-
"prepublishOnly": "pnpm build",
|
|
45
|
-
"version:patch": "pnpm version patch --no-git-tag-version",
|
|
46
|
-
"version:minor": "pnpm version minor --no-git-tag-version",
|
|
47
|
-
"version:major": "pnpm version major --no-git-tag-version"
|
|
48
|
-
},
|
|
49
39
|
"dependencies": {
|
|
50
40
|
"aws-amplify": "^6.15.7"
|
|
51
41
|
},
|
|
@@ -57,5 +47,14 @@
|
|
|
57
47
|
},
|
|
58
48
|
"publishConfig": {
|
|
59
49
|
"access": "public"
|
|
50
|
+
},
|
|
51
|
+
"scripts": {
|
|
52
|
+
"build": "tsup",
|
|
53
|
+
"dev": "tsup --watch",
|
|
54
|
+
"test": "vitest run",
|
|
55
|
+
"test:watch": "vitest",
|
|
56
|
+
"version:patch": "pnpm version patch --no-git-tag-version",
|
|
57
|
+
"version:minor": "pnpm version minor --no-git-tag-version",
|
|
58
|
+
"version:major": "pnpm version major --no-git-tag-version"
|
|
60
59
|
}
|
|
61
|
-
}
|
|
60
|
+
}
|
package/src/types/index.ts
CHANGED
|
@@ -137,4 +137,23 @@ export interface Contact {
|
|
|
137
137
|
legacyId?: string;
|
|
138
138
|
createdAt?: string;
|
|
139
139
|
updatedAt?: string;
|
|
140
|
+
deletedAt?: string | null;
|
|
141
|
+
deletedBy?: string | null;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* ActivityLog interface representing an immutable audit trail entry
|
|
146
|
+
*/
|
|
147
|
+
export interface ActivityLog {
|
|
148
|
+
id: string;
|
|
149
|
+
userId: string;
|
|
150
|
+
userEmail: string;
|
|
151
|
+
accountId?: string;
|
|
152
|
+
brandId?: string;
|
|
153
|
+
action: "create" | "update" | "delete" | "restore" | "permanent_delete";
|
|
154
|
+
resourceType: string;
|
|
155
|
+
resourceId: string;
|
|
156
|
+
resourceName?: string;
|
|
157
|
+
changes?: Record<string, any>;
|
|
158
|
+
createdAt: string;
|
|
140
159
|
}
|