@muni-sanfer/types-gestor-documental 0.0.1-beta.6 → 0.0.1-beta.61
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 +1055 -7
- package/dist/base/entities.js +258 -2
- package/dist/contracts/accessRequest.contract.d.ts +109 -0
- package/dist/contracts/accessRequest.contract.js +12 -0
- package/dist/contracts/archivalSeries.contract.d.ts +56 -0
- package/dist/contracts/archivalSeries.contract.js +11 -0
- package/dist/contracts/audit.contract.d.ts +32 -0
- package/dist/contracts/audit.contract.js +8 -0
- package/dist/contracts/caseFile.contract.d.ts +124 -1
- package/dist/contracts/caseFile.contract.js +10 -0
- package/dist/contracts/dataProtection.contract.d.ts +256 -0
- package/dist/contracts/dataProtection.contract.js +23 -0
- package/dist/contracts/desk.contract.d.ts +88 -0
- package/dist/contracts/desk.contract.js +13 -0
- package/dist/contracts/document.contract.d.ts +236 -3
- package/dist/contracts/document.contract.js +16 -0
- package/dist/contracts/documentTemplate.contract.d.ts +17 -0
- package/dist/contracts/documentTemplate.contract.js +10 -0
- package/dist/contracts/documentType.contract.d.ts +33 -3
- package/dist/contracts/documentType.contract.js +2 -0
- package/dist/contracts/draftingRequest.contract.d.ts +97 -0
- package/dist/contracts/draftingRequest.contract.js +11 -0
- package/dist/contracts/holiday.contract.d.ts +39 -0
- package/dist/contracts/holiday.contract.js +10 -0
- package/dist/contracts/index.d.ts +249 -4
- package/dist/contracts/index.js +69 -0
- package/dist/contracts/indicators.contract.d.ts +103 -0
- package/dist/contracts/indicators.contract.js +15 -0
- package/dist/contracts/internalReview.contract.d.ts +55 -0
- package/dist/contracts/internalReview.contract.js +9 -0
- package/dist/contracts/issuingEntity.contract.d.ts +52 -0
- package/dist/contracts/issuingEntity.contract.js +11 -0
- package/dist/contracts/mailIntake.contract.d.ts +61 -0
- package/dist/contracts/mailIntake.contract.js +15 -0
- package/dist/contracts/partsOffice.contract.d.ts +94 -2
- package/dist/contracts/partsOffice.contract.js +5 -0
- package/dist/contracts/procedure.contract.d.ts +14 -23
- package/dist/contracts/procedure.contract.js +6 -4
- package/dist/contracts/push.contract.d.ts +59 -0
- package/dist/contracts/push.contract.js +14 -0
- package/dist/contracts/repositoryExport.contract.d.ts +57 -0
- package/dist/contracts/repositoryExport.contract.js +13 -0
- package/dist/contracts/retention.contract.d.ts +58 -0
- package/dist/contracts/retention.contract.js +11 -0
- package/dist/contracts/richImage.contract.d.ts +33 -0
- package/dist/contracts/richImage.contract.js +8 -0
- package/dist/contracts/scan.contract.d.ts +63 -0
- package/dist/contracts/scan.contract.js +12 -0
- package/dist/contracts/signatureBatch.contract.d.ts +109 -0
- package/dist/contracts/signatureBatch.contract.js +12 -0
- package/dist/contracts/signatureCheck.contract.d.ts +14 -0
- package/dist/contracts/signatureCheck.contract.js +7 -0
- package/dist/contracts/textSnippet.contract.d.ts +51 -0
- package/dist/contracts/textSnippet.contract.js +11 -0
- package/dist/contracts/transparency.contract.d.ts +96 -0
- package/dist/contracts/transparency.contract.js +12 -0
- package/dist/contracts/visaInitials.contract.d.ts +28 -0
- package/dist/contracts/visaInitials.contract.js +11 -0
- package/dist/contracts/workFolder.contract.d.ts +114 -0
- package/dist/contracts/workFolder.contract.js +16 -0
- package/dist/entities/accessRequest/accessRequest.entity.d.ts +73 -0
- package/dist/entities/accessRequest/accessRequest.entity.js +2 -0
- package/dist/entities/accessRequest/index.d.ts +1 -0
- package/dist/entities/accessRequest/index.js +17 -0
- package/dist/entities/archivalSeries/archivalSeries.entity.d.ts +32 -0
- package/dist/entities/archivalSeries/archivalSeries.entity.js +2 -0
- package/dist/entities/archivalSeries/index.d.ts +1 -0
- package/dist/entities/archivalSeries/index.js +17 -0
- package/dist/entities/audit/audit.entity.d.ts +30 -0
- package/dist/entities/audit/audit.entity.js +2 -0
- package/dist/entities/audit/index.d.ts +1 -0
- package/dist/entities/audit/index.js +17 -0
- package/dist/entities/caseFile/caseFile.entity.d.ts +135 -0
- package/dist/entities/dataProtection/dataProtection.entity.d.ts +180 -0
- package/dist/entities/dataProtection/dataProtection.entity.js +2 -0
- package/dist/entities/dataProtection/index.d.ts +1 -0
- package/dist/entities/dataProtection/index.js +17 -0
- package/dist/entities/desk/desk.entity.d.ts +25 -0
- package/dist/entities/desk/desk.entity.js +2 -0
- package/dist/entities/desk/index.d.ts +1 -0
- package/dist/entities/desk/index.js +17 -0
- package/dist/entities/document/document.entity.d.ts +476 -1
- package/dist/entities/document/index.d.ts +2 -0
- package/dist/entities/document/index.js +2 -0
- package/dist/entities/document/richStyle.d.ts +219 -0
- package/dist/entities/document/richStyle.js +81 -0
- package/dist/entities/document/stampPlacement.d.ts +42 -0
- package/dist/entities/document/stampPlacement.js +16 -0
- package/dist/entities/documentTemplate/documentTemplate.entity.d.ts +25 -0
- package/dist/entities/documentTemplate/documentTemplate.entity.js +2 -0
- package/dist/entities/documentTemplate/index.d.ts +1 -0
- package/dist/entities/documentTemplate/index.js +17 -0
- package/dist/entities/documentType/documentCategory.d.ts +15 -0
- package/dist/entities/documentType/documentCategory.js +39 -0
- package/dist/entities/documentType/documentType.entity.d.ts +64 -1
- package/dist/entities/documentType/index.d.ts +1 -0
- package/dist/entities/documentType/index.js +1 -0
- package/dist/entities/draftingRequest/draftingRequest.entity.d.ts +78 -0
- package/dist/entities/draftingRequest/draftingRequest.entity.js +2 -0
- package/dist/entities/draftingRequest/index.d.ts +1 -0
- package/dist/entities/draftingRequest/index.js +17 -0
- package/dist/entities/holiday/holiday.entity.d.ts +32 -0
- package/dist/entities/holiday/holiday.entity.js +2 -0
- package/dist/entities/holiday/index.d.ts +1 -0
- package/dist/entities/holiday/index.js +17 -0
- package/dist/entities/index.d.ts +22 -0
- package/dist/entities/index.js +22 -0
- package/dist/entities/indicators/index.d.ts +1 -0
- package/dist/entities/indicators/index.js +17 -0
- package/dist/entities/indicators/indicators.entity.d.ts +152 -0
- package/dist/entities/indicators/indicators.entity.js +2 -0
- package/dist/entities/internalReview/index.d.ts +1 -0
- package/dist/entities/internalReview/index.js +17 -0
- package/dist/entities/internalReview/internalReview.entity.d.ts +50 -0
- package/dist/entities/internalReview/internalReview.entity.js +2 -0
- package/dist/entities/issuingEntity/index.d.ts +1 -0
- package/dist/entities/issuingEntity/index.js +17 -0
- package/dist/entities/issuingEntity/issuingEntity.entity.d.ts +20 -0
- package/dist/entities/issuingEntity/issuingEntity.entity.js +2 -0
- package/dist/entities/mailIntake/index.d.ts +1 -0
- package/dist/entities/mailIntake/index.js +17 -0
- package/dist/entities/mailIntake/mailIntake.entity.d.ts +51 -0
- package/dist/entities/mailIntake/mailIntake.entity.js +2 -0
- package/dist/entities/partsOffice/partsOffice.entity.d.ts +39 -0
- package/dist/entities/procedure/procedure.entity.d.ts +27 -6
- package/dist/entities/push/index.d.ts +1 -0
- package/dist/entities/push/index.js +17 -0
- package/dist/entities/push/push.entity.d.ts +28 -0
- package/dist/entities/push/push.entity.js +2 -0
- package/dist/entities/registerBook/registerBook.entity.d.ts +6 -0
- package/dist/entities/repositoryExport/index.d.ts +1 -0
- package/dist/entities/repositoryExport/index.js +17 -0
- package/dist/entities/repositoryExport/repositoryExport.entity.d.ts +124 -0
- package/dist/entities/repositoryExport/repositoryExport.entity.js +2 -0
- package/dist/entities/retention/index.d.ts +1 -0
- package/dist/entities/retention/index.js +17 -0
- package/dist/entities/retention/retention.entity.d.ts +49 -0
- package/dist/entities/retention/retention.entity.js +2 -0
- package/dist/entities/scan/index.d.ts +1 -0
- package/dist/entities/scan/index.js +17 -0
- package/dist/entities/scan/scan.entity.d.ts +29 -0
- package/dist/entities/scan/scan.entity.js +2 -0
- package/dist/entities/signatureBatch/index.d.ts +1 -0
- package/dist/entities/signatureBatch/index.js +17 -0
- package/dist/entities/signatureBatch/signatureBatch.entity.d.ts +107 -0
- package/dist/entities/signatureBatch/signatureBatch.entity.js +2 -0
- package/dist/entities/signatureCheck/index.d.ts +1 -0
- package/dist/entities/signatureCheck/index.js +17 -0
- package/dist/entities/signatureCheck/signatureCheck.entity.d.ts +60 -0
- package/dist/entities/signatureCheck/signatureCheck.entity.js +2 -0
- package/dist/entities/textSnippet/index.d.ts +1 -0
- package/dist/entities/textSnippet/index.js +17 -0
- package/dist/entities/textSnippet/textSnippet.entity.d.ts +20 -0
- package/dist/entities/textSnippet/textSnippet.entity.js +2 -0
- package/dist/entities/transparency/index.d.ts +1 -0
- package/dist/entities/transparency/index.js +17 -0
- package/dist/entities/transparency/transparency.entity.d.ts +77 -0
- package/dist/entities/transparency/transparency.entity.js +2 -0
- package/dist/entities/visaInitials/index.d.ts +1 -0
- package/dist/entities/visaInitials/index.js +17 -0
- package/dist/entities/visaInitials/visaInitials.entity.d.ts +13 -0
- package/dist/entities/visaInitials/visaInitials.entity.js +5 -0
- package/dist/entities/workFolder/index.d.ts +1 -0
- package/dist/entities/workFolder/index.js +17 -0
- package/dist/entities/workFolder/workFolder.entity.d.ts +83 -0
- package/dist/entities/workFolder/workFolder.entity.js +2 -0
- package/package.json +1 -1
- package/src/base/entities.ts +1244 -7
- package/src/contracts/accessRequest.contract.ts +81 -0
- package/src/contracts/archivalSeries.contract.ts +59 -0
- package/src/contracts/audit.contract.ts +30 -0
- package/src/contracts/caseFile.contract.ts +107 -2
- package/src/contracts/dataProtection.contract.ts +197 -0
- package/src/contracts/desk.contract.ts +72 -0
- package/src/contracts/document.contract.ts +223 -3
- package/src/contracts/documentTemplate.contract.ts +17 -0
- package/src/contracts/documentType.contract.ts +57 -4
- package/src/contracts/draftingRequest.contract.ts +77 -0
- package/src/contracts/holiday.contract.ts +25 -0
- package/src/contracts/index.ts +93 -1
- package/src/contracts/indicators.contract.ts +80 -0
- package/src/contracts/internalReview.contract.ts +48 -0
- package/src/contracts/issuingEntity.contract.ts +55 -0
- package/src/contracts/mailIntake.contract.ts +49 -0
- package/src/contracts/partsOffice.contract.ts +81 -2
- package/src/contracts/procedure.contract.ts +11 -27
- package/src/contracts/push.contract.ts +41 -0
- package/src/contracts/repositoryExport.contract.ts +54 -0
- package/src/contracts/retention.contract.ts +44 -0
- package/src/contracts/richImage.contract.ts +23 -0
- package/src/contracts/scan.contract.ts +52 -0
- package/src/contracts/signatureBatch.contract.ts +96 -0
- package/src/contracts/signatureCheck.contract.ts +11 -0
- package/src/contracts/textSnippet.contract.ts +53 -0
- package/src/contracts/transparency.contract.ts +55 -0
- package/src/contracts/visaInitials.contract.ts +23 -0
- package/src/contracts/workFolder.contract.ts +75 -0
- package/src/entities/accessRequest/accessRequest.entity.ts +78 -0
- package/src/entities/accessRequest/index.ts +1 -0
- package/src/entities/archivalSeries/archivalSeries.entity.ts +37 -0
- package/src/entities/archivalSeries/index.ts +1 -0
- package/src/entities/audit/audit.entity.ts +41 -0
- package/src/entities/audit/index.ts +1 -0
- package/src/entities/caseFile/caseFile.entity.ts +132 -0
- package/src/entities/dataProtection/dataProtection.entity.ts +191 -0
- package/src/entities/dataProtection/index.ts +1 -0
- package/src/entities/desk/desk.entity.ts +28 -0
- package/src/entities/desk/index.ts +1 -0
- package/src/entities/document/document.entity.ts +464 -1
- package/src/entities/document/index.ts +2 -0
- package/src/entities/document/richStyle.ts +200 -0
- package/src/entities/document/stampPlacement.ts +35 -0
- package/src/entities/documentTemplate/documentTemplate.entity.ts +27 -0
- package/src/entities/documentTemplate/index.ts +1 -0
- package/src/entities/documentType/documentCategory.ts +40 -0
- package/src/entities/documentType/documentType.entity.ts +76 -1
- package/src/entities/documentType/index.ts +1 -0
- package/src/entities/draftingRequest/draftingRequest.entity.ts +81 -0
- package/src/entities/draftingRequest/index.ts +1 -0
- package/src/entities/holiday/holiday.entity.ts +36 -0
- package/src/entities/holiday/index.ts +1 -0
- package/src/entities/index.ts +22 -0
- package/src/entities/indicators/index.ts +1 -0
- package/src/entities/indicators/indicators.entity.ts +157 -0
- package/src/entities/internalReview/index.ts +1 -0
- package/src/entities/internalReview/internalReview.entity.ts +50 -0
- package/src/entities/issuingEntity/index.ts +1 -0
- package/src/entities/issuingEntity/issuingEntity.entity.ts +24 -0
- package/src/entities/mailIntake/index.ts +1 -0
- package/src/entities/mailIntake/mailIntake.entity.ts +55 -0
- package/src/entities/partsOffice/partsOffice.entity.ts +35 -0
- package/src/entities/procedure/procedure.entity.ts +27 -6
- package/src/entities/push/index.ts +1 -0
- package/src/entities/push/push.entity.ts +31 -0
- package/src/entities/registerBook/registerBook.entity.ts +6 -0
- package/src/entities/repositoryExport/index.ts +1 -0
- package/src/entities/repositoryExport/repositoryExport.entity.ts +86 -0
- package/src/entities/retention/index.ts +1 -0
- package/src/entities/retention/retention.entity.ts +53 -0
- package/src/entities/scan/index.ts +1 -0
- package/src/entities/scan/scan.entity.ts +32 -0
- package/src/entities/signatureBatch/index.ts +1 -0
- package/src/entities/signatureBatch/signatureBatch.entity.ts +110 -0
- package/src/entities/signatureCheck/index.ts +1 -0
- package/src/entities/signatureCheck/signatureCheck.entity.ts +63 -0
- package/src/entities/textSnippet/index.ts +1 -0
- package/src/entities/textSnippet/textSnippet.entity.ts +24 -0
- package/src/entities/transparency/index.ts +1 -0
- package/src/entities/transparency/transparency.entity.ts +78 -0
- package/src/entities/visaInitials/index.ts +1 -0
- package/src/entities/visaInitials/visaInitials.entity.ts +12 -0
- package/src/entities/workFolder/index.ts +1 -0
- package/src/entities/workFolder/workFolder.entity.ts +84 -0
- package/tsconfig.json +1 -3
|
@@ -1,13 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
|
+
type CommunicationMeans,
|
|
2
3
|
DocumentAnnulledNumberEntity,
|
|
3
4
|
DocumentAttachmentEntity,
|
|
4
5
|
DocumentDeliveryEntity,
|
|
5
6
|
DocumentEntity,
|
|
6
7
|
DocumentParticipantEntity,
|
|
7
8
|
DocumentRecipientEntity,
|
|
9
|
+
type DocumentStatus,
|
|
8
10
|
DocumentTrackingEntity,
|
|
9
11
|
DocumentTypeEntity,
|
|
10
12
|
} from '../../base/entities';
|
|
13
|
+
import { type RichLetterhead, type RichPage, type RichSpacing, type RichTextStyle } from './richStyle';
|
|
14
|
+
import { type DocumentDraftingRequestEntity } from '../draftingRequest/draftingRequest.entity';
|
|
15
|
+
import { type DocumentStampPlacements } from './stampPlacement';
|
|
11
16
|
|
|
12
17
|
/** Tipo documental de un documento, con lo necesario para citarlo. */
|
|
13
18
|
export interface DocumentTypeSummaryEntity {
|
|
@@ -21,6 +26,8 @@ export interface DocumentParticipantResponseEntity {
|
|
|
21
26
|
id: DocumentParticipantEntity['id'];
|
|
22
27
|
role: DocumentParticipantEntity['role'];
|
|
23
28
|
order: DocumentParticipantEntity['order'];
|
|
29
|
+
/** Los visadores de una misma etapa visan a la vez. */
|
|
30
|
+
stage: DocumentParticipantEntity['stage'];
|
|
24
31
|
status: DocumentParticipantEntity['status'];
|
|
25
32
|
employeeId: DocumentParticipantEntity['employeeId'];
|
|
26
33
|
fullName: DocumentParticipantEntity['fullName'];
|
|
@@ -99,6 +106,14 @@ export interface DocumentDispatchResponseEntity {
|
|
|
99
106
|
returnedAt: string | null;
|
|
100
107
|
returnedByFullName: string | null;
|
|
101
108
|
returnReason: string | null;
|
|
109
|
+
/** Registro por contingencia: salió por otro medio porque no se pudo por DocDigital. */
|
|
110
|
+
contingency: {
|
|
111
|
+
means: CommunicationMeans;
|
|
112
|
+
sentTo: string | null;
|
|
113
|
+
reason: string | null;
|
|
114
|
+
/** Nombre del comprobante, si se adjuntó. */
|
|
115
|
+
receiptName: string | null;
|
|
116
|
+
} | null;
|
|
102
117
|
}
|
|
103
118
|
|
|
104
119
|
export interface DocumentGetAllResponseEntity {
|
|
@@ -121,27 +136,70 @@ export interface DocumentGetAllResponseEntity {
|
|
|
121
136
|
snippet?: string | null;
|
|
122
137
|
// A quién le toca visar o firmar (null si el documento no está en tramitación).
|
|
123
138
|
currentParticipant: Pick<DocumentParticipantResponseEntity, 'role' | 'employeeId' | 'fullName'> | null;
|
|
139
|
+
// Cuántos más tienen el turno a la vez (visación en paralelo).
|
|
140
|
+
otherCurrentCount: number;
|
|
124
141
|
// A cuántos funcionarios llegó y cuántos ya lo abrieron (null si aún no se distribuye a nadie).
|
|
125
142
|
distribution: { total: number; read: number } | null;
|
|
126
143
|
}
|
|
127
144
|
|
|
128
145
|
/** Una entrada de la bandeja de recibidos: la entrega y el documento al que corresponde. */
|
|
146
|
+
/** Semáforo de un plazo pendiente: a tiempo, por vencer (2 días hábiles o menos) o vencido. */
|
|
147
|
+
export type DocumentDueStatus = 'OnTime' | 'DueSoon' | 'Overdue';
|
|
148
|
+
|
|
129
149
|
export interface DocumentInboxItemEntity extends DocumentDeliveryResponseEntity {
|
|
150
|
+
/** Semáforo de lo pendiente con plazo (sin plazo o ya atendido, `null`). */
|
|
151
|
+
dueStatus: DocumentDueStatus | null;
|
|
152
|
+
/** Días hábiles que quedan, sin contar hoy (vencido: `null`). */
|
|
153
|
+
businessDaysLeft: number | null;
|
|
130
154
|
document: DocumentLinkEntity;
|
|
131
155
|
}
|
|
132
156
|
|
|
157
|
+
/**
|
|
158
|
+
* Área responsable de un documento (su unidad emisora): una dirección o un departamento, con su nombre y el de la
|
|
159
|
+
* dirección a que pertenece (en una dirección, el mismo).
|
|
160
|
+
*/
|
|
161
|
+
export interface DocumentResponsibleAreaEntity {
|
|
162
|
+
directorateCodeReference: number | null;
|
|
163
|
+
departmentId: string | null;
|
|
164
|
+
name: string;
|
|
165
|
+
directorateName: string;
|
|
166
|
+
}
|
|
167
|
+
|
|
133
168
|
export interface DocumentGetByIdResponseEntity {
|
|
134
169
|
id: DocumentEntity['id'];
|
|
170
|
+
// Quién lo emite: la entidad emisora del tipo (Educación, Salud, Juzgado) o la municipalidad.
|
|
171
|
+
issuerName: string;
|
|
172
|
+
// Serie documental del Cuadro de Clasificación (la de su tipo documental; MGDDE1_2).
|
|
173
|
+
archivalSeries: { id: string; code: string; name: string } | null;
|
|
174
|
+
// Fin de la restricción de acceso: desde entonces se consulta como público si no tiene datos sensibles.
|
|
175
|
+
restrictionEndsAt: string | null;
|
|
135
176
|
subject: DocumentEntity['subject'];
|
|
177
|
+
/** Resumen breve; va a DocDigital como «descripcion» al despacharlo. */
|
|
178
|
+
description: string | null;
|
|
179
|
+
/** Procedimiento administrativo al que corresponde. */
|
|
180
|
+
procedure: { id: string; name: string; cpatCode: string | null } | null;
|
|
136
181
|
keywords: DocumentEntity['keywords'];
|
|
137
182
|
accessLevel: DocumentEntity['accessLevel'];
|
|
138
183
|
hasSensitiveData: DocumentEntity['hasSensitiveData'];
|
|
184
|
+
/**
|
|
185
|
+
* Formato del archivo vigente: la conformidad PDF/A que declara («PDF/A-2B») o «PDF». `null` si no se revisó (los
|
|
186
|
+
* documentos anteriores a esta revisión, o aún sin firmar).
|
|
187
|
+
*/
|
|
188
|
+
fileFormat: DocumentEntity['fileFormat'];
|
|
139
189
|
status: DocumentEntity['status'];
|
|
140
190
|
correlative: DocumentEntity['correlative'];
|
|
141
191
|
correlativeYear: DocumentEntity['correlativeYear'];
|
|
142
192
|
numberedAt: DocumentEntity['numberedAt'];
|
|
193
|
+
// Número con que llegó el documento, si ya venía numerado: lo toma con la primera firma (y no se pierde si lo
|
|
194
|
+
// rechazan).
|
|
195
|
+
externalCorrelative: DocumentEntity['externalCorrelative'];
|
|
196
|
+
externalCorrelativeYear: DocumentEntity['externalCorrelativeYear'];
|
|
143
197
|
directorateCodeReference: DocumentEntity['directorateCodeReference'];
|
|
144
198
|
departmentId: DocumentEntity['departmentId'];
|
|
199
|
+
// Área responsable con sus nombres, como estaban al guardarlo (sin valor si no se registraron).
|
|
200
|
+
responsibleArea: DocumentResponsibleAreaEntity | null;
|
|
201
|
+
// A pedido de otra área: el área responsable es la de quien lo pidió y no se cambia.
|
|
202
|
+
responsibleAreaFixed: boolean;
|
|
145
203
|
createdByEmployeeId: DocumentEntity['createdByEmployeeId'];
|
|
146
204
|
createdByFullName: DocumentEntity['createdByFullName'];
|
|
147
205
|
originalFileId: DocumentEntity['originalFileId'];
|
|
@@ -168,14 +226,31 @@ export interface DocumentGetByIdResponseEntity {
|
|
|
168
226
|
employeeFullName: DocumentAnnulledNumberEntity['employeeFullName'];
|
|
169
227
|
createdAt: DocumentAnnulledNumberEntity['createdAt'];
|
|
170
228
|
}[];
|
|
171
|
-
// Plazo en que el redactor espera respuesta de los destinatarios
|
|
229
|
+
// Plazo en que el redactor espera respuesta de los destinatarios: una fecha o, mientras no se finaliza, N días
|
|
230
|
+
// hábiles desde que lo reciban (al finalizar queda la fecha en `responseDueAt`).
|
|
172
231
|
responseDueAt: DocumentEntity['responseDueAt'];
|
|
232
|
+
responseDueBusinessDays: number | null;
|
|
173
233
|
// A quién va dirigido, como lo indicó el redactor (personas y áreas).
|
|
174
234
|
recipients: DocumentRecipientResponseEntity[];
|
|
175
235
|
// En la bandeja de quién está: destinatarios y derivaciones, con su lectura y atención.
|
|
176
236
|
deliveries: DocumentDeliveryResponseEntity[];
|
|
177
237
|
// Documento al que este responde, y los que le responden (solo los ya finalizados, más los propios de quien consulta).
|
|
178
238
|
replyTo: DocumentLinkEntity | null;
|
|
239
|
+
/** Lote de firma al que pertenece. */
|
|
240
|
+
batch: { id: string; name: string } | null;
|
|
241
|
+
/** Contenido redactado en el sistema con una plantilla, para volver a editarlo (sin valor si se subió un PDF). */
|
|
242
|
+
composition: DocumentComposition | null;
|
|
243
|
+
/**
|
|
244
|
+
* Revisión del borrador antes de enviarlo a tramitación, si su tipo la exige: qué dirección revisa, las rondas (la
|
|
245
|
+
* más reciente primero) y si la versión vigente ya está aprobada. `null` si el tipo no la exige.
|
|
246
|
+
*/
|
|
247
|
+
draftReview: DocumentDraftReviewInfoEntity | null;
|
|
248
|
+
/** Se subió como validado: no pasó por la revisión del tipo. */
|
|
249
|
+
selfValidation: DocumentSelfValidationEntity | null;
|
|
250
|
+
/** Dónde van las visaciones y las firmas, si quien redacta las ubicó; `null`, las ubica el sistema. */
|
|
251
|
+
stampPlacements: DocumentStampPlacements | null;
|
|
252
|
+
/** Solicitud de redacción que atiende, si se redactó a pedido de otra área. */
|
|
253
|
+
draftingRequest: DocumentDraftingRequestEntity | null;
|
|
179
254
|
replies: DocumentLinkEntity[];
|
|
180
255
|
/** Expedientes en que está incorporado y que quien consulta puede ver. */
|
|
181
256
|
caseFiles: { id: string; code: string; title: string; status: 'Open' | 'Closed' }[];
|
|
@@ -189,7 +264,15 @@ export interface DocumentGetByIdResponseEntity {
|
|
|
189
264
|
/** Instituciones de DocDigital a quienes va dirigido, y su despacho por Oficina de Partes. */
|
|
190
265
|
externalRecipients: DocumentExternalRecipientResponseEntity[];
|
|
191
266
|
dispatch: DocumentDispatchResponseEntity | null;
|
|
267
|
+
// Copias por correo a quienes están fuera del Estado, con su envío y apertura.
|
|
268
|
+
emailCopies: DocumentEmailCopyResponseEntity[];
|
|
269
|
+
// El tipo como estaba en la versión con que se tramita (nombre, sigla y categoría de entonces).
|
|
192
270
|
documentType: DocumentTypeSummaryEntity;
|
|
271
|
+
// Versión del tipo con que se tramita: la vigente mientras es borrador; desde que se envía, queda fija. `null` si
|
|
272
|
+
// el tipo ya no la tiene registrada.
|
|
273
|
+
documentTypeVersion: { version: number; current: boolean } | null;
|
|
274
|
+
/** Cómo se visa: con el sello del sistema o con la firma electrónica desatendida de cada visador (sin OTP). */
|
|
275
|
+
visaMode: DocumentTypeEntity['visaMode'];
|
|
193
276
|
participants: DocumentParticipantResponseEntity[];
|
|
194
277
|
attachments: {
|
|
195
278
|
id: DocumentAttachmentEntity['id'];
|
|
@@ -202,6 +285,8 @@ export interface DocumentGetByIdResponseEntity {
|
|
|
202
285
|
id: DocumentTrackingEntity['id'];
|
|
203
286
|
action: DocumentTrackingEntity['action'];
|
|
204
287
|
observation: DocumentTrackingEntity['observation'];
|
|
288
|
+
// Huella SHA-256 del PDF en ese hecho (firma, despacho o ingreso por DocDigital).
|
|
289
|
+
sha256: DocumentTrackingEntity['sha256'];
|
|
205
290
|
employeeId: DocumentTrackingEntity['employeeId'];
|
|
206
291
|
employeeFullName: DocumentTrackingEntity['employeeFullName'];
|
|
207
292
|
createdAt: DocumentTrackingEntity['createdAt'];
|
|
@@ -219,6 +304,8 @@ export interface DocumentGetByIdResponseEntity {
|
|
|
219
304
|
canReassign: boolean;
|
|
220
305
|
/** Quien consulta redactó el documento (o lo ingresó, si llegó por DocDigital). */
|
|
221
306
|
isAuthor: boolean;
|
|
307
|
+
/** Le toca aprobar o devolver el borrador: es la jefatura de la revisión pendiente. */
|
|
308
|
+
canResolveDraftReview: boolean;
|
|
222
309
|
// Sus propias entregas de este documento (puede tener más de una si además se lo derivaron).
|
|
223
310
|
inbox: DocumentDeliveryResponseEntity[];
|
|
224
311
|
};
|
|
@@ -230,6 +317,12 @@ export interface DocumentGetByIdResponseEntity {
|
|
|
230
317
|
export interface DocumentGetSummaryResponseEntity {
|
|
231
318
|
toVisa: number;
|
|
232
319
|
toSign: number;
|
|
320
|
+
/** Borradores que esperan su revisión (como jefatura de la dirección que los revisa). */
|
|
321
|
+
toReview: number;
|
|
322
|
+
/** Solicitudes de redacción: sin tomar dirigidas a su dirección, y tomadas por él aún sin atender. */
|
|
323
|
+
draftingRequests: { pending: number; taken: number };
|
|
324
|
+
/** Lotes de firma con documentos en su turno (los documentos de un lote no se cuentan en `toVisa` ni `toSign`). */
|
|
325
|
+
batches: { toVisa: number; toSign: number };
|
|
233
326
|
created: {
|
|
234
327
|
drafted: number;
|
|
235
328
|
inProgress: number;
|
|
@@ -252,6 +345,8 @@ export interface DocumentCreateResponseEntity {
|
|
|
252
345
|
export interface DocumentUpdateResponseEntity {
|
|
253
346
|
id: DocumentEntity['id'];
|
|
254
347
|
ok: boolean;
|
|
348
|
+
/** Se envió con el borrador aprobado: el documento oficial quedó en revisión (hay que avisar a quien lo revisa). */
|
|
349
|
+
officialReview?: DocumentDraftReviewResponseEntity;
|
|
255
350
|
}
|
|
256
351
|
|
|
257
352
|
export interface DocumentReviewResponseEntity {
|
|
@@ -260,6 +355,29 @@ export interface DocumentReviewResponseEntity {
|
|
|
260
355
|
status: DocumentEntity['status'];
|
|
261
356
|
}
|
|
262
357
|
|
|
358
|
+
/** Resultado de un documento en una firma de varios documentos. */
|
|
359
|
+
export interface DocumentSignManyResultEntity {
|
|
360
|
+
id: DocumentEntity['id'];
|
|
361
|
+
ok: boolean;
|
|
362
|
+
/** Estado en que quedó, si se firmó. */
|
|
363
|
+
status?: DocumentEntity['status'];
|
|
364
|
+
/** Por qué no se firmó. */
|
|
365
|
+
message?: string;
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
/**
|
|
369
|
+
* Firma de varios documentos con un solo OTP. FirmaGob admite 5 MB por solicitud: los que no cupieron quedan en
|
|
370
|
+
* `remaining`, en el turno del firmante, para firmarlos con un OTP nuevo.
|
|
371
|
+
*/
|
|
372
|
+
export interface DocumentSignManyResponseEntity {
|
|
373
|
+
results: DocumentSignManyResultEntity[];
|
|
374
|
+
signed: number;
|
|
375
|
+
failed: number;
|
|
376
|
+
remaining: DocumentEntity['id'][];
|
|
377
|
+
/** FirmaGob avisó que el OTP venció antes de firmar todos los documentos de la solicitud. */
|
|
378
|
+
otpExpired: boolean;
|
|
379
|
+
}
|
|
380
|
+
|
|
263
381
|
export interface DocumentDiscardResponseEntity {
|
|
264
382
|
id: DocumentEntity['id'];
|
|
265
383
|
ok: boolean;
|
|
@@ -286,6 +404,8 @@ export interface DocumentVerifyResponseEntity {
|
|
|
286
404
|
state: DocumentVerificationState;
|
|
287
405
|
verificationCode: string;
|
|
288
406
|
documentType: Pick<DocumentTypeSummaryEntity, 'name' | 'abbreviation'>;
|
|
407
|
+
// Quién lo emite: la entidad emisora del tipo (Educación, Salud, Juzgado) o la municipalidad.
|
|
408
|
+
issuerName: string;
|
|
289
409
|
correlative: DocumentEntity['correlative'];
|
|
290
410
|
correlativeYear: DocumentEntity['correlativeYear'];
|
|
291
411
|
numberedAt: DocumentEntity['numberedAt'];
|
|
@@ -324,3 +444,346 @@ export interface DocumentReassignResponseEntity {
|
|
|
324
444
|
id: DocumentEntity['id'];
|
|
325
445
|
ok: boolean;
|
|
326
446
|
}
|
|
447
|
+
|
|
448
|
+
/**
|
|
449
|
+
* Un plazo en la agenda de un funcionario: lo que recibió (como destinatario o por derivación) y debe atender, o un
|
|
450
|
+
* documento que envió y del que espera respuesta.
|
|
451
|
+
*/
|
|
452
|
+
export interface DocumentAgendaItemEntity {
|
|
453
|
+
kind: 'Received' | 'Sent';
|
|
454
|
+
/** Semáforo de lo pendiente (atendido o ya respondido por todos: `null`). */
|
|
455
|
+
dueStatus: DocumentDueStatus | null;
|
|
456
|
+
/** Días hábiles que quedan, sin contar hoy (vencido: `null`). */
|
|
457
|
+
businessDaysLeft: number | null;
|
|
458
|
+
/** La entrega (lo recibido) o el documento (lo enviado). */
|
|
459
|
+
id: string;
|
|
460
|
+
documentId: DocumentEntity['id'];
|
|
461
|
+
subject: DocumentEntity['subject'];
|
|
462
|
+
documentType: { name: string; abbreviation: string | null };
|
|
463
|
+
correlative: DocumentEntity['correlative'];
|
|
464
|
+
correlativeYear: DocumentEntity['correlativeYear'];
|
|
465
|
+
intakeNumber: DocumentEntity['intakeNumber'];
|
|
466
|
+
intakeYear: DocumentEntity['intakeYear'];
|
|
467
|
+
/** Plazo, en ISO 8601. */
|
|
468
|
+
dueAt: string;
|
|
469
|
+
/** Lo recibido: cuándo lo marcó como atendido (sin valor si sigue pendiente). */
|
|
470
|
+
closedAt: string | null;
|
|
471
|
+
/** Lo recibido: la providencia y quién lo derivó. */
|
|
472
|
+
instruction: DocumentDeliveryEntity['instruction'] | null;
|
|
473
|
+
sentByFullName: string | null;
|
|
474
|
+
/** Lo enviado: a cuántos les llegó y cuántos aún no lo atienden. */
|
|
475
|
+
recipients: { total: number; pending: number } | null;
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
export interface DocumentAgendaResponseEntity {
|
|
479
|
+
/** Plazos dentro del período pedido. */
|
|
480
|
+
items: DocumentAgendaItemEntity[];
|
|
481
|
+
/** Lo recibido con el plazo vencido y sin atender, de cualquier fecha (los 50 más antiguos). */
|
|
482
|
+
overdue: DocumentAgendaItemEntity[];
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
/** Trazabilidad de un documento en PDF, lista para descargar. */
|
|
486
|
+
export interface DocumentTrailExportEntity {
|
|
487
|
+
fileName: string;
|
|
488
|
+
contentType: string;
|
|
489
|
+
contentBase64: string;
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
/** Plantilla oficial con que se redacta un documento en el sistema. */
|
|
493
|
+
export type DocumentTemplateKind = 'Decree' | 'Office' | 'Memorandum' | 'General';
|
|
494
|
+
|
|
495
|
+
/** Formato de un trozo de texto en el editor del gestor. Superíndice y subíndice no van juntos. */
|
|
496
|
+
export type RichMark = 'bold' | 'italic' | 'underline' | 'strike' | 'superscript' | 'subscript';
|
|
497
|
+
|
|
498
|
+
/**
|
|
499
|
+
* Texto con su formato, o un campo de la plantilla (`field`: su clave), que se reemplaza por su valor al armar el PDF.
|
|
500
|
+
* Un salto de línea dentro del texto (`\n`) es un salto de línea del párrafo.
|
|
501
|
+
*/
|
|
502
|
+
export type RichInline =
|
|
503
|
+
| { text: string; marks?: RichMark[]; style?: RichTextStyle }
|
|
504
|
+
| { field: string; marks?: RichMark[]; style?: RichTextStyle };
|
|
505
|
+
|
|
506
|
+
export type RichAlign = 'left' | 'center' | 'right' | 'justify';
|
|
507
|
+
|
|
508
|
+
/** Numeración de una lista: viñetas, «1.» o la de los decretos, «1.-». */
|
|
509
|
+
export type RichListStyle = 'bullet' | 'decimal' | 'decree';
|
|
510
|
+
|
|
511
|
+
/**
|
|
512
|
+
* Cómo se ve una tabla: con bordes (`grid`), o como las líneas «DE:», «A:», «MAT.:» de un oficio, con la etiqueta en
|
|
513
|
+
* negrita y sin bordes (`labels`, o `labelsRight`, en la mitad derecha, como «ANT.» y «MAT.» de un oficio).
|
|
514
|
+
*/
|
|
515
|
+
export type RichTableVariant = 'grid' | 'labels' | 'labelsRight';
|
|
516
|
+
|
|
517
|
+
/**
|
|
518
|
+
* Un bloque del texto. Los de una plantilla pueden ser fijos (`locked`): quien redacta no los cambia. Las listas son
|
|
519
|
+
* bloques seguidos del mismo estilo (su nivel es la sangría, desde 0); un título o un párrafo reinicia la numeración.
|
|
520
|
+
*/
|
|
521
|
+
export type RichBlock =
|
|
522
|
+
| { id: string; type: 'paragraph'; align?: RichAlign; spacing?: RichSpacing; locked?: boolean; content: RichInline[] }
|
|
523
|
+
| {
|
|
524
|
+
id: string;
|
|
525
|
+
type: 'heading';
|
|
526
|
+
level: 1 | 2;
|
|
527
|
+
align?: RichAlign;
|
|
528
|
+
spacing?: RichSpacing;
|
|
529
|
+
locked?: boolean;
|
|
530
|
+
content: RichInline[];
|
|
531
|
+
}
|
|
532
|
+
| {
|
|
533
|
+
id: string;
|
|
534
|
+
type: 'listItem';
|
|
535
|
+
list: RichListStyle;
|
|
536
|
+
level: number;
|
|
537
|
+
spacing?: RichSpacing;
|
|
538
|
+
locked?: boolean;
|
|
539
|
+
content: RichInline[];
|
|
540
|
+
}
|
|
541
|
+
/** Imagen registrada en el gestor (`imageId`), con su ancho en puntos (sin pasar el del texto) y alineación. */
|
|
542
|
+
| {
|
|
543
|
+
id: string;
|
|
544
|
+
type: 'image';
|
|
545
|
+
imageId: string;
|
|
546
|
+
width: number;
|
|
547
|
+
align?: 'left' | 'center' | 'right';
|
|
548
|
+
caption?: string;
|
|
549
|
+
locked?: boolean;
|
|
550
|
+
}
|
|
551
|
+
/** `rows[fila][columna]`: el contenido de cada celda. */
|
|
552
|
+
| { id: string; type: 'table'; variant: RichTableVariant; locked?: boolean; rows: RichInline[][][] }
|
|
553
|
+
| { id: string; type: 'rule'; locked?: boolean }
|
|
554
|
+
| { id: string; type: 'pageBreak'; locked?: boolean };
|
|
555
|
+
|
|
556
|
+
/**
|
|
557
|
+
* Campo de una plantilla, con el valor que le dio quien redacta. `materia` es el asunto del documento: no se escribe
|
|
558
|
+
* aparte.
|
|
559
|
+
*/
|
|
560
|
+
export interface RichField {
|
|
561
|
+
key: string;
|
|
562
|
+
label: string;
|
|
563
|
+
value: string;
|
|
564
|
+
required?: boolean;
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
/**
|
|
568
|
+
* Contenido de un documento redactado en el sistema. Cada plantilla tiene su estructura; los párrafos son texto
|
|
569
|
+
* (un salto de línea dentro de un párrafo se respeta). La materia es el asunto del documento.
|
|
570
|
+
*/
|
|
571
|
+
export type DocumentComposition =
|
|
572
|
+
| {
|
|
573
|
+
template: 'Decree';
|
|
574
|
+
/** VISTOS: las normas y antecedentes. */
|
|
575
|
+
vistos: string[];
|
|
576
|
+
/** CONSIDERANDO: cada fundamento, numerado. */
|
|
577
|
+
considerando: string[];
|
|
578
|
+
/** DECRETO: cada punto resolutivo, numerado. */
|
|
579
|
+
resolutive: string[];
|
|
580
|
+
/** Fórmula de cierre: «Anótese, comuníquese y archívese». */
|
|
581
|
+
closing: string;
|
|
582
|
+
distribution: string[];
|
|
583
|
+
}
|
|
584
|
+
| {
|
|
585
|
+
template: 'Office';
|
|
586
|
+
/** ANT.: antecedentes (otro oficio, una solicitud). */
|
|
587
|
+
antecedents?: string | null;
|
|
588
|
+
from: string;
|
|
589
|
+
to: string;
|
|
590
|
+
body: string[];
|
|
591
|
+
closing: string;
|
|
592
|
+
distribution: string[];
|
|
593
|
+
}
|
|
594
|
+
| {
|
|
595
|
+
template: 'Memorandum';
|
|
596
|
+
from: string;
|
|
597
|
+
to: string;
|
|
598
|
+
body: string[];
|
|
599
|
+
closing?: string | null;
|
|
600
|
+
distribution: string[];
|
|
601
|
+
}
|
|
602
|
+
| { template: 'General'; title: string; body: string[]; closing?: string | null }
|
|
603
|
+
/**
|
|
604
|
+
* Redactado con el editor del gestor: los bloques del texto, los campos de la plantilla con su valor y la
|
|
605
|
+
* distribución. `templateKey` y `templateVersion`: de qué plantilla salió, si salió de una.
|
|
606
|
+
*/
|
|
607
|
+
| {
|
|
608
|
+
template: 'Rich';
|
|
609
|
+
templateKey?: string | null;
|
|
610
|
+
templateVersion?: number | null;
|
|
611
|
+
blocks: RichBlock[];
|
|
612
|
+
fields: RichField[];
|
|
613
|
+
distribution: string[];
|
|
614
|
+
/** Página y membrete. En una plantilla propia los pone su versión: lo que mande el navegador no cuenta. */
|
|
615
|
+
page?: RichPage;
|
|
616
|
+
letterhead?: RichLetterhead;
|
|
617
|
+
};
|
|
618
|
+
|
|
619
|
+
/** PDF armado con una plantilla: para la vista previa (`contentBase64`) o ya subido (`fileId`). */
|
|
620
|
+
export interface DocumentComposeResponseEntity {
|
|
621
|
+
fileName: string;
|
|
622
|
+
fileId?: string;
|
|
623
|
+
contentBase64?: string;
|
|
624
|
+
}
|
|
625
|
+
|
|
626
|
+
/** Copia por correo de un documento, como la ve quien lo consulta en el gestor. */
|
|
627
|
+
export interface DocumentEmailCopyResponseEntity {
|
|
628
|
+
id: string;
|
|
629
|
+
name: string;
|
|
630
|
+
email: string;
|
|
631
|
+
/** Cuándo se envió (sin valor: aún no corresponde). */
|
|
632
|
+
issuedAt: string | null;
|
|
633
|
+
expiresAt: string | null;
|
|
634
|
+
openedAt: string | null;
|
|
635
|
+
downloadCount: number;
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
/** Copia recién emitida: el gateway le envía el enlace a su destinatario. El token viaja solo aquí. */
|
|
639
|
+
export interface DocumentEmailCopyIssuedEntity {
|
|
640
|
+
copyId: string;
|
|
641
|
+
documentId: string;
|
|
642
|
+
name: string;
|
|
643
|
+
email: string;
|
|
644
|
+
token: string;
|
|
645
|
+
expiresAt: string;
|
|
646
|
+
/** Cómo se cita: «D.E. N° 590/2026», o el tipo si no lleva número. */
|
|
647
|
+
folio: string;
|
|
648
|
+
subject: string;
|
|
649
|
+
issuerName: string;
|
|
650
|
+
}
|
|
651
|
+
|
|
652
|
+
/** El documento como lo ve quien abre su copia por correo. */
|
|
653
|
+
export interface DocumentEmailCopyViewEntity {
|
|
654
|
+
recipientName: string;
|
|
655
|
+
expiresAt: string;
|
|
656
|
+
documentTypeName: string;
|
|
657
|
+
folio: string;
|
|
658
|
+
subject: string;
|
|
659
|
+
issuerName: string;
|
|
660
|
+
finishedAt: string | null;
|
|
661
|
+
verificationCode: string | null;
|
|
662
|
+
signers: { fullName: string; position: string | null; signedAt: string | null }[];
|
|
663
|
+
}
|
|
664
|
+
|
|
665
|
+
/** Recordatorio de un plazo: al recibido y, si venció, también a su jefatura (la resuelve el gateway). */
|
|
666
|
+
export interface DocumentReminderEntity {
|
|
667
|
+
deliveryId: string;
|
|
668
|
+
kind: 'DueSoon' | 'Overdue';
|
|
669
|
+
employeeId: string;
|
|
670
|
+
fullName: string;
|
|
671
|
+
documentId: string;
|
|
672
|
+
/** Cómo se cita: «D.E. N° 590/2026», el folio de ingreso o el tipo. */
|
|
673
|
+
folio: string;
|
|
674
|
+
subject: string;
|
|
675
|
+
dueAt: string;
|
|
676
|
+
instruction: DocumentDeliveryEntity['instruction'];
|
|
677
|
+
sentByFullName: string | null;
|
|
678
|
+
}
|
|
679
|
+
|
|
680
|
+
/** Quien visó, firmó o rechazó una versión, según la trazabilidad. */
|
|
681
|
+
export interface DocumentVersionReviewEntity {
|
|
682
|
+
action: 'Visaed' | 'Signed' | 'Rejected';
|
|
683
|
+
employeeFullName: string;
|
|
684
|
+
createdAt: string;
|
|
685
|
+
}
|
|
686
|
+
|
|
687
|
+
/** Una versión de un documento: lo que se guardó cada vez que cambió su PDF, su texto o su asunto. */
|
|
688
|
+
export interface DocumentVersionResponseEntity {
|
|
689
|
+
number: number;
|
|
690
|
+
subject: string;
|
|
691
|
+
fileName: string;
|
|
692
|
+
sha256: string | null;
|
|
693
|
+
/** Lo redactado con plantilla, para compararla con otra versión. `null` si se subió un PDF. */
|
|
694
|
+
composition: DocumentComposition | null;
|
|
695
|
+
note: string | null;
|
|
696
|
+
status: DocumentStatus;
|
|
697
|
+
/** La guardó la jefatura revisora al corregir el texto; `note` es su justificación. */
|
|
698
|
+
correction: boolean;
|
|
699
|
+
createdByFullName: string;
|
|
700
|
+
createdAt: string;
|
|
701
|
+
/** Visaciones, firmas y rechazos mientras fue la versión vigente. */
|
|
702
|
+
reviews: DocumentVersionReviewEntity[];
|
|
703
|
+
}
|
|
704
|
+
|
|
705
|
+
/** Comentario de redacción de un visador, un firmante o el redactor. */
|
|
706
|
+
export interface DocumentCommentResponseEntity {
|
|
707
|
+
id: string;
|
|
708
|
+
versionNumber: number;
|
|
709
|
+
section: string | null;
|
|
710
|
+
quote: string | null;
|
|
711
|
+
text: string;
|
|
712
|
+
authorEmployeeId: string;
|
|
713
|
+
authorFullName: string;
|
|
714
|
+
/** `Review`: la jefatura que revisa el borrador antes de enviarlo a tramitación. */
|
|
715
|
+
authorRole: 'Author' | 'Visa' | 'Signature' | 'Review';
|
|
716
|
+
createdAt: string;
|
|
717
|
+
resolvedAt: string | null;
|
|
718
|
+
resolvedByFullName: string | null;
|
|
719
|
+
resolutionNote: string | null;
|
|
720
|
+
/** Quien consulta lo puede marcar como resuelto: el redactor o quien lo escribió, mientras el documento se tramita. */
|
|
721
|
+
canResolve: boolean;
|
|
722
|
+
}
|
|
723
|
+
|
|
724
|
+
export interface DocumentCommentsResponseEntity {
|
|
725
|
+
comments: DocumentCommentResponseEntity[];
|
|
726
|
+
/** Quien consulta puede comentar: es el redactor o tiene un turno, y el documento no ha terminado. */
|
|
727
|
+
canComment: boolean;
|
|
728
|
+
currentVersion: number;
|
|
729
|
+
}
|
|
730
|
+
|
|
731
|
+
/** Una ronda de revisión del borrador. */
|
|
732
|
+
export interface DocumentDraftReviewRoundEntity {
|
|
733
|
+
id: string;
|
|
734
|
+
round: number;
|
|
735
|
+
/** Qué se revisó: el borrador (su contenido) o el documento oficial, antes de entrar a tramitación. */
|
|
736
|
+
stage: 'Draft' | 'Official';
|
|
737
|
+
/** Versión del borrador que se revisó. */
|
|
738
|
+
versionNumber: number;
|
|
739
|
+
directorateName: string;
|
|
740
|
+
reviewerEmployeeId: string;
|
|
741
|
+
reviewerFullName: string;
|
|
742
|
+
requestedByFullName: string;
|
|
743
|
+
requestedAt: string;
|
|
744
|
+
status: 'Pending' | 'Approved' | 'Rejected' | 'Cancelled';
|
|
745
|
+
observation: string | null;
|
|
746
|
+
resolvedAt: string | null;
|
|
747
|
+
}
|
|
748
|
+
|
|
749
|
+
/** La revisión del borrador que exige el tipo documental. */
|
|
750
|
+
export interface DocumentDraftReviewInfoEntity {
|
|
751
|
+
directorateCodeReference: number;
|
|
752
|
+
directorateName: string;
|
|
753
|
+
rounds: DocumentDraftReviewRoundEntity[];
|
|
754
|
+
/**
|
|
755
|
+
* La versión vigente del borrador está aprobada: quien redacta completa visación, firma y destinatarios y lo envía,
|
|
756
|
+
* y el documento oficial va a revisión de quien aprobó el borrador.
|
|
757
|
+
*/
|
|
758
|
+
approved: boolean;
|
|
759
|
+
/** Hay una ronda esperando respuesta: el borrador no se edita mientras tanto. */
|
|
760
|
+
pending: boolean;
|
|
761
|
+
/** Qué espera la ronda pendiente, si la hay. */
|
|
762
|
+
pendingStage: DocumentDraftReviewRoundEntity['stage'] | null;
|
|
763
|
+
}
|
|
764
|
+
|
|
765
|
+
/** PDF subido que quien redacta declaró validado, con su justificación: se saltó la revisión que exige el tipo. */
|
|
766
|
+
export interface DocumentSelfValidationEntity {
|
|
767
|
+
note: string;
|
|
768
|
+
}
|
|
769
|
+
|
|
770
|
+
/** Resultado de pedir, resolver o retirar una revisión del borrador. */
|
|
771
|
+
export interface DocumentDraftReviewResponseEntity {
|
|
772
|
+
id: string;
|
|
773
|
+
ok: boolean;
|
|
774
|
+
round: number;
|
|
775
|
+
stage: DocumentDraftReviewRoundEntity['stage'];
|
|
776
|
+
status: DocumentDraftReviewRoundEntity['status'];
|
|
777
|
+
/** A quién avisar: la jefatura revisora (al pedirla) o el redactor (al resolverla). */
|
|
778
|
+
notify: { employeeId: string; fullName: string } | null;
|
|
779
|
+
/** Al aprobar el oficial, el documento entró a tramitación: hay que avisar a quien tiene el primer turno. */
|
|
780
|
+
submitted?: boolean;
|
|
781
|
+
}
|
|
782
|
+
|
|
783
|
+
/** Resultado de la corrección de la jefatura revisora: la versión nueva y a quién avisar (quien redacta). */
|
|
784
|
+
export interface DocumentDraftCorrectionResponseEntity {
|
|
785
|
+
id: string;
|
|
786
|
+
ok: boolean;
|
|
787
|
+
versionNumber: number;
|
|
788
|
+
notify: { employeeId: string; fullName: string } | null;
|
|
789
|
+
}
|