modcomms/frontend/types.ts
2025-12-18 16:51:27 +00:00

64 lines
1.5 KiB
TypeScript
Executable file

// Fix: Broke a circular dependency by defining the AgentName type directly in this file instead of importing it.
export type AgentName = 'Legal Agent' | 'Brand Agent' | 'Tone Agent' | 'Channel Agent';
export type AgentStatus = 'pending' | 'in-progress' | 'complete' | 'issues-found' | 'error';
export type ReviewStatus = {
[key in AgentName]?: AgentStatus;
};
export type RagStatus = 'Red' | 'Amber' | 'Green' | 'Error';
export interface SubReview {
ragStatus: RagStatus;
feedback: string;
issues: string[];
}
export type OverallStatus = 'Passed' | 'Failed' | 'Analysis Error' | 'Requires Manual Legal Review';
export interface AgentReview {
legalAgentReview: SubReview;
brandAgentReview: SubReview;
toneAgentReview: SubReview;
channelAgentReview: SubReview;
leadAgentSummary: string;
overallStatus: OverallStatus;
financialPromotionReason?: string;
}
export interface FlaggedItem {
id: string;
campaignName: string;
proofName: string;
version: number;
submitter: string;
submitAgency: string;
agentFlagged: string;
comments: string;
timestamp: string;
}
export interface ResolvedItem {
id: string;
campaignName: string;
proofName: string;
version: number;
submitter: string;
submitAgency: string;
agent: string;
issue: string;
resolution: string;
timestamp: string;
}
export interface ErrorItem {
id: string;
campaignName: string;
proofName: string;
version: number;
submitter: string;
submitAgency: string;
errorSummary: string;
timestamp: string;
}