@muni-sanfer/types-gestor-documental 0.0.1-beta.0 → 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 +459 -2
- package/dist/base/entities.js +102 -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 +167 -3
- package/dist/contracts/document.contract.js +10 -0
- package/dist/contracts/documentType.contract.d.ts +18 -1
- package/dist/contracts/index.d.ts +86 -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 +250 -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 +544 -2
- package/src/contracts/caseFile.contract.ts +141 -0
- package/src/contracts/document.contract.ts +153 -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 +271 -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,176 @@
|
|
|
1
|
+
import { CaseFileAccessEntity, CaseFileActorEntity, CaseFileEntity, CaseFileEntryEntity, CaseFileMetadataChangeEntity, CaseFileParticipantEntity, CaseFileTrackingEntity, DocumentEntity, ProcedureEntity } from '../../base/entities';
|
|
2
|
+
import { DocumentTypeSummaryEntity } from '../document';
|
|
3
|
+
/** Expediente al que se hace referencia desde otro lado: cómo se cita y en qué estado está. */
|
|
4
|
+
export interface CaseFileLinkEntity {
|
|
5
|
+
id: CaseFileEntity['id'];
|
|
6
|
+
code: CaseFileEntity['code'];
|
|
7
|
+
title: CaseFileEntity['title'];
|
|
8
|
+
status: CaseFileEntity['status'];
|
|
9
|
+
}
|
|
10
|
+
export interface CaseFileGetAllResponseEntity extends CaseFileLinkEntity {
|
|
11
|
+
subject: CaseFileEntity['subject'];
|
|
12
|
+
accessLevel: CaseFileEntity['accessLevel'];
|
|
13
|
+
hasSensitiveData: CaseFileEntity['hasSensitiveData'];
|
|
14
|
+
procedure: Pick<ProcedureEntity, 'id' | 'name'>;
|
|
15
|
+
responsibleEmployeeId: CaseFileEntity['responsibleEmployeeId'];
|
|
16
|
+
responsibleFullName: CaseFileEntity['responsibleFullName'];
|
|
17
|
+
/** Actuaciones vigentes del índice (las que quedaron sin efecto no cuentan). */
|
|
18
|
+
entries: number;
|
|
19
|
+
participants: number;
|
|
20
|
+
createdAt: CaseFileEntity['createdAt'];
|
|
21
|
+
closedAt: CaseFileEntity['closedAt'];
|
|
22
|
+
}
|
|
23
|
+
/** Documento del gestor incorporado al expediente. */
|
|
24
|
+
export interface CaseFileEntryDocumentEntity {
|
|
25
|
+
id: DocumentEntity['id'];
|
|
26
|
+
subject: DocumentEntity['subject'];
|
|
27
|
+
status: DocumentEntity['status'];
|
|
28
|
+
correlative: DocumentEntity['correlative'];
|
|
29
|
+
correlativeYear: DocumentEntity['correlativeYear'];
|
|
30
|
+
documentType: DocumentTypeSummaryEntity;
|
|
31
|
+
}
|
|
32
|
+
/** Entrada del índice electrónico: una actuación, en su orden de incorporación. */
|
|
33
|
+
export interface CaseFileEntryResponseEntity {
|
|
34
|
+
id: CaseFileEntryEntity['id'];
|
|
35
|
+
sequence: CaseFileEntryEntity['sequence'];
|
|
36
|
+
kind: CaseFileEntryEntity['kind'];
|
|
37
|
+
actuationType: CaseFileEntryEntity['actuationType'];
|
|
38
|
+
title: CaseFileEntryEntity['title'];
|
|
39
|
+
document: CaseFileEntryDocumentEntity | null;
|
|
40
|
+
fileName: CaseFileEntryEntity['fileName'];
|
|
41
|
+
documentTypeName: CaseFileEntryEntity['documentTypeName'];
|
|
42
|
+
originDate: CaseFileEntryEntity['originDate'];
|
|
43
|
+
author: CaseFileEntryEntity['author'];
|
|
44
|
+
keywords: CaseFileEntryEntity['keywords'];
|
|
45
|
+
accessLevel: CaseFileEntryEntity['accessLevel'];
|
|
46
|
+
hasSensitiveData: CaseFileEntryEntity['hasSensitiveData'];
|
|
47
|
+
linkedCaseFile: CaseFileLinkEntity | null;
|
|
48
|
+
/** `true` si la entrada tiene un archivo que se puede abrir (un documento o un archivo subido). */
|
|
49
|
+
hasFile: boolean;
|
|
50
|
+
sha256: CaseFileEntryEntity['sha256'];
|
|
51
|
+
size: CaseFileEntryEntity['size'];
|
|
52
|
+
hasAdvancedSignature: CaseFileEntryEntity['hasAdvancedSignature'];
|
|
53
|
+
incorporatedByEmployeeId: CaseFileEntryEntity['incorporatedByEmployeeId'];
|
|
54
|
+
incorporatedByFullName: CaseFileEntryEntity['incorporatedByFullName'];
|
|
55
|
+
createdAt: CaseFileEntryEntity['createdAt'];
|
|
56
|
+
voidedAt: CaseFileEntryEntity['voidedAt'];
|
|
57
|
+
voidedByFullName: CaseFileEntryEntity['voidedByFullName'];
|
|
58
|
+
voidReason: CaseFileEntryEntity['voidReason'];
|
|
59
|
+
/** `true` si quien consulta puede dejarla sin efecto: el responsable o quien la incorporó, con el expediente abierto. */
|
|
60
|
+
canVoid: boolean;
|
|
61
|
+
}
|
|
62
|
+
export interface CaseFileParticipantResponseEntity {
|
|
63
|
+
id: CaseFileParticipantEntity['id'];
|
|
64
|
+
employeeId: CaseFileParticipantEntity['employeeId'];
|
|
65
|
+
fullName: CaseFileParticipantEntity['fullName'];
|
|
66
|
+
position: CaseFileParticipantEntity['position'];
|
|
67
|
+
addedByFullName: CaseFileParticipantEntity['addedByFullName'];
|
|
68
|
+
createdAt: CaseFileParticipantEntity['createdAt'];
|
|
69
|
+
}
|
|
70
|
+
export interface CaseFileActorResponseEntity {
|
|
71
|
+
id: CaseFileActorEntity['id'];
|
|
72
|
+
relation: CaseFileActorEntity['relation'];
|
|
73
|
+
actorType: CaseFileActorEntity['actorType'];
|
|
74
|
+
identifier: CaseFileActorEntity['identifier'];
|
|
75
|
+
name: CaseFileActorEntity['name'];
|
|
76
|
+
}
|
|
77
|
+
export interface CaseFileTrackingResponseEntity {
|
|
78
|
+
id: CaseFileTrackingEntity['id'];
|
|
79
|
+
action: CaseFileTrackingEntity['action'];
|
|
80
|
+
observation: CaseFileTrackingEntity['observation'];
|
|
81
|
+
employeeFullName: CaseFileTrackingEntity['employeeFullName'];
|
|
82
|
+
createdAt: CaseFileTrackingEntity['createdAt'];
|
|
83
|
+
}
|
|
84
|
+
export interface CaseFileMetadataChangeResponseEntity {
|
|
85
|
+
id: CaseFileMetadataChangeEntity['id'];
|
|
86
|
+
/** Código oficial del metadato. Ej: `MGDEE1_5`. */
|
|
87
|
+
field: CaseFileMetadataChangeEntity['field'];
|
|
88
|
+
previousValue: CaseFileMetadataChangeEntity['previousValue'];
|
|
89
|
+
newValue: CaseFileMetadataChangeEntity['newValue'];
|
|
90
|
+
employeeFullName: CaseFileMetadataChangeEntity['employeeFullName'];
|
|
91
|
+
createdAt: CaseFileMetadataChangeEntity['createdAt'];
|
|
92
|
+
}
|
|
93
|
+
export interface CaseFileAccessResponseEntity {
|
|
94
|
+
id: CaseFileAccessEntity['id'];
|
|
95
|
+
action: CaseFileAccessEntity['action'];
|
|
96
|
+
entryId: CaseFileAccessEntity['entryId'];
|
|
97
|
+
/** Título del documento que se abrió, si el acceso fue a uno. */
|
|
98
|
+
entryTitle: string | null;
|
|
99
|
+
employeeFullName: CaseFileAccessEntity['employeeFullName'];
|
|
100
|
+
createdAt: CaseFileAccessEntity['createdAt'];
|
|
101
|
+
}
|
|
102
|
+
export interface CaseFileGetByIdResponseEntity extends CaseFileGetAllResponseEntity {
|
|
103
|
+
summary: CaseFileEntity['summary'];
|
|
104
|
+
procedure: Pick<ProcedureEntity, 'id' | 'name' | 'cpatId' | 'cpatCode'>;
|
|
105
|
+
responsiblePosition: CaseFileEntity['responsiblePosition'];
|
|
106
|
+
incorporationMechanism: CaseFileEntity['incorporationMechanism'];
|
|
107
|
+
schemaVersion: CaseFileEntity['schemaVersion'];
|
|
108
|
+
/** Enlace persistente del expediente (MGDEE4_2). `null` si el servicio no tiene configurada la dirección. */
|
|
109
|
+
uri: string | null;
|
|
110
|
+
closedByFullName: CaseFileEntity['closedByFullName'];
|
|
111
|
+
closingNote: CaseFileEntity['closingNote'];
|
|
112
|
+
index: CaseFileEntryResponseEntity[];
|
|
113
|
+
sharedWith: CaseFileParticipantResponseEntity[];
|
|
114
|
+
actors: CaseFileActorResponseEntity[];
|
|
115
|
+
trackings: CaseFileTrackingResponseEntity[];
|
|
116
|
+
metadataChanges: CaseFileMetadataChangeResponseEntity[];
|
|
117
|
+
/** Registro de accesos. Solo lo recibe el responsable y quien puede ver todos los expedientes. */
|
|
118
|
+
accesses: CaseFileAccessResponseEntity[];
|
|
119
|
+
/** Qué puede hacer con el expediente quien lo consulta. Sin `actor` en la consulta, no viene. */
|
|
120
|
+
actorCapabilities?: {
|
|
121
|
+
isResponsible: boolean;
|
|
122
|
+
/** Editar sus metadatos y cerrarlo: el responsable, mientras esté abierto. */
|
|
123
|
+
canEdit: boolean;
|
|
124
|
+
/** Incorporar actuaciones: el responsable y aquellos con quienes se compartió, mientras esté abierto. */
|
|
125
|
+
canIncorporate: boolean;
|
|
126
|
+
/** Compartirlo con otros funcionarios: el responsable, también después de cerrado. */
|
|
127
|
+
canShare: boolean;
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
export interface CaseFileCreateResponseEntity {
|
|
131
|
+
id: CaseFileEntity['id'];
|
|
132
|
+
code: CaseFileEntity['code'];
|
|
133
|
+
ok: boolean;
|
|
134
|
+
}
|
|
135
|
+
export interface CaseFileUpdateResponseEntity {
|
|
136
|
+
id: CaseFileEntity['id'];
|
|
137
|
+
ok: boolean;
|
|
138
|
+
}
|
|
139
|
+
/** Lote incorporado: cuántos documentos entraron y cuántos se omitieron (ya estaban, o no finalizados). */
|
|
140
|
+
export interface CaseFileAddBatchResponseEntity {
|
|
141
|
+
id: CaseFileEntity['id'];
|
|
142
|
+
added: number;
|
|
143
|
+
skipped: number;
|
|
144
|
+
ok: boolean;
|
|
145
|
+
}
|
|
146
|
+
export interface CaseFileAddEntryResponseEntity {
|
|
147
|
+
id: CaseFileEntity['id'];
|
|
148
|
+
entryId: CaseFileEntryEntity['id'];
|
|
149
|
+
sequence: CaseFileEntryEntity['sequence'];
|
|
150
|
+
ok: boolean;
|
|
151
|
+
}
|
|
152
|
+
/** Archivo de una entrada del índice, para servirlo a quien puede ver el expediente. */
|
|
153
|
+
export interface CaseFileEntryFileResponseEntity {
|
|
154
|
+
fileId: string;
|
|
155
|
+
fileName: string;
|
|
156
|
+
}
|
|
157
|
+
/** Archivo que va dentro del expediente exportado, con la huella que tenía al incorporarse. */
|
|
158
|
+
export interface CaseFileExportFileEntity {
|
|
159
|
+
entryId: CaseFileEntryEntity['id'];
|
|
160
|
+
sequence: CaseFileEntryEntity['sequence'];
|
|
161
|
+
/** Ruta dentro del ZIP. Ej: `documentos/001-decreto-alcaldicio-exento-590-2026.pdf`. */
|
|
162
|
+
path: string;
|
|
163
|
+
fileId: string;
|
|
164
|
+
sha256: string | null;
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* Expediente listo para exportar: los metadatos con sus códigos oficiales (va tal cual como `expediente.json`) y los
|
|
168
|
+
* archivos que hay que agregar. El ZIP lo arma el gateway.
|
|
169
|
+
*/
|
|
170
|
+
export interface CaseFileExportResponseEntity {
|
|
171
|
+
code: CaseFileEntity['code'];
|
|
172
|
+
manifest: Record<string, unknown>;
|
|
173
|
+
files: CaseFileExportFileEntity[];
|
|
174
|
+
}
|
|
175
|
+
/** Expediente en que está incorporado un documento, visto desde el documento. */
|
|
176
|
+
export type DocumentCaseFileEntity = CaseFileLinkEntity;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './caseFile.entity';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./caseFile.entity"), exports);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DocumentAttachmentEntity, DocumentEntity, DocumentParticipantEntity, DocumentTrackingEntity, DocumentTypeEntity } from '../../base/entities';
|
|
1
|
+
import { DocumentAnnulledNumberEntity, DocumentAttachmentEntity, DocumentDeliveryEntity, DocumentEntity, DocumentParticipantEntity, DocumentRecipientEntity, DocumentTrackingEntity, DocumentTypeEntity } from '../../base/entities';
|
|
2
2
|
/** Tipo documental de un documento, con lo necesario para citarlo. */
|
|
3
3
|
export interface DocumentTypeSummaryEntity {
|
|
4
4
|
id: DocumentTypeEntity['id'];
|
|
@@ -10,6 +10,8 @@ export interface DocumentParticipantResponseEntity {
|
|
|
10
10
|
id: DocumentParticipantEntity['id'];
|
|
11
11
|
role: DocumentParticipantEntity['role'];
|
|
12
12
|
order: DocumentParticipantEntity['order'];
|
|
13
|
+
/** Los visadores de una misma etapa visan a la vez. */
|
|
14
|
+
stage: DocumentParticipantEntity['stage'];
|
|
13
15
|
status: DocumentParticipantEntity['status'];
|
|
14
16
|
employeeId: DocumentParticipantEntity['employeeId'];
|
|
15
17
|
fullName: DocumentParticipantEntity['fullName'];
|
|
@@ -17,6 +19,70 @@ export interface DocumentParticipantResponseEntity {
|
|
|
17
19
|
observation: DocumentParticipantEntity['observation'];
|
|
18
20
|
resolvedAt: DocumentParticipantEntity['resolvedAt'];
|
|
19
21
|
}
|
|
22
|
+
/** Destinatario de un documento, como lo eligió el redactor: una persona o un área completa. */
|
|
23
|
+
export interface DocumentRecipientResponseEntity {
|
|
24
|
+
id: DocumentRecipientEntity['id'];
|
|
25
|
+
type: DocumentRecipientEntity['type'];
|
|
26
|
+
employeeId: DocumentRecipientEntity['employeeId'];
|
|
27
|
+
directorateCodeReference: DocumentRecipientEntity['directorateCodeReference'];
|
|
28
|
+
departmentId: DocumentRecipientEntity['departmentId'];
|
|
29
|
+
name: DocumentRecipientEntity['name'];
|
|
30
|
+
position: DocumentRecipientEntity['position'];
|
|
31
|
+
}
|
|
32
|
+
/** Un documento en la bandeja de un funcionario: como destinatario o porque se lo derivaron. */
|
|
33
|
+
export interface DocumentDeliveryResponseEntity {
|
|
34
|
+
id: DocumentDeliveryEntity['id'];
|
|
35
|
+
origin: DocumentDeliveryEntity['origin'];
|
|
36
|
+
employeeId: DocumentDeliveryEntity['employeeId'];
|
|
37
|
+
fullName: DocumentDeliveryEntity['fullName'];
|
|
38
|
+
position: DocumentDeliveryEntity['position'];
|
|
39
|
+
areaName: DocumentDeliveryEntity['areaName'];
|
|
40
|
+
sentByEmployeeId: DocumentDeliveryEntity['sentByEmployeeId'];
|
|
41
|
+
sentByFullName: DocumentDeliveryEntity['sentByFullName'];
|
|
42
|
+
instruction: DocumentDeliveryEntity['instruction'];
|
|
43
|
+
note: DocumentDeliveryEntity['note'];
|
|
44
|
+
dueAt: DocumentDeliveryEntity['dueAt'];
|
|
45
|
+
deliveredAt: DocumentDeliveryEntity['deliveredAt'];
|
|
46
|
+
readAt: DocumentDeliveryEntity['readAt'];
|
|
47
|
+
closedAt: DocumentDeliveryEntity['closedAt'];
|
|
48
|
+
closingNote: DocumentDeliveryEntity['closingNote'];
|
|
49
|
+
}
|
|
50
|
+
/** Lo necesario para citar otro documento y enlazarlo (el que se responde, o las respuestas). */
|
|
51
|
+
export interface DocumentLinkEntity {
|
|
52
|
+
id: DocumentEntity['id'];
|
|
53
|
+
subject: DocumentEntity['subject'];
|
|
54
|
+
status: DocumentEntity['status'];
|
|
55
|
+
correlative: DocumentEntity['correlative'];
|
|
56
|
+
correlativeYear: DocumentEntity['correlativeYear'];
|
|
57
|
+
createdByFullName: DocumentEntity['createdByFullName'];
|
|
58
|
+
finishedAt: DocumentEntity['finishedAt'];
|
|
59
|
+
documentType: DocumentTypeSummaryEntity;
|
|
60
|
+
/** Folio de ingreso de Oficina de Partes, si llegó por DocDigital. */
|
|
61
|
+
intakeNumber: DocumentEntity['intakeNumber'];
|
|
62
|
+
intakeYear: DocumentEntity['intakeYear'];
|
|
63
|
+
}
|
|
64
|
+
/** Institución (y usuario) de DocDigital a la que va dirigido un documento. */
|
|
65
|
+
export interface DocumentExternalRecipientResponseEntity {
|
|
66
|
+
id: string;
|
|
67
|
+
entityId: number;
|
|
68
|
+
entityName: string;
|
|
69
|
+
userId: number | null;
|
|
70
|
+
userName: string | null;
|
|
71
|
+
userPosition: string | null;
|
|
72
|
+
}
|
|
73
|
+
/** Despacho de un documento por DocDigital. */
|
|
74
|
+
export interface DocumentDispatchResponseEntity {
|
|
75
|
+
id: string;
|
|
76
|
+
status: 'Pending' | 'Dispatched' | 'Returned';
|
|
77
|
+
folio: string | null;
|
|
78
|
+
docDigitalTypeName: string | null;
|
|
79
|
+
docDigitalDocumentId: string | null;
|
|
80
|
+
dispatchedAt: string | null;
|
|
81
|
+
dispatchedByFullName: string | null;
|
|
82
|
+
returnedAt: string | null;
|
|
83
|
+
returnedByFullName: string | null;
|
|
84
|
+
returnReason: string | null;
|
|
85
|
+
}
|
|
20
86
|
export interface DocumentGetAllResponseEntity {
|
|
21
87
|
id: DocumentEntity['id'];
|
|
22
88
|
subject: DocumentEntity['subject'];
|
|
@@ -30,7 +96,21 @@ export interface DocumentGetAllResponseEntity {
|
|
|
30
96
|
createdByEmployeeId: DocumentEntity['createdByEmployeeId'];
|
|
31
97
|
createdByFullName: DocumentEntity['createdByFullName'];
|
|
32
98
|
documentType: DocumentTypeSummaryEntity;
|
|
99
|
+
intakeNumber: DocumentEntity['intakeNumber'];
|
|
100
|
+
intakeYear: DocumentEntity['intakeYear'];
|
|
101
|
+
origin: DocumentEntity['origin'];
|
|
102
|
+
/** Con búsqueda de texto completo: el fragmento donde aparece lo buscado, con lo encontrado entre ⟦ y ⟧. */
|
|
103
|
+
snippet?: string | null;
|
|
33
104
|
currentParticipant: Pick<DocumentParticipantResponseEntity, 'role' | 'employeeId' | 'fullName'> | null;
|
|
105
|
+
otherCurrentCount: number;
|
|
106
|
+
distribution: {
|
|
107
|
+
total: number;
|
|
108
|
+
read: number;
|
|
109
|
+
} | null;
|
|
110
|
+
}
|
|
111
|
+
/** Una entrada de la bandeja de recibidos: la entrega y el documento al que corresponde. */
|
|
112
|
+
export interface DocumentInboxItemEntity extends DocumentDeliveryResponseEntity {
|
|
113
|
+
document: DocumentLinkEntity;
|
|
34
114
|
}
|
|
35
115
|
export interface DocumentGetByIdResponseEntity {
|
|
36
116
|
id: DocumentEntity['id'];
|
|
@@ -52,6 +132,45 @@ export interface DocumentGetByIdResponseEntity {
|
|
|
52
132
|
createdAt: DocumentEntity['createdAt'];
|
|
53
133
|
submittedAt: DocumentEntity['submittedAt'];
|
|
54
134
|
finishedAt: DocumentEntity['finishedAt'];
|
|
135
|
+
verificationCode: DocumentEntity['verificationCode'];
|
|
136
|
+
verificationUrl: string | null;
|
|
137
|
+
signatureSheet: DocumentEntity['signatureSheet'];
|
|
138
|
+
annulledAt: DocumentEntity['annulledAt'];
|
|
139
|
+
annulmentReason: DocumentEntity['annulmentReason'];
|
|
140
|
+
annulledNumbers: {
|
|
141
|
+
correlative: DocumentAnnulledNumberEntity['correlative'];
|
|
142
|
+
correlativeYear: DocumentAnnulledNumberEntity['correlativeYear'];
|
|
143
|
+
reason: DocumentAnnulledNumberEntity['reason'];
|
|
144
|
+
employeeFullName: DocumentAnnulledNumberEntity['employeeFullName'];
|
|
145
|
+
createdAt: DocumentAnnulledNumberEntity['createdAt'];
|
|
146
|
+
}[];
|
|
147
|
+
responseDueAt: DocumentEntity['responseDueAt'];
|
|
148
|
+
recipients: DocumentRecipientResponseEntity[];
|
|
149
|
+
deliveries: DocumentDeliveryResponseEntity[];
|
|
150
|
+
replyTo: DocumentLinkEntity | null;
|
|
151
|
+
/** Lote de firma al que pertenece. */
|
|
152
|
+
batch: {
|
|
153
|
+
id: string;
|
|
154
|
+
name: string;
|
|
155
|
+
} | null;
|
|
156
|
+
replies: DocumentLinkEntity[];
|
|
157
|
+
/** Expedientes en que está incorporado y que quien consulta puede ver. */
|
|
158
|
+
caseFiles: {
|
|
159
|
+
id: string;
|
|
160
|
+
code: string;
|
|
161
|
+
title: string;
|
|
162
|
+
status: 'Open' | 'Closed';
|
|
163
|
+
}[];
|
|
164
|
+
/** De dónde viene: del gestor o recibido por DocDigital, con su folio de ingreso y los datos de quien lo envió. */
|
|
165
|
+
origin: DocumentEntity['origin'];
|
|
166
|
+
intakeNumber: DocumentEntity['intakeNumber'];
|
|
167
|
+
intakeYear: DocumentEntity['intakeYear'];
|
|
168
|
+
externalFolio: DocumentEntity['externalFolio'];
|
|
169
|
+
externalSender: DocumentEntity['externalSender'];
|
|
170
|
+
externalDate: DocumentEntity['externalDate'];
|
|
171
|
+
/** Instituciones de DocDigital a quienes va dirigido, y su despacho por Oficina de Partes. */
|
|
172
|
+
externalRecipients: DocumentExternalRecipientResponseEntity[];
|
|
173
|
+
dispatch: DocumentDispatchResponseEntity | null;
|
|
55
174
|
documentType: DocumentTypeSummaryEntity;
|
|
56
175
|
participants: DocumentParticipantResponseEntity[];
|
|
57
176
|
attachments: {
|
|
@@ -73,6 +192,12 @@ export interface DocumentGetByIdResponseEntity {
|
|
|
73
192
|
turn: Pick<DocumentParticipantResponseEntity, 'id' | 'role'> | null;
|
|
74
193
|
canEdit: boolean;
|
|
75
194
|
canDiscard: boolean;
|
|
195
|
+
canDerive: boolean;
|
|
196
|
+
canReply: boolean;
|
|
197
|
+
canReassign: boolean;
|
|
198
|
+
/** Quien consulta redactó el documento (o lo ingresó, si llegó por DocDigital). */
|
|
199
|
+
isAuthor: boolean;
|
|
200
|
+
inbox: DocumentDeliveryResponseEntity[];
|
|
76
201
|
};
|
|
77
202
|
signatureRequiresOtp: boolean;
|
|
78
203
|
}
|
|
@@ -80,12 +205,22 @@ export interface DocumentGetByIdResponseEntity {
|
|
|
80
205
|
export interface DocumentGetSummaryResponseEntity {
|
|
81
206
|
toVisa: number;
|
|
82
207
|
toSign: number;
|
|
208
|
+
/** Lotes de firma con documentos en su turno (los documentos de un lote no se cuentan en `toVisa` ni `toSign`). */
|
|
209
|
+
batches: {
|
|
210
|
+
toVisa: number;
|
|
211
|
+
toSign: number;
|
|
212
|
+
};
|
|
83
213
|
created: {
|
|
84
214
|
drafted: number;
|
|
85
215
|
inProgress: number;
|
|
86
216
|
rejected: number;
|
|
87
217
|
finished: number;
|
|
88
218
|
};
|
|
219
|
+
received: {
|
|
220
|
+
unread: number;
|
|
221
|
+
pending: number;
|
|
222
|
+
overdue: number;
|
|
223
|
+
};
|
|
89
224
|
}
|
|
90
225
|
export interface DocumentCreateResponseEntity {
|
|
91
226
|
id: DocumentEntity['id'];
|
|
@@ -100,7 +235,121 @@ export interface DocumentReviewResponseEntity {
|
|
|
100
235
|
ok: boolean;
|
|
101
236
|
status: DocumentEntity['status'];
|
|
102
237
|
}
|
|
238
|
+
/** Resultado de un documento en una firma de varios documentos. */
|
|
239
|
+
export interface DocumentSignManyResultEntity {
|
|
240
|
+
id: DocumentEntity['id'];
|
|
241
|
+
ok: boolean;
|
|
242
|
+
/** Estado en que quedó, si se firmó. */
|
|
243
|
+
status?: DocumentEntity['status'];
|
|
244
|
+
/** Por qué no se firmó. */
|
|
245
|
+
message?: string;
|
|
246
|
+
}
|
|
247
|
+
/**
|
|
248
|
+
* Firma de varios documentos con un solo OTP. FirmaGob admite 5 MB por solicitud: los que no cupieron quedan en
|
|
249
|
+
* `remaining`, en el turno del firmante, para firmarlos con un OTP nuevo.
|
|
250
|
+
*/
|
|
251
|
+
export interface DocumentSignManyResponseEntity {
|
|
252
|
+
results: DocumentSignManyResultEntity[];
|
|
253
|
+
signed: number;
|
|
254
|
+
failed: number;
|
|
255
|
+
remaining: DocumentEntity['id'][];
|
|
256
|
+
/** FirmaGob avisó que el OTP venció antes de firmar todos los documentos de la solicitud. */
|
|
257
|
+
otpExpired: boolean;
|
|
258
|
+
}
|
|
103
259
|
export interface DocumentDiscardResponseEntity {
|
|
104
260
|
id: DocumentEntity['id'];
|
|
105
261
|
ok: boolean;
|
|
106
262
|
}
|
|
263
|
+
export interface DocumentAnnulResponseEntity {
|
|
264
|
+
id: DocumentEntity['id'];
|
|
265
|
+
ok: boolean;
|
|
266
|
+
}
|
|
267
|
+
/**
|
|
268
|
+
* Qué se le dice a quien comprueba un documento con su código, sin sesión:
|
|
269
|
+
* - `Finished`: es un documento oficial vigente;
|
|
270
|
+
* - `Annulled`: lo fue, pero quedó sin efecto;
|
|
271
|
+
* - `InProgress`: todavía se está firmando, así que la copia que tiene no es el documento oficial.
|
|
272
|
+
*/
|
|
273
|
+
export type DocumentVerificationState = 'Finished' | 'Annulled' | 'InProgress';
|
|
274
|
+
/**
|
|
275
|
+
* Respuesta pública de la verificación. Dice lo necesario para comprobar la autenticidad (tipo, número, fecha y
|
|
276
|
+
* quiénes firmaron); la materia y la descarga solo se entregan si el documento es de acceso público.
|
|
277
|
+
*/
|
|
278
|
+
export interface DocumentVerifyResponseEntity {
|
|
279
|
+
state: DocumentVerificationState;
|
|
280
|
+
verificationCode: string;
|
|
281
|
+
documentType: Pick<DocumentTypeSummaryEntity, 'name' | 'abbreviation'>;
|
|
282
|
+
correlative: DocumentEntity['correlative'];
|
|
283
|
+
correlativeYear: DocumentEntity['correlativeYear'];
|
|
284
|
+
numberedAt: DocumentEntity['numberedAt'];
|
|
285
|
+
finishedAt: DocumentEntity['finishedAt'];
|
|
286
|
+
annulledAt: DocumentEntity['annulledAt'];
|
|
287
|
+
signers: {
|
|
288
|
+
fullName: DocumentParticipantEntity['fullName'];
|
|
289
|
+
position: DocumentParticipantEntity['position'];
|
|
290
|
+
signedAt: DocumentParticipantEntity['resolvedAt'];
|
|
291
|
+
}[];
|
|
292
|
+
subject: DocumentEntity['subject'] | null;
|
|
293
|
+
canDownload: boolean;
|
|
294
|
+
}
|
|
295
|
+
/** Archivo de un documento público, para que el gateway lo entregue a quien lo verifica. */
|
|
296
|
+
export interface DocumentPublicFileResponseEntity {
|
|
297
|
+
fileId: string;
|
|
298
|
+
fileName: string;
|
|
299
|
+
}
|
|
300
|
+
export interface DocumentDeriveResponseEntity {
|
|
301
|
+
id: DocumentEntity['id'];
|
|
302
|
+
ok: boolean;
|
|
303
|
+
delivered: number;
|
|
304
|
+
}
|
|
305
|
+
export interface DocumentCloseDeliveryResponseEntity {
|
|
306
|
+
id: DocumentDeliveryEntity['id'];
|
|
307
|
+
ok: boolean;
|
|
308
|
+
}
|
|
309
|
+
export interface DocumentReassignResponseEntity {
|
|
310
|
+
id: DocumentEntity['id'];
|
|
311
|
+
ok: boolean;
|
|
312
|
+
}
|
|
313
|
+
/**
|
|
314
|
+
* Un plazo en la agenda de un funcionario: lo que recibió (como destinatario o por derivación) y debe atender, o un
|
|
315
|
+
* documento que envió y del que espera respuesta.
|
|
316
|
+
*/
|
|
317
|
+
export interface DocumentAgendaItemEntity {
|
|
318
|
+
kind: 'Received' | 'Sent';
|
|
319
|
+
/** La entrega (lo recibido) o el documento (lo enviado). */
|
|
320
|
+
id: string;
|
|
321
|
+
documentId: DocumentEntity['id'];
|
|
322
|
+
subject: DocumentEntity['subject'];
|
|
323
|
+
documentType: {
|
|
324
|
+
name: string;
|
|
325
|
+
abbreviation: string | null;
|
|
326
|
+
};
|
|
327
|
+
correlative: DocumentEntity['correlative'];
|
|
328
|
+
correlativeYear: DocumentEntity['correlativeYear'];
|
|
329
|
+
intakeNumber: DocumentEntity['intakeNumber'];
|
|
330
|
+
intakeYear: DocumentEntity['intakeYear'];
|
|
331
|
+
/** Plazo, en ISO 8601. */
|
|
332
|
+
dueAt: string;
|
|
333
|
+
/** Lo recibido: cuándo lo marcó como atendido (sin valor si sigue pendiente). */
|
|
334
|
+
closedAt: string | null;
|
|
335
|
+
/** Lo recibido: la providencia y quién lo derivó. */
|
|
336
|
+
instruction: DocumentDeliveryEntity['instruction'] | null;
|
|
337
|
+
sentByFullName: string | null;
|
|
338
|
+
/** Lo enviado: a cuántos les llegó y cuántos aún no lo atienden. */
|
|
339
|
+
recipients: {
|
|
340
|
+
total: number;
|
|
341
|
+
pending: number;
|
|
342
|
+
} | null;
|
|
343
|
+
}
|
|
344
|
+
export interface DocumentAgendaResponseEntity {
|
|
345
|
+
/** Plazos dentro del período pedido. */
|
|
346
|
+
items: DocumentAgendaItemEntity[];
|
|
347
|
+
/** Lo recibido con el plazo vencido y sin atender, de cualquier fecha (los 50 más antiguos). */
|
|
348
|
+
overdue: DocumentAgendaItemEntity[];
|
|
349
|
+
}
|
|
350
|
+
/** Trazabilidad de un documento en PDF, lista para descargar. */
|
|
351
|
+
export interface DocumentTrailExportEntity {
|
|
352
|
+
fileName: string;
|
|
353
|
+
contentType: string;
|
|
354
|
+
contentBase64: string;
|
|
355
|
+
}
|
|
@@ -1,4 +1,15 @@
|
|
|
1
|
-
import { DocumentTypeEntity } from '../../base/entities';
|
|
1
|
+
import { DocumentTypeEntity, DocumentTypeFlowStepEntity } from '../../base/entities';
|
|
2
|
+
/** Paso del flujo sugerido de un tipo documental: quién visa o firma, en su orden. */
|
|
3
|
+
export interface DocumentTypeFlowStepResponseEntity {
|
|
4
|
+
id: DocumentTypeFlowStepEntity['id'];
|
|
5
|
+
role: DocumentTypeFlowStepEntity['role'];
|
|
6
|
+
order: DocumentTypeFlowStepEntity['order'];
|
|
7
|
+
type: DocumentTypeFlowStepEntity['type'];
|
|
8
|
+
employeeId: DocumentTypeFlowStepEntity['employeeId'];
|
|
9
|
+
directorateCodeReference: DocumentTypeFlowStepEntity['directorateCodeReference'];
|
|
10
|
+
name: DocumentTypeFlowStepEntity['name'];
|
|
11
|
+
position: DocumentTypeFlowStepEntity['position'];
|
|
12
|
+
}
|
|
2
13
|
export interface DocumentTypeGetAllResponseEntity {
|
|
3
14
|
id: DocumentTypeEntity['id'];
|
|
4
15
|
name: DocumentTypeEntity['name'];
|
|
@@ -8,11 +19,17 @@ export interface DocumentTypeGetAllResponseEntity {
|
|
|
8
19
|
nextCorrelative: DocumentTypeEntity['nextCorrelative'];
|
|
9
20
|
correlativeYear: DocumentTypeEntity['correlativeYear'];
|
|
10
21
|
resetsYearly: DocumentTypeEntity['resetsYearly'];
|
|
22
|
+
numbered: DocumentTypeEntity['numbered'];
|
|
11
23
|
directorateCodeReference: DocumentTypeEntity['directorateCodeReference'];
|
|
12
24
|
enabled: DocumentTypeEntity['enabled'];
|
|
25
|
+
flow: {
|
|
26
|
+
visa: number;
|
|
27
|
+
signature: number;
|
|
28
|
+
};
|
|
13
29
|
}
|
|
14
30
|
export interface DocumentTypeGetByIdResponseEntity extends DocumentTypeGetAllResponseEntity {
|
|
15
31
|
lastCorrelative: number | null;
|
|
32
|
+
flowSteps: DocumentTypeFlowStepResponseEntity[];
|
|
16
33
|
}
|
|
17
34
|
export interface DocumentTypeCreateResponseEntity {
|
|
18
35
|
id: DocumentTypeEntity['id'];
|
package/dist/entities/index.d.ts
CHANGED
package/dist/entities/index.js
CHANGED
|
@@ -16,3 +16,9 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./documentType"), exports);
|
|
18
18
|
__exportStar(require("./document"), exports);
|
|
19
|
+
__exportStar(require("./procedure"), exports);
|
|
20
|
+
__exportStar(require("./caseFile"), exports);
|
|
21
|
+
__exportStar(require("./partsOffice"), exports);
|
|
22
|
+
__exportStar(require("./registerBook"), exports);
|
|
23
|
+
__exportStar(require("./signatureBatch"), exports);
|
|
24
|
+
__exportStar(require("./workFolder"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './partsOffice.entity';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./partsOffice.entity"), exports);
|