Skip to main content
This page documents all TypeScript interfaces used in the Service Orders Management System.

ServiceOrder

The main interface representing a service order.
export interface ServiceOrder {
    id: number,
    number: number,
    type: string,
    part_number: string,
    serial_number: string,
    description: string,
    solution: string,
    company: Company,
    delivery_conditions: DeliveryConditions
    contacts: Contact[],
    mails: Email[],
    phones: Phone[],
    addresses: Address[],
    cities: City[],
    // equipment_types: EquipmentType[]
}
The equipment_types field is commented out in the type definition but is used throughout the codebase. This represents a type inconsistency in the source code.
id
number
required
Unique identifier for the service order
number
number
required
Service order number displayed to users
type
string
required
Type of service (e.g., “garantía”, “reparación”, “mantenimiento”)
part_number
string
required
Part number of the equipment being serviced
serial_number
string
required
Serial number of the equipment
description
string
required
Detailed description of the service issue or request
solution
string
required
Solution or resolution details for the service order
company
Company
required
The company associated with this service order
delivery_conditions
DeliveryConditions
required
Conditions under which the equipment was delivered or returned
contacts
Contact[]
required
Array of contact persons for this service order
mails
Email[]
required
Array of email addresses associated with the service order
phones
Phone[]
required
Array of phone numbers for contact
addresses
Address[]
required
Array of physical addresses related to the service order
cities
City[]
required
Array of cities associated with the service order
The equipment_types field is defined in the EquipmentType interface but is commented out in the ServiceOrder type definition. However, it’s used throughout the codebase implementation.

Company

Represents a company entity.
export interface Company {
    name: string,
    headquarters: string
}
name
string
required
Company name
headquarters
string
required
Location of company headquarters

Contact

Represents a contact person.
export interface Contact {
    name: string,
    last_name: string,
    gender: string,
    active: boolean,
    identification: number,
    charge: string,
    birthday: string
}
name
string
required
Contact’s first name
last_name
string
required
Contact’s last name
gender
string
required
Contact’s gender (e.g., “Masculino”, “Femenino”)
active
boolean
required
Whether the contact is currently active
identification
number
required
Contact’s identification number
charge
string
required
Contact’s job title or role (e.g., “admin”, “técnico”, “soporte”)
birthday
string
required
Contact’s birthday in DD/MM/YYYY format

Email

Represents an email address.
export interface Email {
    mail: string
}
mail
string
required
Email address

Phone

Represents a phone number.
export interface Phone {
    phone: number
}
phone
number
required
Phone number (stored as a numeric value)

Address

Represents a physical address.
export interface Address {
    address: string
}
address
string
required
Street address

City

Represents a city.
export interface City {
    city: string
}
city
string
required
City name

EquipmentType

Represents equipment type information.
export interface EquipmentType {
    name: string
}
name
string
required
Name/brand of the equipment type (e.g., “Lenovo”, “HP”, “Dell”)
This interface is defined in the type file but currently commented out in the ServiceOrder interface.

DeliveryConditions

Represents delivery or equipment condition information.
export interface DeliveryConditions {
    description: string
}
description
string
required
Description of delivery conditions (e.g., “con funda protectora”, “sin cargador”)

Usage Example

import type { ServiceOrder, Contact, Company } from '~/types/ServiceOrder'
Note that in the composable implementation, some fields like contacts, mails, phones, etc. are initialized as single objects rather than arrays, despite the type definition specifying arrays. This inconsistency should be addressed for proper type safety.

Build docs developers (and LLMs) love