Add structured moderation assessments with revision history
This commit is contained in:
@@ -41,6 +41,49 @@ export function isModerationCaseOpen(status: ModerationCaseStatus): boolean {
|
||||
return status === 'open' || status === 'in_review' || status === 'escalated';
|
||||
}
|
||||
|
||||
export const moderationConcernCategories = [
|
||||
'hate_speech',
|
||||
'harassment',
|
||||
'threats',
|
||||
'safeguarding',
|
||||
'spam',
|
||||
'cheating',
|
||||
'other'
|
||||
] as const;
|
||||
export type ModerationConcernCategory = (typeof moderationConcernCategories)[number];
|
||||
export const moderationConcernLabels: Record<ModerationConcernCategory, string> = {
|
||||
hate_speech: 'Hate speech',
|
||||
harassment: 'Harassment',
|
||||
threats: 'Threats',
|
||||
safeguarding: 'Safeguarding',
|
||||
spam: 'Spam',
|
||||
cheating: 'Cheating',
|
||||
other: 'Other'
|
||||
};
|
||||
export const moderationFindingOutcomes = [
|
||||
'substantiated',
|
||||
'inconclusive',
|
||||
'unsubstantiated'
|
||||
] as const;
|
||||
export type ModerationFindingOutcome = (typeof moderationFindingOutcomes)[number];
|
||||
export const moderationFindingLabels: Record<ModerationFindingOutcome, string> = {
|
||||
substantiated: 'Substantiated',
|
||||
inconclusive: 'Inconclusive',
|
||||
unsubstantiated: 'Unsubstantiated'
|
||||
};
|
||||
export interface ModerationCaseAssessment {
|
||||
revision: number;
|
||||
summary: string;
|
||||
rules: string[];
|
||||
findings: {
|
||||
category: ModerationConcernCategory;
|
||||
finding: ModerationFindingOutcome;
|
||||
detail: string;
|
||||
}[];
|
||||
actor: string;
|
||||
createdAt: string;
|
||||
}
|
||||
|
||||
export interface ModerationPlayer {
|
||||
game: ModerationGame;
|
||||
guid: string;
|
||||
@@ -112,6 +155,7 @@ export interface ModerationCase {
|
||||
createdAt: string;
|
||||
updatedAt: string;
|
||||
revision: number;
|
||||
assessment?: ModerationCaseAssessment | null;
|
||||
evidence: {
|
||||
id: string;
|
||||
text: string;
|
||||
@@ -127,6 +171,8 @@ export interface ModerationCaseDetail {
|
||||
sanctions: ModerationSanction[];
|
||||
linkedActions?: ModerationCaseAction[];
|
||||
availableActions?: ModerationCaseAction[];
|
||||
assessment?: ModerationCaseAssessment | null;
|
||||
assessmentHistory?: ModerationCaseAssessment[];
|
||||
events: ModerationEvent[];
|
||||
coverage: ModerationCoverage[];
|
||||
assignees: { id: string; username: string }[];
|
||||
|
||||
Reference in New Issue
Block a user