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 CHANGED
@@ -1084,7 +1084,7 @@ declare class EstadoInternoWithoutSubstateDTO {
1084
1084
  Descripcion: string;
1085
1085
  Icono: string;
1086
1086
  Color: string;
1087
- Orden: number;
1087
+ Orden: string;
1088
1088
  ColorFondo: string;
1089
1089
  Tipo: string;
1090
1090
  UsuarioEdicion: UsuarioEdicionDTO;
package/dist/index.d.ts CHANGED
@@ -1084,7 +1084,7 @@ declare class EstadoInternoWithoutSubstateDTO {
1084
1084
  Descripcion: string;
1085
1085
  Icono: string;
1086
1086
  Color: string;
1087
- Orden: number;
1087
+ Orden: string;
1088
1088
  ColorFondo: string;
1089
1089
  Tipo: string;
1090
1090
  UsuarioEdicion: UsuarioEdicionDTO;
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
- if (typeof obj === "string") {
340
- const date = new Date(obj);
341
- return isNaN(date.getTime()) ? obj : date;
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 = 0;
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.IsNumber)({}, { message: "debe ser un n\xFAmero" }),
5590
- (0, import_class_validator100.IsNotEmpty)({ message: "es requerido" }),
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
- if (typeof obj === "string") {
101
- const date = new Date(obj);
102
- return isNaN(date.getTime()) ? obj : date;
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 = 0;
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
- IsNumber67({}, { message: "debe ser un n\xFAmero" }),
5351
- IsNotEmpty98({ message: "es requerido" }),
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([
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sigo-entities",
3
- "version": "0.0.180",
3
+ "version": "0.0.182",
4
4
  "description": "Desarrollo de modelos de datos SIGO",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",