Skip to main content
The ticket model defines the core data structures used throughout Front Helpdesk. All interfaces are exported from projects/shared/src/models/ticket.model.ts.

Source

export type TicketStatus =
  | 'ABIERTO'
  | 'EN_PROCESO'
  | 'PAUSADO'
  | 'RESUELTO'
  | 'CANCELADO'
  | 'CERRADO';

export type TicketTipo =
  | 'PETICION'
  | 'QUEJA'
  | 'RECLAMO'
  | 'SUGERENCIA'
  | 'INCIDENTE'
  | 'SOLICITUD'
  | 'CONSULTA';

export type TicketPrioridad =
  | 'BAJA'
  | 'MEDIA'
  | 'ALTA'
  | 'URGENTE';

export interface Ticket {
  id: string;
  label: string;
  tipo?: TicketTipo;
  nombre: string;
  documento?: string;
  correo?: string;
  telefono?: string;
  empresaDepartamento?: string;
  categoria?: string;
  subcategoria?: string;
  asunto?: string;
  descripcion: string;
  estado: TicketStatus;
  prioridad: TicketPrioridad | string;
  slaHoras?: number;
  fechaLimiteSla?: string;
  area?: string;
  creadoEn: string;
  actualizadoEn?: string;
}

export interface TicketMDA extends Ticket {
  horasRestantes?: number;
  slaVencido?: boolean;
  agenteNombre?: string | null;
}

export interface TicketCreatePayload {
  nombre: string;
  documento?: string | null;
  email: string;
  telefono?: string | null;
  tieneWhatsapp?: boolean;
  empresaDepartamento?: string | null;
  tipo: TicketTipo;
  categoria: string;
  subcategoria?: string | null;
  asunto?: string | null;
  descripcion: string;
  prioridad: TicketPrioridad | string;
  areaAsignada?: string | null;
}

export interface TicketCreateResponse {
  ticketUuid: string;
  ticketLabel: string;
  estado: string;
  tipo: string;
  prioridad: string;
  slaHoras: number;
  fechaCreacion: string;
  fechaLimiteSla: string;
  mensaje: string;
}

export interface TicketConsultaPayload {
  label: string;
  email: string;
}

export interface TicketConsultaPublica {
  uuid: string;
  ticket_label: string;
  tipo_solicitud?: string;
  categoria?: string;
  subcategoria?: string;
  asunto?: string;
  descripcion_problema?: string;
  area_asignada?: string;
  estado?: string;
  prioridad?: string;
  sla_horas?: number;
  creado_en?: string;
  fecha_limite_sla?: string;
}

export interface TicketConsultaResponse {
  ticket: TicketConsultaPublica | null;
  historial?: any[];
}

Ticket interface

The base ticket object returned from the API for authenticated admin and agent views.
id
string
required
UUID that uniquely identifies the ticket.
label
string
required
Human-readable ticket reference (e.g. TK-2024-0001). Use this value when displaying or searching for tickets.
tipo
TicketTipo
Request type. See TicketTipo for all valid values.
nombre
string
required
Full name of the requester who submitted the ticket.
documento
string
Requester’s ID document number.
correo
string
Requester’s email address.
telefono
string
Requester’s phone number.
empresaDepartamento
string
Company or department the requester belongs to.
categoria
string
Top-level classification category for the ticket.
subcategoria
string
Sub-classification within the category.
asunto
string
Brief subject line for the ticket.
descripcion
string
required
Full description of the request or issue.
estado
TicketStatus
required
Current lifecycle status of the ticket. See TicketStatus for all valid values.
prioridad
TicketPrioridad | string
required
Assigned priority level. Prefer one of the TicketPrioridad values (BAJA, MEDIA, ALTA, URGENTE). See TicketPrioridad.
slaHoras
number
Number of hours allowed by the SLA agreement for this ticket.
fechaLimiteSla
string
ISO 8601 date string representing the SLA deadline.
area
string
The department area the ticket is assigned to. See area options.
creadoEn
string
required
ISO 8601 date string for when the ticket was created.
actualizadoEn
string
ISO 8601 date string for when the ticket was last updated.

TicketMDA interface

TicketMDA extends Ticket with computed SLA fields added by the backend for the admin/agent (MDA) view.
horasRestantes
number
Hours remaining before the SLA deadline expires. Negative values indicate the SLA has already been breached.
slaVencido
boolean
true when the SLA deadline has passed and the ticket has not been resolved.
agenteNombre
string | null
Display name of the agent currently assigned to the ticket. null when no agent is assigned.

TicketCreatePayload interface

Use this payload when creating a new ticket via the admin API.
nombre
string
required
Full name of the person submitting the ticket.
email
string
required
Email address of the requester. Used to look up the ticket later.
tipo
TicketTipo
required
Request type. Must be one of the TicketTipo values.
categoria
string
required
Top-level category for the ticket.
descripcion
string
required
Full description of the request or issue.
prioridad
TicketPrioridad | string
required
Priority level assigned to the ticket.
documento
string | null
Requester’s ID document number.
telefono
string | null
Requester’s phone number.
tieneWhatsapp
boolean
Whether the phone number provided supports WhatsApp.
empresaDepartamento
string | null
Company or department the requester belongs to.
subcategoria
string | null
Sub-classification within the category.
asunto
string | null
Brief subject line for the ticket.
areaAsignada
string | null
Target area to assign the ticket to on creation.

TicketCreateResponse interface

Returned by the API after a ticket is successfully created.
ticketUuid
string
required
UUID assigned to the newly created ticket.
ticketLabel
string
required
Human-readable reference label (e.g. TK-2024-0001).
estado
string
required
Initial status of the ticket, typically ABIERTO.
tipo
string
required
Request type as provided in the payload.
prioridad
string
required
Assigned priority level.
slaHoras
number
required
Number of SLA hours allocated for this ticket based on its priority.
fechaCreacion
string
required
ISO 8601 date string for when the ticket was created.
fechaLimiteSla
string
required
ISO 8601 date string for the SLA deadline.
mensaje
string
required
Confirmation message from the server.

TicketConsultaPayload interface

Use this payload to look up a ticket from the public-facing consultation endpoint.
label
string
required
The ticket reference label (e.g. TK-2024-0001).
email
string
required
The email address used when the ticket was submitted. Used to verify ownership.

TicketConsultaPublica interface

The limited ticket view returned to end users from the public consultation endpoint.
uuid
string
required
UUID of the ticket.
ticket_label
string
required
Human-readable ticket reference.
tipo_solicitud
string
Request type label.
categoria
string
Ticket category.
subcategoria
string
Ticket sub-category.
asunto
string
Subject line of the ticket.
descripcion_problema
string
Description of the request or issue.
area_asignada
string
Department area the ticket is assigned to.
estado
string
Current lifecycle status.
prioridad
string
Assigned priority level.
sla_horas
number
Number of SLA hours allocated for the ticket.
creado_en
string
ISO 8601 date string for when the ticket was created.
fecha_limite_sla
string
ISO 8601 date string for the SLA deadline.

TicketConsultaResponse interface

Wrapper returned by the public consultation endpoint.
ticket
TicketConsultaPublica | null
required
The ticket data if found and the email matches. null when no matching ticket exists.
historial
any[]
Array of historical activity entries for the ticket.

Build docs developers (and LLMs) love