✨ types(audit): excludeFields und AuditEntry (#67)
collection.audit.excludeFields (dot notation) hält Werte aus dem Audit-Verlauf heraus; AuditLog.redactedFields nennt die betroffenen Pfade. AuditEntry ist jetzt als Typ deklariert, damit Clients das Feld sehen. Refs cms/tibi-server#67
This commit is contained in:
1 parent
779dd574fc
commit
cbec4753a1
2 files changed
+35
No files matched your search
Vendored
+27
@@ -272,6 +272,33 @@ declare global {
|
||||
| "bulkUpdate"
|
||||
| "bulkDelete"
|
||||
>
|
||||
/**
|
||||
* Document paths (dot notation, e.g. `security.twoFactor.secret`) whose
|
||||
* values are never written to the audit history. The values are dropped,
|
||||
* not replaced: the paths are recorded in `AuditEntry.redactedFields`
|
||||
* instead, so a client-side audit restore cannot write a placeholder into
|
||||
* the document. Snapshot backups (`snapshotPath`) are not affected.
|
||||
*/
|
||||
excludeFields?: string[]
|
||||
}
|
||||
|
||||
/** One audit history entry as returned by `GET /api/v1/audit`. */
|
||||
export interface AuditEntry {
|
||||
id?: string
|
||||
projectNamespace?: string
|
||||
projectName?: string
|
||||
collection: string
|
||||
action: string
|
||||
documentId?: string
|
||||
snapshot?: Record<string, unknown>
|
||||
changes?: Record<string, unknown>
|
||||
filter?: Record<string, unknown>
|
||||
/**
|
||||
* Paths removed from `snapshot`/`changes` because the collection lists
|
||||
* them in `audit.excludeFields`. Metadata only — the values are gone.
|
||||
*/
|
||||
redactedFields?: string[]
|
||||
[key: string]: any
|
||||
}
|
||||
|
||||
export interface UploadConfig {
|
||||
|
||||
Reference in new issue
Block a user