fix: add all missing type exports (TimeEntry, Invoice, reports, notifications, audit)
This commit is contained in:
@@ -353,31 +353,6 @@ export interface DashboardData {
|
||||
recent_activity?: RecentActivity[];
|
||||
}
|
||||
|
||||
// Notes
|
||||
export interface Note {
|
||||
id: string;
|
||||
tenant_id: string;
|
||||
case_id?: string;
|
||||
deadline_id?: string;
|
||||
appointment_id?: string;
|
||||
case_event_id?: string;
|
||||
content: string;
|
||||
created_by?: string;
|
||||
created_at: string;
|
||||
updated_at: string;
|
||||
}
|
||||
|
||||
// Recent Activity
|
||||
export interface RecentActivity {
|
||||
id: string;
|
||||
event_type?: string;
|
||||
title: string;
|
||||
case_id: string;
|
||||
case_number: string;
|
||||
event_date?: string;
|
||||
created_at: string;
|
||||
}
|
||||
|
||||
// AI Extraction types
|
||||
|
||||
export interface ExtractedDeadline {
|
||||
@@ -479,3 +454,244 @@ export interface SimilarCasesResponse {
|
||||
cases: SimilarCase[];
|
||||
count: number;
|
||||
}
|
||||
|
||||
// Time Tracking
|
||||
|
||||
export interface TimeEntry {
|
||||
id: string;
|
||||
tenant_id: string;
|
||||
case_id: string;
|
||||
user_id: string;
|
||||
description: string;
|
||||
duration_minutes: number;
|
||||
hourly_rate: number;
|
||||
billable: boolean;
|
||||
billed?: boolean;
|
||||
activity?: string;
|
||||
date: string;
|
||||
created_at: string;
|
||||
updated_at: string;
|
||||
}
|
||||
|
||||
// Billing
|
||||
|
||||
export interface InvoiceItem {
|
||||
description: string;
|
||||
amount: number;
|
||||
duration_minutes?: number;
|
||||
hourly_rate?: number;
|
||||
}
|
||||
|
||||
export interface Invoice {
|
||||
id: string;
|
||||
tenant_id: string;
|
||||
case_id: string;
|
||||
invoice_number: string;
|
||||
client_name: string;
|
||||
client_address?: string;
|
||||
items: InvoiceItem[];
|
||||
subtotal: number;
|
||||
tax_rate: number;
|
||||
tax_amount: number;
|
||||
total: number;
|
||||
status: string;
|
||||
notes?: string;
|
||||
issued_at?: string;
|
||||
due_at?: string;
|
||||
paid_at?: string;
|
||||
created_at: string;
|
||||
updated_at: string;
|
||||
}
|
||||
|
||||
export interface BillingRate {
|
||||
id: string;
|
||||
tenant_id: string;
|
||||
user_id?: string;
|
||||
rate: number;
|
||||
currency: string;
|
||||
valid_from: string;
|
||||
valid_to?: string;
|
||||
created_at: string;
|
||||
updated_at: string;
|
||||
}
|
||||
|
||||
// Reports
|
||||
|
||||
export interface BillingReportMonthly {
|
||||
period: string;
|
||||
cases_new: number;
|
||||
cases_closed: number;
|
||||
cases_active: number;
|
||||
}
|
||||
|
||||
export interface BillingReportByType {
|
||||
case_type: string;
|
||||
total: number;
|
||||
active: number;
|
||||
closed: number;
|
||||
}
|
||||
|
||||
export interface BillingReport {
|
||||
total_revenue: number;
|
||||
outstanding: number;
|
||||
billable_hours: number;
|
||||
non_billable_hours: number;
|
||||
monthly: BillingReportMonthly[];
|
||||
by_type: BillingReportByType[];
|
||||
}
|
||||
|
||||
export interface CaseReportTotal {
|
||||
opened: number;
|
||||
closed: number;
|
||||
active: number;
|
||||
}
|
||||
|
||||
export interface CaseReportMonthly {
|
||||
period: string;
|
||||
opened: number;
|
||||
closed: number;
|
||||
active: number;
|
||||
}
|
||||
|
||||
export interface CaseReportByType {
|
||||
case_type: string;
|
||||
count: number;
|
||||
active: number;
|
||||
closed: number;
|
||||
total: number;
|
||||
}
|
||||
|
||||
export interface CaseReportByCourt {
|
||||
court: string;
|
||||
count: number;
|
||||
}
|
||||
|
||||
export interface CaseReport {
|
||||
opened: number;
|
||||
closed: number;
|
||||
active: number;
|
||||
total: CaseReportTotal;
|
||||
monthly: CaseReportMonthly[];
|
||||
by_type: CaseReportByType[];
|
||||
by_court: CaseReportByCourt[];
|
||||
}
|
||||
|
||||
export interface DeadlineReportTotal {
|
||||
total: number;
|
||||
met: number;
|
||||
missed: number;
|
||||
compliance_rate: number;
|
||||
}
|
||||
|
||||
export interface DeadlineReportMonthly {
|
||||
period: string;
|
||||
total: number;
|
||||
met: number;
|
||||
missed: number;
|
||||
pending: number;
|
||||
compliance_rate: number;
|
||||
}
|
||||
|
||||
export interface MissedDeadline {
|
||||
id: string;
|
||||
title: string;
|
||||
case_id: string;
|
||||
case_number: string;
|
||||
case_title: string;
|
||||
due_date: string;
|
||||
days_overdue: number;
|
||||
}
|
||||
|
||||
export interface DeadlineReport {
|
||||
compliance_rate: number;
|
||||
met: number;
|
||||
total: DeadlineReportTotal;
|
||||
monthly: DeadlineReportMonthly[];
|
||||
missed: MissedDeadline[];
|
||||
by_case: Record<string, number>;
|
||||
}
|
||||
|
||||
export interface WorkloadUser {
|
||||
name: string;
|
||||
user_id: string;
|
||||
hours: number;
|
||||
utilization: number;
|
||||
active_cases: number;
|
||||
deadlines: number;
|
||||
overdue: number;
|
||||
completed: number;
|
||||
}
|
||||
|
||||
export interface WorkloadReport {
|
||||
users: WorkloadUser[];
|
||||
}
|
||||
|
||||
// Document Templates
|
||||
|
||||
export interface DocumentTemplate {
|
||||
id: string;
|
||||
tenant_id: string;
|
||||
name: string;
|
||||
description?: string;
|
||||
category: string;
|
||||
content: string;
|
||||
variables: string[];
|
||||
is_system: boolean;
|
||||
created_at: string;
|
||||
updated_at: string;
|
||||
}
|
||||
|
||||
export interface RenderResponse {
|
||||
rendered_content: string;
|
||||
content: string;
|
||||
name: string;
|
||||
}
|
||||
|
||||
// Notifications
|
||||
|
||||
export interface Notification {
|
||||
id: string;
|
||||
tenant_id: string;
|
||||
type: string;
|
||||
entity_type: string;
|
||||
entity_id: string;
|
||||
title: string;
|
||||
body: string;
|
||||
sent_at?: string;
|
||||
read_at?: string;
|
||||
created_at: string;
|
||||
updated_at: string;
|
||||
}
|
||||
|
||||
export interface NotificationPreferences {
|
||||
deadline_reminder_days: number[];
|
||||
email_enabled: boolean;
|
||||
daily_digest: boolean;
|
||||
}
|
||||
|
||||
export interface NotificationListResponse {
|
||||
notifications: Notification[];
|
||||
data: Notification[];
|
||||
total: number;
|
||||
unread_count: number;
|
||||
}
|
||||
|
||||
// Audit Log
|
||||
|
||||
export interface AuditLogEntry {
|
||||
id: string;
|
||||
tenant_id: string;
|
||||
user_id: string;
|
||||
action: string;
|
||||
entity_type: string;
|
||||
entity_id: string;
|
||||
old_values?: Record<string, unknown>;
|
||||
new_values?: Record<string, unknown>;
|
||||
ip_address?: string;
|
||||
created_at: string;
|
||||
}
|
||||
|
||||
export interface AuditLogResponse {
|
||||
entries: AuditLogEntry[];
|
||||
total: number;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user