sigo-entities 1.2.344 → 1.2.346

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
@@ -1709,8 +1709,8 @@ declare class ValorizacionAlemaniaDTO {
1709
1709
  Descripcion: string;
1710
1710
  Certificacion: CertificacionDTO;
1711
1711
  Produccion: ProduccionDTO;
1712
- Ultimo_Estado_Interno: EstadoInternoDTO;
1713
- Estados: EstadoInternoDTO[];
1712
+ Ultimo_Estado_Interno: EstadoInternoWithoutSubstateDTO;
1713
+ Estados: EstadoInternoWithoutSubstateDTO[];
1714
1714
  FechaLiquidacion: Date;
1715
1715
  Semana: number;
1716
1716
  Calle: string;
@@ -8277,6 +8277,7 @@ declare class Peru9112FibramasENTITYDB {
8277
8277
  MO: number;
8278
8278
  Gasto_EECC: number;
8279
8279
  EECC: EECCFibramasDBDTO;
8280
+ boletin: FilesDocDTO;
8280
8281
  }
8281
8282
 
8282
8283
  declare class Peru9112FibramasENTITY {
package/dist/index.d.ts CHANGED
@@ -1709,8 +1709,8 @@ declare class ValorizacionAlemaniaDTO {
1709
1709
  Descripcion: string;
1710
1710
  Certificacion: CertificacionDTO;
1711
1711
  Produccion: ProduccionDTO;
1712
- Ultimo_Estado_Interno: EstadoInternoDTO;
1713
- Estados: EstadoInternoDTO[];
1712
+ Ultimo_Estado_Interno: EstadoInternoWithoutSubstateDTO;
1713
+ Estados: EstadoInternoWithoutSubstateDTO[];
1714
1714
  FechaLiquidacion: Date;
1715
1715
  Semana: number;
1716
1716
  Calle: string;
@@ -8277,6 +8277,7 @@ declare class Peru9112FibramasENTITYDB {
8277
8277
  MO: number;
8278
8278
  Gasto_EECC: number;
8279
8279
  EECC: EECCFibramasDBDTO;
8280
+ boletin: FilesDocDTO;
8280
8281
  }
8281
8282
 
8282
8283
  declare class Peru9112FibramasENTITY {
package/dist/index.js CHANGED
@@ -9495,7 +9495,7 @@ var ValorizacionAlemaniaDTO = class {
9495
9495
  Descripcion = "";
9496
9496
  Certificacion = new CertificacionDTO();
9497
9497
  Produccion = new ProduccionDTO();
9498
- Ultimo_Estado_Interno = new EstadoInternoDTO();
9498
+ Ultimo_Estado_Interno = new EstadoInternoWithoutSubstateDTO();
9499
9499
  Estados = [];
9500
9500
  FechaLiquidacion = /* @__PURE__ */ new Date();
9501
9501
  Semana = 0;
@@ -9565,14 +9565,14 @@ __decorateClass([
9565
9565
  (0, import_class_validator173.ValidateNested)()
9566
9566
  ], ValorizacionAlemaniaDTO.prototype, "Produccion", 2);
9567
9567
  __decorateClass([
9568
- (0, import_class_transformer175.Type)(() => EstadoInternoDTO),
9568
+ (0, import_class_transformer175.Type)(() => EstadoInternoWithoutSubstateDTO),
9569
9569
  (0, import_class_validator173.IsNotEmpty)({ message: "es requerido" }),
9570
9570
  (0, import_class_transformer175.Expose)(),
9571
9571
  (0, import_class_validator173.ValidateNested)()
9572
9572
  ], ValorizacionAlemaniaDTO.prototype, "Ultimo_Estado_Interno", 2);
9573
9573
  __decorateClass([
9574
9574
  (0, import_class_validator173.IsArray)(),
9575
- (0, import_class_transformer175.Type)(() => EstadoInternoDTO),
9575
+ (0, import_class_transformer175.Type)(() => EstadoInternoWithoutSubstateDTO),
9576
9576
  (0, import_class_validator173.IsNotEmpty)({ message: "es requerido" }),
9577
9577
  (0, import_class_transformer175.Expose)(),
9578
9578
  (0, import_class_validator173.ValidateNested)({ each: true })
@@ -43407,6 +43407,7 @@ var Peru9112FibramasENTITYDB = class {
43407
43407
  MO = 0;
43408
43408
  Gasto_EECC = 0;
43409
43409
  EECC = new EECCFibramasDBDTO();
43410
+ boletin = new FilesDocDTO();
43410
43411
  };
43411
43412
  __decorateClass([
43412
43413
  (0, import_class_validator713.IsDefined)({ message: "El campo _id es obligatorio." }),
@@ -43555,6 +43556,12 @@ __decorateClass([
43555
43556
  (0, import_class_validator713.ValidateNested)(),
43556
43557
  (0, import_class_transformer736.Type)(() => EECCFibramasDBDTO)
43557
43558
  ], Peru9112FibramasENTITYDB.prototype, "EECC", 2);
43559
+ __decorateClass([
43560
+ (0, import_class_transformer736.Expose)(),
43561
+ (0, import_class_validator713.IsDefined)(),
43562
+ (0, import_class_validator713.ValidateNested)(),
43563
+ (0, import_class_transformer736.Type)(() => FilesDocDTO)
43564
+ ], Peru9112FibramasENTITYDB.prototype, "boletin", 2);
43558
43565
 
43559
43566
  // src/operativa/procesos/fibramas_order/shared/index.ts
43560
43567
  var Peru9112FibramasENTITY = class {
package/dist/index.mjs CHANGED
@@ -8692,7 +8692,7 @@ var ValorizacionAlemaniaDTO = class {
8692
8692
  Descripcion = "";
8693
8693
  Certificacion = new CertificacionDTO();
8694
8694
  Produccion = new ProduccionDTO();
8695
- Ultimo_Estado_Interno = new EstadoInternoDTO();
8695
+ Ultimo_Estado_Interno = new EstadoInternoWithoutSubstateDTO();
8696
8696
  Estados = [];
8697
8697
  FechaLiquidacion = /* @__PURE__ */ new Date();
8698
8698
  Semana = 0;
@@ -8762,14 +8762,14 @@ __decorateClass([
8762
8762
  ValidateNested102()
8763
8763
  ], ValorizacionAlemaniaDTO.prototype, "Produccion", 2);
8764
8764
  __decorateClass([
8765
- Type112(() => EstadoInternoDTO),
8765
+ Type112(() => EstadoInternoWithoutSubstateDTO),
8766
8766
  IsNotEmpty120({ message: "es requerido" }),
8767
8767
  Expose170(),
8768
8768
  ValidateNested102()
8769
8769
  ], ValorizacionAlemaniaDTO.prototype, "Ultimo_Estado_Interno", 2);
8770
8770
  __decorateClass([
8771
8771
  IsArray54(),
8772
- Type112(() => EstadoInternoDTO),
8772
+ Type112(() => EstadoInternoWithoutSubstateDTO),
8773
8773
  IsNotEmpty120({ message: "es requerido" }),
8774
8774
  Expose170(),
8775
8775
  ValidateNested102({ each: true })
@@ -42869,6 +42869,7 @@ var Peru9112FibramasENTITYDB = class {
42869
42869
  MO = 0;
42870
42870
  Gasto_EECC = 0;
42871
42871
  EECC = new EECCFibramasDBDTO();
42872
+ boletin = new FilesDocDTO();
42872
42873
  };
42873
42874
  __decorateClass([
42874
42875
  IsDefined221({ message: "El campo _id es obligatorio." }),
@@ -43017,6 +43018,12 @@ __decorateClass([
43017
43018
  ValidateNested398(),
43018
43019
  Type453(() => EECCFibramasDBDTO)
43019
43020
  ], Peru9112FibramasENTITYDB.prototype, "EECC", 2);
43021
+ __decorateClass([
43022
+ Expose710(),
43023
+ IsDefined221(),
43024
+ ValidateNested398(),
43025
+ Type453(() => FilesDocDTO)
43026
+ ], Peru9112FibramasENTITYDB.prototype, "boletin", 2);
43020
43027
 
43021
43028
  // src/operativa/procesos/fibramas_order/shared/index.ts
43022
43029
  var Peru9112FibramasENTITY = class {
package/package.json CHANGED
@@ -1,34 +1,34 @@
1
- {
2
- "name": "sigo-entities",
3
- "version": "1.2.344",
4
- "description": "Desarrollo de modelos de datos SIGO",
5
- "main": "dist/index.js",
6
- "module": "dist/index.mjs",
7
- "types": "dist/index.d.ts",
8
- "scripts": {
9
- "build": "tsup && tsc-alias",
10
- "prepare": "npm run build"
11
- },
12
- "repository": {
13
- "type": "git",
14
- "url": "git@github.com-trabajo:GRUPOCOBRA/sigo-entities.git"
15
- },
16
- "keywords": [],
17
- "author": "usuario088",
18
- "license": "ISC",
19
- "devDependencies": {
20
- "@types/express": "^5.0.1",
21
- "sigo-package": "^1.2.132",
22
- "tsc-alias": "^1.8.15",
23
- "tsconfig-paths": "^4.2.0",
24
- "tsup": "^8.1.0",
25
- "typescript": "^5.4.5"
26
- },
27
- "dependencies": {
28
- "class-transformer": "^0.5.1",
29
- "class-validator": "^0.14.1"
30
- },
31
- "peerDependencies": {
32
- "reflect-metadata": "^0.2.2"
33
- }
1
+ {
2
+ "name": "sigo-entities",
3
+ "version": "1.2.346",
4
+ "description": "Desarrollo de modelos de datos SIGO",
5
+ "main": "dist/index.js",
6
+ "module": "dist/index.mjs",
7
+ "types": "dist/index.d.ts",
8
+ "scripts": {
9
+ "build": "tsup && tsc-alias",
10
+ "prepare": "npm run build"
11
+ },
12
+ "repository": {
13
+ "type": "git",
14
+ "url": "git@github.com-trabajo:GRUPOCOBRA/sigo-entities.git"
15
+ },
16
+ "keywords": [],
17
+ "author": "usuario088",
18
+ "license": "ISC",
19
+ "devDependencies": {
20
+ "@types/express": "^5.0.1",
21
+ "sigo-package": "^1.2.132",
22
+ "tsc-alias": "^1.8.15",
23
+ "tsconfig-paths": "^4.2.0",
24
+ "tsup": "^8.1.0",
25
+ "typescript": "^5.4.5"
26
+ },
27
+ "dependencies": {
28
+ "class-transformer": "^0.5.1",
29
+ "class-validator": "^0.14.1"
30
+ },
31
+ "peerDependencies": {
32
+ "reflect-metadata": "^0.2.2"
33
+ }
34
34
  }
package/test.ts CHANGED
@@ -1,13 +1,13 @@
1
- import { validateAndFormatData, CubicacionColombia9612ENTITY } from './src'
2
- import { convertDates } from 'sigo-package'
3
- import fs from 'fs'
4
-
5
- // ts-node -r tsconfig-paths/register test.ts
6
-
7
- async function test() {
8
- const data = JSON.parse(fs.readFileSync('./body_testing.json', 'utf-8'))
9
- convertDates(data)
10
- console.log(await validateAndFormatData(data, CubicacionColombia9612ENTITY))
11
- }
12
-
1
+ import { validateAndFormatData, CubicacionColombia9612ENTITY } from './src'
2
+ import { convertDates } from 'sigo-package'
3
+ import fs from 'fs'
4
+
5
+ // ts-node -r tsconfig-paths/register test.ts
6
+
7
+ async function test() {
8
+ const data = JSON.parse(fs.readFileSync('./body_testing.json', 'utf-8'))
9
+ convertDates(data)
10
+ console.log(await validateAndFormatData(data, CubicacionColombia9612ENTITY))
11
+ }
12
+
13
13
  test()
package/.ai_context.md DELETED
@@ -1,50 +0,0 @@
1
- # Contexto del Proyecto
2
-
3
- **Nombre:** Ingeniero Brayan Valero
4
- **Preferencias de idioma:** Español (Indispensable)
5
- **Formato de Planes y Tareas:** Siempre en Español
6
- **Contexto del proyecto:** Librería transversal para entidades compartidas (Front y Back)
7
- **Nombre del Asistente:** Latas
8
-
9
- **Tipo de Proyecto:** Shared Library
10
- **Ubicación Raíz:** `d:\16_SIGO_ENTITYS\sigo-entities`
11
-
12
- Este archivo contiene la visión general del proyecto `sigo-entities`.
13
-
14
- ## Descripción
15
- `sigo-entities` es la librería donde se alojan las entidades compartidas por front y back. En ambos hay un archivo de contexto llamado `.ai_context.md`, donde almacenamos la configuración del proyecto, estructura del mismo y contexto de workflows para tareas futuras.
16
-
17
- ## Normas Generales
18
- 1. **Archivos de Contexto**: Mantener actualizados los `.ai_context.md` locales.
19
- 2. **Git Ignore**: Asegurarse de que `**/.ai_context.md` esté ignorado.
20
- 3. **sigo-entities**: Librería transversal para tipos compartidos.
21
-
22
- ## Guía de Desarrollo de Entidades y DTOs
23
-
24
- ### Estructura de Carpetas
25
- - **DTOs compartidos**: `src/programados/procesos/[Entidad]/shared`
26
- - **Request DTOs**: `src/programados/procesos/[Entidad]/shared/requestDto`
27
-
28
- ### Convenciones de Nombres
29
- - **Archivos**: `kebab-case` con sufijo `-dto.ts` (ej. `job-macro-request-dto.ts`).
30
- - **Clases**: `PascalCase` con sufijo `DTO` (ej. `JobMacroRequestDTO`).
31
-
32
- ### Reglas de Implementación
33
- 1. **Librerías**: Usar `class-transformer` (@Expose, @Type) y `class-validator` (IsString, IsNumber, etc.).
34
- 2. **Mensajes de Validación**: Deben ser en español (ej. "debe ser un texto", "es requerido").
35
- 3. **Inicialización**: Todas las propiedades deben tener valor inicial (ej. `string = ''`, `number = 0`).
36
- 4. **Exposición**: Decorar todas las propiedades con `@Expose()`.
37
-
38
- ## Proceso de Despliegue (sigo-entities)
39
-
40
- 1. **Validación**: Confirmar que la nueva entidad o DTO es correcto y cumple con las normas (preguntar al usuario).
41
- - *Aprendizaje*: No incluir campos como `UsuarioEdicion` si el backend puede obtenerlos del token. Los DTOs de actualización deben ser lo más minimalistas posible (ID, nuevos valores, observaciones).
42
- 2. **Sincronización Inicial**: Bajar cambios (`git pull`) y subir cambios de la nueva entidad (`git push`).
43
- 3. **Versionamiento**: Incrementar la versión en el `package.json` (ej: `1.2.205` -> `1.2.206`).
44
- 4. **Sincronización de Versión**: Bajar y subir cambios nuevamente para asegurar la versión en el repositorio.
45
- 5. **Publicación**: Ejecutar `npm publish`.
46
- 6. **Actualización en Servicios**:
47
- - Posicionarse en el servicio (Back/Front) objetivo mediante el comando `cd`.
48
- - Ejecutar `npm i sigo-entities@latest`.
49
- - Verificar importaciones.
50
- - *Aprendizaje*: Los DTOs de procesos deben exportarse desde el `index.ts` principal de la entidad (ej. `obra/index.ts`) y no solo desde el `shared/index.ts`.
package/build.log DELETED
Binary file