| 7 | const logger = createLogger('AuditLog') |
| 8 | |
| 9 | interface AuditLogParams { |
| 10 | workspaceId?: string | null |
| 11 | actorId: string |
| 12 | action: AuditActionType |
| 13 | resourceType: AuditResourceTypeValue |
| 14 | resourceId?: string |
| 15 | actorName?: string | null |
| 16 | actorEmail?: string | null |
| 17 | resourceName?: string |
| 18 | description?: string |
| 19 | metadata?: Record<string, unknown> |
| 20 | request?: { headers: { get(name: string): string | null } } |
| 21 | } |
| 22 | |
| 23 | function getClientIp(request: { headers: { get(name: string): string | null } }): string { |
| 24 | return ( |
nothing calls this directly
no outgoing calls
no test coverage detected