Initial commit: TicketingSystem
Internal ticketing app with CTI routing, severity levels, and n8n integration. Stack: Express + TypeScript + Prisma + PostgreSQL / React + Vite + Tailwind - JWT auth for users, API key auth for service accounts (Goddard/n8n) - CTI hierarchy (Category > Type > Item) for ticket routing - Severity 1-5, auto-close resolved tickets after 14 days - Gitea Actions CI/CD building separate server/client images - Production docker-compose.yml with Traefik integration Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,63 @@
|
||||
export type Role = 'ADMIN' | 'AGENT' | 'SERVICE'
|
||||
export type TicketStatus = 'OPEN' | 'IN_PROGRESS' | 'RESOLVED' | 'CLOSED'
|
||||
|
||||
export interface User {
|
||||
id: string
|
||||
username: string
|
||||
displayName: string
|
||||
email: string
|
||||
role: Role
|
||||
apiKey?: string
|
||||
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: Pick<User, 'id' | 'username' | 'displayName'>
|
||||
createdAt: string
|
||||
}
|
||||
|
||||
export interface Ticket {
|
||||
id: 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: Pick<User, 'id' | 'username' | 'displayName'> | null
|
||||
createdBy: Pick<User, 'id' | 'username' | 'displayName'>
|
||||
comments?: Comment[]
|
||||
_count?: { comments: number }
|
||||
}
|
||||
Reference in New Issue
Block a user