feat(frontend): audit log
This commit is contained in:
		
							parent
							
								
									49e9eabea0
								
							
						
					
					
						commit
						53006ea313
					
				
					 11 changed files with 385 additions and 1 deletions
				
			
		|  | @ -1,3 +1,6 @@ | |||
| import type { Member } from "./member"; | ||||
| import type { PartialMember, PartialUser, User } from "./user"; | ||||
| 
 | ||||
| export type CreateReportRequest = { | ||||
| 	reason: ReportReason; | ||||
| 	context: string | null; | ||||
|  | @ -24,3 +27,35 @@ export enum ReportReason { | |||
| 	Advertisement = "ADVERTISEMENT", | ||||
| 	CopyrightViolation = "COPYRIGHT_VIOLATION", | ||||
| } | ||||
| 
 | ||||
| export type Report = { | ||||
| 	id: string; | ||||
| 	reporter: PartialUser; | ||||
| 	target_user: PartialUser; | ||||
| 	target_member?: PartialMember; | ||||
| 	status: "OPEN" | "CLOSED"; | ||||
| 	reason: ReportReason; | ||||
| 	context: string | null; | ||||
| 	target_type: "USER" | "MEMBER"; | ||||
| 	snapshot: User | Member | null; | ||||
| }; | ||||
| 
 | ||||
| export type AuditLogEntry = { | ||||
| 	id: string; | ||||
| 	moderator: AuditLogEntity; | ||||
| 	target_user?: AuditLogEntity; | ||||
| 	target_member?: AuditLogEntity; | ||||
| 	report_id?: string; | ||||
| 	type: AuditLogEntryType; | ||||
| 	reason: string | null; | ||||
| 	cleared_fields?: string[]; | ||||
| }; | ||||
| 
 | ||||
| export type AuditLogEntity = { id: string; username: string }; | ||||
| 
 | ||||
| export enum AuditLogEntryType { | ||||
| 	IgnoreReport = "IGNORE_REPORT", | ||||
| 	WarnUser = "WARN_USER", | ||||
| 	WarnUserAndClearProfile = "WARN_USER_AND_CLEAR_PROFILE", | ||||
| 	SuspendUser = "SUSPEND_USER", | ||||
| } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue