@phenyxhealth/sdk 1.0.12 → 1.0.14
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 +1 -1
- package/src/PhenyxApi.js +6 -0
- package/src/index.js +0 -1
- package/types/index.d.ts +12 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@phenyxhealth/sdk",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.14",
|
|
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
|
+
static getContrastingColor = getContrastingColor;
|
|
622
|
+
|
|
623
|
+
static newId = () => v4();
|
|
618
624
|
};
|
|
619
625
|
|
|
620
626
|
export default PhenyxApi;
|
package/src/index.js
CHANGED
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
|
/**
|