@muni-sanfer/types-gestor-documental 0.0.1-beta.15 → 0.0.1-beta.17
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 +63 -0
- package/dist/base/entities.js +12 -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 +12 -1
- package/dist/contracts/document.contract.js +1 -0
- package/dist/contracts/documentType.contract.d.ts +1 -0
- package/dist/contracts/holiday.contract.d.ts +30 -0
- package/dist/contracts/holiday.contract.js +9 -0
- package/dist/contracts/index.d.ts +37 -1
- package/dist/contracts/index.js +12 -0
- package/dist/contracts/scan.contract.d.ts +63 -0
- package/dist/contracts/scan.contract.js +12 -0
- package/dist/contracts/textSnippet.contract.d.ts +51 -0
- package/dist/contracts/textSnippet.contract.js +11 -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 +30 -0
- package/dist/entities/documentType/documentType.entity.d.ts +5 -0
- package/dist/entities/holiday/holiday.entity.d.ts +10 -0
- package/dist/entities/holiday/holiday.entity.js +2 -0
- package/dist/entities/holiday/index.d.ts +1 -0
- package/dist/entities/holiday/index.js +17 -0
- package/dist/entities/index.d.ts +4 -0
- package/dist/entities/index.js +4 -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/dist/entities/textSnippet/index.d.ts +1 -0
- package/dist/entities/textSnippet/index.js +17 -0
- package/dist/entities/textSnippet/textSnippet.entity.d.ts +20 -0
- package/dist/entities/textSnippet/textSnippet.entity.js +2 -0
- package/package.json +1 -1
- package/src/base/entities.ts +71 -0
- package/src/contracts/archivalSeries.contract.ts +53 -0
- package/src/contracts/caseFile.contract.ts +4 -0
- package/src/contracts/document.contract.ts +14 -0
- package/src/contracts/documentType.contract.ts +2 -0
- package/src/contracts/holiday.contract.ts +16 -0
- package/src/contracts/index.ts +17 -1
- package/src/contracts/scan.contract.ts +52 -0
- package/src/contracts/textSnippet.contract.ts +53 -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 +30 -0
- package/src/entities/documentType/documentType.entity.ts +2 -0
- package/src/entities/holiday/holiday.entity.ts +11 -0
- package/src/entities/holiday/index.ts +1 -0
- package/src/entities/index.ts +4 -0
- package/src/entities/scan/index.ts +1 -0
- package/src/entities/scan/scan.entity.ts +32 -0
- package/src/entities/textSnippet/index.ts +1 -0
- package/src/entities/textSnippet/textSnippet.entity.ts +24 -0
|
@@ -109,12 +109,24 @@ export interface DocumentGetAllResponseEntity {
|
|
|
109
109
|
} | null;
|
|
110
110
|
}
|
|
111
111
|
/** Una entrada de la bandeja de recibidos: la entrega y el documento al que corresponde. */
|
|
112
|
+
/** Semáforo de un plazo pendiente: a tiempo, por vencer (2 días hábiles o menos) o vencido. */
|
|
113
|
+
export type DocumentDueStatus = 'OnTime' | 'DueSoon' | 'Overdue';
|
|
112
114
|
export interface DocumentInboxItemEntity extends DocumentDeliveryResponseEntity {
|
|
115
|
+
/** Semáforo de lo pendiente con plazo (sin plazo o ya atendido, `null`). */
|
|
116
|
+
dueStatus: DocumentDueStatus | null;
|
|
117
|
+
/** Días hábiles que quedan, sin contar hoy (vencido: `null`). */
|
|
118
|
+
businessDaysLeft: number | null;
|
|
113
119
|
document: DocumentLinkEntity;
|
|
114
120
|
}
|
|
115
121
|
export interface DocumentGetByIdResponseEntity {
|
|
116
122
|
id: DocumentEntity['id'];
|
|
117
123
|
issuerName: string;
|
|
124
|
+
archivalSeries: {
|
|
125
|
+
id: string;
|
|
126
|
+
code: string;
|
|
127
|
+
name: string;
|
|
128
|
+
} | null;
|
|
129
|
+
restrictionEndsAt: string | null;
|
|
118
130
|
subject: DocumentEntity['subject'];
|
|
119
131
|
keywords: DocumentEntity['keywords'];
|
|
120
132
|
accessLevel: DocumentEntity['accessLevel'];
|
|
@@ -322,6 +334,10 @@ export interface DocumentReassignResponseEntity {
|
|
|
322
334
|
*/
|
|
323
335
|
export interface DocumentAgendaItemEntity {
|
|
324
336
|
kind: 'Received' | 'Sent';
|
|
337
|
+
/** Semáforo de lo pendiente (atendido o ya respondido por todos: `null`). */
|
|
338
|
+
dueStatus: DocumentDueStatus | null;
|
|
339
|
+
/** Días hábiles que quedan, sin contar hoy (vencido: `null`). */
|
|
340
|
+
businessDaysLeft: number | null;
|
|
325
341
|
/** La entrega (lo recibido) o el documento (lo enviado). */
|
|
326
342
|
id: string;
|
|
327
343
|
documentId: DocumentEntity['id'];
|
|
@@ -444,3 +460,17 @@ export interface DocumentEmailCopyViewEntity {
|
|
|
444
460
|
signedAt: string | null;
|
|
445
461
|
}[];
|
|
446
462
|
}
|
|
463
|
+
/** Recordatorio de un plazo: al recibido y, si venció, también a su jefatura (la resuelve el gateway). */
|
|
464
|
+
export interface DocumentReminderEntity {
|
|
465
|
+
deliveryId: string;
|
|
466
|
+
kind: 'DueSoon' | 'Overdue';
|
|
467
|
+
employeeId: string;
|
|
468
|
+
fullName: string;
|
|
469
|
+
documentId: string;
|
|
470
|
+
/** Cómo se cita: «D.E. N° 590/2026», el folio de ingreso o el tipo. */
|
|
471
|
+
folio: string;
|
|
472
|
+
subject: string;
|
|
473
|
+
dueAt: string;
|
|
474
|
+
instruction: DocumentDeliveryEntity['instruction'];
|
|
475
|
+
sentByFullName: string | null;
|
|
476
|
+
}
|
|
@@ -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;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './holiday.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("./holiday.entity"), exports);
|
package/dist/entities/index.d.ts
CHANGED
package/dist/entities/index.js
CHANGED
|
@@ -23,3 +23,7 @@ __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);
|
|
28
|
+
__exportStar(require("./textSnippet"), exports);
|
|
29
|
+
__exportStar(require("./holiday"), 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
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './textSnippet.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("./textSnippet.entity"), exports);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { TextSnippetEntity } from '../../base/entities';
|
|
2
|
+
/** Texto de la biblioteca de vistos y cláusulas. */
|
|
3
|
+
export interface TextSnippetGetAllResponseEntity {
|
|
4
|
+
id: TextSnippetEntity['id'];
|
|
5
|
+
title: TextSnippetEntity['title'];
|
|
6
|
+
text: TextSnippetEntity['text'];
|
|
7
|
+
section: TextSnippetEntity['section'];
|
|
8
|
+
keywords: TextSnippetEntity['keywords'];
|
|
9
|
+
enabled: TextSnippetEntity['enabled'];
|
|
10
|
+
updatedAt: TextSnippetEntity['updatedAt'];
|
|
11
|
+
}
|
|
12
|
+
export type TextSnippetGetByIdResponseEntity = TextSnippetGetAllResponseEntity;
|
|
13
|
+
export interface TextSnippetCreateResponseEntity {
|
|
14
|
+
id: TextSnippetEntity['id'];
|
|
15
|
+
ok: boolean;
|
|
16
|
+
}
|
|
17
|
+
export interface TextSnippetUpdateResponseEntity {
|
|
18
|
+
id: TextSnippetEntity['id'];
|
|
19
|
+
ok: boolean;
|
|
20
|
+
}
|
package/package.json
CHANGED
package/src/base/entities.ts
CHANGED
|
@@ -252,6 +252,23 @@ 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
|
+
|
|
262
|
+
export type TextSnippetSection = 'Vistos' | 'Considerando' | 'Resolutive' | 'Body' | 'Closing';
|
|
263
|
+
|
|
264
|
+
export const TextSnippetSection = {
|
|
265
|
+
Vistos: 'Vistos',
|
|
266
|
+
Considerando: 'Considerando',
|
|
267
|
+
Resolutive: 'Resolutive',
|
|
268
|
+
Body: 'Body',
|
|
269
|
+
Closing: 'Closing',
|
|
270
|
+
} satisfies Record<string, TextSnippetSection>;
|
|
271
|
+
|
|
255
272
|
export type WorkFolderItemKind = 'Document' | 'File';
|
|
256
273
|
|
|
257
274
|
export const WorkFolderItemKind = {
|
|
@@ -270,6 +287,8 @@ export interface DocumentTypeEntity {
|
|
|
270
287
|
resetsYearly: boolean;
|
|
271
288
|
numbered: boolean;
|
|
272
289
|
directorateCodeReference?: number | null;
|
|
290
|
+
archivalSeries?: ArchivalSeriesEntity | null;
|
|
291
|
+
archivalSeriesId?: string | null;
|
|
273
292
|
issuingEntity?: IssuingEntityEntity | null;
|
|
274
293
|
issuingEntityId?: string | null;
|
|
275
294
|
sharesNumberingWith?: DocumentTypeEntity | null;
|
|
@@ -291,6 +310,7 @@ export interface DocumentEntity {
|
|
|
291
310
|
keywords: string[];
|
|
292
311
|
accessLevel: DocumentAccessLevel;
|
|
293
312
|
hasSensitiveData: boolean;
|
|
313
|
+
restrictionEndsAt?: string | null;
|
|
294
314
|
status: DocumentStatus;
|
|
295
315
|
correlative?: number | null;
|
|
296
316
|
correlativeYear?: number | null;
|
|
@@ -441,6 +461,8 @@ export interface DocumentDeliveryEntity {
|
|
|
441
461
|
readAt?: string | null;
|
|
442
462
|
closedAt?: string | null;
|
|
443
463
|
closingNote?: string | null;
|
|
464
|
+
dueSoonRemindedAt?: string | null;
|
|
465
|
+
overdueRemindedAt?: string | null;
|
|
444
466
|
document?: DocumentEntity;
|
|
445
467
|
documentId: string;
|
|
446
468
|
createdAt: string;
|
|
@@ -490,6 +512,9 @@ export interface CaseFileEntity {
|
|
|
490
512
|
status: CaseFileStatus;
|
|
491
513
|
accessLevel: DocumentAccessLevel;
|
|
492
514
|
hasSensitiveData: boolean;
|
|
515
|
+
restrictionEndsAt?: string | null;
|
|
516
|
+
archivalSeries?: ArchivalSeriesEntity | null;
|
|
517
|
+
archivalSeriesId?: string | null;
|
|
493
518
|
incorporationMechanism: CaseFileIncorporationMechanism;
|
|
494
519
|
schemaVersion: string;
|
|
495
520
|
procedure?: ProcedureEntity;
|
|
@@ -642,6 +667,19 @@ export interface DocumentEmailCopyEntity {
|
|
|
642
667
|
createdAt: string;
|
|
643
668
|
}
|
|
644
669
|
|
|
670
|
+
export interface ScanSessionEntity {
|
|
671
|
+
id: string;
|
|
672
|
+
tokenHash: string;
|
|
673
|
+
status: ScanSessionStatus;
|
|
674
|
+
employeeId: string;
|
|
675
|
+
pages: JsonValue;
|
|
676
|
+
fileId?: string | null;
|
|
677
|
+
fileName?: string | null;
|
|
678
|
+
expiresAt: string;
|
|
679
|
+
finishedAt?: string | null;
|
|
680
|
+
createdAt: string;
|
|
681
|
+
}
|
|
682
|
+
|
|
645
683
|
export interface DocumentExternalRecipientEntity {
|
|
646
684
|
id: string;
|
|
647
685
|
entityId: number;
|
|
@@ -710,6 +748,39 @@ export interface DocDigitalInboundEntity {
|
|
|
710
748
|
updatedAt: string;
|
|
711
749
|
}
|
|
712
750
|
|
|
751
|
+
export interface HolidayEntity {
|
|
752
|
+
id: string;
|
|
753
|
+
date: string;
|
|
754
|
+
name: string;
|
|
755
|
+
createdAt: string;
|
|
756
|
+
}
|
|
757
|
+
|
|
758
|
+
export interface TextSnippetEntity {
|
|
759
|
+
id: string;
|
|
760
|
+
title: string;
|
|
761
|
+
text: string;
|
|
762
|
+
section: TextSnippetSection;
|
|
763
|
+
keywords: string[];
|
|
764
|
+
enabled: boolean;
|
|
765
|
+
deleted: boolean;
|
|
766
|
+
createdAt: string;
|
|
767
|
+
updatedAt: string;
|
|
768
|
+
}
|
|
769
|
+
|
|
770
|
+
export interface ArchivalSeriesEntity {
|
|
771
|
+
id: string;
|
|
772
|
+
code: string;
|
|
773
|
+
name: string;
|
|
774
|
+
section?: string | null;
|
|
775
|
+
description?: string | null;
|
|
776
|
+
enabled: boolean;
|
|
777
|
+
documentTypes?: DocumentTypeEntity[];
|
|
778
|
+
caseFiles?: CaseFileEntity[];
|
|
779
|
+
deleted: boolean;
|
|
780
|
+
createdAt: string;
|
|
781
|
+
updatedAt: string;
|
|
782
|
+
}
|
|
783
|
+
|
|
713
784
|
export interface IssuingEntityEntity {
|
|
714
785
|
id: string;
|
|
715
786
|
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
|
|
|
@@ -15,6 +15,7 @@ import {
|
|
|
15
15
|
type DocumentDiscardResponseEntity,
|
|
16
16
|
type DocumentEmailCopyIssuedEntity,
|
|
17
17
|
type DocumentEmailCopyViewEntity,
|
|
18
|
+
type DocumentReminderEntity,
|
|
18
19
|
type DocumentGetAllResponseEntity,
|
|
19
20
|
type DocumentGetByIdResponseEntity,
|
|
20
21
|
type DocumentGetSummaryResponseEntity,
|
|
@@ -56,6 +57,7 @@ export const DocumentPatterns = {
|
|
|
56
57
|
issueEmailCopies: 'gestorDocumental.document.issueEmailCopies',
|
|
57
58
|
getEmailCopy: 'gestorDocumental.document.getEmailCopy',
|
|
58
59
|
getEmailCopyFile: 'gestorDocumental.document.getEmailCopyFile',
|
|
60
|
+
claimReminders: 'gestorDocumental.document.claimReminders',
|
|
59
61
|
} as const;
|
|
60
62
|
|
|
61
63
|
/**
|
|
@@ -124,6 +126,8 @@ export interface DocumentWritePayload extends Pick<DocumentEntity, 'subject' | '
|
|
|
124
126
|
replyToDocumentId?: string | null;
|
|
125
127
|
// Instituciones (y usuarios) de DocDigital a quienes va: al terminar la firma pasa a Oficina de Partes.
|
|
126
128
|
externalRecipients?: DocumentExternalRecipientInput[];
|
|
129
|
+
// Fin de la restricción de acceso (ISO 8601), si no es público.
|
|
130
|
+
restrictionEndsAt?: string | null;
|
|
127
131
|
// Copia por correo a quienes están fuera del Estado: sale al finalizar o, si también va por DocDigital, al despacharlo.
|
|
128
132
|
emailCopies?: DocumentEmailCopyInput[];
|
|
129
133
|
action?: 'Submit';
|
|
@@ -296,6 +300,8 @@ export interface DocumentContract {
|
|
|
296
300
|
note?: string | null;
|
|
297
301
|
// Plazo para atenderlo (ISO 8601).
|
|
298
302
|
dueAt?: string | null;
|
|
303
|
+
// O el plazo en días hábiles (Ley 19.880): el servicio calcula la fecha con los feriados cargados.
|
|
304
|
+
dueBusinessDays?: number | null;
|
|
299
305
|
actor: DocumentActor;
|
|
300
306
|
viewAll?: boolean;
|
|
301
307
|
};
|
|
@@ -329,6 +335,14 @@ export interface DocumentContract {
|
|
|
329
335
|
payload: { token: string };
|
|
330
336
|
response: DocumentEmailCopyViewEntity;
|
|
331
337
|
};
|
|
338
|
+
/**
|
|
339
|
+
* Recordatorios de plazos que corresponde enviar ahora: lo que vence en un día hábil y lo vencido sin atender. Cada
|
|
340
|
+
* uno se entrega una sola vez (queda marcado al reclamarlo), aunque lo pidan varias instancias del gateway a la vez.
|
|
341
|
+
*/
|
|
342
|
+
[DocumentPatterns.claimReminders]: {
|
|
343
|
+
payload: Record<string, never>;
|
|
344
|
+
response: DocumentReminderEntity[];
|
|
345
|
+
};
|
|
332
346
|
[DocumentPatterns.getEmailCopyFile]: {
|
|
333
347
|
payload: { token: string };
|
|
334
348
|
response: DocumentPublicFileResponseEntity;
|
|
@@ -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).
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type HolidayRemoveResponseEntity, type HolidayResponseEntity } from '../entities';
|
|
2
|
+
|
|
3
|
+
/** Patrones NATS de `holiday`: feriados para contar días hábiles. */
|
|
4
|
+
export const HolidayPatterns = {
|
|
5
|
+
getAll: 'gestorDocumental.holiday.getAll',
|
|
6
|
+
create: 'gestorDocumental.holiday.create',
|
|
7
|
+
remove: 'gestorDocumental.holiday.remove',
|
|
8
|
+
} as const;
|
|
9
|
+
|
|
10
|
+
export interface HolidayContract {
|
|
11
|
+
/** Feriados de un año, en orden. */
|
|
12
|
+
[HolidayPatterns.getAll]: { payload: { year: number }; response: HolidayResponseEntity[] };
|
|
13
|
+
/** `date` como «AAAA-MM-DD». */
|
|
14
|
+
[HolidayPatterns.create]: { payload: { date: string; name: string }; response: HolidayResponseEntity };
|
|
15
|
+
[HolidayPatterns.remove]: { payload: { id: string }; response: HolidayRemoveResponseEntity };
|
|
16
|
+
}
|
package/src/contracts/index.ts
CHANGED
|
@@ -2,6 +2,10 @@ 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 { TextSnippetPatterns, type TextSnippetContract } from './textSnippet.contract';
|
|
7
|
+
import { HolidayPatterns, type HolidayContract } from './holiday.contract';
|
|
8
|
+
import { ScanPatterns, type ScanContract } from './scan.contract';
|
|
5
9
|
import { PartsOfficePatterns, type PartsOfficeContract } from './partsOffice.contract';
|
|
6
10
|
import { ProcedurePatterns, type ProcedureContract } from './procedure.contract';
|
|
7
11
|
import { RegisterBookPatterns, type RegisterBookContract } from './registerBook.contract';
|
|
@@ -18,6 +22,10 @@ export * from './partsOffice.contract';
|
|
|
18
22
|
export * from './registerBook.contract';
|
|
19
23
|
export * from './signatureBatch.contract';
|
|
20
24
|
export * from './workFolder.contract';
|
|
25
|
+
export * from './scan.contract';
|
|
26
|
+
export * from './archivalSeries.contract';
|
|
27
|
+
export * from './textSnippet.contract';
|
|
28
|
+
export * from './holiday.contract';
|
|
21
29
|
|
|
22
30
|
/** Patrones NATS de gestor-documental-ms, por recurso: `gestorDocumental.<recurso>.<acción>`. */
|
|
23
31
|
export const GestorDocumentalPatterns = {
|
|
@@ -30,6 +38,10 @@ export const GestorDocumentalPatterns = {
|
|
|
30
38
|
registerBook: RegisterBookPatterns,
|
|
31
39
|
signatureBatch: SignatureBatchPatterns,
|
|
32
40
|
workFolder: WorkFolderPatterns,
|
|
41
|
+
scan: ScanPatterns,
|
|
42
|
+
archivalSeries: ArchivalSeriesPatterns,
|
|
43
|
+
textSnippet: TextSnippetPatterns,
|
|
44
|
+
holiday: HolidayPatterns,
|
|
33
45
|
} as const;
|
|
34
46
|
|
|
35
47
|
/** Contrato completo de gestor-documental-ms: la unión de los contratos de sus recursos. */
|
|
@@ -41,4 +53,8 @@ export type GestorDocumentalContract = DocumentTypeContract &
|
|
|
41
53
|
PartsOfficeContract &
|
|
42
54
|
RegisterBookContract &
|
|
43
55
|
SignatureBatchContract &
|
|
44
|
-
WorkFolderContract
|
|
56
|
+
WorkFolderContract &
|
|
57
|
+
ScanContract &
|
|
58
|
+
ArchivalSeriesContract &
|
|
59
|
+
TextSnippetContract &
|
|
60
|
+
HolidayContract;
|
|
@@ -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,53 @@
|
|
|
1
|
+
import { type TextSnippetEntity, type TextSnippetSection } from '../base/entities';
|
|
2
|
+
import {
|
|
3
|
+
type TextSnippetCreateResponseEntity,
|
|
4
|
+
type TextSnippetGetAllResponseEntity,
|
|
5
|
+
type TextSnippetGetByIdResponseEntity,
|
|
6
|
+
type TextSnippetUpdateResponseEntity,
|
|
7
|
+
} from '../entities';
|
|
8
|
+
import { type RpcPage } from './contract';
|
|
9
|
+
|
|
10
|
+
/** Patrones NATS de `textSnippet` (biblioteca de vistos y cláusulas): `<servicio>.<recurso>.<acción>`. */
|
|
11
|
+
export const TextSnippetPatterns = {
|
|
12
|
+
getAll: 'gestorDocumental.textSnippet.getAll',
|
|
13
|
+
getById: 'gestorDocumental.textSnippet.getById',
|
|
14
|
+
create: 'gestorDocumental.textSnippet.create',
|
|
15
|
+
update: 'gestorDocumental.textSnippet.update',
|
|
16
|
+
setEnabled: 'gestorDocumental.textSnippet.setEnabled',
|
|
17
|
+
} as const;
|
|
18
|
+
|
|
19
|
+
/** Datos de un texto de la biblioteca al crearlo o editarlo. */
|
|
20
|
+
export interface TextSnippetWritePayload {
|
|
21
|
+
title: string;
|
|
22
|
+
text: string;
|
|
23
|
+
section: TextSnippetSection;
|
|
24
|
+
keywords?: string[];
|
|
25
|
+
enabled?: boolean;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export interface TextSnippetContract {
|
|
29
|
+
[TextSnippetPatterns.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; section?: TextSnippetSection };
|
|
34
|
+
};
|
|
35
|
+
response: RpcPage<TextSnippetGetAllResponseEntity[]>;
|
|
36
|
+
};
|
|
37
|
+
[TextSnippetPatterns.getById]: {
|
|
38
|
+
payload: Pick<TextSnippetEntity, 'id'>;
|
|
39
|
+
response: TextSnippetGetByIdResponseEntity;
|
|
40
|
+
};
|
|
41
|
+
[TextSnippetPatterns.create]: {
|
|
42
|
+
payload: TextSnippetWritePayload;
|
|
43
|
+
response: TextSnippetCreateResponseEntity;
|
|
44
|
+
};
|
|
45
|
+
[TextSnippetPatterns.update]: {
|
|
46
|
+
payload: TextSnippetWritePayload & Pick<TextSnippetEntity, 'id'>;
|
|
47
|
+
response: TextSnippetUpdateResponseEntity;
|
|
48
|
+
};
|
|
49
|
+
[TextSnippetPatterns.setEnabled]: {
|
|
50
|
+
payload: Pick<TextSnippetEntity, 'id' | 'enabled'>;
|
|
51
|
+
response: TextSnippetUpdateResponseEntity;
|
|
52
|
+
};
|
|
53
|
+
}
|