@phenyxhealth/sdk 1.0.13 → 1.0.15

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@phenyxhealth/sdk",
3
- "version": "1.0.13",
3
+ "version": "1.0.15",
4
4
  "type": "module",
5
5
  "description": "SDK oficial para PhenyxHealth - Sistema integral de gestión de radioterapia. Incluye gestión de pacientes, recursos humanos, equipos médicos y configuración global.",
6
6
  "main": "./src/index.js",
package/src/PhenyxApi.js CHANGED
@@ -1,5 +1,6 @@
1
1
  import { v4 } from 'uuid';
2
2
  import { today } from './utils/dates.js';
3
+ import { getContrastingColor } from './utils/colors.js';
3
4
 
4
5
  /**
5
6
  * Cliente principal para la API de PhenyxHealth
@@ -615,6 +616,11 @@ class PhenyxApi {
615
616
  const el = this[type].find(e => e.name === name);
616
617
  return el?.id || null;
617
618
  }
619
+
620
+
621
+ getContrastingColor = getContrastingColor;
622
+
623
+ newId = () => v4();
618
624
  };
619
625
 
620
626
  export default PhenyxApi;
@@ -103,5 +103,4 @@ const beSureGlobalExists = async (apiInstance, currentList, toBeList) => {
103
103
  export {
104
104
  checkGlobals,
105
105
  beSureGlobalExists,
106
- getContrastingColor,
107
106
  };
package/src/index.js CHANGED
@@ -36,4 +36,3 @@ export { beSureLinacsExists } from './controllers/linacs.js';
36
36
 
37
37
  // Utilidades
38
38
  export { today, formatDateString, formatDate } from './utils/dates.js';
39
- export { getContrastingColor } from './utils/colors.js';
package/types/index.d.ts CHANGED
@@ -460,6 +460,18 @@ declare module "@phenyxhealth/sdk" {
460
460
  * @returns ID del elemento o null
461
461
  */
462
462
  getElementIdByName(type: string, name: string): string | null;
463
+
464
+ /**
465
+ * Genera un color RGB aleatorio que contrasta bien
466
+ * @returns String con color en formato "R, G, B"
467
+ */
468
+ static getContrastingColor(): string;
469
+
470
+ /**
471
+ * Genera un nuevo UUID v4
472
+ * @returns UUID como string
473
+ */
474
+ static newId(): string;
463
475
  }
464
476
 
465
477
  // ==================== FUNCIONES DE UTILIDAD ====================
@@ -484,12 +496,6 @@ declare module "@phenyxhealth/sdk" {
484
496
  */
485
497
  export function formatDateString(date: string): string;
486
498
 
487
- /**
488
- * Genera un color RGB aleatorio que contrasta bien
489
- * @returns String con color en formato "R, G, B"
490
- */
491
- export function getContrastingColor(): string;
492
-
493
499
  // ==================== FUNCIONES DE VALIDACIÓN ====================
494
500
 
495
501
  /**