import type { Role, TicketStatus } from './schemas/enums'; export type { Role, TicketStatus }; export interface UserSummary { id: string; username: string; displayName: string; } export interface User extends UserSummary { email: string; role: Role; apiKey?: string | null; createdAt?: string; } export interface Category { id: string; name: string; } export interface CTIType { id: string; name: string; categoryId: string; category?: Category; } export interface Item { id: string; name: string; typeId: string; type?: CTIType & { category?: Category }; } export interface Comment { id: string; body: string; ticketId: string; authorId: string; author: UserSummary; createdAt: string; } export interface AuditLog { id: string; ticketId: string; userId: string; action: string; detail: string | null; createdAt: string; user: UserSummary; } export interface Ticket { id: string; displayId: string; title: string; overview: string; severity: number; status: TicketStatus; categoryId: string; typeId: string; itemId: string; assigneeId: string | null; createdById: string; resolvedAt: string | null; createdAt: string; updatedAt: string; category: Category; type: CTIType; item: Item; assignee: UserSummary | null; createdBy: UserSummary; comments?: Comment[]; _count?: { comments: number; attachments?: number }; } export interface Attachment { id: string; filename: string; mimetype: string; size: number; ticketId: string | null; commentId: string | null; uploadedById: string; uploadedBy: UserSummary; createdAt: string; } export interface Notification { id: string; userId: string; kind: string; ticketId: string | null; commentId: string | null; data: unknown; readAt: string | null; createdAt: string; } export interface SavedView { id: string; userId: string; name: string; filters: Record; createdAt: string; updatedAt: string; } export interface Webhook { id: string; name: string; url: string; events: string[]; secret?: string; active: boolean; createdAt: string; updatedAt: string; } export interface PaginatedResponse { data: T[]; total: number; page: number; pageSize: number; }