@muni-sanfer/types-gestor-documental 0.0.1-beta.1 → 0.0.1-beta.10
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 +435 -1
- package/dist/base/entities.js +98 -1
- package/dist/contracts/caseFile.contract.d.ts +159 -0
- package/dist/contracts/caseFile.contract.js +18 -0
- package/dist/contracts/document.contract.d.ts +141 -3
- package/dist/contracts/document.contract.js +7 -0
- package/dist/contracts/documentType.contract.d.ts +18 -1
- package/dist/contracts/index.d.ts +83 -1
- package/dist/contracts/index.js +18 -0
- package/dist/contracts/partsOffice.contract.d.ts +171 -0
- package/dist/contracts/partsOffice.contract.js +22 -0
- package/dist/contracts/procedure.contract.d.ts +50 -0
- package/dist/contracts/procedure.contract.js +11 -0
- package/dist/contracts/registerBook.contract.d.ts +27 -0
- package/dist/contracts/registerBook.contract.js +8 -0
- package/dist/contracts/signatureBatch.contract.d.ts +109 -0
- package/dist/contracts/signatureBatch.contract.js +12 -0
- package/dist/contracts/workFolder.contract.d.ts +114 -0
- package/dist/contracts/workFolder.contract.js +16 -0
- package/dist/entities/caseFile/caseFile.entity.d.ts +176 -0
- package/dist/entities/caseFile/caseFile.entity.js +2 -0
- package/dist/entities/caseFile/index.d.ts +1 -0
- package/dist/entities/caseFile/index.js +17 -0
- package/dist/entities/document/document.entity.d.ts +201 -1
- package/dist/entities/documentType/documentType.entity.d.ts +18 -1
- package/dist/entities/index.d.ts +6 -0
- package/dist/entities/index.js +6 -0
- package/dist/entities/partsOffice/index.d.ts +1 -0
- package/dist/entities/partsOffice/index.js +17 -0
- package/dist/entities/partsOffice/partsOffice.entity.d.ts +98 -0
- package/dist/entities/partsOffice/partsOffice.entity.js +2 -0
- package/dist/entities/procedure/index.d.ts +1 -0
- package/dist/entities/procedure/index.js +17 -0
- package/dist/entities/procedure/procedure.entity.d.ts +20 -0
- package/dist/entities/procedure/procedure.entity.js +2 -0
- package/dist/entities/registerBook/index.d.ts +1 -0
- package/dist/entities/registerBook/index.js +17 -0
- package/dist/entities/registerBook/registerBook.entity.d.ts +42 -0
- package/dist/entities/registerBook/registerBook.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/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 +508 -1
- package/src/contracts/caseFile.contract.ts +141 -0
- package/src/contracts/document.contract.ts +130 -0
- package/src/contracts/documentType.contract.ts +14 -1
- package/src/contracts/index.ts +26 -1
- package/src/contracts/partsOffice.contract.ts +120 -0
- package/src/contracts/procedure.contract.ts +53 -0
- package/src/contracts/registerBook.contract.ts +24 -0
- package/src/contracts/signatureBatch.contract.ts +96 -0
- package/src/contracts/workFolder.contract.ts +75 -0
- package/src/entities/caseFile/caseFile.entity.ts +204 -0
- package/src/entities/caseFile/index.ts +1 -0
- package/src/entities/document/document.entity.ts +210 -0
- package/src/entities/documentType/documentType.entity.ts +20 -1
- package/src/entities/index.ts +6 -0
- package/src/entities/partsOffice/index.ts +1 -0
- package/src/entities/partsOffice/partsOffice.entity.ts +103 -0
- package/src/entities/procedure/index.ts +1 -0
- package/src/entities/procedure/procedure.entity.ts +24 -0
- package/src/entities/registerBook/index.ts +1 -0
- package/src/entities/registerBook/registerBook.entity.ts +46 -0
- package/src/entities/signatureBatch/index.ts +1 -0
- package/src/entities/signatureBatch/signatureBatch.entity.ts +110 -0
- package/src/entities/workFolder/index.ts +1 -0
- package/src/entities/workFolder/workFolder.entity.ts +84 -0
- package/tsconfig.json +1 -3
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
import {
|
|
2
|
+
CaseFileAccessEntity,
|
|
3
|
+
CaseFileActorEntity,
|
|
4
|
+
CaseFileEntity,
|
|
5
|
+
CaseFileEntryEntity,
|
|
6
|
+
CaseFileMetadataChangeEntity,
|
|
7
|
+
CaseFileParticipantEntity,
|
|
8
|
+
CaseFileTrackingEntity,
|
|
9
|
+
DocumentEntity,
|
|
10
|
+
ProcedureEntity,
|
|
11
|
+
} from '../../base/entities';
|
|
12
|
+
import { DocumentTypeSummaryEntity } from '../document';
|
|
13
|
+
|
|
14
|
+
/** Expediente al que se hace referencia desde otro lado: cómo se cita y en qué estado está. */
|
|
15
|
+
export interface CaseFileLinkEntity {
|
|
16
|
+
id: CaseFileEntity['id'];
|
|
17
|
+
code: CaseFileEntity['code'];
|
|
18
|
+
title: CaseFileEntity['title'];
|
|
19
|
+
status: CaseFileEntity['status'];
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface CaseFileGetAllResponseEntity extends CaseFileLinkEntity {
|
|
23
|
+
subject: CaseFileEntity['subject'];
|
|
24
|
+
accessLevel: CaseFileEntity['accessLevel'];
|
|
25
|
+
hasSensitiveData: CaseFileEntity['hasSensitiveData'];
|
|
26
|
+
procedure: Pick<ProcedureEntity, 'id' | 'name'>;
|
|
27
|
+
responsibleEmployeeId: CaseFileEntity['responsibleEmployeeId'];
|
|
28
|
+
responsibleFullName: CaseFileEntity['responsibleFullName'];
|
|
29
|
+
/** Actuaciones vigentes del índice (las que quedaron sin efecto no cuentan). */
|
|
30
|
+
entries: number;
|
|
31
|
+
participants: number;
|
|
32
|
+
createdAt: CaseFileEntity['createdAt'];
|
|
33
|
+
closedAt: CaseFileEntity['closedAt'];
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/** Documento del gestor incorporado al expediente. */
|
|
37
|
+
export interface CaseFileEntryDocumentEntity {
|
|
38
|
+
id: DocumentEntity['id'];
|
|
39
|
+
subject: DocumentEntity['subject'];
|
|
40
|
+
status: DocumentEntity['status'];
|
|
41
|
+
correlative: DocumentEntity['correlative'];
|
|
42
|
+
correlativeYear: DocumentEntity['correlativeYear'];
|
|
43
|
+
documentType: DocumentTypeSummaryEntity;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/** Entrada del índice electrónico: una actuación, en su orden de incorporación. */
|
|
47
|
+
export interface CaseFileEntryResponseEntity {
|
|
48
|
+
id: CaseFileEntryEntity['id'];
|
|
49
|
+
sequence: CaseFileEntryEntity['sequence'];
|
|
50
|
+
kind: CaseFileEntryEntity['kind'];
|
|
51
|
+
actuationType: CaseFileEntryEntity['actuationType'];
|
|
52
|
+
title: CaseFileEntryEntity['title'];
|
|
53
|
+
document: CaseFileEntryDocumentEntity | null;
|
|
54
|
+
fileName: CaseFileEntryEntity['fileName'];
|
|
55
|
+
documentTypeName: CaseFileEntryEntity['documentTypeName'];
|
|
56
|
+
originDate: CaseFileEntryEntity['originDate'];
|
|
57
|
+
author: CaseFileEntryEntity['author'];
|
|
58
|
+
keywords: CaseFileEntryEntity['keywords'];
|
|
59
|
+
accessLevel: CaseFileEntryEntity['accessLevel'];
|
|
60
|
+
hasSensitiveData: CaseFileEntryEntity['hasSensitiveData'];
|
|
61
|
+
linkedCaseFile: CaseFileLinkEntity | null;
|
|
62
|
+
/** `true` si la entrada tiene un archivo que se puede abrir (un documento o un archivo subido). */
|
|
63
|
+
hasFile: boolean;
|
|
64
|
+
sha256: CaseFileEntryEntity['sha256'];
|
|
65
|
+
size: CaseFileEntryEntity['size'];
|
|
66
|
+
hasAdvancedSignature: CaseFileEntryEntity['hasAdvancedSignature'];
|
|
67
|
+
incorporatedByEmployeeId: CaseFileEntryEntity['incorporatedByEmployeeId'];
|
|
68
|
+
incorporatedByFullName: CaseFileEntryEntity['incorporatedByFullName'];
|
|
69
|
+
createdAt: CaseFileEntryEntity['createdAt'];
|
|
70
|
+
voidedAt: CaseFileEntryEntity['voidedAt'];
|
|
71
|
+
voidedByFullName: CaseFileEntryEntity['voidedByFullName'];
|
|
72
|
+
voidReason: CaseFileEntryEntity['voidReason'];
|
|
73
|
+
/** `true` si quien consulta puede dejarla sin efecto: el responsable o quien la incorporó, con el expediente abierto. */
|
|
74
|
+
canVoid: boolean;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export interface CaseFileParticipantResponseEntity {
|
|
78
|
+
id: CaseFileParticipantEntity['id'];
|
|
79
|
+
employeeId: CaseFileParticipantEntity['employeeId'];
|
|
80
|
+
fullName: CaseFileParticipantEntity['fullName'];
|
|
81
|
+
position: CaseFileParticipantEntity['position'];
|
|
82
|
+
addedByFullName: CaseFileParticipantEntity['addedByFullName'];
|
|
83
|
+
createdAt: CaseFileParticipantEntity['createdAt'];
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export interface CaseFileActorResponseEntity {
|
|
87
|
+
id: CaseFileActorEntity['id'];
|
|
88
|
+
relation: CaseFileActorEntity['relation'];
|
|
89
|
+
actorType: CaseFileActorEntity['actorType'];
|
|
90
|
+
identifier: CaseFileActorEntity['identifier'];
|
|
91
|
+
name: CaseFileActorEntity['name'];
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export interface CaseFileTrackingResponseEntity {
|
|
95
|
+
id: CaseFileTrackingEntity['id'];
|
|
96
|
+
action: CaseFileTrackingEntity['action'];
|
|
97
|
+
observation: CaseFileTrackingEntity['observation'];
|
|
98
|
+
employeeFullName: CaseFileTrackingEntity['employeeFullName'];
|
|
99
|
+
createdAt: CaseFileTrackingEntity['createdAt'];
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export interface CaseFileMetadataChangeResponseEntity {
|
|
103
|
+
id: CaseFileMetadataChangeEntity['id'];
|
|
104
|
+
/** Código oficial del metadato. Ej: `MGDEE1_5`. */
|
|
105
|
+
field: CaseFileMetadataChangeEntity['field'];
|
|
106
|
+
previousValue: CaseFileMetadataChangeEntity['previousValue'];
|
|
107
|
+
newValue: CaseFileMetadataChangeEntity['newValue'];
|
|
108
|
+
employeeFullName: CaseFileMetadataChangeEntity['employeeFullName'];
|
|
109
|
+
createdAt: CaseFileMetadataChangeEntity['createdAt'];
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
export interface CaseFileAccessResponseEntity {
|
|
113
|
+
id: CaseFileAccessEntity['id'];
|
|
114
|
+
action: CaseFileAccessEntity['action'];
|
|
115
|
+
entryId: CaseFileAccessEntity['entryId'];
|
|
116
|
+
/** Título del documento que se abrió, si el acceso fue a uno. */
|
|
117
|
+
entryTitle: string | null;
|
|
118
|
+
employeeFullName: CaseFileAccessEntity['employeeFullName'];
|
|
119
|
+
createdAt: CaseFileAccessEntity['createdAt'];
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
export interface CaseFileGetByIdResponseEntity extends CaseFileGetAllResponseEntity {
|
|
123
|
+
summary: CaseFileEntity['summary'];
|
|
124
|
+
procedure: Pick<ProcedureEntity, 'id' | 'name' | 'cpatId' | 'cpatCode'>;
|
|
125
|
+
responsiblePosition: CaseFileEntity['responsiblePosition'];
|
|
126
|
+
incorporationMechanism: CaseFileEntity['incorporationMechanism'];
|
|
127
|
+
schemaVersion: CaseFileEntity['schemaVersion'];
|
|
128
|
+
/** Enlace persistente del expediente (MGDEE4_2). `null` si el servicio no tiene configurada la dirección. */
|
|
129
|
+
uri: string | null;
|
|
130
|
+
closedByFullName: CaseFileEntity['closedByFullName'];
|
|
131
|
+
closingNote: CaseFileEntity['closingNote'];
|
|
132
|
+
index: CaseFileEntryResponseEntity[];
|
|
133
|
+
sharedWith: CaseFileParticipantResponseEntity[];
|
|
134
|
+
actors: CaseFileActorResponseEntity[];
|
|
135
|
+
trackings: CaseFileTrackingResponseEntity[];
|
|
136
|
+
metadataChanges: CaseFileMetadataChangeResponseEntity[];
|
|
137
|
+
/** Registro de accesos. Solo lo recibe el responsable y quien puede ver todos los expedientes. */
|
|
138
|
+
accesses: CaseFileAccessResponseEntity[];
|
|
139
|
+
/** Qué puede hacer con el expediente quien lo consulta. Sin `actor` en la consulta, no viene. */
|
|
140
|
+
actorCapabilities?: {
|
|
141
|
+
isResponsible: boolean;
|
|
142
|
+
/** Editar sus metadatos y cerrarlo: el responsable, mientras esté abierto. */
|
|
143
|
+
canEdit: boolean;
|
|
144
|
+
/** Incorporar actuaciones: el responsable y aquellos con quienes se compartió, mientras esté abierto. */
|
|
145
|
+
canIncorporate: boolean;
|
|
146
|
+
/** Compartirlo con otros funcionarios: el responsable, también después de cerrado. */
|
|
147
|
+
canShare: boolean;
|
|
148
|
+
};
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
export interface CaseFileCreateResponseEntity {
|
|
152
|
+
id: CaseFileEntity['id'];
|
|
153
|
+
code: CaseFileEntity['code'];
|
|
154
|
+
ok: boolean;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
export interface CaseFileUpdateResponseEntity {
|
|
158
|
+
id: CaseFileEntity['id'];
|
|
159
|
+
ok: boolean;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
/** Lote incorporado: cuántos documentos entraron y cuántos se omitieron (ya estaban, o no finalizados). */
|
|
163
|
+
export interface CaseFileAddBatchResponseEntity {
|
|
164
|
+
id: CaseFileEntity['id'];
|
|
165
|
+
added: number;
|
|
166
|
+
skipped: number;
|
|
167
|
+
ok: boolean;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
export interface CaseFileAddEntryResponseEntity {
|
|
171
|
+
id: CaseFileEntity['id'];
|
|
172
|
+
entryId: CaseFileEntryEntity['id'];
|
|
173
|
+
sequence: CaseFileEntryEntity['sequence'];
|
|
174
|
+
ok: boolean;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
/** Archivo de una entrada del índice, para servirlo a quien puede ver el expediente. */
|
|
178
|
+
export interface CaseFileEntryFileResponseEntity {
|
|
179
|
+
fileId: string;
|
|
180
|
+
fileName: string;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
/** Archivo que va dentro del expediente exportado, con la huella que tenía al incorporarse. */
|
|
184
|
+
export interface CaseFileExportFileEntity {
|
|
185
|
+
entryId: CaseFileEntryEntity['id'];
|
|
186
|
+
sequence: CaseFileEntryEntity['sequence'];
|
|
187
|
+
/** Ruta dentro del ZIP. Ej: `documentos/001-decreto-alcaldicio-exento-590-2026.pdf`. */
|
|
188
|
+
path: string;
|
|
189
|
+
fileId: string;
|
|
190
|
+
sha256: string | null;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* Expediente listo para exportar: los metadatos con sus códigos oficiales (va tal cual como `expediente.json`) y los
|
|
195
|
+
* archivos que hay que agregar. El ZIP lo arma el gateway.
|
|
196
|
+
*/
|
|
197
|
+
export interface CaseFileExportResponseEntity {
|
|
198
|
+
code: CaseFileEntity['code'];
|
|
199
|
+
manifest: Record<string, unknown>;
|
|
200
|
+
files: CaseFileExportFileEntity[];
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
/** Expediente en que está incorporado un documento, visto desde el documento. */
|
|
204
|
+
export type DocumentCaseFileEntity = CaseFileLinkEntity;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './caseFile.entity';
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DocumentAnnulledNumberEntity,
|
|
3
3
|
DocumentAttachmentEntity,
|
|
4
|
+
DocumentDeliveryEntity,
|
|
4
5
|
DocumentEntity,
|
|
5
6
|
DocumentParticipantEntity,
|
|
7
|
+
DocumentRecipientEntity,
|
|
6
8
|
DocumentTrackingEntity,
|
|
7
9
|
DocumentTypeEntity,
|
|
8
10
|
} from '../../base/entities';
|
|
@@ -19,6 +21,8 @@ export interface DocumentParticipantResponseEntity {
|
|
|
19
21
|
id: DocumentParticipantEntity['id'];
|
|
20
22
|
role: DocumentParticipantEntity['role'];
|
|
21
23
|
order: DocumentParticipantEntity['order'];
|
|
24
|
+
/** Los visadores de una misma etapa visan a la vez. */
|
|
25
|
+
stage: DocumentParticipantEntity['stage'];
|
|
22
26
|
status: DocumentParticipantEntity['status'];
|
|
23
27
|
employeeId: DocumentParticipantEntity['employeeId'];
|
|
24
28
|
fullName: DocumentParticipantEntity['fullName'];
|
|
@@ -27,6 +31,78 @@ export interface DocumentParticipantResponseEntity {
|
|
|
27
31
|
resolvedAt: DocumentParticipantEntity['resolvedAt'];
|
|
28
32
|
}
|
|
29
33
|
|
|
34
|
+
/** Destinatario de un documento, como lo eligió el redactor: una persona o un área completa. */
|
|
35
|
+
export interface DocumentRecipientResponseEntity {
|
|
36
|
+
id: DocumentRecipientEntity['id'];
|
|
37
|
+
type: DocumentRecipientEntity['type'];
|
|
38
|
+
employeeId: DocumentRecipientEntity['employeeId'];
|
|
39
|
+
directorateCodeReference: DocumentRecipientEntity['directorateCodeReference'];
|
|
40
|
+
departmentId: DocumentRecipientEntity['departmentId'];
|
|
41
|
+
name: DocumentRecipientEntity['name'];
|
|
42
|
+
position: DocumentRecipientEntity['position'];
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/** Un documento en la bandeja de un funcionario: como destinatario o porque se lo derivaron. */
|
|
46
|
+
export interface DocumentDeliveryResponseEntity {
|
|
47
|
+
id: DocumentDeliveryEntity['id'];
|
|
48
|
+
origin: DocumentDeliveryEntity['origin'];
|
|
49
|
+
employeeId: DocumentDeliveryEntity['employeeId'];
|
|
50
|
+
fullName: DocumentDeliveryEntity['fullName'];
|
|
51
|
+
position: DocumentDeliveryEntity['position'];
|
|
52
|
+
// Área por la que le llegó, si el documento iba dirigido a un área.
|
|
53
|
+
areaName: DocumentDeliveryEntity['areaName'];
|
|
54
|
+
// Quién se lo derivó. Null si es uno de los destinatarios originales.
|
|
55
|
+
sentByEmployeeId: DocumentDeliveryEntity['sentByEmployeeId'];
|
|
56
|
+
sentByFullName: DocumentDeliveryEntity['sentByFullName'];
|
|
57
|
+
instruction: DocumentDeliveryEntity['instruction'];
|
|
58
|
+
note: DocumentDeliveryEntity['note'];
|
|
59
|
+
dueAt: DocumentDeliveryEntity['dueAt'];
|
|
60
|
+
// Null mientras el documento no termina su tramitación.
|
|
61
|
+
deliveredAt: DocumentDeliveryEntity['deliveredAt'];
|
|
62
|
+
readAt: DocumentDeliveryEntity['readAt'];
|
|
63
|
+
closedAt: DocumentDeliveryEntity['closedAt'];
|
|
64
|
+
closingNote: DocumentDeliveryEntity['closingNote'];
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/** Lo necesario para citar otro documento y enlazarlo (el que se responde, o las respuestas). */
|
|
68
|
+
export interface DocumentLinkEntity {
|
|
69
|
+
id: DocumentEntity['id'];
|
|
70
|
+
subject: DocumentEntity['subject'];
|
|
71
|
+
status: DocumentEntity['status'];
|
|
72
|
+
correlative: DocumentEntity['correlative'];
|
|
73
|
+
correlativeYear: DocumentEntity['correlativeYear'];
|
|
74
|
+
createdByFullName: DocumentEntity['createdByFullName'];
|
|
75
|
+
finishedAt: DocumentEntity['finishedAt'];
|
|
76
|
+
documentType: DocumentTypeSummaryEntity;
|
|
77
|
+
/** Folio de ingreso de Oficina de Partes, si llegó por DocDigital. */
|
|
78
|
+
intakeNumber: DocumentEntity['intakeNumber'];
|
|
79
|
+
intakeYear: DocumentEntity['intakeYear'];
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/** Institución (y usuario) de DocDigital a la que va dirigido un documento. */
|
|
83
|
+
export interface DocumentExternalRecipientResponseEntity {
|
|
84
|
+
id: string;
|
|
85
|
+
entityId: number;
|
|
86
|
+
entityName: string;
|
|
87
|
+
userId: number | null;
|
|
88
|
+
userName: string | null;
|
|
89
|
+
userPosition: string | null;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/** Despacho de un documento por DocDigital. */
|
|
93
|
+
export interface DocumentDispatchResponseEntity {
|
|
94
|
+
id: string;
|
|
95
|
+
status: 'Pending' | 'Dispatched' | 'Returned';
|
|
96
|
+
folio: string | null;
|
|
97
|
+
docDigitalTypeName: string | null;
|
|
98
|
+
docDigitalDocumentId: string | null;
|
|
99
|
+
dispatchedAt: string | null;
|
|
100
|
+
dispatchedByFullName: string | null;
|
|
101
|
+
returnedAt: string | null;
|
|
102
|
+
returnedByFullName: string | null;
|
|
103
|
+
returnReason: string | null;
|
|
104
|
+
}
|
|
105
|
+
|
|
30
106
|
export interface DocumentGetAllResponseEntity {
|
|
31
107
|
id: DocumentEntity['id'];
|
|
32
108
|
subject: DocumentEntity['subject'];
|
|
@@ -40,8 +116,22 @@ export interface DocumentGetAllResponseEntity {
|
|
|
40
116
|
createdByEmployeeId: DocumentEntity['createdByEmployeeId'];
|
|
41
117
|
createdByFullName: DocumentEntity['createdByFullName'];
|
|
42
118
|
documentType: DocumentTypeSummaryEntity;
|
|
119
|
+
intakeNumber: DocumentEntity['intakeNumber'];
|
|
120
|
+
intakeYear: DocumentEntity['intakeYear'];
|
|
121
|
+
origin: DocumentEntity['origin'];
|
|
122
|
+
/** Con búsqueda de texto completo: el fragmento donde aparece lo buscado, con lo encontrado entre ⟦ y ⟧. */
|
|
123
|
+
snippet?: string | null;
|
|
43
124
|
// A quién le toca visar o firmar (null si el documento no está en tramitación).
|
|
44
125
|
currentParticipant: Pick<DocumentParticipantResponseEntity, 'role' | 'employeeId' | 'fullName'> | null;
|
|
126
|
+
// Cuántos más tienen el turno a la vez (visación en paralelo).
|
|
127
|
+
otherCurrentCount: number;
|
|
128
|
+
// A cuántos funcionarios llegó y cuántos ya lo abrieron (null si aún no se distribuye a nadie).
|
|
129
|
+
distribution: { total: number; read: number } | null;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/** Una entrada de la bandeja de recibidos: la entrega y el documento al que corresponde. */
|
|
133
|
+
export interface DocumentInboxItemEntity extends DocumentDeliveryResponseEntity {
|
|
134
|
+
document: DocumentLinkEntity;
|
|
45
135
|
}
|
|
46
136
|
|
|
47
137
|
export interface DocumentGetByIdResponseEntity {
|
|
@@ -82,6 +172,29 @@ export interface DocumentGetByIdResponseEntity {
|
|
|
82
172
|
employeeFullName: DocumentAnnulledNumberEntity['employeeFullName'];
|
|
83
173
|
createdAt: DocumentAnnulledNumberEntity['createdAt'];
|
|
84
174
|
}[];
|
|
175
|
+
// Plazo en que el redactor espera respuesta de los destinatarios.
|
|
176
|
+
responseDueAt: DocumentEntity['responseDueAt'];
|
|
177
|
+
// A quién va dirigido, como lo indicó el redactor (personas y áreas).
|
|
178
|
+
recipients: DocumentRecipientResponseEntity[];
|
|
179
|
+
// En la bandeja de quién está: destinatarios y derivaciones, con su lectura y atención.
|
|
180
|
+
deliveries: DocumentDeliveryResponseEntity[];
|
|
181
|
+
// Documento al que este responde, y los que le responden (solo los ya finalizados, más los propios de quien consulta).
|
|
182
|
+
replyTo: DocumentLinkEntity | null;
|
|
183
|
+
/** Lote de firma al que pertenece. */
|
|
184
|
+
batch: { id: string; name: string } | null;
|
|
185
|
+
replies: DocumentLinkEntity[];
|
|
186
|
+
/** Expedientes en que está incorporado y que quien consulta puede ver. */
|
|
187
|
+
caseFiles: { id: string; code: string; title: string; status: 'Open' | 'Closed' }[];
|
|
188
|
+
/** De dónde viene: del gestor o recibido por DocDigital, con su folio de ingreso y los datos de quien lo envió. */
|
|
189
|
+
origin: DocumentEntity['origin'];
|
|
190
|
+
intakeNumber: DocumentEntity['intakeNumber'];
|
|
191
|
+
intakeYear: DocumentEntity['intakeYear'];
|
|
192
|
+
externalFolio: DocumentEntity['externalFolio'];
|
|
193
|
+
externalSender: DocumentEntity['externalSender'];
|
|
194
|
+
externalDate: DocumentEntity['externalDate'];
|
|
195
|
+
/** Instituciones de DocDigital a quienes va dirigido, y su despacho por Oficina de Partes. */
|
|
196
|
+
externalRecipients: DocumentExternalRecipientResponseEntity[];
|
|
197
|
+
dispatch: DocumentDispatchResponseEntity | null;
|
|
85
198
|
documentType: DocumentTypeSummaryEntity;
|
|
86
199
|
participants: DocumentParticipantResponseEntity[];
|
|
87
200
|
attachments: {
|
|
@@ -105,6 +218,15 @@ export interface DocumentGetByIdResponseEntity {
|
|
|
105
218
|
turn: Pick<DocumentParticipantResponseEntity, 'id' | 'role'> | null;
|
|
106
219
|
canEdit: boolean;
|
|
107
220
|
canDiscard: boolean;
|
|
221
|
+
// Puede derivarlo a otros funcionarios y responderlo: el documento ya es oficial y está a su alcance.
|
|
222
|
+
canDerive: boolean;
|
|
223
|
+
canReply: boolean;
|
|
224
|
+
// Es quien redactó un documento en tramitación: puede pasar un turno pendiente a otro funcionario.
|
|
225
|
+
canReassign: boolean;
|
|
226
|
+
/** Quien consulta redactó el documento (o lo ingresó, si llegó por DocDigital). */
|
|
227
|
+
isAuthor: boolean;
|
|
228
|
+
// Sus propias entregas de este documento (puede tener más de una si además se lo derivaron).
|
|
229
|
+
inbox: DocumentDeliveryResponseEntity[];
|
|
108
230
|
};
|
|
109
231
|
// Firmar exige el código OTP de quien firma (firma atendida).
|
|
110
232
|
signatureRequiresOtp: boolean;
|
|
@@ -114,12 +236,20 @@ export interface DocumentGetByIdResponseEntity {
|
|
|
114
236
|
export interface DocumentGetSummaryResponseEntity {
|
|
115
237
|
toVisa: number;
|
|
116
238
|
toSign: number;
|
|
239
|
+
/** Lotes de firma con documentos en su turno (los documentos de un lote no se cuentan en `toVisa` ni `toSign`). */
|
|
240
|
+
batches: { toVisa: number; toSign: number };
|
|
117
241
|
created: {
|
|
118
242
|
drafted: number;
|
|
119
243
|
inProgress: number;
|
|
120
244
|
rejected: number;
|
|
121
245
|
finished: number;
|
|
122
246
|
};
|
|
247
|
+
// Su bandeja de recibidos: sin abrir, sin atender y, de estos, con el plazo vencido.
|
|
248
|
+
received: {
|
|
249
|
+
unread: number;
|
|
250
|
+
pending: number;
|
|
251
|
+
overdue: number;
|
|
252
|
+
};
|
|
123
253
|
}
|
|
124
254
|
|
|
125
255
|
export interface DocumentCreateResponseEntity {
|
|
@@ -138,6 +268,29 @@ export interface DocumentReviewResponseEntity {
|
|
|
138
268
|
status: DocumentEntity['status'];
|
|
139
269
|
}
|
|
140
270
|
|
|
271
|
+
/** Resultado de un documento en una firma de varios documentos. */
|
|
272
|
+
export interface DocumentSignManyResultEntity {
|
|
273
|
+
id: DocumentEntity['id'];
|
|
274
|
+
ok: boolean;
|
|
275
|
+
/** Estado en que quedó, si se firmó. */
|
|
276
|
+
status?: DocumentEntity['status'];
|
|
277
|
+
/** Por qué no se firmó. */
|
|
278
|
+
message?: string;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
/**
|
|
282
|
+
* Firma de varios documentos con un solo OTP. FirmaGob admite 5 MB por solicitud: los que no cupieron quedan en
|
|
283
|
+
* `remaining`, en el turno del firmante, para firmarlos con un OTP nuevo.
|
|
284
|
+
*/
|
|
285
|
+
export interface DocumentSignManyResponseEntity {
|
|
286
|
+
results: DocumentSignManyResultEntity[];
|
|
287
|
+
signed: number;
|
|
288
|
+
failed: number;
|
|
289
|
+
remaining: DocumentEntity['id'][];
|
|
290
|
+
/** FirmaGob avisó que el OTP venció antes de firmar todos los documentos de la solicitud. */
|
|
291
|
+
otpExpired: boolean;
|
|
292
|
+
}
|
|
293
|
+
|
|
141
294
|
export interface DocumentDiscardResponseEntity {
|
|
142
295
|
id: DocumentEntity['id'];
|
|
143
296
|
ok: boolean;
|
|
@@ -185,3 +338,60 @@ export interface DocumentPublicFileResponseEntity {
|
|
|
185
338
|
fileId: string;
|
|
186
339
|
fileName: string;
|
|
187
340
|
}
|
|
341
|
+
|
|
342
|
+
export interface DocumentDeriveResponseEntity {
|
|
343
|
+
id: DocumentEntity['id'];
|
|
344
|
+
ok: boolean;
|
|
345
|
+
// A cuántos funcionarios llegó la derivación.
|
|
346
|
+
delivered: number;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
export interface DocumentCloseDeliveryResponseEntity {
|
|
350
|
+
id: DocumentDeliveryEntity['id'];
|
|
351
|
+
ok: boolean;
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
export interface DocumentReassignResponseEntity {
|
|
355
|
+
id: DocumentEntity['id'];
|
|
356
|
+
ok: boolean;
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
/**
|
|
360
|
+
* Un plazo en la agenda de un funcionario: lo que recibió (como destinatario o por derivación) y debe atender, o un
|
|
361
|
+
* documento que envió y del que espera respuesta.
|
|
362
|
+
*/
|
|
363
|
+
export interface DocumentAgendaItemEntity {
|
|
364
|
+
kind: 'Received' | 'Sent';
|
|
365
|
+
/** La entrega (lo recibido) o el documento (lo enviado). */
|
|
366
|
+
id: string;
|
|
367
|
+
documentId: DocumentEntity['id'];
|
|
368
|
+
subject: DocumentEntity['subject'];
|
|
369
|
+
documentType: { name: string; abbreviation: string | null };
|
|
370
|
+
correlative: DocumentEntity['correlative'];
|
|
371
|
+
correlativeYear: DocumentEntity['correlativeYear'];
|
|
372
|
+
intakeNumber: DocumentEntity['intakeNumber'];
|
|
373
|
+
intakeYear: DocumentEntity['intakeYear'];
|
|
374
|
+
/** Plazo, en ISO 8601. */
|
|
375
|
+
dueAt: string;
|
|
376
|
+
/** Lo recibido: cuándo lo marcó como atendido (sin valor si sigue pendiente). */
|
|
377
|
+
closedAt: string | null;
|
|
378
|
+
/** Lo recibido: la providencia y quién lo derivó. */
|
|
379
|
+
instruction: DocumentDeliveryEntity['instruction'] | null;
|
|
380
|
+
sentByFullName: string | null;
|
|
381
|
+
/** Lo enviado: a cuántos les llegó y cuántos aún no lo atienden. */
|
|
382
|
+
recipients: { total: number; pending: number } | null;
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
export interface DocumentAgendaResponseEntity {
|
|
386
|
+
/** Plazos dentro del período pedido. */
|
|
387
|
+
items: DocumentAgendaItemEntity[];
|
|
388
|
+
/** Lo recibido con el plazo vencido y sin atender, de cualquier fecha (los 50 más antiguos). */
|
|
389
|
+
overdue: DocumentAgendaItemEntity[];
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
/** Trazabilidad de un documento en PDF, lista para descargar. */
|
|
393
|
+
export interface DocumentTrailExportEntity {
|
|
394
|
+
fileName: string;
|
|
395
|
+
contentType: string;
|
|
396
|
+
contentBase64: string;
|
|
397
|
+
}
|
|
@@ -1,4 +1,17 @@
|
|
|
1
|
-
import { DocumentTypeEntity } from '../../base/entities';
|
|
1
|
+
import { DocumentTypeEntity, DocumentTypeFlowStepEntity } from '../../base/entities';
|
|
2
|
+
|
|
3
|
+
/** Paso del flujo sugerido de un tipo documental: quién visa o firma, en su orden. */
|
|
4
|
+
export interface DocumentTypeFlowStepResponseEntity {
|
|
5
|
+
id: DocumentTypeFlowStepEntity['id'];
|
|
6
|
+
role: DocumentTypeFlowStepEntity['role'];
|
|
7
|
+
order: DocumentTypeFlowStepEntity['order'];
|
|
8
|
+
type: DocumentTypeFlowStepEntity['type'];
|
|
9
|
+
employeeId: DocumentTypeFlowStepEntity['employeeId'];
|
|
10
|
+
directorateCodeReference: DocumentTypeFlowStepEntity['directorateCodeReference'];
|
|
11
|
+
// Nombre del funcionario o de la dirección, como estaba al definir el flujo.
|
|
12
|
+
name: DocumentTypeFlowStepEntity['name'];
|
|
13
|
+
position: DocumentTypeFlowStepEntity['position'];
|
|
14
|
+
}
|
|
2
15
|
|
|
3
16
|
export interface DocumentTypeGetAllResponseEntity {
|
|
4
17
|
id: DocumentTypeEntity['id'];
|
|
@@ -9,14 +22,20 @@ export interface DocumentTypeGetAllResponseEntity {
|
|
|
9
22
|
nextCorrelative: DocumentTypeEntity['nextCorrelative'];
|
|
10
23
|
correlativeYear: DocumentTypeEntity['correlativeYear'];
|
|
11
24
|
resetsYearly: DocumentTypeEntity['resetsYearly'];
|
|
25
|
+
// Sin numeración, sus documentos solo llevan fecha, código de verificación y QR.
|
|
26
|
+
numbered: DocumentTypeEntity['numbered'];
|
|
12
27
|
directorateCodeReference: DocumentTypeEntity['directorateCodeReference'];
|
|
13
28
|
enabled: DocumentTypeEntity['enabled'];
|
|
29
|
+
// Cuántos visadores y firmantes tiene su flujo sugerido.
|
|
30
|
+
flow: { visa: number; signature: number };
|
|
14
31
|
}
|
|
15
32
|
|
|
16
33
|
export interface DocumentTypeGetByIdResponseEntity extends DocumentTypeGetAllResponseEntity {
|
|
17
34
|
// Último número ya asignado en el año vigente del correlativo (null si aún no se numera ninguno): el próximo
|
|
18
35
|
// correlativo no puede quedar por debajo de él.
|
|
19
36
|
lastCorrelative: number | null;
|
|
37
|
+
// Flujo sugerido: primero los visadores y después los firmantes, cada grupo en su orden.
|
|
38
|
+
flowSteps: DocumentTypeFlowStepResponseEntity[];
|
|
20
39
|
}
|
|
21
40
|
|
|
22
41
|
export interface DocumentTypeCreateResponseEntity {
|
package/src/entities/index.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './partsOffice.entity';
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import {
|
|
2
|
+
type DocumentDispatchResponseEntity,
|
|
3
|
+
type DocumentExternalRecipientResponseEntity,
|
|
4
|
+
type DocumentLinkEntity,
|
|
5
|
+
} from '../document';
|
|
6
|
+
|
|
7
|
+
/** Institución del Estado en DocDigital. */
|
|
8
|
+
export interface DocDigitalEntityEntity {
|
|
9
|
+
id: number;
|
|
10
|
+
name: string;
|
|
11
|
+
/** Organismo al que pertenece (la entidad padre). */
|
|
12
|
+
organism: string | null;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/** Usuario habilitado de una institución en DocDigital. */
|
|
16
|
+
export interface DocDigitalUserEntity {
|
|
17
|
+
id: number;
|
|
18
|
+
name: string;
|
|
19
|
+
position: string | null;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface DocDigitalDocumentTypeEntity {
|
|
23
|
+
id: number;
|
|
24
|
+
name: string;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/** Si DocDigital está configurado en el gestor y cada cuánto se revisa lo recibido. */
|
|
28
|
+
export interface PartsOfficeStatusEntity {
|
|
29
|
+
configured: boolean;
|
|
30
|
+
syncMinutes: number;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/** Totales del Panel de Partes. */
|
|
34
|
+
export interface PartsOfficeSummaryEntity {
|
|
35
|
+
toDispatch: number;
|
|
36
|
+
received: number;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/** Documento firmado que va a otras instituciones: lo despacha Oficina de Partes. */
|
|
40
|
+
export interface PartsOfficeDispatchEntity extends DocumentDispatchResponseEntity {
|
|
41
|
+
document: DocumentLinkEntity & { accessLevel: string };
|
|
42
|
+
externalRecipients: DocumentExternalRecipientResponseEntity[];
|
|
43
|
+
createdAt: string;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/** Documento que llegó por DocDigital. */
|
|
47
|
+
export interface PartsOfficeInboundEntity {
|
|
48
|
+
id: string;
|
|
49
|
+
docDigitalDocumentId: string;
|
|
50
|
+
status: 'Pending' | 'Registered' | 'Returned';
|
|
51
|
+
subject: string;
|
|
52
|
+
description: string | null;
|
|
53
|
+
folio: string | null;
|
|
54
|
+
folioDate: string | null;
|
|
55
|
+
typeName: string | null;
|
|
56
|
+
reserved: boolean;
|
|
57
|
+
senderEntityName: string | null;
|
|
58
|
+
senderName: string | null;
|
|
59
|
+
senderPosition: string | null;
|
|
60
|
+
fileName: string | null;
|
|
61
|
+
hasFile: boolean;
|
|
62
|
+
attachments: { name: string; url: string | null; hasFile: boolean }[];
|
|
63
|
+
createdAt: string;
|
|
64
|
+
registeredAt: string | null;
|
|
65
|
+
registeredByFullName: string | null;
|
|
66
|
+
acknowledgedAt: string | null;
|
|
67
|
+
acknowledgeError: string | null;
|
|
68
|
+
returnedAt: string | null;
|
|
69
|
+
returnedByFullName: string | null;
|
|
70
|
+
returnReason: string | null;
|
|
71
|
+
/** El documento con que quedó ingresado al gestor. */
|
|
72
|
+
document: { id: string; intakeNumber: number | null; intakeYear: number | null } | null;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export interface PartsOfficeOkResponseEntity {
|
|
76
|
+
id: string;
|
|
77
|
+
ok: boolean;
|
|
78
|
+
/** Documento al que corresponde el despacho (al despachar o devolver). */
|
|
79
|
+
documentId?: string;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export interface PartsOfficeSyncResponseEntity {
|
|
83
|
+
/** Recibidos nuevos que se trajeron. */
|
|
84
|
+
created: number;
|
|
85
|
+
/** Los que no se pudieron traer (se reintentan en la próxima revisión). */
|
|
86
|
+
failed: number;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export interface PartsOfficeRegisterResponseEntity {
|
|
90
|
+
id: string;
|
|
91
|
+
documentId: string;
|
|
92
|
+
intakeNumber: number;
|
|
93
|
+
intakeYear: number;
|
|
94
|
+
/** `false` si DocDigital no aceptó el acuse de recibo: se puede reintentar. */
|
|
95
|
+
acknowledged: boolean;
|
|
96
|
+
ok: boolean;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/** Archivo de un recibido, ya copiado al gestor. */
|
|
100
|
+
export interface PartsOfficeFileEntity {
|
|
101
|
+
fileId: string;
|
|
102
|
+
fileName: string;
|
|
103
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './procedure.entity';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ProcedureEntity } from '../../base/entities';
|
|
2
|
+
|
|
3
|
+
export interface ProcedureGetAllResponseEntity {
|
|
4
|
+
id: ProcedureEntity['id'];
|
|
5
|
+
name: ProcedureEntity['name'];
|
|
6
|
+
cpatId: ProcedureEntity['cpatId'];
|
|
7
|
+
cpatCode: ProcedureEntity['cpatCode'];
|
|
8
|
+
description: ProcedureEntity['description'];
|
|
9
|
+
enabled: ProcedureEntity['enabled'];
|
|
10
|
+
/** Cuántos expedientes pertenecen a este procedimiento. */
|
|
11
|
+
caseFiles: number;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export type ProcedureGetByIdResponseEntity = ProcedureGetAllResponseEntity;
|
|
15
|
+
|
|
16
|
+
export interface ProcedureCreateResponseEntity {
|
|
17
|
+
id: ProcedureEntity['id'];
|
|
18
|
+
ok: boolean;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface ProcedureUpdateResponseEntity {
|
|
22
|
+
id: ProcedureEntity['id'];
|
|
23
|
+
ok: boolean;
|
|
24
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './registerBook.entity';
|