@muni-sanfer/types-gestor-documental 0.0.1-beta.15 → 0.0.1-beta.16
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 +36 -0
- package/dist/base/entities.js +5 -1
- package/dist/contracts/archivalSeries.contract.d.ts +50 -0
- package/dist/contracts/archivalSeries.contract.js +11 -0
- package/dist/contracts/caseFile.contract.d.ts +4 -0
- package/dist/contracts/document.contract.d.ts +1 -0
- package/dist/contracts/documentType.contract.d.ts +1 -0
- package/dist/contracts/index.d.ts +20 -1
- package/dist/contracts/index.js +6 -0
- package/dist/contracts/scan.contract.d.ts +63 -0
- package/dist/contracts/scan.contract.js +12 -0
- package/dist/entities/archivalSeries/archivalSeries.entity.d.ts +27 -0
- package/dist/entities/archivalSeries/archivalSeries.entity.js +2 -0
- package/dist/entities/archivalSeries/index.d.ts +1 -0
- package/dist/entities/archivalSeries/index.js +17 -0
- package/dist/entities/caseFile/caseFile.entity.d.ts +8 -0
- package/dist/entities/document/document.entity.d.ts +6 -0
- package/dist/entities/documentType/documentType.entity.d.ts +5 -0
- package/dist/entities/index.d.ts +2 -0
- package/dist/entities/index.js +2 -0
- package/dist/entities/scan/index.d.ts +1 -0
- package/dist/entities/scan/index.js +17 -0
- package/dist/entities/scan/scan.entity.d.ts +29 -0
- package/dist/entities/scan/scan.entity.js +2 -0
- package/package.json +1 -1
- package/src/base/entities.ts +40 -0
- package/src/contracts/archivalSeries.contract.ts +53 -0
- package/src/contracts/caseFile.contract.ts +4 -0
- package/src/contracts/document.contract.ts +2 -0
- package/src/contracts/documentType.contract.ts +2 -0
- package/src/contracts/index.ts +9 -1
- package/src/contracts/scan.contract.ts +52 -0
- package/src/entities/archivalSeries/archivalSeries.entity.ts +32 -0
- package/src/entities/archivalSeries/index.ts +1 -0
- package/src/entities/caseFile/caseFile.entity.ts +4 -0
- package/src/entities/document/document.entity.ts +4 -0
- package/src/entities/documentType/documentType.entity.ts +2 -0
- package/src/entities/index.ts +2 -0
- package/src/entities/scan/index.ts +1 -0
- package/src/entities/scan/scan.entity.ts +32 -0
package/dist/base/entities.d.ts
CHANGED
|
@@ -166,6 +166,11 @@ export declare const CaseFileAccessAction: {
|
|
|
166
166
|
FileDownloaded: "FileDownloaded";
|
|
167
167
|
Exported: "Exported";
|
|
168
168
|
};
|
|
169
|
+
export type ScanSessionStatus = 'Open' | 'Ready';
|
|
170
|
+
export declare const ScanSessionStatus: {
|
|
171
|
+
Open: "Open";
|
|
172
|
+
Ready: "Ready";
|
|
173
|
+
};
|
|
169
174
|
export type WorkFolderItemKind = 'Document' | 'File';
|
|
170
175
|
export declare const WorkFolderItemKind: {
|
|
171
176
|
Document: "Document";
|
|
@@ -182,6 +187,8 @@ export interface DocumentTypeEntity {
|
|
|
182
187
|
resetsYearly: boolean;
|
|
183
188
|
numbered: boolean;
|
|
184
189
|
directorateCodeReference?: number | null;
|
|
190
|
+
archivalSeries?: ArchivalSeriesEntity | null;
|
|
191
|
+
archivalSeriesId?: string | null;
|
|
185
192
|
issuingEntity?: IssuingEntityEntity | null;
|
|
186
193
|
issuingEntityId?: string | null;
|
|
187
194
|
sharesNumberingWith?: DocumentTypeEntity | null;
|
|
@@ -202,6 +209,7 @@ export interface DocumentEntity {
|
|
|
202
209
|
keywords: string[];
|
|
203
210
|
accessLevel: DocumentAccessLevel;
|
|
204
211
|
hasSensitiveData: boolean;
|
|
212
|
+
restrictionEndsAt?: string | null;
|
|
205
213
|
status: DocumentStatus;
|
|
206
214
|
correlative?: number | null;
|
|
207
215
|
correlativeYear?: number | null;
|
|
@@ -390,6 +398,9 @@ export interface CaseFileEntity {
|
|
|
390
398
|
status: CaseFileStatus;
|
|
391
399
|
accessLevel: DocumentAccessLevel;
|
|
392
400
|
hasSensitiveData: boolean;
|
|
401
|
+
restrictionEndsAt?: string | null;
|
|
402
|
+
archivalSeries?: ArchivalSeriesEntity | null;
|
|
403
|
+
archivalSeriesId?: string | null;
|
|
393
404
|
incorporationMechanism: CaseFileIncorporationMechanism;
|
|
394
405
|
schemaVersion: string;
|
|
395
406
|
procedure?: ProcedureEntity;
|
|
@@ -533,6 +544,18 @@ export interface DocumentEmailCopyEntity {
|
|
|
533
544
|
documentId: string;
|
|
534
545
|
createdAt: string;
|
|
535
546
|
}
|
|
547
|
+
export interface ScanSessionEntity {
|
|
548
|
+
id: string;
|
|
549
|
+
tokenHash: string;
|
|
550
|
+
status: ScanSessionStatus;
|
|
551
|
+
employeeId: string;
|
|
552
|
+
pages: JsonValue;
|
|
553
|
+
fileId?: string | null;
|
|
554
|
+
fileName?: string | null;
|
|
555
|
+
expiresAt: string;
|
|
556
|
+
finishedAt?: string | null;
|
|
557
|
+
createdAt: string;
|
|
558
|
+
}
|
|
536
559
|
export interface DocumentExternalRecipientEntity {
|
|
537
560
|
id: string;
|
|
538
561
|
entityId: number;
|
|
@@ -598,6 +621,19 @@ export interface DocDigitalInboundEntity {
|
|
|
598
621
|
createdAt: string;
|
|
599
622
|
updatedAt: string;
|
|
600
623
|
}
|
|
624
|
+
export interface ArchivalSeriesEntity {
|
|
625
|
+
id: string;
|
|
626
|
+
code: string;
|
|
627
|
+
name: string;
|
|
628
|
+
section?: string | null;
|
|
629
|
+
description?: string | null;
|
|
630
|
+
enabled: boolean;
|
|
631
|
+
documentTypes?: DocumentTypeEntity[];
|
|
632
|
+
caseFiles?: CaseFileEntity[];
|
|
633
|
+
deleted: boolean;
|
|
634
|
+
createdAt: string;
|
|
635
|
+
updatedAt: string;
|
|
636
|
+
}
|
|
601
637
|
export interface IssuingEntityEntity {
|
|
602
638
|
id: string;
|
|
603
639
|
name: string;
|
package/dist/base/entities.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// This file was auto-generated by prisma-generator-typescript-interfaces
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.WorkFolderItemKind = exports.CaseFileAccessAction = exports.CaseFileTrackingAction = exports.CaseFileActorType = exports.CaseFileActorRelation = exports.CaseFileEntryKind = exports.CaseFileActuationType = exports.CaseFileIncorporationMechanism = exports.CaseFileStatus = exports.DocumentInstruction = exports.DocumentDeliveryOrigin = exports.DocumentRecipientType = exports.DocumentAttachmentType = exports.DocumentFlowStepType = exports.DocDigitalInboundStatus = exports.DocumentDispatchStatus = exports.DocumentOrigin = exports.DocumentTrackingAction = exports.DocumentParticipantStatus = exports.DocumentParticipantRole = exports.DocumentAccessLevel = exports.DocumentStatus = exports.DocumentCategory = void 0;
|
|
4
|
+
exports.WorkFolderItemKind = exports.ScanSessionStatus = exports.CaseFileAccessAction = exports.CaseFileTrackingAction = exports.CaseFileActorType = exports.CaseFileActorRelation = exports.CaseFileEntryKind = exports.CaseFileActuationType = exports.CaseFileIncorporationMechanism = exports.CaseFileStatus = exports.DocumentInstruction = exports.DocumentDeliveryOrigin = exports.DocumentRecipientType = exports.DocumentAttachmentType = exports.DocumentFlowStepType = exports.DocDigitalInboundStatus = exports.DocumentDispatchStatus = exports.DocumentOrigin = exports.DocumentTrackingAction = exports.DocumentParticipantStatus = exports.DocumentParticipantRole = exports.DocumentAccessLevel = exports.DocumentStatus = exports.DocumentCategory = void 0;
|
|
5
5
|
exports.DocumentCategory = {
|
|
6
6
|
Decree: 'Decree',
|
|
7
7
|
Communication: 'Communication',
|
|
@@ -148,6 +148,10 @@ exports.CaseFileAccessAction = {
|
|
|
148
148
|
FileDownloaded: 'FileDownloaded',
|
|
149
149
|
Exported: 'Exported',
|
|
150
150
|
};
|
|
151
|
+
exports.ScanSessionStatus = {
|
|
152
|
+
Open: 'Open',
|
|
153
|
+
Ready: 'Ready',
|
|
154
|
+
};
|
|
151
155
|
exports.WorkFolderItemKind = {
|
|
152
156
|
Document: 'Document',
|
|
153
157
|
File: 'File',
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { type ArchivalSeriesEntity } from '../base/entities';
|
|
2
|
+
import { type ArchivalSeriesCreateResponseEntity, type ArchivalSeriesGetAllResponseEntity, type ArchivalSeriesGetByIdResponseEntity, type ArchivalSeriesUpdateResponseEntity } from '../entities';
|
|
3
|
+
import { type RpcPage } from './contract';
|
|
4
|
+
/** Patrones NATS de `archivalSeries` (series del Cuadro de Clasificación): `<servicio>.<recurso>.<acción>`. */
|
|
5
|
+
export declare const ArchivalSeriesPatterns: {
|
|
6
|
+
readonly getAll: "gestorDocumental.archivalSeries.getAll";
|
|
7
|
+
readonly getById: "gestorDocumental.archivalSeries.getById";
|
|
8
|
+
readonly create: "gestorDocumental.archivalSeries.create";
|
|
9
|
+
readonly update: "gestorDocumental.archivalSeries.update";
|
|
10
|
+
readonly setEnabled: "gestorDocumental.archivalSeries.setEnabled";
|
|
11
|
+
};
|
|
12
|
+
/** Datos de una serie documental al crearla o editarla. */
|
|
13
|
+
export interface ArchivalSeriesWritePayload {
|
|
14
|
+
code: string;
|
|
15
|
+
name: string;
|
|
16
|
+
section?: string | null;
|
|
17
|
+
description?: string | null;
|
|
18
|
+
enabled?: boolean;
|
|
19
|
+
}
|
|
20
|
+
export interface ArchivalSeriesContract {
|
|
21
|
+
[ArchivalSeriesPatterns.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<ArchivalSeriesGetAllResponseEntity[]>;
|
|
33
|
+
};
|
|
34
|
+
[ArchivalSeriesPatterns.getById]: {
|
|
35
|
+
payload: Pick<ArchivalSeriesEntity, 'id'>;
|
|
36
|
+
response: ArchivalSeriesGetByIdResponseEntity;
|
|
37
|
+
};
|
|
38
|
+
[ArchivalSeriesPatterns.create]: {
|
|
39
|
+
payload: ArchivalSeriesWritePayload;
|
|
40
|
+
response: ArchivalSeriesCreateResponseEntity;
|
|
41
|
+
};
|
|
42
|
+
[ArchivalSeriesPatterns.update]: {
|
|
43
|
+
payload: ArchivalSeriesWritePayload & Pick<ArchivalSeriesEntity, 'id'>;
|
|
44
|
+
response: ArchivalSeriesUpdateResponseEntity;
|
|
45
|
+
};
|
|
46
|
+
[ArchivalSeriesPatterns.setEnabled]: {
|
|
47
|
+
payload: Pick<ArchivalSeriesEntity, 'id' | 'enabled'>;
|
|
48
|
+
response: ArchivalSeriesUpdateResponseEntity;
|
|
49
|
+
};
|
|
50
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ArchivalSeriesPatterns = void 0;
|
|
4
|
+
/** Patrones NATS de `archivalSeries` (series del Cuadro de Clasificación): `<servicio>.<recurso>.<acción>`. */
|
|
5
|
+
exports.ArchivalSeriesPatterns = {
|
|
6
|
+
getAll: 'gestorDocumental.archivalSeries.getAll',
|
|
7
|
+
getById: 'gestorDocumental.archivalSeries.getById',
|
|
8
|
+
create: 'gestorDocumental.archivalSeries.create',
|
|
9
|
+
update: 'gestorDocumental.archivalSeries.update',
|
|
10
|
+
setEnabled: 'gestorDocumental.archivalSeries.setEnabled',
|
|
11
|
+
};
|
|
@@ -51,6 +51,10 @@ export interface CaseFileWritePayload {
|
|
|
51
51
|
procedureId: string;
|
|
52
52
|
accessLevel: DocumentAccessLevel;
|
|
53
53
|
hasSensitiveData: boolean;
|
|
54
|
+
/** MGDEE8_2: fin de la restricción de acceso (ISO 8601), si no es público. */
|
|
55
|
+
restrictionEndsAt?: string | null;
|
|
56
|
+
/** MGDEE1_2: serie del Cuadro de Clasificación. */
|
|
57
|
+
archivalSeriesId?: string | null;
|
|
54
58
|
actors?: CaseFileActorInput[];
|
|
55
59
|
}
|
|
56
60
|
/** Actuación que se incorpora al índice: un documento del gestor, un archivo subido u otro expediente. */
|
|
@@ -84,6 +84,7 @@ export interface DocumentWritePayload extends Pick<DocumentEntity, 'subject' | '
|
|
|
84
84
|
responseDueAt?: string | null;
|
|
85
85
|
replyToDocumentId?: string | null;
|
|
86
86
|
externalRecipients?: DocumentExternalRecipientInput[];
|
|
87
|
+
restrictionEndsAt?: string | null;
|
|
87
88
|
emailCopies?: DocumentEmailCopyInput[];
|
|
88
89
|
action?: 'Submit';
|
|
89
90
|
actor: DocumentActor;
|
|
@@ -36,6 +36,7 @@ export interface DocumentTypeWritePayload {
|
|
|
36
36
|
resetsYearly?: boolean;
|
|
37
37
|
numbered?: boolean;
|
|
38
38
|
directorateCodeReference?: number | null;
|
|
39
|
+
archivalSeriesId?: string | null;
|
|
39
40
|
issuingEntityId?: string | null;
|
|
40
41
|
sharesNumberingWithId?: string | null;
|
|
41
42
|
enabled?: boolean;
|
|
@@ -2,6 +2,8 @@ import { type CaseFileContract } from './caseFile.contract';
|
|
|
2
2
|
import { type DocumentContract } from './document.contract';
|
|
3
3
|
import { type DocumentTypeContract } from './documentType.contract';
|
|
4
4
|
import { type IssuingEntityContract } from './issuingEntity.contract';
|
|
5
|
+
import { type ArchivalSeriesContract } from './archivalSeries.contract';
|
|
6
|
+
import { type ScanContract } from './scan.contract';
|
|
5
7
|
import { type PartsOfficeContract } from './partsOffice.contract';
|
|
6
8
|
import { type ProcedureContract } from './procedure.contract';
|
|
7
9
|
import { type RegisterBookContract } from './registerBook.contract';
|
|
@@ -17,6 +19,8 @@ export * from './partsOffice.contract';
|
|
|
17
19
|
export * from './registerBook.contract';
|
|
18
20
|
export * from './signatureBatch.contract';
|
|
19
21
|
export * from './workFolder.contract';
|
|
22
|
+
export * from './scan.contract';
|
|
23
|
+
export * from './archivalSeries.contract';
|
|
20
24
|
/** Patrones NATS de gestor-documental-ms, por recurso: `gestorDocumental.<recurso>.<acción>`. */
|
|
21
25
|
export declare const GestorDocumentalPatterns: {
|
|
22
26
|
readonly documentType: {
|
|
@@ -128,6 +132,21 @@ export declare const GestorDocumentalPatterns: {
|
|
|
128
132
|
readonly remove: "gestorDocumental.workFolder.remove";
|
|
129
133
|
readonly convert: "gestorDocumental.workFolder.convert";
|
|
130
134
|
};
|
|
135
|
+
readonly scan: {
|
|
136
|
+
readonly create: "gestorDocumental.scan.create";
|
|
137
|
+
readonly getById: "gestorDocumental.scan.getById";
|
|
138
|
+
readonly getFile: "gestorDocumental.scan.getFile";
|
|
139
|
+
readonly getByToken: "gestorDocumental.scan.getByToken";
|
|
140
|
+
readonly addPage: "gestorDocumental.scan.addPage";
|
|
141
|
+
readonly finish: "gestorDocumental.scan.finish";
|
|
142
|
+
};
|
|
143
|
+
readonly archivalSeries: {
|
|
144
|
+
readonly getAll: "gestorDocumental.archivalSeries.getAll";
|
|
145
|
+
readonly getById: "gestorDocumental.archivalSeries.getById";
|
|
146
|
+
readonly create: "gestorDocumental.archivalSeries.create";
|
|
147
|
+
readonly update: "gestorDocumental.archivalSeries.update";
|
|
148
|
+
readonly setEnabled: "gestorDocumental.archivalSeries.setEnabled";
|
|
149
|
+
};
|
|
131
150
|
};
|
|
132
151
|
/** Contrato completo de gestor-documental-ms: la unión de los contratos de sus recursos. */
|
|
133
|
-
export type GestorDocumentalContract = DocumentTypeContract & DocumentContract & ProcedureContract & IssuingEntityContract & CaseFileContract & PartsOfficeContract & RegisterBookContract & SignatureBatchContract & WorkFolderContract;
|
|
152
|
+
export type GestorDocumentalContract = DocumentTypeContract & DocumentContract & ProcedureContract & IssuingEntityContract & CaseFileContract & PartsOfficeContract & RegisterBookContract & SignatureBatchContract & WorkFolderContract & ScanContract & ArchivalSeriesContract;
|
package/dist/contracts/index.js
CHANGED
|
@@ -19,6 +19,8 @@ const caseFile_contract_1 = require("./caseFile.contract");
|
|
|
19
19
|
const document_contract_1 = require("./document.contract");
|
|
20
20
|
const documentType_contract_1 = require("./documentType.contract");
|
|
21
21
|
const issuingEntity_contract_1 = require("./issuingEntity.contract");
|
|
22
|
+
const archivalSeries_contract_1 = require("./archivalSeries.contract");
|
|
23
|
+
const scan_contract_1 = require("./scan.contract");
|
|
22
24
|
const partsOffice_contract_1 = require("./partsOffice.contract");
|
|
23
25
|
const procedure_contract_1 = require("./procedure.contract");
|
|
24
26
|
const registerBook_contract_1 = require("./registerBook.contract");
|
|
@@ -34,6 +36,8 @@ __exportStar(require("./partsOffice.contract"), exports);
|
|
|
34
36
|
__exportStar(require("./registerBook.contract"), exports);
|
|
35
37
|
__exportStar(require("./signatureBatch.contract"), exports);
|
|
36
38
|
__exportStar(require("./workFolder.contract"), exports);
|
|
39
|
+
__exportStar(require("./scan.contract"), exports);
|
|
40
|
+
__exportStar(require("./archivalSeries.contract"), exports);
|
|
37
41
|
/** Patrones NATS de gestor-documental-ms, por recurso: `gestorDocumental.<recurso>.<acción>`. */
|
|
38
42
|
exports.GestorDocumentalPatterns = {
|
|
39
43
|
documentType: documentType_contract_1.DocumentTypePatterns,
|
|
@@ -45,4 +49,6 @@ exports.GestorDocumentalPatterns = {
|
|
|
45
49
|
registerBook: registerBook_contract_1.RegisterBookPatterns,
|
|
46
50
|
signatureBatch: signatureBatch_contract_1.SignatureBatchPatterns,
|
|
47
51
|
workFolder: workFolder_contract_1.WorkFolderPatterns,
|
|
52
|
+
scan: scan_contract_1.ScanPatterns,
|
|
53
|
+
archivalSeries: archivalSeries_contract_1.ArchivalSeriesPatterns,
|
|
48
54
|
};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { type ScanSessionCreateResponseEntity, type ScanSessionFileResponseEntity, type ScanSessionPublicEntity, type ScanSessionResponseEntity } from '../entities';
|
|
2
|
+
import { type DocumentActor } from './document.contract';
|
|
3
|
+
/** Patrones NATS de `scan`: escanear con el celular. */
|
|
4
|
+
export declare const ScanPatterns: {
|
|
5
|
+
readonly create: "gestorDocumental.scan.create";
|
|
6
|
+
readonly getById: "gestorDocumental.scan.getById";
|
|
7
|
+
readonly getFile: "gestorDocumental.scan.getFile";
|
|
8
|
+
readonly getByToken: "gestorDocumental.scan.getByToken";
|
|
9
|
+
readonly addPage: "gestorDocumental.scan.addPage";
|
|
10
|
+
readonly finish: "gestorDocumental.scan.finish";
|
|
11
|
+
};
|
|
12
|
+
export interface ScanContract {
|
|
13
|
+
/**
|
|
14
|
+
* Abre una sesión de escaneo para el funcionario. `url` es la dirección pública del celular (sin el token): con ella
|
|
15
|
+
* se arma el QR que se muestra en el escritorio.
|
|
16
|
+
*/
|
|
17
|
+
[ScanPatterns.create]: {
|
|
18
|
+
payload: {
|
|
19
|
+
url: string;
|
|
20
|
+
actor: DocumentActor;
|
|
21
|
+
};
|
|
22
|
+
response: ScanSessionCreateResponseEntity;
|
|
23
|
+
};
|
|
24
|
+
/** Estado de la sesión, para quien la abrió: el escritorio la consulta hasta que el PDF esté listo. */
|
|
25
|
+
[ScanPatterns.getById]: {
|
|
26
|
+
payload: {
|
|
27
|
+
id: string;
|
|
28
|
+
actor: DocumentActor;
|
|
29
|
+
};
|
|
30
|
+
response: ScanSessionResponseEntity;
|
|
31
|
+
};
|
|
32
|
+
[ScanPatterns.getFile]: {
|
|
33
|
+
payload: {
|
|
34
|
+
id: string;
|
|
35
|
+
actor: DocumentActor;
|
|
36
|
+
};
|
|
37
|
+
response: ScanSessionFileResponseEntity;
|
|
38
|
+
};
|
|
39
|
+
/** Sin sesión, desde el celular, con el token del QR. */
|
|
40
|
+
[ScanPatterns.getByToken]: {
|
|
41
|
+
payload: {
|
|
42
|
+
token: string;
|
|
43
|
+
};
|
|
44
|
+
response: ScanSessionPublicEntity;
|
|
45
|
+
};
|
|
46
|
+
/** Agrega una foto ya subida al gestor de archivos (la sube el gateway). */
|
|
47
|
+
[ScanPatterns.addPage]: {
|
|
48
|
+
payload: {
|
|
49
|
+
token: string;
|
|
50
|
+
fileId: string;
|
|
51
|
+
contentType: string;
|
|
52
|
+
size: number;
|
|
53
|
+
};
|
|
54
|
+
response: ScanSessionPublicEntity;
|
|
55
|
+
};
|
|
56
|
+
/** Junta las fotos en un PDF y cierra la sesión. */
|
|
57
|
+
[ScanPatterns.finish]: {
|
|
58
|
+
payload: {
|
|
59
|
+
token: string;
|
|
60
|
+
};
|
|
61
|
+
response: ScanSessionPublicEntity;
|
|
62
|
+
};
|
|
63
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ScanPatterns = void 0;
|
|
4
|
+
/** Patrones NATS de `scan`: escanear con el celular. */
|
|
5
|
+
exports.ScanPatterns = {
|
|
6
|
+
create: 'gestorDocumental.scan.create',
|
|
7
|
+
getById: 'gestorDocumental.scan.getById',
|
|
8
|
+
getFile: 'gestorDocumental.scan.getFile',
|
|
9
|
+
getByToken: 'gestorDocumental.scan.getByToken',
|
|
10
|
+
addPage: 'gestorDocumental.scan.addPage',
|
|
11
|
+
finish: 'gestorDocumental.scan.finish',
|
|
12
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ArchivalSeriesEntity } from '../../base/entities';
|
|
2
|
+
export interface ArchivalSeriesGetAllResponseEntity {
|
|
3
|
+
id: ArchivalSeriesEntity['id'];
|
|
4
|
+
code: ArchivalSeriesEntity['code'];
|
|
5
|
+
name: ArchivalSeriesEntity['name'];
|
|
6
|
+
section: ArchivalSeriesEntity['section'];
|
|
7
|
+
description: ArchivalSeriesEntity['description'];
|
|
8
|
+
enabled: ArchivalSeriesEntity['enabled'];
|
|
9
|
+
/** Cuántos tipos documentales y expedientes la usan. */
|
|
10
|
+
documentTypes: number;
|
|
11
|
+
caseFiles: number;
|
|
12
|
+
}
|
|
13
|
+
export type ArchivalSeriesGetByIdResponseEntity = ArchivalSeriesGetAllResponseEntity;
|
|
14
|
+
/** Cómo se cita una serie donde se usa: código y nombre. */
|
|
15
|
+
export interface ArchivalSeriesSummaryEntity {
|
|
16
|
+
id: string;
|
|
17
|
+
code: string;
|
|
18
|
+
name: string;
|
|
19
|
+
}
|
|
20
|
+
export interface ArchivalSeriesCreateResponseEntity {
|
|
21
|
+
id: ArchivalSeriesEntity['id'];
|
|
22
|
+
ok: boolean;
|
|
23
|
+
}
|
|
24
|
+
export interface ArchivalSeriesUpdateResponseEntity {
|
|
25
|
+
id: ArchivalSeriesEntity['id'];
|
|
26
|
+
ok: boolean;
|
|
27
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './archivalSeries.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("./archivalSeries.entity"), exports);
|
|
@@ -120,6 +120,14 @@ export interface CaseFileGetByIdResponseEntity extends CaseFileGetAllResponseEnt
|
|
|
120
120
|
closingNote: CaseFileEntity['closingNote'];
|
|
121
121
|
/** Expediente híbrido: tiene documentos en papel que no se pudieron digitalizar. */
|
|
122
122
|
isHybrid: boolean;
|
|
123
|
+
/** MGDEE1_2: serie del Cuadro de Clasificación. */
|
|
124
|
+
archivalSeries: {
|
|
125
|
+
id: string;
|
|
126
|
+
code: string;
|
|
127
|
+
name: string;
|
|
128
|
+
} | null;
|
|
129
|
+
/** MGDEE8_2: fin de la restricción de acceso. */
|
|
130
|
+
restrictionEndsAt: string | null;
|
|
123
131
|
index: CaseFileEntryResponseEntity[];
|
|
124
132
|
sharedWith: CaseFileParticipantResponseEntity[];
|
|
125
133
|
actors: CaseFileActorResponseEntity[];
|
|
@@ -115,6 +115,12 @@ export interface DocumentInboxItemEntity extends DocumentDeliveryResponseEntity
|
|
|
115
115
|
export interface DocumentGetByIdResponseEntity {
|
|
116
116
|
id: DocumentEntity['id'];
|
|
117
117
|
issuerName: string;
|
|
118
|
+
archivalSeries: {
|
|
119
|
+
id: string;
|
|
120
|
+
code: string;
|
|
121
|
+
name: string;
|
|
122
|
+
} | null;
|
|
123
|
+
restrictionEndsAt: string | null;
|
|
118
124
|
subject: DocumentEntity['subject'];
|
|
119
125
|
keywords: DocumentEntity['keywords'];
|
|
120
126
|
accessLevel: DocumentEntity['accessLevel'];
|
|
@@ -22,6 +22,11 @@ export interface DocumentTypeGetAllResponseEntity {
|
|
|
22
22
|
resetsYearly: DocumentTypeEntity['resetsYearly'];
|
|
23
23
|
numbered: DocumentTypeEntity['numbered'];
|
|
24
24
|
directorateCodeReference: DocumentTypeEntity['directorateCodeReference'];
|
|
25
|
+
archivalSeries: {
|
|
26
|
+
id: string;
|
|
27
|
+
code: string;
|
|
28
|
+
name: string;
|
|
29
|
+
} | null;
|
|
25
30
|
issuingEntity: {
|
|
26
31
|
id: string;
|
|
27
32
|
name: string;
|
package/dist/entities/index.d.ts
CHANGED
package/dist/entities/index.js
CHANGED
|
@@ -23,3 +23,5 @@ __exportStar(require("./partsOffice"), exports);
|
|
|
23
23
|
__exportStar(require("./registerBook"), exports);
|
|
24
24
|
__exportStar(require("./signatureBatch"), exports);
|
|
25
25
|
__exportStar(require("./workFolder"), exports);
|
|
26
|
+
__exportStar(require("./scan"), exports);
|
|
27
|
+
__exportStar(require("./archivalSeries"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './scan.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("./scan.entity"), exports);
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/** Sesión recién abierta: el token y el QR viajan solo aquí. */
|
|
2
|
+
export interface ScanSessionCreateResponseEntity {
|
|
3
|
+
id: string;
|
|
4
|
+
token: string;
|
|
5
|
+
/** Dirección que abre el celular, con el token. */
|
|
6
|
+
url: string;
|
|
7
|
+
/** El QR de esa dirección, como imagen PNG en data URL. */
|
|
8
|
+
qrDataUrl: string;
|
|
9
|
+
expiresAt: string;
|
|
10
|
+
}
|
|
11
|
+
/** Estado de la sesión, como lo ve en el escritorio quien la abrió. */
|
|
12
|
+
export interface ScanSessionResponseEntity {
|
|
13
|
+
id: string;
|
|
14
|
+
status: 'Open' | 'Ready';
|
|
15
|
+
pageCount: number;
|
|
16
|
+
expiresAt: string;
|
|
17
|
+
fileName: string | null;
|
|
18
|
+
}
|
|
19
|
+
export interface ScanSessionFileResponseEntity {
|
|
20
|
+
fileId: string;
|
|
21
|
+
fileName: string;
|
|
22
|
+
}
|
|
23
|
+
/** La sesión como la ve el celular. */
|
|
24
|
+
export interface ScanSessionPublicEntity {
|
|
25
|
+
status: 'Open' | 'Ready';
|
|
26
|
+
pageCount: number;
|
|
27
|
+
maxPages: number;
|
|
28
|
+
expiresAt: string;
|
|
29
|
+
}
|
package/package.json
CHANGED
package/src/base/entities.ts
CHANGED
|
@@ -252,6 +252,13 @@ export const CaseFileAccessAction = {
|
|
|
252
252
|
Exported: 'Exported',
|
|
253
253
|
} satisfies Record<string, CaseFileAccessAction>;
|
|
254
254
|
|
|
255
|
+
export type ScanSessionStatus = 'Open' | 'Ready';
|
|
256
|
+
|
|
257
|
+
export const ScanSessionStatus = {
|
|
258
|
+
Open: 'Open',
|
|
259
|
+
Ready: 'Ready',
|
|
260
|
+
} satisfies Record<string, ScanSessionStatus>;
|
|
261
|
+
|
|
255
262
|
export type WorkFolderItemKind = 'Document' | 'File';
|
|
256
263
|
|
|
257
264
|
export const WorkFolderItemKind = {
|
|
@@ -270,6 +277,8 @@ export interface DocumentTypeEntity {
|
|
|
270
277
|
resetsYearly: boolean;
|
|
271
278
|
numbered: boolean;
|
|
272
279
|
directorateCodeReference?: number | null;
|
|
280
|
+
archivalSeries?: ArchivalSeriesEntity | null;
|
|
281
|
+
archivalSeriesId?: string | null;
|
|
273
282
|
issuingEntity?: IssuingEntityEntity | null;
|
|
274
283
|
issuingEntityId?: string | null;
|
|
275
284
|
sharesNumberingWith?: DocumentTypeEntity | null;
|
|
@@ -291,6 +300,7 @@ export interface DocumentEntity {
|
|
|
291
300
|
keywords: string[];
|
|
292
301
|
accessLevel: DocumentAccessLevel;
|
|
293
302
|
hasSensitiveData: boolean;
|
|
303
|
+
restrictionEndsAt?: string | null;
|
|
294
304
|
status: DocumentStatus;
|
|
295
305
|
correlative?: number | null;
|
|
296
306
|
correlativeYear?: number | null;
|
|
@@ -490,6 +500,9 @@ export interface CaseFileEntity {
|
|
|
490
500
|
status: CaseFileStatus;
|
|
491
501
|
accessLevel: DocumentAccessLevel;
|
|
492
502
|
hasSensitiveData: boolean;
|
|
503
|
+
restrictionEndsAt?: string | null;
|
|
504
|
+
archivalSeries?: ArchivalSeriesEntity | null;
|
|
505
|
+
archivalSeriesId?: string | null;
|
|
493
506
|
incorporationMechanism: CaseFileIncorporationMechanism;
|
|
494
507
|
schemaVersion: string;
|
|
495
508
|
procedure?: ProcedureEntity;
|
|
@@ -642,6 +655,19 @@ export interface DocumentEmailCopyEntity {
|
|
|
642
655
|
createdAt: string;
|
|
643
656
|
}
|
|
644
657
|
|
|
658
|
+
export interface ScanSessionEntity {
|
|
659
|
+
id: string;
|
|
660
|
+
tokenHash: string;
|
|
661
|
+
status: ScanSessionStatus;
|
|
662
|
+
employeeId: string;
|
|
663
|
+
pages: JsonValue;
|
|
664
|
+
fileId?: string | null;
|
|
665
|
+
fileName?: string | null;
|
|
666
|
+
expiresAt: string;
|
|
667
|
+
finishedAt?: string | null;
|
|
668
|
+
createdAt: string;
|
|
669
|
+
}
|
|
670
|
+
|
|
645
671
|
export interface DocumentExternalRecipientEntity {
|
|
646
672
|
id: string;
|
|
647
673
|
entityId: number;
|
|
@@ -710,6 +736,20 @@ export interface DocDigitalInboundEntity {
|
|
|
710
736
|
updatedAt: string;
|
|
711
737
|
}
|
|
712
738
|
|
|
739
|
+
export interface ArchivalSeriesEntity {
|
|
740
|
+
id: string;
|
|
741
|
+
code: string;
|
|
742
|
+
name: string;
|
|
743
|
+
section?: string | null;
|
|
744
|
+
description?: string | null;
|
|
745
|
+
enabled: boolean;
|
|
746
|
+
documentTypes?: DocumentTypeEntity[];
|
|
747
|
+
caseFiles?: CaseFileEntity[];
|
|
748
|
+
deleted: boolean;
|
|
749
|
+
createdAt: string;
|
|
750
|
+
updatedAt: string;
|
|
751
|
+
}
|
|
752
|
+
|
|
713
753
|
export interface IssuingEntityEntity {
|
|
714
754
|
id: string;
|
|
715
755
|
name: string;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { type ArchivalSeriesEntity } from '../base/entities';
|
|
2
|
+
import {
|
|
3
|
+
type ArchivalSeriesCreateResponseEntity,
|
|
4
|
+
type ArchivalSeriesGetAllResponseEntity,
|
|
5
|
+
type ArchivalSeriesGetByIdResponseEntity,
|
|
6
|
+
type ArchivalSeriesUpdateResponseEntity,
|
|
7
|
+
} from '../entities';
|
|
8
|
+
import { type RpcPage } from './contract';
|
|
9
|
+
|
|
10
|
+
/** Patrones NATS de `archivalSeries` (series del Cuadro de Clasificación): `<servicio>.<recurso>.<acción>`. */
|
|
11
|
+
export const ArchivalSeriesPatterns = {
|
|
12
|
+
getAll: 'gestorDocumental.archivalSeries.getAll',
|
|
13
|
+
getById: 'gestorDocumental.archivalSeries.getById',
|
|
14
|
+
create: 'gestorDocumental.archivalSeries.create',
|
|
15
|
+
update: 'gestorDocumental.archivalSeries.update',
|
|
16
|
+
setEnabled: 'gestorDocumental.archivalSeries.setEnabled',
|
|
17
|
+
} as const;
|
|
18
|
+
|
|
19
|
+
/** Datos de una serie documental al crearla o editarla. */
|
|
20
|
+
export interface ArchivalSeriesWritePayload {
|
|
21
|
+
code: string;
|
|
22
|
+
name: string;
|
|
23
|
+
section?: string | null;
|
|
24
|
+
description?: string | null;
|
|
25
|
+
enabled?: boolean;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export interface ArchivalSeriesContract {
|
|
29
|
+
[ArchivalSeriesPatterns.getAll]: {
|
|
30
|
+
// sin `page` y `limit` responde todas en una sola página
|
|
31
|
+
payload: {
|
|
32
|
+
pagination?: { page?: number; limit?: number };
|
|
33
|
+
filters?: { search?: string; enabled?: boolean };
|
|
34
|
+
};
|
|
35
|
+
response: RpcPage<ArchivalSeriesGetAllResponseEntity[]>;
|
|
36
|
+
};
|
|
37
|
+
[ArchivalSeriesPatterns.getById]: {
|
|
38
|
+
payload: Pick<ArchivalSeriesEntity, 'id'>;
|
|
39
|
+
response: ArchivalSeriesGetByIdResponseEntity;
|
|
40
|
+
};
|
|
41
|
+
[ArchivalSeriesPatterns.create]: {
|
|
42
|
+
payload: ArchivalSeriesWritePayload;
|
|
43
|
+
response: ArchivalSeriesCreateResponseEntity;
|
|
44
|
+
};
|
|
45
|
+
[ArchivalSeriesPatterns.update]: {
|
|
46
|
+
payload: ArchivalSeriesWritePayload & Pick<ArchivalSeriesEntity, 'id'>;
|
|
47
|
+
response: ArchivalSeriesUpdateResponseEntity;
|
|
48
|
+
};
|
|
49
|
+
[ArchivalSeriesPatterns.setEnabled]: {
|
|
50
|
+
payload: Pick<ArchivalSeriesEntity, 'id' | 'enabled'>;
|
|
51
|
+
response: ArchivalSeriesUpdateResponseEntity;
|
|
52
|
+
};
|
|
53
|
+
}
|
|
@@ -74,6 +74,10 @@ export interface CaseFileWritePayload {
|
|
|
74
74
|
procedureId: string;
|
|
75
75
|
accessLevel: DocumentAccessLevel;
|
|
76
76
|
hasSensitiveData: boolean;
|
|
77
|
+
/** MGDEE8_2: fin de la restricción de acceso (ISO 8601), si no es público. */
|
|
78
|
+
restrictionEndsAt?: string | null;
|
|
79
|
+
/** MGDEE1_2: serie del Cuadro de Clasificación. */
|
|
80
|
+
archivalSeriesId?: string | null;
|
|
77
81
|
actors?: CaseFileActorInput[];
|
|
78
82
|
}
|
|
79
83
|
|
|
@@ -124,6 +124,8 @@ export interface DocumentWritePayload extends Pick<DocumentEntity, 'subject' | '
|
|
|
124
124
|
replyToDocumentId?: string | null;
|
|
125
125
|
// Instituciones (y usuarios) de DocDigital a quienes va: al terminar la firma pasa a Oficina de Partes.
|
|
126
126
|
externalRecipients?: DocumentExternalRecipientInput[];
|
|
127
|
+
// Fin de la restricción de acceso (ISO 8601), si no es público.
|
|
128
|
+
restrictionEndsAt?: string | null;
|
|
127
129
|
// Copia por correo a quienes están fuera del Estado: sale al finalizar o, si también va por DocDigital, al despacharlo.
|
|
128
130
|
emailCopies?: DocumentEmailCopyInput[];
|
|
129
131
|
action?: 'Submit';
|
|
@@ -41,6 +41,8 @@ export interface DocumentTypeWritePayload {
|
|
|
41
41
|
// Sus documentos llevan número (por omisión, sí).
|
|
42
42
|
numbered?: boolean;
|
|
43
43
|
directorateCodeReference?: number | null;
|
|
44
|
+
// Serie documental del Cuadro de Clasificación (sin valor: sin clasificar).
|
|
45
|
+
archivalSeriesId?: string | null;
|
|
44
46
|
// Entidad emisora (sin valor: la municipalidad).
|
|
45
47
|
issuingEntityId?: string | null;
|
|
46
48
|
// Tipo cuyo correlativo comparte (sin valor: el suyo propio).
|
package/src/contracts/index.ts
CHANGED
|
@@ -2,6 +2,8 @@ import { CaseFilePatterns, type CaseFileContract } from './caseFile.contract';
|
|
|
2
2
|
import { DocumentPatterns, type DocumentContract } from './document.contract';
|
|
3
3
|
import { DocumentTypePatterns, type DocumentTypeContract } from './documentType.contract';
|
|
4
4
|
import { IssuingEntityPatterns, type IssuingEntityContract } from './issuingEntity.contract';
|
|
5
|
+
import { ArchivalSeriesPatterns, type ArchivalSeriesContract } from './archivalSeries.contract';
|
|
6
|
+
import { ScanPatterns, type ScanContract } from './scan.contract';
|
|
5
7
|
import { PartsOfficePatterns, type PartsOfficeContract } from './partsOffice.contract';
|
|
6
8
|
import { ProcedurePatterns, type ProcedureContract } from './procedure.contract';
|
|
7
9
|
import { RegisterBookPatterns, type RegisterBookContract } from './registerBook.contract';
|
|
@@ -18,6 +20,8 @@ export * from './partsOffice.contract';
|
|
|
18
20
|
export * from './registerBook.contract';
|
|
19
21
|
export * from './signatureBatch.contract';
|
|
20
22
|
export * from './workFolder.contract';
|
|
23
|
+
export * from './scan.contract';
|
|
24
|
+
export * from './archivalSeries.contract';
|
|
21
25
|
|
|
22
26
|
/** Patrones NATS de gestor-documental-ms, por recurso: `gestorDocumental.<recurso>.<acción>`. */
|
|
23
27
|
export const GestorDocumentalPatterns = {
|
|
@@ -30,6 +34,8 @@ export const GestorDocumentalPatterns = {
|
|
|
30
34
|
registerBook: RegisterBookPatterns,
|
|
31
35
|
signatureBatch: SignatureBatchPatterns,
|
|
32
36
|
workFolder: WorkFolderPatterns,
|
|
37
|
+
scan: ScanPatterns,
|
|
38
|
+
archivalSeries: ArchivalSeriesPatterns,
|
|
33
39
|
} as const;
|
|
34
40
|
|
|
35
41
|
/** Contrato completo de gestor-documental-ms: la unión de los contratos de sus recursos. */
|
|
@@ -41,4 +47,6 @@ export type GestorDocumentalContract = DocumentTypeContract &
|
|
|
41
47
|
PartsOfficeContract &
|
|
42
48
|
RegisterBookContract &
|
|
43
49
|
SignatureBatchContract &
|
|
44
|
-
WorkFolderContract
|
|
50
|
+
WorkFolderContract &
|
|
51
|
+
ScanContract &
|
|
52
|
+
ArchivalSeriesContract;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import {
|
|
2
|
+
type ScanSessionCreateResponseEntity,
|
|
3
|
+
type ScanSessionFileResponseEntity,
|
|
4
|
+
type ScanSessionPublicEntity,
|
|
5
|
+
type ScanSessionResponseEntity,
|
|
6
|
+
} from '../entities';
|
|
7
|
+
import { type DocumentActor } from './document.contract';
|
|
8
|
+
|
|
9
|
+
/** Patrones NATS de `scan`: escanear con el celular. */
|
|
10
|
+
export const ScanPatterns = {
|
|
11
|
+
create: 'gestorDocumental.scan.create',
|
|
12
|
+
getById: 'gestorDocumental.scan.getById',
|
|
13
|
+
getFile: 'gestorDocumental.scan.getFile',
|
|
14
|
+
getByToken: 'gestorDocumental.scan.getByToken',
|
|
15
|
+
addPage: 'gestorDocumental.scan.addPage',
|
|
16
|
+
finish: 'gestorDocumental.scan.finish',
|
|
17
|
+
} as const;
|
|
18
|
+
|
|
19
|
+
export interface ScanContract {
|
|
20
|
+
/**
|
|
21
|
+
* Abre una sesión de escaneo para el funcionario. `url` es la dirección pública del celular (sin el token): con ella
|
|
22
|
+
* se arma el QR que se muestra en el escritorio.
|
|
23
|
+
*/
|
|
24
|
+
[ScanPatterns.create]: {
|
|
25
|
+
payload: { url: string; actor: DocumentActor };
|
|
26
|
+
response: ScanSessionCreateResponseEntity;
|
|
27
|
+
};
|
|
28
|
+
/** Estado de la sesión, para quien la abrió: el escritorio la consulta hasta que el PDF esté listo. */
|
|
29
|
+
[ScanPatterns.getById]: {
|
|
30
|
+
payload: { id: string; actor: DocumentActor };
|
|
31
|
+
response: ScanSessionResponseEntity;
|
|
32
|
+
};
|
|
33
|
+
[ScanPatterns.getFile]: {
|
|
34
|
+
payload: { id: string; actor: DocumentActor };
|
|
35
|
+
response: ScanSessionFileResponseEntity;
|
|
36
|
+
};
|
|
37
|
+
/** Sin sesión, desde el celular, con el token del QR. */
|
|
38
|
+
[ScanPatterns.getByToken]: {
|
|
39
|
+
payload: { token: string };
|
|
40
|
+
response: ScanSessionPublicEntity;
|
|
41
|
+
};
|
|
42
|
+
/** Agrega una foto ya subida al gestor de archivos (la sube el gateway). */
|
|
43
|
+
[ScanPatterns.addPage]: {
|
|
44
|
+
payload: { token: string; fileId: string; contentType: string; size: number };
|
|
45
|
+
response: ScanSessionPublicEntity;
|
|
46
|
+
};
|
|
47
|
+
/** Junta las fotos en un PDF y cierra la sesión. */
|
|
48
|
+
[ScanPatterns.finish]: {
|
|
49
|
+
payload: { token: string };
|
|
50
|
+
response: ScanSessionPublicEntity;
|
|
51
|
+
};
|
|
52
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { ArchivalSeriesEntity } from '../../base/entities';
|
|
2
|
+
|
|
3
|
+
export interface ArchivalSeriesGetAllResponseEntity {
|
|
4
|
+
id: ArchivalSeriesEntity['id'];
|
|
5
|
+
code: ArchivalSeriesEntity['code'];
|
|
6
|
+
name: ArchivalSeriesEntity['name'];
|
|
7
|
+
section: ArchivalSeriesEntity['section'];
|
|
8
|
+
description: ArchivalSeriesEntity['description'];
|
|
9
|
+
enabled: ArchivalSeriesEntity['enabled'];
|
|
10
|
+
/** Cuántos tipos documentales y expedientes la usan. */
|
|
11
|
+
documentTypes: number;
|
|
12
|
+
caseFiles: number;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export type ArchivalSeriesGetByIdResponseEntity = ArchivalSeriesGetAllResponseEntity;
|
|
16
|
+
|
|
17
|
+
/** Cómo se cita una serie donde se usa: código y nombre. */
|
|
18
|
+
export interface ArchivalSeriesSummaryEntity {
|
|
19
|
+
id: string;
|
|
20
|
+
code: string;
|
|
21
|
+
name: string;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export interface ArchivalSeriesCreateResponseEntity {
|
|
25
|
+
id: ArchivalSeriesEntity['id'];
|
|
26
|
+
ok: boolean;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export interface ArchivalSeriesUpdateResponseEntity {
|
|
30
|
+
id: ArchivalSeriesEntity['id'];
|
|
31
|
+
ok: boolean;
|
|
32
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './archivalSeries.entity';
|
|
@@ -140,6 +140,10 @@ export interface CaseFileGetByIdResponseEntity extends CaseFileGetAllResponseEnt
|
|
|
140
140
|
closingNote: CaseFileEntity['closingNote'];
|
|
141
141
|
/** Expediente híbrido: tiene documentos en papel que no se pudieron digitalizar. */
|
|
142
142
|
isHybrid: boolean;
|
|
143
|
+
/** MGDEE1_2: serie del Cuadro de Clasificación. */
|
|
144
|
+
archivalSeries: { id: string; code: string; name: string } | null;
|
|
145
|
+
/** MGDEE8_2: fin de la restricción de acceso. */
|
|
146
|
+
restrictionEndsAt: string | null;
|
|
143
147
|
index: CaseFileEntryResponseEntity[];
|
|
144
148
|
sharedWith: CaseFileParticipantResponseEntity[];
|
|
145
149
|
actors: CaseFileActorResponseEntity[];
|
|
@@ -138,6 +138,10 @@ export interface DocumentGetByIdResponseEntity {
|
|
|
138
138
|
id: DocumentEntity['id'];
|
|
139
139
|
// Quién lo emite: la entidad emisora del tipo (Educación, Salud, Juzgado) o la municipalidad.
|
|
140
140
|
issuerName: string;
|
|
141
|
+
// Serie documental del Cuadro de Clasificación (la de su tipo documental; MGDDE1_2).
|
|
142
|
+
archivalSeries: { id: string; code: string; name: string } | null;
|
|
143
|
+
// Fin de la restricción de acceso: desde entonces se consulta como público si no tiene datos sensibles.
|
|
144
|
+
restrictionEndsAt: string | null;
|
|
141
145
|
subject: DocumentEntity['subject'];
|
|
142
146
|
keywords: DocumentEntity['keywords'];
|
|
143
147
|
accessLevel: DocumentEntity['accessLevel'];
|
|
@@ -27,6 +27,8 @@ export interface DocumentTypeGetAllResponseEntity {
|
|
|
27
27
|
// Sin numeración, sus documentos solo llevan fecha, código de verificación y QR.
|
|
28
28
|
numbered: DocumentTypeEntity['numbered'];
|
|
29
29
|
directorateCodeReference: DocumentTypeEntity['directorateCodeReference'];
|
|
30
|
+
// Serie documental del Cuadro de Clasificación a la que van sus documentos (MGDDE1_2).
|
|
31
|
+
archivalSeries: { id: string; code: string; name: string } | null;
|
|
30
32
|
// Entidad que emite sus documentos (Educación, Salud, Juzgado). `null`: la municipalidad.
|
|
31
33
|
issuingEntity: { id: string; name: string; shortName: string | null } | null;
|
|
32
34
|
// Tipo cuyo correlativo comparte: sus números salen de esa serie (y `nextCorrelative`, `correlativeYear` y
|
package/src/entities/index.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './scan.entity';
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/** Sesión recién abierta: el token y el QR viajan solo aquí. */
|
|
2
|
+
export interface ScanSessionCreateResponseEntity {
|
|
3
|
+
id: string;
|
|
4
|
+
token: string;
|
|
5
|
+
/** Dirección que abre el celular, con el token. */
|
|
6
|
+
url: string;
|
|
7
|
+
/** El QR de esa dirección, como imagen PNG en data URL. */
|
|
8
|
+
qrDataUrl: string;
|
|
9
|
+
expiresAt: string;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/** Estado de la sesión, como lo ve en el escritorio quien la abrió. */
|
|
13
|
+
export interface ScanSessionResponseEntity {
|
|
14
|
+
id: string;
|
|
15
|
+
status: 'Open' | 'Ready';
|
|
16
|
+
pageCount: number;
|
|
17
|
+
expiresAt: string;
|
|
18
|
+
fileName: string | null;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface ScanSessionFileResponseEntity {
|
|
22
|
+
fileId: string;
|
|
23
|
+
fileName: string;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/** La sesión como la ve el celular. */
|
|
27
|
+
export interface ScanSessionPublicEntity {
|
|
28
|
+
status: 'Open' | 'Ready';
|
|
29
|
+
pageCount: number;
|
|
30
|
+
maxPages: number;
|
|
31
|
+
expiresAt: string;
|
|
32
|
+
}
|