213 lines
7.6 KiB
TypeScript
213 lines
7.6 KiB
TypeScript
|
|
import { Agent, KBArticle, Ticket, TicketPriority, TicketStatus, SurveyResult, AppSettings, ClientUser, TicketQueue, EmailTrigger, EmailAudience, AiProvider } from "./types";
|
|
|
|
export const INITIAL_QUEUES: TicketQueue[] = [
|
|
{ id: 'q1', name: 'General', description: 'Richieste generiche e informazioni' },
|
|
{ id: 'q2', name: 'Tech Support', description: 'Problemi tecnici hardware e software' },
|
|
{ id: 'q3', name: 'Billing', description: 'Fatturazione, pagamenti e rimborsi' }
|
|
];
|
|
|
|
export const MOCK_AGENTS: Agent[] = [
|
|
{
|
|
id: 'a0',
|
|
name: 'Super Admin',
|
|
email: 'fcarra79@gmail.com',
|
|
password: 'Mr10921.',
|
|
role: 'superadmin',
|
|
avatar: 'https://ui-avatars.com/api/?name=Super+Admin&background=0D8ABC&color=fff',
|
|
avatarConfig: { x: 50, y: 50, scale: 1 },
|
|
skills: ['All'],
|
|
queues: ['General', 'Tech Support', 'Billing']
|
|
},
|
|
{
|
|
id: 'a1',
|
|
name: 'Mario Rossi',
|
|
email: 'mario@omni.ai',
|
|
password: 'admin',
|
|
role: 'agent',
|
|
avatar: 'https://picsum.photos/id/1005/200/200',
|
|
avatarConfig: { x: 50, y: 50, scale: 1 },
|
|
skills: ['Technical', 'Linux'],
|
|
queues: ['Tech Support', 'General']
|
|
},
|
|
{
|
|
id: 'a2',
|
|
name: 'Giulia Bianchi',
|
|
email: 'giulia@omni.ai',
|
|
password: 'admin',
|
|
role: 'supervisor',
|
|
avatar: 'https://picsum.photos/id/1011/200/200',
|
|
avatarConfig: { x: 50, y: 50, scale: 1 },
|
|
skills: ['Billing', 'Refunds'],
|
|
queues: ['Billing']
|
|
},
|
|
];
|
|
|
|
export const MOCK_CLIENT_USERS: ClientUser[] = [
|
|
{ id: 'u1', name: 'Luca Verdi', email: 'luca@client.com', password: 'user', company: 'Acme Corp', status: 'active' },
|
|
{ id: 'u2', name: 'Anna Neri', email: 'anna@client.com', password: 'user', company: 'Globex', status: 'active' },
|
|
{ id: 'u3', name: 'Giorgio Gialli', email: 'giorgio.g@example.com', password: 'user', status: 'inactive' },
|
|
];
|
|
|
|
export const INITIAL_SETTINGS: AppSettings = {
|
|
branding: {
|
|
appName: 'OmniSupport AI',
|
|
primaryColor: '#0284c7', // brand-600
|
|
logoUrl: 'https://via.placeholder.com/150'
|
|
},
|
|
features: {
|
|
kbEnabled: true,
|
|
maxKbArticles: 50,
|
|
maxSupervisors: 2,
|
|
aiKnowledgeAgentEnabled: true,
|
|
maxAiGeneratedArticles: 10,
|
|
maxAgents: 10,
|
|
attachmentsEnabled: true,
|
|
maxFileSizeMb: 5,
|
|
allowedFileTypes: 'jpg,png,pdf'
|
|
},
|
|
aiConfig: {
|
|
provider: AiProvider.GEMINI,
|
|
apiKey: '',
|
|
model: 'gemini-3-flash-preview',
|
|
isActive: true
|
|
},
|
|
smtp: {
|
|
host: 'smtp.example.com',
|
|
port: 587,
|
|
user: 'notifications@omnisupport.ai',
|
|
pass: 'password',
|
|
secure: true,
|
|
fromEmail: 'noreply@omnisupport.ai'
|
|
},
|
|
emailTemplates: [
|
|
{
|
|
id: 't1',
|
|
name: 'Conferma Apertura Ticket',
|
|
trigger: EmailTrigger.TICKET_CREATED,
|
|
audience: EmailAudience.CLIENT,
|
|
subject: 'Ticket #{ticket_id} Creato - {ticket_subject}',
|
|
body: 'Ciao {customer_name},\n\nAbbiamo ricevuto la tua richiesta. Un agente prenderà in carico il ticket #{ticket_id} al più presto.\n\nGrazie,\nIl team di {app_name}',
|
|
isActive: true
|
|
},
|
|
{
|
|
id: 't2',
|
|
name: 'Notifica Nuovo Ticket (Staff)',
|
|
trigger: EmailTrigger.TICKET_CREATED,
|
|
audience: EmailAudience.STAFF,
|
|
subject: '[NUOVO] Ticket #{ticket_id} in {queue_name}',
|
|
body: 'Ciao,\n\nÈ stato aperto un nuovo ticket.\nCliente: {customer_name}\nOggetto: {ticket_subject}\nPriorità: {ticket_priority}\n\nAccedi alla dashboard per gestirlo.',
|
|
isActive: true
|
|
},
|
|
{
|
|
id: 't3',
|
|
name: 'Aggiornamento Stato',
|
|
trigger: EmailTrigger.STATUS_CHANGED,
|
|
audience: EmailAudience.CLIENT,
|
|
subject: 'Aggiornamento Ticket #{ticket_id}: {status}',
|
|
body: 'Ciao {customer_name},\n\nLo stato del tuo ticket #{ticket_id} è cambiato in: {status}.\n\nAccedi al portale per vedere i dettagli.',
|
|
isActive: true
|
|
},
|
|
{
|
|
id: 't4',
|
|
name: 'Richiesta Feedback',
|
|
trigger: EmailTrigger.SURVEY_REQUEST,
|
|
audience: EmailAudience.CLIENT,
|
|
subject: 'Come è andata con il ticket #{ticket_id}?',
|
|
body: 'Ciao {customer_name},\n\nIl tuo ticket è stato risolto. Ti andrebbe di valutare il servizio?\n\nClicca qui per lasciare un feedback: {survey_link}',
|
|
isActive: true
|
|
}
|
|
]
|
|
};
|
|
|
|
export const INITIAL_KB: KBArticle[] = [
|
|
{
|
|
id: 'kb1',
|
|
title: 'Come reimpostare la password',
|
|
content: 'Per reimpostare la password, vai su Impostazioni > Sicurezza e clicca su "Cambia Password". Ti verrà inviata una mail di conferma.',
|
|
category: 'Account',
|
|
type: 'article',
|
|
source: 'manual',
|
|
visibility: 'public',
|
|
lastUpdated: '2023-10-15'
|
|
},
|
|
{
|
|
id: 'kb2',
|
|
title: 'Configurazione Email su Outlook',
|
|
content: '1. Apri Outlook. 2. File > Aggiungi Account. 3. Inserisci la tua mail. 4. Seleziona IMAP. Server in entrata: imap.example.com porta 993.',
|
|
category: 'Tecnico',
|
|
type: 'article',
|
|
source: 'manual',
|
|
visibility: 'public',
|
|
lastUpdated: '2023-11-02'
|
|
},
|
|
{
|
|
id: 'kb3',
|
|
title: 'Documentazione API Ufficiale',
|
|
content: 'Riferimento esterno alla documentazione.',
|
|
url: 'https://example.com/api-docs',
|
|
category: 'Sviluppo',
|
|
type: 'url',
|
|
source: 'manual',
|
|
visibility: 'public',
|
|
lastUpdated: '2023-09-20'
|
|
}
|
|
];
|
|
|
|
export const INITIAL_TICKETS: Ticket[] = [
|
|
{
|
|
id: 'T-1001',
|
|
subject: 'Problema connessione VPN',
|
|
description: 'Non riesco a connettermi alla VPN aziendale da casa.',
|
|
status: TicketStatus.OPEN,
|
|
priority: TicketPriority.HIGH,
|
|
queue: 'Tech Support',
|
|
customerName: 'Luca Verdi',
|
|
createdAt: '2023-12-01T09:00:00Z',
|
|
messages: [],
|
|
attachments: []
|
|
},
|
|
{
|
|
id: 'T-1002',
|
|
subject: 'Errore Fattura Dicembre',
|
|
description: 'La fattura riporta un importo errato rispetto al contratto.',
|
|
status: TicketStatus.RESOLVED,
|
|
priority: TicketPriority.MEDIUM,
|
|
assignedAgentId: 'a2',
|
|
queue: 'Billing',
|
|
customerName: 'Anna Neri',
|
|
createdAt: '2023-11-28T14:30:00Z',
|
|
messages: [
|
|
{ id: 'm1', role: 'user', content: 'La fattura è di 50€ invece di 30€.', timestamp: '2023-11-28T14:30:00Z'},
|
|
{ id: 'm2', role: 'assistant', content: 'Ciao Anna, ho verificato. C\'era un errore nel calcolo dell\'IVA. Ho emesso una nota di credito.', timestamp: '2023-11-28T15:00:00Z'},
|
|
{ id: 'm3', role: 'user', content: 'Grazie mille, risolto.', timestamp: '2023-11-28T15:10:00Z'}
|
|
],
|
|
attachments: [
|
|
{ id: 'att1', name: 'fattura_errata.pdf', type: 'application/pdf', url: '#' }
|
|
]
|
|
},
|
|
{
|
|
id: 'T-1003',
|
|
subject: 'Come configurare 2FA',
|
|
description: 'Vorrei attivare la doppia autenticazione ma non trovo l\'opzione.',
|
|
status: TicketStatus.RESOLVED,
|
|
priority: TicketPriority.LOW,
|
|
assignedAgentId: 'a1',
|
|
queue: 'Tech Support',
|
|
customerName: 'Giorgio Gialli',
|
|
createdAt: '2023-11-25T10:00:00Z',
|
|
messages: [
|
|
{ id: 'm4', role: 'user', content: 'Dove trovo il 2FA?', timestamp: '2023-11-25T10:00:00Z'},
|
|
{ id: 'm5', role: 'assistant', content: 'Ciao Giorgio. Devi scaricare Google Authenticator. Poi vai nel tuo profilo, clicca su "Sicurezza Avanzata" e scansiona il QR code.', timestamp: '2023-11-25T10:15:00Z'}
|
|
],
|
|
attachments: []
|
|
}
|
|
];
|
|
|
|
export const MOCK_SURVEYS: SurveyResult[] = [
|
|
{ id: 's1', rating: 5, comment: 'Ottimo servizio, molto veloce!', source: 'ticket', referenceId: 'T-1002', timestamp: '2023-11-28T16:00:00Z' },
|
|
{ id: 's2', rating: 4, comment: 'Buono, ma l\'attesa è stata lunghetta.', source: 'chat', timestamp: '2023-12-02T10:30:00Z' },
|
|
{ id: 's3', rating: 5, comment: 'AI molto intelligente, ha risolto subito.', source: 'chat', timestamp: '2023-12-03T09:15:00Z' },
|
|
{ id: 's4', rating: 2, comment: 'Non ha capito la mia domanda.', source: 'chat', timestamp: '2023-12-01T14:20:00Z' }
|
|
];
|