@muni-sanfer/types-gestor-documental 0.0.1-beta.3 → 0.0.1-beta.5
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 +295 -1
- package/dist/base/entities.js +72 -1
- package/dist/contracts/caseFile.contract.d.ts +149 -0
- package/dist/contracts/caseFile.contract.js +17 -0
- package/dist/contracts/document.contract.d.ts +6 -0
- package/dist/contracts/index.d.ts +45 -1
- package/dist/contracts/index.js +9 -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/entities/caseFile/caseFile.entity.d.ts +169 -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 +47 -0
- package/dist/entities/index.d.ts +3 -0
- package/dist/entities/index.js +3 -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/package.json +1 -1
- package/src/base/entities.ts +348 -1
- package/src/contracts/caseFile.contract.ts +134 -0
- package/src/contracts/document.contract.ts +8 -0
- package/src/contracts/index.ts +14 -1
- package/src/contracts/partsOffice.contract.ts +120 -0
- package/src/contracts/procedure.contract.ts +53 -0
- package/src/entities/caseFile/caseFile.entity.ts +196 -0
- package/src/entities/caseFile/index.ts +1 -0
- package/src/entities/document/document.entity.ts +44 -0
- package/src/entities/index.ts +3 -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
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import { type DocumentAccessLevel, type DocumentInstruction } from '../base/entities';
|
|
2
|
+
import { type DocDigitalDocumentTypeEntity, type DocDigitalEntityEntity, type PartsOfficeInboundEntity, type DocDigitalUserEntity, type PartsOfficeDispatchEntity, type PartsOfficeFileEntity, type PartsOfficeOkResponseEntity, type PartsOfficeRegisterResponseEntity, type PartsOfficeStatusEntity, type PartsOfficeSummaryEntity, type PartsOfficeSyncResponseEntity } from '../entities';
|
|
3
|
+
import { type RpcPage } from './contract';
|
|
4
|
+
import { type DocumentActor, type DocumentExternalRecipientInput } from './document.contract';
|
|
5
|
+
/** Patrones NATS de `partsOffice` (Oficina de Partes y DocDigital): `<servicio>.<recurso>.<acción>`. */
|
|
6
|
+
export declare const PartsOfficePatterns: {
|
|
7
|
+
readonly getStatus: "gestorDocumental.partsOffice.getStatus";
|
|
8
|
+
readonly getSummary: "gestorDocumental.partsOffice.getSummary";
|
|
9
|
+
readonly getEntities: "gestorDocumental.partsOffice.getEntities";
|
|
10
|
+
readonly getUsers: "gestorDocumental.partsOffice.getUsers";
|
|
11
|
+
readonly getDocumentTypes: "gestorDocumental.partsOffice.getDocumentTypes";
|
|
12
|
+
readonly getDispatches: "gestorDocumental.partsOffice.getDispatches";
|
|
13
|
+
readonly dispatch: "gestorDocumental.partsOffice.dispatch";
|
|
14
|
+
readonly returnDispatch: "gestorDocumental.partsOffice.returnDispatch";
|
|
15
|
+
readonly resendDispatch: "gestorDocumental.partsOffice.resendDispatch";
|
|
16
|
+
readonly getDispatchFile: "gestorDocumental.partsOffice.getDispatchFile";
|
|
17
|
+
readonly getInbound: "gestorDocumental.partsOffice.getInbound";
|
|
18
|
+
readonly syncInbound: "gestorDocumental.partsOffice.syncInbound";
|
|
19
|
+
readonly registerInbound: "gestorDocumental.partsOffice.registerInbound";
|
|
20
|
+
readonly acknowledgeInbound: "gestorDocumental.partsOffice.acknowledgeInbound";
|
|
21
|
+
readonly returnInbound: "gestorDocumental.partsOffice.returnInbound";
|
|
22
|
+
readonly getInboundFile: "gestorDocumental.partsOffice.getInboundFile";
|
|
23
|
+
};
|
|
24
|
+
/** Destinatario interno de un ingreso, ya resuelto por el gateway (las áreas con sus integrantes). */
|
|
25
|
+
export type PartsOfficeRecipientInput = {
|
|
26
|
+
type: 'Employee';
|
|
27
|
+
employeeId: string;
|
|
28
|
+
} | {
|
|
29
|
+
type: 'Directorate';
|
|
30
|
+
directorateCodeReference: number;
|
|
31
|
+
name: string;
|
|
32
|
+
memberEmployeeIds: string[];
|
|
33
|
+
} | {
|
|
34
|
+
type: 'Department';
|
|
35
|
+
departmentId: string;
|
|
36
|
+
name: string;
|
|
37
|
+
memberEmployeeIds: string[];
|
|
38
|
+
};
|
|
39
|
+
interface IListPayload<S> {
|
|
40
|
+
pagination?: {
|
|
41
|
+
page?: number;
|
|
42
|
+
limit?: number;
|
|
43
|
+
};
|
|
44
|
+
filters?: {
|
|
45
|
+
search?: string;
|
|
46
|
+
status?: S;
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
export interface PartsOfficeContract {
|
|
50
|
+
[PartsOfficePatterns.getStatus]: {
|
|
51
|
+
payload: Record<string, never>;
|
|
52
|
+
response: PartsOfficeStatusEntity;
|
|
53
|
+
};
|
|
54
|
+
[PartsOfficePatterns.getSummary]: {
|
|
55
|
+
payload: Record<string, never>;
|
|
56
|
+
response: PartsOfficeSummaryEntity;
|
|
57
|
+
};
|
|
58
|
+
/** Directorio de DocDigital: instituciones por nombre. */
|
|
59
|
+
[PartsOfficePatterns.getEntities]: {
|
|
60
|
+
payload: {
|
|
61
|
+
search?: string;
|
|
62
|
+
};
|
|
63
|
+
response: DocDigitalEntityEntity[];
|
|
64
|
+
};
|
|
65
|
+
[PartsOfficePatterns.getUsers]: {
|
|
66
|
+
payload: {
|
|
67
|
+
entityId: number;
|
|
68
|
+
search?: string;
|
|
69
|
+
};
|
|
70
|
+
response: DocDigitalUserEntity[];
|
|
71
|
+
};
|
|
72
|
+
[PartsOfficePatterns.getDocumentTypes]: {
|
|
73
|
+
payload: Record<string, never>;
|
|
74
|
+
response: DocDigitalDocumentTypeEntity[];
|
|
75
|
+
};
|
|
76
|
+
[PartsOfficePatterns.getDispatches]: {
|
|
77
|
+
payload: IListPayload<'Pending' | 'Dispatched' | 'Returned'>;
|
|
78
|
+
response: RpcPage<PartsOfficeDispatchEntity[]>;
|
|
79
|
+
};
|
|
80
|
+
/** Despacha por DocDigital, con el número del documento como folio. `operatorRun`: RUN de quien despacha. */
|
|
81
|
+
[PartsOfficePatterns.dispatch]: {
|
|
82
|
+
payload: {
|
|
83
|
+
id: string;
|
|
84
|
+
docDigitalTypeId: number;
|
|
85
|
+
operatorRun?: string | null;
|
|
86
|
+
actor: DocumentActor;
|
|
87
|
+
};
|
|
88
|
+
response: PartsOfficeOkResponseEntity & {
|
|
89
|
+
docDigitalDocumentId: string;
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
/** Devuelve el despacho al redactor, con el motivo (por ejemplo, un destinatario equivocado). */
|
|
93
|
+
[PartsOfficePatterns.returnDispatch]: {
|
|
94
|
+
payload: {
|
|
95
|
+
id: string;
|
|
96
|
+
reason: string;
|
|
97
|
+
actor: DocumentActor;
|
|
98
|
+
};
|
|
99
|
+
response: PartsOfficeOkResponseEntity;
|
|
100
|
+
};
|
|
101
|
+
/** El redactor corrige las instituciones de destino de un despacho devuelto y lo envía de nuevo a Partes. */
|
|
102
|
+
[PartsOfficePatterns.resendDispatch]: {
|
|
103
|
+
payload: {
|
|
104
|
+
id: string;
|
|
105
|
+
externalRecipients: DocumentExternalRecipientInput[];
|
|
106
|
+
actor: DocumentActor;
|
|
107
|
+
};
|
|
108
|
+
response: PartsOfficeOkResponseEntity;
|
|
109
|
+
};
|
|
110
|
+
/** PDF firmado de un documento por despachar, para que Oficina de Partes lo revise. */
|
|
111
|
+
[PartsOfficePatterns.getDispatchFile]: {
|
|
112
|
+
payload: {
|
|
113
|
+
id: string;
|
|
114
|
+
};
|
|
115
|
+
response: PartsOfficeFileEntity;
|
|
116
|
+
};
|
|
117
|
+
[PartsOfficePatterns.getInbound]: {
|
|
118
|
+
payload: IListPayload<'Pending' | 'Registered' | 'Returned'>;
|
|
119
|
+
response: RpcPage<PartsOfficeInboundEntity[]>;
|
|
120
|
+
};
|
|
121
|
+
/** Trae de DocDigital lo recibido que aún no tiene acuse de recibo. */
|
|
122
|
+
[PartsOfficePatterns.syncInbound]: {
|
|
123
|
+
payload: Record<string, never>;
|
|
124
|
+
response: PartsOfficeSyncResponseEntity;
|
|
125
|
+
};
|
|
126
|
+
/**
|
|
127
|
+
* Ingresa un recibido al gestor: le da folio de ingreso, lo deriva a quienes corresponda y da el acuse de recibo
|
|
128
|
+
* en DocDigital.
|
|
129
|
+
*/
|
|
130
|
+
[PartsOfficePatterns.registerInbound]: {
|
|
131
|
+
payload: {
|
|
132
|
+
id: string;
|
|
133
|
+
documentTypeId: string;
|
|
134
|
+
keywords: string[];
|
|
135
|
+
accessLevel: DocumentAccessLevel;
|
|
136
|
+
hasSensitiveData: boolean;
|
|
137
|
+
recipients: PartsOfficeRecipientInput[];
|
|
138
|
+
instruction: DocumentInstruction;
|
|
139
|
+
note?: string | null;
|
|
140
|
+
dueAt?: string | null;
|
|
141
|
+
actor: DocumentActor;
|
|
142
|
+
};
|
|
143
|
+
response: PartsOfficeRegisterResponseEntity;
|
|
144
|
+
};
|
|
145
|
+
/** Reintenta el acuse de recibo de un recibido ya ingresado. */
|
|
146
|
+
[PartsOfficePatterns.acknowledgeInbound]: {
|
|
147
|
+
payload: {
|
|
148
|
+
id: string;
|
|
149
|
+
actor: DocumentActor;
|
|
150
|
+
};
|
|
151
|
+
response: PartsOfficeOkResponseEntity;
|
|
152
|
+
};
|
|
153
|
+
/** Devuelve el recibido a la institución que lo envió, con el motivo (entre 3 y 255 caracteres). */
|
|
154
|
+
[PartsOfficePatterns.returnInbound]: {
|
|
155
|
+
payload: {
|
|
156
|
+
id: string;
|
|
157
|
+
reason: string;
|
|
158
|
+
actor: DocumentActor;
|
|
159
|
+
};
|
|
160
|
+
response: PartsOfficeOkResponseEntity;
|
|
161
|
+
};
|
|
162
|
+
/** Archivo de un recibido: el principal o, con `attachment`, uno de sus anexos (por su posición). */
|
|
163
|
+
[PartsOfficePatterns.getInboundFile]: {
|
|
164
|
+
payload: {
|
|
165
|
+
id: string;
|
|
166
|
+
attachment?: number;
|
|
167
|
+
};
|
|
168
|
+
response: PartsOfficeFileEntity;
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PartsOfficePatterns = void 0;
|
|
4
|
+
/** Patrones NATS de `partsOffice` (Oficina de Partes y DocDigital): `<servicio>.<recurso>.<acción>`. */
|
|
5
|
+
exports.PartsOfficePatterns = {
|
|
6
|
+
getStatus: 'gestorDocumental.partsOffice.getStatus',
|
|
7
|
+
getSummary: 'gestorDocumental.partsOffice.getSummary',
|
|
8
|
+
getEntities: 'gestorDocumental.partsOffice.getEntities',
|
|
9
|
+
getUsers: 'gestorDocumental.partsOffice.getUsers',
|
|
10
|
+
getDocumentTypes: 'gestorDocumental.partsOffice.getDocumentTypes',
|
|
11
|
+
getDispatches: 'gestorDocumental.partsOffice.getDispatches',
|
|
12
|
+
dispatch: 'gestorDocumental.partsOffice.dispatch',
|
|
13
|
+
returnDispatch: 'gestorDocumental.partsOffice.returnDispatch',
|
|
14
|
+
resendDispatch: 'gestorDocumental.partsOffice.resendDispatch',
|
|
15
|
+
getDispatchFile: 'gestorDocumental.partsOffice.getDispatchFile',
|
|
16
|
+
getInbound: 'gestorDocumental.partsOffice.getInbound',
|
|
17
|
+
syncInbound: 'gestorDocumental.partsOffice.syncInbound',
|
|
18
|
+
registerInbound: 'gestorDocumental.partsOffice.registerInbound',
|
|
19
|
+
acknowledgeInbound: 'gestorDocumental.partsOffice.acknowledgeInbound',
|
|
20
|
+
returnInbound: 'gestorDocumental.partsOffice.returnInbound',
|
|
21
|
+
getInboundFile: 'gestorDocumental.partsOffice.getInboundFile',
|
|
22
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { type ProcedureEntity } from '../base/entities';
|
|
2
|
+
import { type ProcedureCreateResponseEntity, type ProcedureGetAllResponseEntity, type ProcedureGetByIdResponseEntity, type ProcedureUpdateResponseEntity } from '../entities';
|
|
3
|
+
import { type RpcPage } from './contract';
|
|
4
|
+
/** Patrones NATS de `procedure`: `<servicio>.<recurso>.<acción>`. */
|
|
5
|
+
export declare const ProcedurePatterns: {
|
|
6
|
+
readonly getAll: "gestorDocumental.procedure.getAll";
|
|
7
|
+
readonly getById: "gestorDocumental.procedure.getById";
|
|
8
|
+
readonly create: "gestorDocumental.procedure.create";
|
|
9
|
+
readonly update: "gestorDocumental.procedure.update";
|
|
10
|
+
readonly setEnabled: "gestorDocumental.procedure.setEnabled";
|
|
11
|
+
};
|
|
12
|
+
/** Datos de un procedimiento administrativo al crearlo o editarlo. */
|
|
13
|
+
export interface ProcedureWritePayload {
|
|
14
|
+
name: string;
|
|
15
|
+
cpatId?: string | null;
|
|
16
|
+
cpatCode?: string | null;
|
|
17
|
+
description?: string | null;
|
|
18
|
+
enabled?: boolean;
|
|
19
|
+
}
|
|
20
|
+
export interface ProcedureContract {
|
|
21
|
+
[ProcedurePatterns.getAll]: {
|
|
22
|
+
payload: {
|
|
23
|
+
pagination?: {
|
|
24
|
+
page?: number;
|
|
25
|
+
limit?: number;
|
|
26
|
+
};
|
|
27
|
+
filters?: {
|
|
28
|
+
search?: string;
|
|
29
|
+
enabled?: boolean;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
response: RpcPage<ProcedureGetAllResponseEntity[]>;
|
|
33
|
+
};
|
|
34
|
+
[ProcedurePatterns.getById]: {
|
|
35
|
+
payload: Pick<ProcedureEntity, 'id'>;
|
|
36
|
+
response: ProcedureGetByIdResponseEntity;
|
|
37
|
+
};
|
|
38
|
+
[ProcedurePatterns.create]: {
|
|
39
|
+
payload: ProcedureWritePayload;
|
|
40
|
+
response: ProcedureCreateResponseEntity;
|
|
41
|
+
};
|
|
42
|
+
[ProcedurePatterns.update]: {
|
|
43
|
+
payload: ProcedureWritePayload & Pick<ProcedureEntity, 'id'>;
|
|
44
|
+
response: ProcedureUpdateResponseEntity;
|
|
45
|
+
};
|
|
46
|
+
[ProcedurePatterns.setEnabled]: {
|
|
47
|
+
payload: Pick<ProcedureEntity, 'id' | 'enabled'>;
|
|
48
|
+
response: ProcedureUpdateResponseEntity;
|
|
49
|
+
};
|
|
50
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ProcedurePatterns = void 0;
|
|
4
|
+
/** Patrones NATS de `procedure`: `<servicio>.<recurso>.<acción>`. */
|
|
5
|
+
exports.ProcedurePatterns = {
|
|
6
|
+
getAll: 'gestorDocumental.procedure.getAll',
|
|
7
|
+
getById: 'gestorDocumental.procedure.getById',
|
|
8
|
+
create: 'gestorDocumental.procedure.create',
|
|
9
|
+
update: 'gestorDocumental.procedure.update',
|
|
10
|
+
setEnabled: 'gestorDocumental.procedure.setEnabled',
|
|
11
|
+
};
|
|
@@ -0,0 +1,169 @@
|
|
|
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
|
+
export interface CaseFileAddEntryResponseEntity {
|
|
140
|
+
id: CaseFileEntity['id'];
|
|
141
|
+
entryId: CaseFileEntryEntity['id'];
|
|
142
|
+
sequence: CaseFileEntryEntity['sequence'];
|
|
143
|
+
ok: boolean;
|
|
144
|
+
}
|
|
145
|
+
/** Archivo de una entrada del índice, para servirlo a quien puede ver el expediente. */
|
|
146
|
+
export interface CaseFileEntryFileResponseEntity {
|
|
147
|
+
fileId: string;
|
|
148
|
+
fileName: string;
|
|
149
|
+
}
|
|
150
|
+
/** Archivo que va dentro del expediente exportado, con la huella que tenía al incorporarse. */
|
|
151
|
+
export interface CaseFileExportFileEntity {
|
|
152
|
+
entryId: CaseFileEntryEntity['id'];
|
|
153
|
+
sequence: CaseFileEntryEntity['sequence'];
|
|
154
|
+
/** Ruta dentro del ZIP. Ej: `documentos/001-decreto-alcaldicio-exento-590-2026.pdf`. */
|
|
155
|
+
path: string;
|
|
156
|
+
fileId: string;
|
|
157
|
+
sha256: string | null;
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* Expediente listo para exportar: los metadatos con sus códigos oficiales (va tal cual como `expediente.json`) y los
|
|
161
|
+
* archivos que hay que agregar. El ZIP lo arma el gateway.
|
|
162
|
+
*/
|
|
163
|
+
export interface CaseFileExportResponseEntity {
|
|
164
|
+
code: CaseFileEntity['code'];
|
|
165
|
+
manifest: Record<string, unknown>;
|
|
166
|
+
files: CaseFileExportFileEntity[];
|
|
167
|
+
}
|
|
168
|
+
/** Expediente en que está incorporado un documento, visto desde el documento. */
|
|
169
|
+
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);
|
|
@@ -55,6 +55,31 @@ export interface DocumentLinkEntity {
|
|
|
55
55
|
createdByFullName: DocumentEntity['createdByFullName'];
|
|
56
56
|
finishedAt: DocumentEntity['finishedAt'];
|
|
57
57
|
documentType: DocumentTypeSummaryEntity;
|
|
58
|
+
/** Folio de ingreso de Oficina de Partes, si llegó por DocDigital. */
|
|
59
|
+
intakeNumber: DocumentEntity['intakeNumber'];
|
|
60
|
+
intakeYear: DocumentEntity['intakeYear'];
|
|
61
|
+
}
|
|
62
|
+
/** Institución (y usuario) de DocDigital a la que va dirigido un documento. */
|
|
63
|
+
export interface DocumentExternalRecipientResponseEntity {
|
|
64
|
+
id: string;
|
|
65
|
+
entityId: number;
|
|
66
|
+
entityName: string;
|
|
67
|
+
userId: number | null;
|
|
68
|
+
userName: string | null;
|
|
69
|
+
userPosition: string | null;
|
|
70
|
+
}
|
|
71
|
+
/** Despacho de un documento por DocDigital. */
|
|
72
|
+
export interface DocumentDispatchResponseEntity {
|
|
73
|
+
id: string;
|
|
74
|
+
status: 'Pending' | 'Dispatched' | 'Returned';
|
|
75
|
+
folio: string | null;
|
|
76
|
+
docDigitalTypeName: string | null;
|
|
77
|
+
docDigitalDocumentId: string | null;
|
|
78
|
+
dispatchedAt: string | null;
|
|
79
|
+
dispatchedByFullName: string | null;
|
|
80
|
+
returnedAt: string | null;
|
|
81
|
+
returnedByFullName: string | null;
|
|
82
|
+
returnReason: string | null;
|
|
58
83
|
}
|
|
59
84
|
export interface DocumentGetAllResponseEntity {
|
|
60
85
|
id: DocumentEntity['id'];
|
|
@@ -69,6 +94,9 @@ export interface DocumentGetAllResponseEntity {
|
|
|
69
94
|
createdByEmployeeId: DocumentEntity['createdByEmployeeId'];
|
|
70
95
|
createdByFullName: DocumentEntity['createdByFullName'];
|
|
71
96
|
documentType: DocumentTypeSummaryEntity;
|
|
97
|
+
intakeNumber: DocumentEntity['intakeNumber'];
|
|
98
|
+
intakeYear: DocumentEntity['intakeYear'];
|
|
99
|
+
origin: DocumentEntity['origin'];
|
|
72
100
|
currentParticipant: Pick<DocumentParticipantResponseEntity, 'role' | 'employeeId' | 'fullName'> | null;
|
|
73
101
|
distribution: {
|
|
74
102
|
total: number;
|
|
@@ -116,6 +144,23 @@ export interface DocumentGetByIdResponseEntity {
|
|
|
116
144
|
deliveries: DocumentDeliveryResponseEntity[];
|
|
117
145
|
replyTo: DocumentLinkEntity | null;
|
|
118
146
|
replies: DocumentLinkEntity[];
|
|
147
|
+
/** Expedientes en que está incorporado y que quien consulta puede ver. */
|
|
148
|
+
caseFiles: {
|
|
149
|
+
id: string;
|
|
150
|
+
code: string;
|
|
151
|
+
title: string;
|
|
152
|
+
status: 'Open' | 'Closed';
|
|
153
|
+
}[];
|
|
154
|
+
/** De dónde viene: del gestor o recibido por DocDigital, con su folio de ingreso y los datos de quien lo envió. */
|
|
155
|
+
origin: DocumentEntity['origin'];
|
|
156
|
+
intakeNumber: DocumentEntity['intakeNumber'];
|
|
157
|
+
intakeYear: DocumentEntity['intakeYear'];
|
|
158
|
+
externalFolio: DocumentEntity['externalFolio'];
|
|
159
|
+
externalSender: DocumentEntity['externalSender'];
|
|
160
|
+
externalDate: DocumentEntity['externalDate'];
|
|
161
|
+
/** Instituciones de DocDigital a quienes va dirigido, y su despacho por Oficina de Partes. */
|
|
162
|
+
externalRecipients: DocumentExternalRecipientResponseEntity[];
|
|
163
|
+
dispatch: DocumentDispatchResponseEntity | null;
|
|
119
164
|
documentType: DocumentTypeSummaryEntity;
|
|
120
165
|
participants: DocumentParticipantResponseEntity[];
|
|
121
166
|
attachments: {
|
|
@@ -140,6 +185,8 @@ export interface DocumentGetByIdResponseEntity {
|
|
|
140
185
|
canDerive: boolean;
|
|
141
186
|
canReply: boolean;
|
|
142
187
|
canReassign: boolean;
|
|
188
|
+
/** Quien consulta redactó el documento (o lo ingresó, si llegó por DocDigital). */
|
|
189
|
+
isAuthor: boolean;
|
|
143
190
|
inbox: DocumentDeliveryResponseEntity[];
|
|
144
191
|
};
|
|
145
192
|
signatureRequiresOtp: boolean;
|
package/dist/entities/index.d.ts
CHANGED
package/dist/entities/index.js
CHANGED
|
@@ -16,3 +16,6 @@ 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);
|
|
@@ -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);
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { type DocumentDispatchResponseEntity, type DocumentExternalRecipientResponseEntity, type DocumentLinkEntity } from '../document';
|
|
2
|
+
/** Institución del Estado en DocDigital. */
|
|
3
|
+
export interface DocDigitalEntityEntity {
|
|
4
|
+
id: number;
|
|
5
|
+
name: string;
|
|
6
|
+
/** Organismo al que pertenece (la entidad padre). */
|
|
7
|
+
organism: string | null;
|
|
8
|
+
}
|
|
9
|
+
/** Usuario habilitado de una institución en DocDigital. */
|
|
10
|
+
export interface DocDigitalUserEntity {
|
|
11
|
+
id: number;
|
|
12
|
+
name: string;
|
|
13
|
+
position: string | null;
|
|
14
|
+
}
|
|
15
|
+
export interface DocDigitalDocumentTypeEntity {
|
|
16
|
+
id: number;
|
|
17
|
+
name: string;
|
|
18
|
+
}
|
|
19
|
+
/** Si DocDigital está configurado en el gestor y cada cuánto se revisa lo recibido. */
|
|
20
|
+
export interface PartsOfficeStatusEntity {
|
|
21
|
+
configured: boolean;
|
|
22
|
+
syncMinutes: number;
|
|
23
|
+
}
|
|
24
|
+
/** Totales del Panel de Partes. */
|
|
25
|
+
export interface PartsOfficeSummaryEntity {
|
|
26
|
+
toDispatch: number;
|
|
27
|
+
received: number;
|
|
28
|
+
}
|
|
29
|
+
/** Documento firmado que va a otras instituciones: lo despacha Oficina de Partes. */
|
|
30
|
+
export interface PartsOfficeDispatchEntity extends DocumentDispatchResponseEntity {
|
|
31
|
+
document: DocumentLinkEntity & {
|
|
32
|
+
accessLevel: string;
|
|
33
|
+
};
|
|
34
|
+
externalRecipients: DocumentExternalRecipientResponseEntity[];
|
|
35
|
+
createdAt: string;
|
|
36
|
+
}
|
|
37
|
+
/** Documento que llegó por DocDigital. */
|
|
38
|
+
export interface PartsOfficeInboundEntity {
|
|
39
|
+
id: string;
|
|
40
|
+
docDigitalDocumentId: string;
|
|
41
|
+
status: 'Pending' | 'Registered' | 'Returned';
|
|
42
|
+
subject: string;
|
|
43
|
+
description: string | null;
|
|
44
|
+
folio: string | null;
|
|
45
|
+
folioDate: string | null;
|
|
46
|
+
typeName: string | null;
|
|
47
|
+
reserved: boolean;
|
|
48
|
+
senderEntityName: string | null;
|
|
49
|
+
senderName: string | null;
|
|
50
|
+
senderPosition: string | null;
|
|
51
|
+
fileName: string | null;
|
|
52
|
+
hasFile: boolean;
|
|
53
|
+
attachments: {
|
|
54
|
+
name: string;
|
|
55
|
+
url: string | null;
|
|
56
|
+
hasFile: boolean;
|
|
57
|
+
}[];
|
|
58
|
+
createdAt: string;
|
|
59
|
+
registeredAt: string | null;
|
|
60
|
+
registeredByFullName: string | null;
|
|
61
|
+
acknowledgedAt: string | null;
|
|
62
|
+
acknowledgeError: string | null;
|
|
63
|
+
returnedAt: string | null;
|
|
64
|
+
returnedByFullName: string | null;
|
|
65
|
+
returnReason: string | null;
|
|
66
|
+
/** El documento con que quedó ingresado al gestor. */
|
|
67
|
+
document: {
|
|
68
|
+
id: string;
|
|
69
|
+
intakeNumber: number | null;
|
|
70
|
+
intakeYear: number | null;
|
|
71
|
+
} | null;
|
|
72
|
+
}
|
|
73
|
+
export interface PartsOfficeOkResponseEntity {
|
|
74
|
+
id: string;
|
|
75
|
+
ok: boolean;
|
|
76
|
+
/** Documento al que corresponde el despacho (al despachar o devolver). */
|
|
77
|
+
documentId?: string;
|
|
78
|
+
}
|
|
79
|
+
export interface PartsOfficeSyncResponseEntity {
|
|
80
|
+
/** Recibidos nuevos que se trajeron. */
|
|
81
|
+
created: number;
|
|
82
|
+
/** Los que no se pudieron traer (se reintentan en la próxima revisión). */
|
|
83
|
+
failed: number;
|
|
84
|
+
}
|
|
85
|
+
export interface PartsOfficeRegisterResponseEntity {
|
|
86
|
+
id: string;
|
|
87
|
+
documentId: string;
|
|
88
|
+
intakeNumber: number;
|
|
89
|
+
intakeYear: number;
|
|
90
|
+
/** `false` si DocDigital no aceptó el acuse de recibo: se puede reintentar. */
|
|
91
|
+
acknowledged: boolean;
|
|
92
|
+
ok: boolean;
|
|
93
|
+
}
|
|
94
|
+
/** Archivo de un recibido, ya copiado al gestor. */
|
|
95
|
+
export interface PartsOfficeFileEntity {
|
|
96
|
+
fileId: string;
|
|
97
|
+
fileName: string;
|
|
98
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './procedure.entity';
|