sigo-entities 0.0.180 → 0.0.182
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/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +9 -6
- package/dist/index.mjs +9 -6
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -336,9 +336,12 @@ function formatErrors(errors, parentPath = "") {
|
|
|
336
336
|
|
|
337
337
|
// src/shared/utils/convertStringsToDates.ts
|
|
338
338
|
function convertStringsToDates(obj) {
|
|
339
|
-
|
|
340
|
-
const date = new Date(
|
|
341
|
-
return isNaN(date.getTime())
|
|
339
|
+
const isValidDate = (str) => {
|
|
340
|
+
const date = new Date(str);
|
|
341
|
+
return !isNaN(date.getTime()) && str === date.toISOString();
|
|
342
|
+
};
|
|
343
|
+
if (typeof obj === "string" && isValidDate(obj)) {
|
|
344
|
+
return new Date(obj);
|
|
342
345
|
}
|
|
343
346
|
if (Array.isArray(obj)) {
|
|
344
347
|
return obj.map((item) => convertStringsToDates(item));
|
|
@@ -5554,7 +5557,7 @@ var EstadoInternoWithoutSubstateDTO = class {
|
|
|
5554
5557
|
Descripcion = "";
|
|
5555
5558
|
Icono = "";
|
|
5556
5559
|
Color = "";
|
|
5557
|
-
Orden =
|
|
5560
|
+
Orden = "";
|
|
5558
5561
|
ColorFondo = "";
|
|
5559
5562
|
Tipo = "";
|
|
5560
5563
|
UsuarioEdicion = new UsuarioEdicionDTO();
|
|
@@ -5586,8 +5589,8 @@ __decorateClass([
|
|
|
5586
5589
|
(0, import_class_transformer100.Expose)()
|
|
5587
5590
|
], EstadoInternoWithoutSubstateDTO.prototype, "Color", 2);
|
|
5588
5591
|
__decorateClass([
|
|
5589
|
-
(0, import_class_validator100.
|
|
5590
|
-
(0, import_class_validator100.
|
|
5592
|
+
(0, import_class_validator100.IsString)({ message: "debe ser un texto" }),
|
|
5593
|
+
(0, import_class_validator100.Length)(1, 50, { message: "debe tener entre 1 y 50 caracteres" }),
|
|
5591
5594
|
(0, import_class_transformer100.Expose)()
|
|
5592
5595
|
], EstadoInternoWithoutSubstateDTO.prototype, "Orden", 2);
|
|
5593
5596
|
__decorateClass([
|
package/dist/index.mjs
CHANGED
|
@@ -97,9 +97,12 @@ function formatErrors(errors, parentPath = "") {
|
|
|
97
97
|
|
|
98
98
|
// src/shared/utils/convertStringsToDates.ts
|
|
99
99
|
function convertStringsToDates(obj) {
|
|
100
|
-
|
|
101
|
-
const date = new Date(
|
|
102
|
-
return isNaN(date.getTime())
|
|
100
|
+
const isValidDate = (str) => {
|
|
101
|
+
const date = new Date(str);
|
|
102
|
+
return !isNaN(date.getTime()) && str === date.toISOString();
|
|
103
|
+
};
|
|
104
|
+
if (typeof obj === "string" && isValidDate(obj)) {
|
|
105
|
+
return new Date(obj);
|
|
103
106
|
}
|
|
104
107
|
if (Array.isArray(obj)) {
|
|
105
108
|
return obj.map((item) => convertStringsToDates(item));
|
|
@@ -5315,7 +5318,7 @@ var EstadoInternoWithoutSubstateDTO = class {
|
|
|
5315
5318
|
Descripcion = "";
|
|
5316
5319
|
Icono = "";
|
|
5317
5320
|
Color = "";
|
|
5318
|
-
Orden =
|
|
5321
|
+
Orden = "";
|
|
5319
5322
|
ColorFondo = "";
|
|
5320
5323
|
Tipo = "";
|
|
5321
5324
|
UsuarioEdicion = new UsuarioEdicionDTO();
|
|
@@ -5347,8 +5350,8 @@ __decorateClass([
|
|
|
5347
5350
|
Expose99()
|
|
5348
5351
|
], EstadoInternoWithoutSubstateDTO.prototype, "Color", 2);
|
|
5349
5352
|
__decorateClass([
|
|
5350
|
-
|
|
5351
|
-
|
|
5353
|
+
IsString84({ message: "debe ser un texto" }),
|
|
5354
|
+
Length70(1, 50, { message: "debe tener entre 1 y 50 caracteres" }),
|
|
5352
5355
|
Expose99()
|
|
5353
5356
|
], EstadoInternoWithoutSubstateDTO.prototype, "Orden", 2);
|
|
5354
5357
|
__decorateClass([
|