@muni-sanfer/types-gestor-documental 0.0.1-beta.51 → 0.0.1-beta.53

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.
@@ -445,6 +445,7 @@ export interface DocumentTypeEntity {
445
445
  numbered: boolean;
446
446
  numberingScope: DocumentNumberingScope;
447
447
  allowsExternalNumber: boolean;
448
+ usesPartsOffice: boolean;
448
449
  activeTransparency: boolean;
449
450
  transparencySection?: string | null;
450
451
  directorateCodeReference?: number | null;
@@ -509,6 +510,8 @@ export interface DocumentEntity {
509
510
  replies?: DocumentEntity[];
510
511
  directorateCodeReference?: number | null;
511
512
  departmentId?: string | null;
513
+ issuingUnitName?: string | null;
514
+ issuingDirectorateName?: string | null;
512
515
  createdByEmployeeId: string;
513
516
  createdByFullName: string;
514
517
  originalFileId: string;
@@ -671,6 +674,7 @@ export interface DocumentTypeVersionEntity {
671
674
  numbered: boolean;
672
675
  numberingScope: DocumentNumberingScope;
673
676
  allowsExternalNumber: boolean;
677
+ usesPartsOffice: boolean;
674
678
  activeTransparency: boolean;
675
679
  transparencySection?: string | null;
676
680
  directorateCodeReference?: number | null;
@@ -1458,6 +1462,9 @@ export interface DraftingRequestEntity {
1458
1462
  requesterEmployeeId: string;
1459
1463
  requesterFullName: string;
1460
1464
  requesterAreaName?: string | null;
1465
+ requesterDirectorateCode?: number | null;
1466
+ requesterDepartmentId?: string | null;
1467
+ requesterDirectorateName?: string | null;
1461
1468
  targetDirectorateCode: number;
1462
1469
  targetDirectorateName: string;
1463
1470
  status: DraftingRequestStatus;
@@ -90,6 +90,10 @@ export interface DocumentWritePayload extends Pick<DocumentEntity, 'subject' | '
90
90
  hasSensitiveData?: boolean;
91
91
  directorateCodeReference?: number | null;
92
92
  departmentId?: string | null;
93
+ issuingUnitName?: string | null;
94
+ issuingDirectorateName?: string | null;
95
+ externalCorrelative?: number | null;
96
+ externalCorrelativeYear?: number | null;
93
97
  file: {
94
98
  fileId: string;
95
99
  name: string;
@@ -39,6 +39,7 @@ export interface DocumentTypeWritePayload {
39
39
  numbered?: boolean;
40
40
  numberingScope?: DocumentNumberingScope;
41
41
  allowsExternalNumber?: boolean;
42
+ usesPartsOffice?: boolean;
42
43
  /** Transparencia Activa: sus documentos se publican cada mes, en esta sección del Portal. */
43
44
  activeTransparency?: boolean;
44
45
  transparencySection?: string | null;
@@ -33,6 +33,9 @@ export interface DraftingRequestCreatePayload {
33
33
  /** Quienes la integran hoy, resueltos por el gateway (sin quien la pide). */
34
34
  recipientEmployeeIds: string[];
35
35
  requesterAreaName?: string | null;
36
+ requesterDirectorateCode?: number | null;
37
+ requesterDepartmentId?: string | null;
38
+ requesterDirectorateName?: string | null;
36
39
  actor: DraftingRequestActor;
37
40
  }
38
41
  /** Lo que se hace con una solicitud, un paso a la vez. */
@@ -128,6 +128,16 @@ export interface DocumentInboxItemEntity extends DocumentDeliveryResponseEntity
128
128
  businessDaysLeft: number | null;
129
129
  document: DocumentLinkEntity;
130
130
  }
131
+ /**
132
+ * Área responsable de un documento (su unidad emisora): una dirección o un departamento, con su nombre y el de la
133
+ * dirección a que pertenece (en una dirección, el mismo).
134
+ */
135
+ export interface DocumentResponsibleAreaEntity {
136
+ directorateCodeReference: number | null;
137
+ departmentId: string | null;
138
+ name: string;
139
+ directorateName: string;
140
+ }
131
141
  export interface DocumentGetByIdResponseEntity {
132
142
  id: DocumentEntity['id'];
133
143
  issuerName: string;
@@ -162,6 +172,8 @@ export interface DocumentGetByIdResponseEntity {
162
172
  externalCorrelativeYear: DocumentEntity['externalCorrelativeYear'];
163
173
  directorateCodeReference: DocumentEntity['directorateCodeReference'];
164
174
  departmentId: DocumentEntity['departmentId'];
175
+ responsibleArea: DocumentResponsibleAreaEntity | null;
176
+ responsibleAreaFixed: boolean;
165
177
  createdByEmployeeId: DocumentEntity['createdByEmployeeId'];
166
178
  createdByFullName: DocumentEntity['createdByFullName'];
167
179
  originalFileId: DocumentEntity['originalFileId'];
@@ -24,6 +24,7 @@ export interface DocumentTypeGetAllResponseEntity {
24
24
  numbered: DocumentTypeEntity['numbered'];
25
25
  numberingScope: DocumentTypeEntity['numberingScope'];
26
26
  allowsExternalNumber: DocumentTypeEntity['allowsExternalNumber'];
27
+ usesPartsOffice: DocumentTypeEntity['usesPartsOffice'];
27
28
  /** Transparencia Activa: sus documentos se publican cada mes, en esta sección del Portal. */
28
29
  activeTransparency: DocumentTypeEntity['activeTransparency'];
29
30
  transparencySection: DocumentTypeEntity['transparencySection'];
@@ -1,4 +1,5 @@
1
1
  import { type DocumentStatus, type DraftingRequestEventAction, type DraftingRequestStatus } from '../../base/entities';
2
+ import { type DocumentResponsibleAreaEntity } from '../document/document.entity';
2
3
  /**
3
4
  * Cómo va la solicitud, para mostrarla: sin tomar, tomada (aún sin documento), en redacción (con documento en curso),
4
5
  * atendida (su documento quedó finalizado), devuelta o retirada.
@@ -21,6 +22,7 @@ export interface DraftingRequestListItemEntity {
21
22
  requesterEmployeeId: string;
22
23
  requesterFullName: string;
23
24
  requesterAreaName: string | null;
25
+ requesterArea: DocumentResponsibleAreaEntity | null;
24
26
  targetDirectorateCode: number;
25
27
  targetDirectorateName: string;
26
28
  takenByEmployeeId: string | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@muni-sanfer/types-gestor-documental",
3
- "version": "0.0.1-beta.51",
3
+ "version": "0.0.1-beta.53",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "scripts": {
@@ -654,6 +654,7 @@ export interface DocumentTypeEntity {
654
654
  numbered: boolean;
655
655
  numberingScope: DocumentNumberingScope;
656
656
  allowsExternalNumber: boolean;
657
+ usesPartsOffice: boolean;
657
658
  activeTransparency: boolean;
658
659
  transparencySection?: string | null;
659
660
  directorateCodeReference?: number | null;
@@ -719,6 +720,8 @@ export interface DocumentEntity {
719
720
  replies?: DocumentEntity[];
720
721
  directorateCodeReference?: number | null;
721
722
  departmentId?: string | null;
723
+ issuingUnitName?: string | null;
724
+ issuingDirectorateName?: string | null;
722
725
  createdByEmployeeId: string;
723
726
  createdByFullName: string;
724
727
  originalFileId: string;
@@ -890,6 +893,7 @@ export interface DocumentTypeVersionEntity {
890
893
  numbered: boolean;
891
894
  numberingScope: DocumentNumberingScope;
892
895
  allowsExternalNumber: boolean;
896
+ usesPartsOffice: boolean;
893
897
  activeTransparency: boolean;
894
898
  transparencySection?: string | null;
895
899
  directorateCodeReference?: number | null;
@@ -1726,6 +1730,9 @@ export interface DraftingRequestEntity {
1726
1730
  requesterEmployeeId: string;
1727
1731
  requesterFullName: string;
1728
1732
  requesterAreaName?: string | null;
1733
+ requesterDirectorateCode?: number | null;
1734
+ requesterDepartmentId?: string | null;
1735
+ requesterDirectorateName?: string | null;
1729
1736
  targetDirectorateCode: number;
1730
1737
  targetDirectorateName: string;
1731
1738
  status: DraftingRequestStatus;
@@ -128,8 +128,15 @@ export interface DocumentWritePayload extends Pick<DocumentEntity, 'subject' | '
128
128
  draftingRequestId?: string | null;
129
129
  accessLevel?: DocumentAccessLevel;
130
130
  hasSensitiveData?: boolean;
131
+ // Área responsable: una dirección o un departamento (a pedido de otra área, el ms usa la de quien lo pidió).
131
132
  directorateCodeReference?: number | null;
132
133
  departmentId?: string | null;
134
+ // Nombres del área responsable y de su dirección: los pone el gateway, no el navegador.
135
+ issuingUnitName?: string | null;
136
+ issuingDirectorateName?: string | null;
137
+ // El documento llegó ya numerado (su tipo lo admite): su número y año.
138
+ externalCorrelative?: number | null;
139
+ externalCorrelativeYear?: number | null;
133
140
  // PDF del documento, ya subido al gestor de archivos.
134
141
  file: { fileId: string; name: string };
135
142
  attachments?: Pick<DocumentAttachmentEntity, 'name' | 'type' | 'fileId' | 'url'>[];
@@ -54,6 +54,8 @@ export interface DocumentTypeWritePayload {
54
54
  numberingScope?: DocumentNumberingScope;
55
55
  // Sus documentos pueden llegar ya numerados (por omisión, no).
56
56
  allowsExternalNumber?: boolean;
57
+ // Pasa por Oficina de Partes (por omisión, sí). Sin ella, el documento solo se firma: va solo a funcionarios y áreas.
58
+ usesPartsOffice?: boolean;
57
59
  /** Transparencia Activa: sus documentos se publican cada mes, en esta sección del Portal. */
58
60
  activeTransparency?: boolean;
59
61
  transparencySection?: string | null;
@@ -34,6 +34,10 @@ export interface DraftingRequestCreatePayload {
34
34
  /** Quienes la integran hoy, resueltos por el gateway (sin quien la pide). */
35
35
  recipientEmployeeIds: string[];
36
36
  requesterAreaName?: string | null;
37
+ // Área de quien la pide (una dirección o un departamento) y su dirección, resueltas por el gateway.
38
+ requesterDirectorateCode?: number | null;
39
+ requesterDepartmentId?: string | null;
40
+ requesterDirectorateName?: string | null;
37
41
  actor: DraftingRequestActor;
38
42
  }
39
43
 
@@ -153,6 +153,17 @@ export interface DocumentInboxItemEntity extends DocumentDeliveryResponseEntity
153
153
  document: DocumentLinkEntity;
154
154
  }
155
155
 
156
+ /**
157
+ * Área responsable de un documento (su unidad emisora): una dirección o un departamento, con su nombre y el de la
158
+ * dirección a que pertenece (en una dirección, el mismo).
159
+ */
160
+ export interface DocumentResponsibleAreaEntity {
161
+ directorateCodeReference: number | null;
162
+ departmentId: string | null;
163
+ name: string;
164
+ directorateName: string;
165
+ }
166
+
156
167
  export interface DocumentGetByIdResponseEntity {
157
168
  id: DocumentEntity['id'];
158
169
  // Quién lo emite: la entidad emisora del tipo (Educación, Salud, Juzgado) o la municipalidad.
@@ -184,6 +195,10 @@ export interface DocumentGetByIdResponseEntity {
184
195
  externalCorrelativeYear: DocumentEntity['externalCorrelativeYear'];
185
196
  directorateCodeReference: DocumentEntity['directorateCodeReference'];
186
197
  departmentId: DocumentEntity['departmentId'];
198
+ // Área responsable con sus nombres, como estaban al guardarlo (sin valor si no se registraron).
199
+ responsibleArea: DocumentResponsibleAreaEntity | null;
200
+ // A pedido de otra área: el área responsable es la de quien lo pidió y no se cambia.
201
+ responsibleAreaFixed: boolean;
187
202
  createdByEmployeeId: DocumentEntity['createdByEmployeeId'];
188
203
  createdByFullName: DocumentEntity['createdByFullName'];
189
204
  originalFileId: DocumentEntity['originalFileId'];
@@ -32,6 +32,9 @@ export interface DocumentTypeGetAllResponseEntity {
32
32
  numberingScope: DocumentTypeEntity['numberingScope'];
33
33
  // Sus documentos pueden llegar ya numerados: quien sube el PDF indica su número.
34
34
  allowsExternalNumber: DocumentTypeEntity['allowsExternalNumber'];
35
+ // Pasa por Oficina de Partes: sus documentos pueden ir a otras instituciones y con copias por correo. Sin ella,
36
+ // solo se firman y van a funcionarios y áreas de la municipalidad.
37
+ usesPartsOffice: DocumentTypeEntity['usesPartsOffice'];
35
38
  /** Transparencia Activa: sus documentos se publican cada mes, en esta sección del Portal. */
36
39
  activeTransparency: DocumentTypeEntity['activeTransparency'];
37
40
  transparencySection: DocumentTypeEntity['transparencySection'];
@@ -1,4 +1,5 @@
1
1
  import { type DocumentStatus, type DraftingRequestEventAction, type DraftingRequestStatus } from '../../base/entities';
2
+ import { type DocumentResponsibleAreaEntity } from '../document/document.entity';
2
3
 
3
4
  /**
4
5
  * Cómo va la solicitud, para mostrarla: sin tomar, tomada (aún sin documento), en redacción (con documento en curso),
@@ -24,6 +25,8 @@ export interface DraftingRequestListItemEntity {
24
25
  requesterEmployeeId: string;
25
26
  requesterFullName: string;
26
27
  requesterAreaName: string | null;
28
+ // Área de quien la pide: es el área responsable del documento que se redacta (sin valor en las anteriores a esto).
29
+ requesterArea: DocumentResponsibleAreaEntity | null;
27
30
  targetDirectorateCode: number;
28
31
  targetDirectorateName: string;
29
32
  takenByEmployeeId: string | null;