feat: complete Phases 2 to 5 inclusive - Access Core, Web Cockpit, Hardware enqueuing, Optical Scanner and QA (v0.5.0-beta)
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
// ==============================================================================
|
||||
// API de Hardware y Apertura Manual
|
||||
// ==============================================================================
|
||||
import { request } from './client';
|
||||
|
||||
export interface HardwareCommandResponse {
|
||||
status: string;
|
||||
modulo_id: number;
|
||||
address: number;
|
||||
payload: string;
|
||||
message: string;
|
||||
latencia_ms: number;
|
||||
}
|
||||
|
||||
export const hardwareApi = {
|
||||
manualOpen: (moduloId: number, motivo: string = 'APERTURA_MANUAL_GUARDIA', ticketId: number = 0) => {
|
||||
return request<HardwareCommandResponse>(`/hardware/modules/${moduloId}/open`, {
|
||||
method: 'POST',
|
||||
body: JSON.stringify({ modulo_id: moduloId, motivo, ticket_id: ticketId }),
|
||||
});
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user