@muni-sanfer/types-gestor-documental 0.0.1-beta.29 → 0.0.1-beta.30
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 +27 -0
- package/dist/base/entities.js +9 -1
- package/dist/contracts/desk.contract.d.ts +86 -0
- package/dist/contracts/desk.contract.js +13 -0
- package/dist/contracts/index.d.ts +12 -1
- package/dist/contracts/index.js +3 -0
- package/dist/entities/desk/desk.entity.d.ts +21 -0
- package/dist/entities/desk/desk.entity.js +2 -0
- package/dist/entities/desk/index.d.ts +1 -0
- package/dist/entities/desk/index.js +17 -0
- package/dist/entities/index.d.ts +1 -0
- package/dist/entities/index.js +1 -0
- package/package.json +1 -1
- package/src/base/entities.ts +32 -0
- package/src/contracts/desk.contract.ts +68 -0
- package/src/contracts/index.ts +5 -1
- package/src/entities/desk/desk.entity.ts +24 -0
- package/src/entities/desk/index.ts +1 -0
- package/src/entities/index.ts +1 -0
package/dist/base/entities.d.ts
CHANGED
|
@@ -369,6 +369,16 @@ export declare const DataBreachNoticeMeans: {
|
|
|
369
369
|
Individual: "Individual";
|
|
370
370
|
PublicNotice: "PublicNotice";
|
|
371
371
|
};
|
|
372
|
+
export type DeskFileSource = 'Upload' | 'Scan';
|
|
373
|
+
export declare const DeskFileSource: {
|
|
374
|
+
Upload: "Upload";
|
|
375
|
+
Scan: "Scan";
|
|
376
|
+
};
|
|
377
|
+
export type DeskFileTarget = 'Document' | 'CaseFile';
|
|
378
|
+
export declare const DeskFileTarget: {
|
|
379
|
+
Document: "Document";
|
|
380
|
+
CaseFile: "CaseFile";
|
|
381
|
+
};
|
|
372
382
|
export interface DocumentTypeEntity {
|
|
373
383
|
id: string;
|
|
374
384
|
name: string;
|
|
@@ -1177,6 +1187,23 @@ export interface DataBreachEventEntity {
|
|
|
1177
1187
|
breachId: string;
|
|
1178
1188
|
createdAt: string;
|
|
1179
1189
|
}
|
|
1190
|
+
export interface DeskFileEntity {
|
|
1191
|
+
id: string;
|
|
1192
|
+
ownerEmployeeId: string;
|
|
1193
|
+
fileId: string;
|
|
1194
|
+
fileName: string;
|
|
1195
|
+
size: number;
|
|
1196
|
+
sha256: string;
|
|
1197
|
+
source: DeskFileSource;
|
|
1198
|
+
description?: string | null;
|
|
1199
|
+
classifiedAt?: string | null;
|
|
1200
|
+
target?: DeskFileTarget | null;
|
|
1201
|
+
targetId?: string | null;
|
|
1202
|
+
targetLabel?: string | null;
|
|
1203
|
+
removedAt?: string | null;
|
|
1204
|
+
createdAt: string;
|
|
1205
|
+
updatedAt: string;
|
|
1206
|
+
}
|
|
1180
1207
|
type JsonValue = string | number | boolean | {
|
|
1181
1208
|
[key in string]?: JsonValue;
|
|
1182
1209
|
} | Array<JsonValue> | null;
|
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.DataBreachNoticeMeans = exports.DataBreachEventAction = exports.DataBreachStatus = exports.DataBreachKind = exports.DataRightsEventAction = exports.DataRightsResolution = exports.DataRightsRequestStatus = exports.DataRightsChannel = exports.DataRight = exports.DataLegalBasis = exports.TransparencyStatus = exports.AccessRequestEventAction = exports.AccessRequestResolution = exports.AccessRequestStatus = exports.AccessRequestChannel = exports.DispositionKind = exports.FinalDisposition = exports.AuditAction = exports.AuditEntity = exports.DocumentAccessAction = exports.QualityMetricKey = exports.ServiceOutageKind = exports.WorkFolderItemKind = exports.TextSnippetSection = 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.CommunicationMeans = exports.DocumentOrigin = exports.DocumentTrackingAction = exports.DocumentParticipantStatus = exports.DocumentParticipantRole = exports.DocumentAccessLevel = exports.DocumentStatus = exports.DocumentCategory = void 0;
|
|
4
|
+
exports.DeskFileTarget = exports.DeskFileSource = exports.DataBreachNoticeMeans = exports.DataBreachEventAction = exports.DataBreachStatus = exports.DataBreachKind = exports.DataRightsEventAction = exports.DataRightsResolution = exports.DataRightsRequestStatus = exports.DataRightsChannel = exports.DataRight = exports.DataLegalBasis = exports.TransparencyStatus = exports.AccessRequestEventAction = exports.AccessRequestResolution = exports.AccessRequestStatus = exports.AccessRequestChannel = exports.DispositionKind = exports.FinalDisposition = exports.AuditAction = exports.AuditEntity = exports.DocumentAccessAction = exports.QualityMetricKey = exports.ServiceOutageKind = exports.WorkFolderItemKind = exports.TextSnippetSection = 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.CommunicationMeans = 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',
|
|
@@ -325,3 +325,11 @@ exports.DataBreachNoticeMeans = {
|
|
|
325
325
|
Individual: 'Individual',
|
|
326
326
|
PublicNotice: 'PublicNotice',
|
|
327
327
|
};
|
|
328
|
+
exports.DeskFileSource = {
|
|
329
|
+
Upload: 'Upload',
|
|
330
|
+
Scan: 'Scan',
|
|
331
|
+
};
|
|
332
|
+
exports.DeskFileTarget = {
|
|
333
|
+
Document: 'Document',
|
|
334
|
+
CaseFile: 'CaseFile',
|
|
335
|
+
};
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { type CaseFileActuationType, type DeskFileSource, type DocumentAccessLevel } from '../base/entities';
|
|
2
|
+
import { type CaseFileAddEntryResponseEntity, type DeskFileResponseEntity, type DeskOkResponseEntity, type DeskSummaryEntity, type DocumentPublicFileResponseEntity } from '../entities';
|
|
3
|
+
import { type DocumentActor } from './document.contract';
|
|
4
|
+
/** Patrones NATS de `desk`: el escritorio de documentos de cada funcionario («Sin clasificar»). */
|
|
5
|
+
export declare const DeskPatterns: {
|
|
6
|
+
readonly getFiles: "gestorDocumental.desk.getFiles";
|
|
7
|
+
readonly getSummary: "gestorDocumental.desk.getSummary";
|
|
8
|
+
readonly addFiles: "gestorDocumental.desk.addFiles";
|
|
9
|
+
readonly getFile: "gestorDocumental.desk.getFile";
|
|
10
|
+
readonly remove: "gestorDocumental.desk.remove";
|
|
11
|
+
readonly classify: "gestorDocumental.desk.classify";
|
|
12
|
+
readonly moveToCaseFile: "gestorDocumental.desk.moveToCaseFile";
|
|
13
|
+
};
|
|
14
|
+
export interface DeskContract {
|
|
15
|
+
/** Los archivos sin clasificar de quien tiene la sesión, del más reciente al más antiguo. */
|
|
16
|
+
[DeskPatterns.getFiles]: {
|
|
17
|
+
payload: {
|
|
18
|
+
actor: DocumentActor;
|
|
19
|
+
};
|
|
20
|
+
response: DeskFileResponseEntity[];
|
|
21
|
+
};
|
|
22
|
+
[DeskPatterns.getSummary]: {
|
|
23
|
+
payload: {
|
|
24
|
+
actor: DocumentActor;
|
|
25
|
+
};
|
|
26
|
+
response: DeskSummaryEntity;
|
|
27
|
+
};
|
|
28
|
+
/** Archivos ya subidos a la carpeta del gestor (por el gateway), que quedan en el escritorio. */
|
|
29
|
+
[DeskPatterns.addFiles]: {
|
|
30
|
+
payload: {
|
|
31
|
+
files: {
|
|
32
|
+
fileId: string;
|
|
33
|
+
fileName: string;
|
|
34
|
+
}[];
|
|
35
|
+
source?: DeskFileSource;
|
|
36
|
+
description?: string | null;
|
|
37
|
+
actor: DocumentActor;
|
|
38
|
+
};
|
|
39
|
+
response: DeskFileResponseEntity[];
|
|
40
|
+
};
|
|
41
|
+
/** El archivo, solo para su dueño. */
|
|
42
|
+
[DeskPatterns.getFile]: {
|
|
43
|
+
payload: {
|
|
44
|
+
id: string;
|
|
45
|
+
actor: DocumentActor;
|
|
46
|
+
};
|
|
47
|
+
response: DocumentPublicFileResponseEntity;
|
|
48
|
+
};
|
|
49
|
+
/** Lo quita del escritorio. El archivo no se borra. */
|
|
50
|
+
[DeskPatterns.remove]: {
|
|
51
|
+
payload: {
|
|
52
|
+
id: string;
|
|
53
|
+
actor: DocumentActor;
|
|
54
|
+
};
|
|
55
|
+
response: DeskOkResponseEntity;
|
|
56
|
+
};
|
|
57
|
+
/** Se redactó o firmó un documento con este archivo: deja el escritorio. El documento tiene que ser de su dueño. */
|
|
58
|
+
[DeskPatterns.classify]: {
|
|
59
|
+
payload: {
|
|
60
|
+
id: string;
|
|
61
|
+
documentId: string;
|
|
62
|
+
actor: DocumentActor;
|
|
63
|
+
};
|
|
64
|
+
response: DeskOkResponseEntity;
|
|
65
|
+
};
|
|
66
|
+
/** Lo incorpora como actuación a un expediente abierto en que puede incorporar, con sus metadatos. */
|
|
67
|
+
[DeskPatterns.moveToCaseFile]: {
|
|
68
|
+
payload: {
|
|
69
|
+
id: string;
|
|
70
|
+
caseFileId: string;
|
|
71
|
+
entry: {
|
|
72
|
+
actuationType: CaseFileActuationType;
|
|
73
|
+
title: string;
|
|
74
|
+
documentTypeName?: string | null;
|
|
75
|
+
originDate?: string | null;
|
|
76
|
+
author?: string | null;
|
|
77
|
+
keywords: string[];
|
|
78
|
+
accessLevel: DocumentAccessLevel;
|
|
79
|
+
hasSensitiveData: boolean;
|
|
80
|
+
};
|
|
81
|
+
folder?: string | null;
|
|
82
|
+
actor: DocumentActor;
|
|
83
|
+
};
|
|
84
|
+
response: CaseFileAddEntryResponseEntity;
|
|
85
|
+
};
|
|
86
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DeskPatterns = void 0;
|
|
4
|
+
/** Patrones NATS de `desk`: el escritorio de documentos de cada funcionario («Sin clasificar»). */
|
|
5
|
+
exports.DeskPatterns = {
|
|
6
|
+
getFiles: 'gestorDocumental.desk.getFiles',
|
|
7
|
+
getSummary: 'gestorDocumental.desk.getSummary',
|
|
8
|
+
addFiles: 'gestorDocumental.desk.addFiles',
|
|
9
|
+
getFile: 'gestorDocumental.desk.getFile',
|
|
10
|
+
remove: 'gestorDocumental.desk.remove',
|
|
11
|
+
classify: 'gestorDocumental.desk.classify',
|
|
12
|
+
moveToCaseFile: 'gestorDocumental.desk.moveToCaseFile',
|
|
13
|
+
};
|
|
@@ -13,6 +13,7 @@ import { type RetentionContract } from './retention.contract';
|
|
|
13
13
|
import { type AccessRequestContract } from './accessRequest.contract';
|
|
14
14
|
import { type TransparencyContract } from './transparency.contract';
|
|
15
15
|
import { type DataProtectionContract } from './dataProtection.contract';
|
|
16
|
+
import { type DeskContract } from './desk.contract';
|
|
16
17
|
import { type ScanContract } from './scan.contract';
|
|
17
18
|
import { type PartsOfficeContract } from './partsOffice.contract';
|
|
18
19
|
import { type ProcedureContract } from './procedure.contract';
|
|
@@ -41,6 +42,7 @@ export * from './retention.contract';
|
|
|
41
42
|
export * from './accessRequest.contract';
|
|
42
43
|
export * from './transparency.contract';
|
|
43
44
|
export * from './dataProtection.contract';
|
|
45
|
+
export * from './desk.contract';
|
|
44
46
|
/** Patrones NATS de gestor-documental-ms, por recurso: `gestorDocumental.<recurso>.<acción>`. */
|
|
45
47
|
export declare const GestorDocumentalPatterns: {
|
|
46
48
|
readonly documentType: {
|
|
@@ -251,6 +253,15 @@ export declare const GestorDocumentalPatterns: {
|
|
|
251
253
|
readonly actOnBreach: "gestorDocumental.dataProtection.actOnBreach";
|
|
252
254
|
readonly getBreachPdf: "gestorDocumental.dataProtection.getBreachPdf";
|
|
253
255
|
};
|
|
256
|
+
readonly desk: {
|
|
257
|
+
readonly getFiles: "gestorDocumental.desk.getFiles";
|
|
258
|
+
readonly getSummary: "gestorDocumental.desk.getSummary";
|
|
259
|
+
readonly addFiles: "gestorDocumental.desk.addFiles";
|
|
260
|
+
readonly getFile: "gestorDocumental.desk.getFile";
|
|
261
|
+
readonly remove: "gestorDocumental.desk.remove";
|
|
262
|
+
readonly classify: "gestorDocumental.desk.classify";
|
|
263
|
+
readonly moveToCaseFile: "gestorDocumental.desk.moveToCaseFile";
|
|
264
|
+
};
|
|
254
265
|
};
|
|
255
266
|
/** Contrato completo de gestor-documental-ms: la unión de los contratos de sus recursos. */
|
|
256
|
-
export type GestorDocumentalContract = DocumentTypeContract & DocumentContract & ProcedureContract & IssuingEntityContract & CaseFileContract & PartsOfficeContract & RegisterBookContract & SignatureBatchContract & WorkFolderContract & ScanContract & ArchivalSeriesContract & TextSnippetContract & HolidayContract & IndicatorsContract & AuditContract & SignatureCheckContract & RepositoryExportContract & RetentionContract & AccessRequestContract & TransparencyContract & DataProtectionContract;
|
|
267
|
+
export type GestorDocumentalContract = DocumentTypeContract & DocumentContract & ProcedureContract & IssuingEntityContract & CaseFileContract & PartsOfficeContract & RegisterBookContract & SignatureBatchContract & WorkFolderContract & ScanContract & ArchivalSeriesContract & TextSnippetContract & HolidayContract & IndicatorsContract & AuditContract & SignatureCheckContract & RepositoryExportContract & RetentionContract & AccessRequestContract & TransparencyContract & DataProtectionContract & DeskContract;
|
package/dist/contracts/index.js
CHANGED
|
@@ -30,6 +30,7 @@ const retention_contract_1 = require("./retention.contract");
|
|
|
30
30
|
const accessRequest_contract_1 = require("./accessRequest.contract");
|
|
31
31
|
const transparency_contract_1 = require("./transparency.contract");
|
|
32
32
|
const dataProtection_contract_1 = require("./dataProtection.contract");
|
|
33
|
+
const desk_contract_1 = require("./desk.contract");
|
|
33
34
|
const scan_contract_1 = require("./scan.contract");
|
|
34
35
|
const partsOffice_contract_1 = require("./partsOffice.contract");
|
|
35
36
|
const procedure_contract_1 = require("./procedure.contract");
|
|
@@ -58,6 +59,7 @@ __exportStar(require("./retention.contract"), exports);
|
|
|
58
59
|
__exportStar(require("./accessRequest.contract"), exports);
|
|
59
60
|
__exportStar(require("./transparency.contract"), exports);
|
|
60
61
|
__exportStar(require("./dataProtection.contract"), exports);
|
|
62
|
+
__exportStar(require("./desk.contract"), exports);
|
|
61
63
|
/** Patrones NATS de gestor-documental-ms, por recurso: `gestorDocumental.<recurso>.<acción>`. */
|
|
62
64
|
exports.GestorDocumentalPatterns = {
|
|
63
65
|
documentType: documentType_contract_1.DocumentTypePatterns,
|
|
@@ -81,4 +83,5 @@ exports.GestorDocumentalPatterns = {
|
|
|
81
83
|
accessRequest: accessRequest_contract_1.AccessRequestPatterns,
|
|
82
84
|
transparency: transparency_contract_1.TransparencyPatterns,
|
|
83
85
|
dataProtection: dataProtection_contract_1.DataProtectionPatterns,
|
|
86
|
+
desk: desk_contract_1.DeskPatterns,
|
|
84
87
|
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type DeskFileSource } from '../../base/entities';
|
|
2
|
+
/** Archivo suelto del escritorio de un funcionario («Sin clasificar»). */
|
|
3
|
+
export interface DeskFileResponseEntity {
|
|
4
|
+
id: string;
|
|
5
|
+
fileName: string;
|
|
6
|
+
size: number;
|
|
7
|
+
sha256: string;
|
|
8
|
+
source: DeskFileSource;
|
|
9
|
+
description: string | null;
|
|
10
|
+
/** Es un PDF: se puede redactar una comunicación con él o firmarlo como documento suelto. */
|
|
11
|
+
isPdf: boolean;
|
|
12
|
+
createdAt: string;
|
|
13
|
+
}
|
|
14
|
+
export interface DeskSummaryEntity {
|
|
15
|
+
/** Archivos del escritorio aún sin clasificar. */
|
|
16
|
+
unclassified: number;
|
|
17
|
+
}
|
|
18
|
+
export interface DeskOkResponseEntity {
|
|
19
|
+
id: string;
|
|
20
|
+
ok: boolean;
|
|
21
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './desk.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("./desk.entity"), exports);
|
package/dist/entities/index.d.ts
CHANGED
package/dist/entities/index.js
CHANGED
package/package.json
CHANGED
package/src/base/entities.ts
CHANGED
|
@@ -552,6 +552,20 @@ export const DataBreachNoticeMeans = {
|
|
|
552
552
|
PublicNotice: 'PublicNotice',
|
|
553
553
|
} satisfies Record<string, DataBreachNoticeMeans>;
|
|
554
554
|
|
|
555
|
+
export type DeskFileSource = 'Upload' | 'Scan';
|
|
556
|
+
|
|
557
|
+
export const DeskFileSource = {
|
|
558
|
+
Upload: 'Upload',
|
|
559
|
+
Scan: 'Scan',
|
|
560
|
+
} satisfies Record<string, DeskFileSource>;
|
|
561
|
+
|
|
562
|
+
export type DeskFileTarget = 'Document' | 'CaseFile';
|
|
563
|
+
|
|
564
|
+
export const DeskFileTarget = {
|
|
565
|
+
Document: 'Document',
|
|
566
|
+
CaseFile: 'CaseFile',
|
|
567
|
+
} satisfies Record<string, DeskFileTarget>;
|
|
568
|
+
|
|
555
569
|
export interface DocumentTypeEntity {
|
|
556
570
|
id: string;
|
|
557
571
|
name: string;
|
|
@@ -1407,4 +1421,22 @@ export interface DataBreachEventEntity {
|
|
|
1407
1421
|
createdAt: string;
|
|
1408
1422
|
}
|
|
1409
1423
|
|
|
1424
|
+
export interface DeskFileEntity {
|
|
1425
|
+
id: string;
|
|
1426
|
+
ownerEmployeeId: string;
|
|
1427
|
+
fileId: string;
|
|
1428
|
+
fileName: string;
|
|
1429
|
+
size: number;
|
|
1430
|
+
sha256: string;
|
|
1431
|
+
source: DeskFileSource;
|
|
1432
|
+
description?: string | null;
|
|
1433
|
+
classifiedAt?: string | null;
|
|
1434
|
+
target?: DeskFileTarget | null;
|
|
1435
|
+
targetId?: string | null;
|
|
1436
|
+
targetLabel?: string | null;
|
|
1437
|
+
removedAt?: string | null;
|
|
1438
|
+
createdAt: string;
|
|
1439
|
+
updatedAt: string;
|
|
1440
|
+
}
|
|
1441
|
+
|
|
1410
1442
|
type JsonValue = string | number | boolean | { [key in string]?: JsonValue } | Array<JsonValue> | null;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { type CaseFileActuationType, type DeskFileSource, type DocumentAccessLevel } from '../base/entities';
|
|
2
|
+
import {
|
|
3
|
+
type CaseFileAddEntryResponseEntity,
|
|
4
|
+
type DeskFileResponseEntity,
|
|
5
|
+
type DeskOkResponseEntity,
|
|
6
|
+
type DeskSummaryEntity,
|
|
7
|
+
type DocumentPublicFileResponseEntity,
|
|
8
|
+
} from '../entities';
|
|
9
|
+
import { type DocumentActor } from './document.contract';
|
|
10
|
+
|
|
11
|
+
/** Patrones NATS de `desk`: el escritorio de documentos de cada funcionario («Sin clasificar»). */
|
|
12
|
+
export const DeskPatterns = {
|
|
13
|
+
getFiles: 'gestorDocumental.desk.getFiles',
|
|
14
|
+
getSummary: 'gestorDocumental.desk.getSummary',
|
|
15
|
+
addFiles: 'gestorDocumental.desk.addFiles',
|
|
16
|
+
getFile: 'gestorDocumental.desk.getFile',
|
|
17
|
+
remove: 'gestorDocumental.desk.remove',
|
|
18
|
+
classify: 'gestorDocumental.desk.classify',
|
|
19
|
+
moveToCaseFile: 'gestorDocumental.desk.moveToCaseFile',
|
|
20
|
+
} as const;
|
|
21
|
+
|
|
22
|
+
export interface DeskContract {
|
|
23
|
+
/** Los archivos sin clasificar de quien tiene la sesión, del más reciente al más antiguo. */
|
|
24
|
+
[DeskPatterns.getFiles]: { payload: { actor: DocumentActor }; response: DeskFileResponseEntity[] };
|
|
25
|
+
[DeskPatterns.getSummary]: { payload: { actor: DocumentActor }; response: DeskSummaryEntity };
|
|
26
|
+
/** Archivos ya subidos a la carpeta del gestor (por el gateway), que quedan en el escritorio. */
|
|
27
|
+
[DeskPatterns.addFiles]: {
|
|
28
|
+
payload: {
|
|
29
|
+
files: { fileId: string; fileName: string }[];
|
|
30
|
+
source?: DeskFileSource;
|
|
31
|
+
description?: string | null;
|
|
32
|
+
actor: DocumentActor;
|
|
33
|
+
};
|
|
34
|
+
response: DeskFileResponseEntity[];
|
|
35
|
+
};
|
|
36
|
+
/** El archivo, solo para su dueño. */
|
|
37
|
+
[DeskPatterns.getFile]: {
|
|
38
|
+
payload: { id: string; actor: DocumentActor };
|
|
39
|
+
response: DocumentPublicFileResponseEntity;
|
|
40
|
+
};
|
|
41
|
+
/** Lo quita del escritorio. El archivo no se borra. */
|
|
42
|
+
[DeskPatterns.remove]: { payload: { id: string; actor: DocumentActor }; response: DeskOkResponseEntity };
|
|
43
|
+
/** Se redactó o firmó un documento con este archivo: deja el escritorio. El documento tiene que ser de su dueño. */
|
|
44
|
+
[DeskPatterns.classify]: {
|
|
45
|
+
payload: { id: string; documentId: string; actor: DocumentActor };
|
|
46
|
+
response: DeskOkResponseEntity;
|
|
47
|
+
};
|
|
48
|
+
/** Lo incorpora como actuación a un expediente abierto en que puede incorporar, con sus metadatos. */
|
|
49
|
+
[DeskPatterns.moveToCaseFile]: {
|
|
50
|
+
payload: {
|
|
51
|
+
id: string;
|
|
52
|
+
caseFileId: string;
|
|
53
|
+
entry: {
|
|
54
|
+
actuationType: CaseFileActuationType;
|
|
55
|
+
title: string;
|
|
56
|
+
documentTypeName?: string | null;
|
|
57
|
+
originDate?: string | null;
|
|
58
|
+
author?: string | null;
|
|
59
|
+
keywords: string[];
|
|
60
|
+
accessLevel: DocumentAccessLevel;
|
|
61
|
+
hasSensitiveData: boolean;
|
|
62
|
+
};
|
|
63
|
+
folder?: string | null;
|
|
64
|
+
actor: DocumentActor;
|
|
65
|
+
};
|
|
66
|
+
response: CaseFileAddEntryResponseEntity;
|
|
67
|
+
};
|
|
68
|
+
}
|
package/src/contracts/index.ts
CHANGED
|
@@ -13,6 +13,7 @@ import { RetentionPatterns, type RetentionContract } from './retention.contract'
|
|
|
13
13
|
import { AccessRequestPatterns, type AccessRequestContract } from './accessRequest.contract';
|
|
14
14
|
import { TransparencyPatterns, type TransparencyContract } from './transparency.contract';
|
|
15
15
|
import { DataProtectionPatterns, type DataProtectionContract } from './dataProtection.contract';
|
|
16
|
+
import { DeskPatterns, type DeskContract } from './desk.contract';
|
|
16
17
|
import { ScanPatterns, type ScanContract } from './scan.contract';
|
|
17
18
|
import { PartsOfficePatterns, type PartsOfficeContract } from './partsOffice.contract';
|
|
18
19
|
import { ProcedurePatterns, type ProcedureContract } from './procedure.contract';
|
|
@@ -42,6 +43,7 @@ export * from './retention.contract';
|
|
|
42
43
|
export * from './accessRequest.contract';
|
|
43
44
|
export * from './transparency.contract';
|
|
44
45
|
export * from './dataProtection.contract';
|
|
46
|
+
export * from './desk.contract';
|
|
45
47
|
|
|
46
48
|
/** Patrones NATS de gestor-documental-ms, por recurso: `gestorDocumental.<recurso>.<acción>`. */
|
|
47
49
|
export const GestorDocumentalPatterns = {
|
|
@@ -66,6 +68,7 @@ export const GestorDocumentalPatterns = {
|
|
|
66
68
|
accessRequest: AccessRequestPatterns,
|
|
67
69
|
transparency: TransparencyPatterns,
|
|
68
70
|
dataProtection: DataProtectionPatterns,
|
|
71
|
+
desk: DeskPatterns,
|
|
69
72
|
} as const;
|
|
70
73
|
|
|
71
74
|
/** Contrato completo de gestor-documental-ms: la unión de los contratos de sus recursos. */
|
|
@@ -89,4 +92,5 @@ export type GestorDocumentalContract = DocumentTypeContract &
|
|
|
89
92
|
RetentionContract &
|
|
90
93
|
AccessRequestContract &
|
|
91
94
|
TransparencyContract &
|
|
92
|
-
DataProtectionContract
|
|
95
|
+
DataProtectionContract &
|
|
96
|
+
DeskContract;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { type DeskFileSource } from '../../base/entities';
|
|
2
|
+
|
|
3
|
+
/** Archivo suelto del escritorio de un funcionario («Sin clasificar»). */
|
|
4
|
+
export interface DeskFileResponseEntity {
|
|
5
|
+
id: string;
|
|
6
|
+
fileName: string;
|
|
7
|
+
size: number;
|
|
8
|
+
sha256: string;
|
|
9
|
+
source: DeskFileSource;
|
|
10
|
+
description: string | null;
|
|
11
|
+
/** Es un PDF: se puede redactar una comunicación con él o firmarlo como documento suelto. */
|
|
12
|
+
isPdf: boolean;
|
|
13
|
+
createdAt: string;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface DeskSummaryEntity {
|
|
17
|
+
/** Archivos del escritorio aún sin clasificar. */
|
|
18
|
+
unclassified: number;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface DeskOkResponseEntity {
|
|
22
|
+
id: string;
|
|
23
|
+
ok: boolean;
|
|
24
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './desk.entity';
|
package/src/entities/index.ts
CHANGED