@gnpdev/rpa-tools 1.0.20 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.d.ts +15 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gnpdev/rpa-tools",
3
- "version": "1.0.20",
3
+ "version": "1.1.0",
4
4
  "description": "Libreria para logs y screenshot de bots",
5
5
  "author": "Sergio Antonio Trujillo del Valle",
6
6
  "main": "src/index.js",
package/src/index.d.ts CHANGED
@@ -74,12 +74,27 @@ export interface RpaTools {
74
74
  */
75
75
  getCredentials: (nombre: string) => Promise<{ usuario: string; password: string; idUsuario: string } | null>;
76
76
 
77
+ /**
78
+ * Actualiza el estado y las observaciones de una aplicación.
79
+ * @param nombre - Nombre de la aplicación (ej. 'Portal CRM')
80
+ * @param status - Estado (true/false)
81
+ * @param observations - Observaciones/Errores
82
+ */
83
+ updateAppStatus: (nombre: string, status: boolean, observations: string) => Promise<boolean>;
84
+
77
85
  /**
78
86
  * Consulta si el bot está activo en la base de datos (columna 'estado').
79
87
  * @returns {Promise<boolean>}
80
88
  */
81
89
  isActive: () => Promise<boolean>;
82
90
 
91
+ /**
92
+ * Captura el estado de la página actual y lo sube a MinIO.
93
+ * @param page - Instancia de Page (Playwright o Puppeteer)
94
+ * @param nombre - Nombre del elemento/captura
95
+ */
96
+ capturePage: (page: any, nombre: string) => Promise<string | null>;
97
+
83
98
  /**
84
99
  * Captura screenshot, trace y registra error en base de datos.
85
100
  */