This commit is contained in:
+60
-2
@@ -6,6 +6,41 @@ export type ModerationActionKind = 'warn' | 'message' | 'kick' | 'announce';
|
||||
export type ModerationState =
|
||||
'queued' | 'delivered' | 'confirmed' | 'failed' | 'expired' | 'unknown';
|
||||
|
||||
export const moderationCaseOutcomes = [
|
||||
'resolved',
|
||||
'dismissed',
|
||||
'warning_issued',
|
||||
'restriction_applied',
|
||||
'no_action',
|
||||
'duplicate',
|
||||
'appeal_upheld',
|
||||
'appeal_denied'
|
||||
] as const;
|
||||
export const moderationCaseStatuses = [
|
||||
'open',
|
||||
'in_review',
|
||||
'escalated',
|
||||
...moderationCaseOutcomes
|
||||
] as const;
|
||||
export type ModerationCaseStatus = (typeof moderationCaseStatuses)[number];
|
||||
export type ModerationCasePriority = 'low' | 'normal' | 'high' | 'urgent';
|
||||
export const moderationCaseStatusLabels: Record<ModerationCaseStatus, string> = {
|
||||
open: 'Open',
|
||||
in_review: 'In review',
|
||||
escalated: 'Escalated',
|
||||
resolved: 'Resolved',
|
||||
dismissed: 'Dismissed',
|
||||
warning_issued: 'Warning issued',
|
||||
restriction_applied: 'Restriction applied',
|
||||
no_action: 'No action needed',
|
||||
duplicate: 'Duplicate',
|
||||
appeal_upheld: 'Appeal upheld',
|
||||
appeal_denied: 'Appeal denied'
|
||||
};
|
||||
export function isModerationCaseOpen(status: ModerationCaseStatus): boolean {
|
||||
return status === 'open' || status === 'in_review' || status === 'escalated';
|
||||
}
|
||||
|
||||
export interface ModerationPlayer {
|
||||
game: ModerationGame;
|
||||
guid: string;
|
||||
@@ -18,6 +53,7 @@ export interface ModerationPlayer {
|
||||
}
|
||||
export interface ModerationSanction {
|
||||
id: string;
|
||||
caseId?: string | null;
|
||||
game: ModerationGame;
|
||||
guid: string;
|
||||
kind: 'ban' | 'mute';
|
||||
@@ -68,12 +104,31 @@ export interface ModerationCase {
|
||||
game: ModerationGame;
|
||||
guid: string;
|
||||
title: string;
|
||||
status: 'open' | 'resolved' | 'dismissed';
|
||||
status: ModerationCaseStatus;
|
||||
priority: ModerationCasePriority;
|
||||
assigneeId: string | null;
|
||||
assignee: string | null;
|
||||
actor: string;
|
||||
createdAt: string;
|
||||
updatedAt: string;
|
||||
revision: number;
|
||||
evidence: { id: string; text: string; source: string; createdAt: string; actor: string }[];
|
||||
evidence: {
|
||||
id: string;
|
||||
text: string;
|
||||
source: string;
|
||||
snapshot?: string | null;
|
||||
createdAt: string;
|
||||
actor: string;
|
||||
}[];
|
||||
}
|
||||
export interface ModerationCaseDetail {
|
||||
case: ModerationCase;
|
||||
player: ModerationPlayer;
|
||||
sanctions: ModerationSanction[];
|
||||
events: ModerationEvent[];
|
||||
coverage: ModerationCoverage[];
|
||||
assignees: { id: string; username: string }[];
|
||||
checkedAt: string;
|
||||
}
|
||||
export interface ModerationEvent {
|
||||
id: number;
|
||||
@@ -100,6 +155,9 @@ export interface ModerationQuery {
|
||||
game: '' | ModerationGame;
|
||||
guid: string;
|
||||
offset: number;
|
||||
caseStatus?: '' | 'active' | 'closed' | ModerationCaseStatus;
|
||||
priority?: '' | ModerationCasePriority;
|
||||
assignedTo?: string;
|
||||
}
|
||||
export interface ModerationOverview {
|
||||
query: ModerationQuery;
|
||||
|
||||
Reference in New Issue
Block a user