Dashboard-Automatizase/types/whatsapp.ts
Luis Erlacher 0152a2fda0 feat: add n8n API testing script for Google OAuth2 schema and existing credentials
- Implemented a bash script to test n8n API and retrieve credential schemas.
- Added types for API responses, Google Calendar, and WhatsApp instances.
- Configured Vitest for testing with React and added setup for testing-library.
2025-10-10 14:29:02 -03:00

53 lines
984 B
TypeScript

// Tipos relacionados a WhatsApp/EvolutionAPI
/**
* Instância WhatsApp - usado na UI
*/
export interface WhatsAppInstance {
name: string;
status: "connected" | "disconnected" | "error";
error?: string;
}
/**
* Status de uma instância - resposta da EvolutionAPI connectionState
*/
export interface InstanceStatus {
instance: string;
status: "connected" | "disconnected" | "error";
error?: string;
}
/**
* Resposta de conexão com QR code - resposta da EvolutionAPI connect
*/
export interface QRCodeResponse {
pairingCode: string;
code: string;
count: number;
base64?: string;
qrcode?: string;
instance: string;
}
/**
* Resposta de logout - resposta da EvolutionAPI logout
*/
export interface LogoutResponse {
status: string;
error: boolean;
response: {
message: string;
};
}
/**
* Resposta de connectionState da API
*/
export interface ConnectionStateAPIResponse {
instance: {
instanceName: string;
state: string;
};
}