@muni-sanfer/types-gestor-documental 0.0.1-beta.52 → 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.
- package/dist/base/entities.d.ts +5 -0
- package/dist/contracts/document.contract.d.ts +4 -0
- package/dist/contracts/draftingRequest.contract.d.ts +3 -0
- package/dist/entities/document/document.entity.d.ts +12 -0
- package/dist/entities/draftingRequest/draftingRequest.entity.d.ts +2 -0
- package/package.json +1 -1
- package/src/base/entities.ts +5 -0
- package/src/contracts/document.contract.ts +7 -0
- package/src/contracts/draftingRequest.contract.ts +4 -0
- package/src/entities/document/document.entity.ts +15 -0
- package/src/entities/draftingRequest/draftingRequest.entity.ts +3 -0
package/dist/base/entities.d.ts
CHANGED
|
@@ -510,6 +510,8 @@ export interface DocumentEntity {
|
|
|
510
510
|
replies?: DocumentEntity[];
|
|
511
511
|
directorateCodeReference?: number | null;
|
|
512
512
|
departmentId?: string | null;
|
|
513
|
+
issuingUnitName?: string | null;
|
|
514
|
+
issuingDirectorateName?: string | null;
|
|
513
515
|
createdByEmployeeId: string;
|
|
514
516
|
createdByFullName: string;
|
|
515
517
|
originalFileId: string;
|
|
@@ -1460,6 +1462,9 @@ export interface DraftingRequestEntity {
|
|
|
1460
1462
|
requesterEmployeeId: string;
|
|
1461
1463
|
requesterFullName: string;
|
|
1462
1464
|
requesterAreaName?: string | null;
|
|
1465
|
+
requesterDirectorateCode?: number | null;
|
|
1466
|
+
requesterDepartmentId?: string | null;
|
|
1467
|
+
requesterDirectorateName?: string | null;
|
|
1463
1468
|
targetDirectorateCode: number;
|
|
1464
1469
|
targetDirectorateName: string;
|
|
1465
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;
|
|
@@ -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'];
|
|
@@ -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
package/src/base/entities.ts
CHANGED
|
@@ -720,6 +720,8 @@ export interface DocumentEntity {
|
|
|
720
720
|
replies?: DocumentEntity[];
|
|
721
721
|
directorateCodeReference?: number | null;
|
|
722
722
|
departmentId?: string | null;
|
|
723
|
+
issuingUnitName?: string | null;
|
|
724
|
+
issuingDirectorateName?: string | null;
|
|
723
725
|
createdByEmployeeId: string;
|
|
724
726
|
createdByFullName: string;
|
|
725
727
|
originalFileId: string;
|
|
@@ -1728,6 +1730,9 @@ export interface DraftingRequestEntity {
|
|
|
1728
1730
|
requesterEmployeeId: string;
|
|
1729
1731
|
requesterFullName: string;
|
|
1730
1732
|
requesterAreaName?: string | null;
|
|
1733
|
+
requesterDirectorateCode?: number | null;
|
|
1734
|
+
requesterDepartmentId?: string | null;
|
|
1735
|
+
requesterDirectorateName?: string | null;
|
|
1731
1736
|
targetDirectorateCode: number;
|
|
1732
1737
|
targetDirectorateName: string;
|
|
1733
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'>[];
|
|
@@ -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'];
|
|
@@ -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;
|