@gnpdev/rpa-tools 1.0.12 → 1.0.13

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 +16 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gnpdev/rpa-tools",
3
- "version": "1.0.12",
3
+ "version": "1.0.13",
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
@@ -57,6 +57,22 @@ export interface RpaTools {
57
57
  */
58
58
  watchDebugFlag: (page: Page, pollMs?: number) => void;
59
59
 
60
+ /**
61
+ * Recupera credenciales de una aplicación desde la base de datos.
62
+ * @param nombre - Nombre de la aplicación (ej. 'Portal CRM')
63
+ */
64
+ getCredentials: (nombre: string) => Promise<{ usuario: string; password: string; idUsuario: string } | null>;
65
+
66
+ /**
67
+ * Captura screenshot, trace y registra error en base de datos.
68
+ */
69
+ captureError: (params: {
70
+ page: Page;
71
+ context: any;
72
+ err: Error;
73
+ step?: string;
74
+ }) => Promise<{ errorId: number | null; screenshotKey: string | null; traceKey: string | null }>;
75
+
60
76
  /** Detiene todos los intervalos. Llamar siempre al cerrar el bot. */
61
77
  destroy: () => void;
62
78
  }