feat: Campo model en impresoras y guías de formato MCP
All checks were successful
build-and-deploy / build-and-deploy (push) Successful in 36s
All checks were successful
build-and-deploy / build-and-deploy (push) Successful in 36s
- Agregar campo model a interface Printer - Nuevas tools: get_printing_guide, list_models - Guías de formato para TM-U220 (matricial) y TM-T88 (térmica) - list_printers ahora incluye el modelo
This commit is contained in:
@@ -8,6 +8,7 @@ export interface Printer {
|
||||
name: string
|
||||
host: string
|
||||
deviceId: string
|
||||
model?: string // Modelo de impresora (ej: "TM-U220", "TM-T88VI")
|
||||
timeout: number
|
||||
isDefault: boolean
|
||||
createdAt: string
|
||||
@@ -94,6 +95,7 @@ export async function createPrinter(data: {
|
||||
name: string
|
||||
host: string
|
||||
deviceId: string
|
||||
model?: string
|
||||
timeout?: number
|
||||
isDefault?: boolean
|
||||
}): Promise<Printer> {
|
||||
@@ -105,6 +107,7 @@ export async function createPrinter(data: {
|
||||
name: data.name,
|
||||
host: data.host,
|
||||
deviceId: data.deviceId,
|
||||
model: data.model,
|
||||
timeout: data.timeout || 60000,
|
||||
isDefault: data.isDefault || store.printers.length === 0, // Primera impresora es default
|
||||
createdAt: now,
|
||||
@@ -131,6 +134,7 @@ export async function updatePrinter(id: string, data: Partial<{
|
||||
name: string
|
||||
host: string
|
||||
deviceId: string
|
||||
model: string
|
||||
timeout: number
|
||||
isDefault: boolean
|
||||
}>): Promise<Printer | null> {
|
||||
|
||||
Reference in New Issue
Block a user