@muni-sanfer/types-gestor-documental 0.0.1-beta.62 → 0.0.1-beta.64
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 +10 -0
- package/dist/contracts/document.contract.d.ts +7 -1
- package/dist/contracts/document.contract.js +1 -0
- package/dist/contracts/documentType.contract.d.ts +3 -0
- package/dist/contracts/index.d.ts +2 -0
- package/dist/contracts/visaInitials.contract.d.ts +12 -1
- package/dist/contracts/visaInitials.contract.js +1 -0
- package/dist/entities/document/document.entity.d.ts +43 -1
- package/dist/entities/document/stampPlacement.d.ts +13 -9
- package/dist/entities/document/stampPlacement.js +5 -2
- package/dist/entities/documentType/documentType.entity.d.ts +3 -0
- package/dist/entities/visaInitials/visaInitials.entity.d.ts +5 -0
- package/package.json +1 -1
- package/src/base/entities.ts +10 -0
- package/src/contracts/document.contract.ts +7 -0
- package/src/contracts/documentType.contract.ts +4 -0
- package/src/contracts/visaInitials.contract.ts +7 -1
- package/src/entities/document/document.entity.ts +44 -2
- package/src/entities/document/stampPlacement.ts +10 -6
- package/src/entities/documentType/documentType.entity.ts +6 -0
- package/src/entities/visaInitials/visaInitials.entity.ts +6 -0
package/dist/base/entities.d.ts
CHANGED
|
@@ -464,6 +464,9 @@ export interface DocumentTypeEntity {
|
|
|
464
464
|
numbered: boolean;
|
|
465
465
|
numberingScope: DocumentNumberingScope;
|
|
466
466
|
usesPartsOffice: boolean;
|
|
467
|
+
processingSlaDays?: number | null;
|
|
468
|
+
turnSlaDays?: number | null;
|
|
469
|
+
reviewSlaDays?: number | null;
|
|
467
470
|
visaMode: DocumentVisaMode;
|
|
468
471
|
activeTransparency: boolean;
|
|
469
472
|
transparencySection?: string | null;
|
|
@@ -540,6 +543,7 @@ export interface DocumentEntity {
|
|
|
540
543
|
currentFileUrl?: string | null;
|
|
541
544
|
fileFormat?: string | null;
|
|
542
545
|
submittedAt?: string | null;
|
|
546
|
+
processingOverdueRemindedAt?: string | null;
|
|
543
547
|
finishedAt?: string | null;
|
|
544
548
|
documentType?: DocumentTypeEntity;
|
|
545
549
|
documentTypeId: string;
|
|
@@ -603,6 +607,8 @@ export interface DocumentParticipantEntity {
|
|
|
603
607
|
observation?: string | null;
|
|
604
608
|
resolvedAt?: string | null;
|
|
605
609
|
initials?: string | null;
|
|
610
|
+
currentSince?: string | null;
|
|
611
|
+
overdueRemindedAt?: string | null;
|
|
606
612
|
document?: DocumentEntity;
|
|
607
613
|
documentId: string;
|
|
608
614
|
createdAt: string;
|
|
@@ -696,6 +702,9 @@ export interface DocumentTypeVersionEntity {
|
|
|
696
702
|
numberingScope: DocumentNumberingScope;
|
|
697
703
|
usesPartsOffice: boolean;
|
|
698
704
|
visaMode: DocumentVisaMode;
|
|
705
|
+
processingSlaDays?: number | null;
|
|
706
|
+
turnSlaDays?: number | null;
|
|
707
|
+
reviewSlaDays?: number | null;
|
|
699
708
|
activeTransparency: boolean;
|
|
700
709
|
transparencySection?: string | null;
|
|
701
710
|
directorateCodeReference?: number | null;
|
|
@@ -1056,6 +1065,7 @@ export interface DocumentDraftReviewEntity {
|
|
|
1056
1065
|
status: DraftReviewStatus;
|
|
1057
1066
|
observation?: string | null;
|
|
1058
1067
|
resolvedAt?: string | null;
|
|
1068
|
+
overdueRemindedAt?: string | null;
|
|
1059
1069
|
}
|
|
1060
1070
|
export interface DocumentTemplateVersionEntity {
|
|
1061
1071
|
id: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type DocumentAccessAction, type DocumentAccessLevel, type DocumentAttachmentEntity, type DocumentDeliveryEntity, type DocumentEntity, type DocumentInstruction, type DocumentParticipantEntity, type DocumentStatus } from '../base/entities';
|
|
2
|
-
import { type DocumentAnnulResponseEntity, type DocumentCloseDeliveryResponseEntity, type DocumentCreateResponseEntity, type DocumentDeriveResponseEntity, type DocumentDiscardResponseEntity, type DocumentEmailCopyIssuedEntity, type DocumentEmailCopyViewEntity, type DocumentReminderEntity, type DocumentGetAllResponseEntity, type DocumentGetByIdResponseEntity, type DocumentGetSummaryResponseEntity, type DocumentInboxItemEntity, type DocumentPublicFileResponseEntity, type DocumentReassignResponseEntity, type DocumentReviewResponseEntity, type DocumentSignManyResponseEntity, type DocumentAgendaResponseEntity, type DocumentComposeResponseEntity, type DocumentComposition, type DocumentTrailExportEntity, type DocumentUpdateResponseEntity, type DocumentVerifyResponseEntity, type DocumentCommentResponseEntity, type DocumentCommentsResponseEntity, type DocumentVersionResponseEntity, type DocumentDraftCorrectionResponseEntity, type DocumentStampPlacements, type DocumentDraftReviewResponseEntity } from '../entities';
|
|
2
|
+
import { type DocumentAnnulResponseEntity, type DocumentCloseDeliveryResponseEntity, type DocumentCreateResponseEntity, type DocumentDeriveResponseEntity, type DocumentDiscardResponseEntity, type DocumentEmailCopyIssuedEntity, type DocumentEmailCopyViewEntity, type DocumentReminderEntity, type DocumentSlaReminderEntity, type DocumentGetAllResponseEntity, type DocumentGetByIdResponseEntity, type DocumentGetSummaryResponseEntity, type DocumentInboxItemEntity, type DocumentPublicFileResponseEntity, type DocumentReassignResponseEntity, type DocumentReviewResponseEntity, type DocumentSignManyResponseEntity, type DocumentAgendaResponseEntity, type DocumentComposeResponseEntity, type DocumentComposition, type DocumentTrailExportEntity, type DocumentUpdateResponseEntity, type DocumentVerifyResponseEntity, type DocumentCommentResponseEntity, type DocumentCommentsResponseEntity, type DocumentVersionResponseEntity, type DocumentDraftCorrectionResponseEntity, type DocumentStampPlacements, type DocumentDraftReviewResponseEntity } from '../entities';
|
|
3
3
|
import { type RpcPage } from './contract';
|
|
4
4
|
/** Patrones NATS de `document`: `<servicio>.<recurso>.<acción>`. */
|
|
5
5
|
export declare const DocumentPatterns: {
|
|
@@ -34,6 +34,7 @@ export declare const DocumentPatterns: {
|
|
|
34
34
|
readonly getEmailCopy: "gestorDocumental.document.getEmailCopy";
|
|
35
35
|
readonly getEmailCopyFile: "gestorDocumental.document.getEmailCopyFile";
|
|
36
36
|
readonly claimReminders: "gestorDocumental.document.claimReminders";
|
|
37
|
+
readonly claimSlaReminders: "gestorDocumental.document.claimSlaReminders";
|
|
37
38
|
};
|
|
38
39
|
/**
|
|
39
40
|
* Funcionario que hace la operación y sus áreas (direcciones y departamentos a los que pertenece o que dirige). Lo
|
|
@@ -453,6 +454,11 @@ export interface DocumentContract {
|
|
|
453
454
|
payload: Record<string, never>;
|
|
454
455
|
response: DocumentReminderEntity[];
|
|
455
456
|
};
|
|
457
|
+
/** Plazos de servicio vencidos que aún no se avisan: se marcan al entregarlos, así cada uno sale una vez. */
|
|
458
|
+
[DocumentPatterns.claimSlaReminders]: {
|
|
459
|
+
payload: Record<string, never>;
|
|
460
|
+
response: DocumentSlaReminderEntity[];
|
|
461
|
+
};
|
|
456
462
|
[DocumentPatterns.getEmailCopyFile]: {
|
|
457
463
|
payload: {
|
|
458
464
|
token: string;
|
|
@@ -34,4 +34,5 @@ exports.DocumentPatterns = {
|
|
|
34
34
|
getEmailCopy: 'gestorDocumental.document.getEmailCopy',
|
|
35
35
|
getEmailCopyFile: 'gestorDocumental.document.getEmailCopyFile',
|
|
36
36
|
claimReminders: 'gestorDocumental.document.claimReminders',
|
|
37
|
+
claimSlaReminders: 'gestorDocumental.document.claimSlaReminders',
|
|
37
38
|
};
|
|
@@ -39,6 +39,9 @@ export interface DocumentTypeWritePayload {
|
|
|
39
39
|
numbered?: boolean;
|
|
40
40
|
numberingScope?: DocumentNumberingScope;
|
|
41
41
|
usesPartsOffice?: boolean;
|
|
42
|
+
processingSlaDays?: number | null;
|
|
43
|
+
turnSlaDays?: number | null;
|
|
44
|
+
reviewSlaDays?: number | null;
|
|
42
45
|
/** Transparencia Activa: sus documentos se publican cada mes, en esta sección del Portal. */
|
|
43
46
|
activeTransparency?: boolean;
|
|
44
47
|
transparencySection?: string | null;
|
|
@@ -100,6 +100,7 @@ export declare const GestorDocumentalPatterns: {
|
|
|
100
100
|
readonly getEmailCopy: "gestorDocumental.document.getEmailCopy";
|
|
101
101
|
readonly getEmailCopyFile: "gestorDocumental.document.getEmailCopyFile";
|
|
102
102
|
readonly claimReminders: "gestorDocumental.document.claimReminders";
|
|
103
|
+
readonly claimSlaReminders: "gestorDocumental.document.claimSlaReminders";
|
|
103
104
|
};
|
|
104
105
|
readonly procedure: {
|
|
105
106
|
readonly getAll: "gestorDocumental.procedure.getAll";
|
|
@@ -323,6 +324,7 @@ export declare const GestorDocumentalPatterns: {
|
|
|
323
324
|
readonly visaInitials: {
|
|
324
325
|
readonly get: "gestorDocumental.visaInitials.get";
|
|
325
326
|
readonly update: "gestorDocumental.visaInitials.update";
|
|
327
|
+
readonly lookup: "gestorDocumental.visaInitials.lookup";
|
|
326
328
|
};
|
|
327
329
|
};
|
|
328
330
|
/** Contrato completo de gestor-documental-ms: la unión de los contratos de sus recursos. */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type VisaInitialsResponseEntity } from '../entities';
|
|
1
|
+
import { type VisaInitialsLookupEntity, type VisaInitialsResponseEntity } from '../entities';
|
|
2
2
|
import { type DocumentActor } from './document.contract';
|
|
3
3
|
/**
|
|
4
4
|
* Patrones NATS de `visaInitials`: las iniciales con que visa quien tiene la sesión. Salen de su nombre y las puede
|
|
@@ -7,6 +7,7 @@ import { type DocumentActor } from './document.contract';
|
|
|
7
7
|
export declare const VisaInitialsPatterns: {
|
|
8
8
|
readonly get: "gestorDocumental.visaInitials.get";
|
|
9
9
|
readonly update: "gestorDocumental.visaInitials.update";
|
|
10
|
+
readonly lookup: "gestorDocumental.visaInitials.lookup";
|
|
10
11
|
};
|
|
11
12
|
export interface VisaInitialsContract {
|
|
12
13
|
[VisaInitialsPatterns.get]: {
|
|
@@ -25,4 +26,14 @@ export interface VisaInitialsContract {
|
|
|
25
26
|
};
|
|
26
27
|
response: VisaInitialsResponseEntity;
|
|
27
28
|
};
|
|
29
|
+
/** Las iniciales con que visarían ahora unos funcionarios (las propias o las de su nombre), para la vista previa. */
|
|
30
|
+
[VisaInitialsPatterns.lookup]: {
|
|
31
|
+
payload: {
|
|
32
|
+
people: {
|
|
33
|
+
employeeId: string;
|
|
34
|
+
fullName: string;
|
|
35
|
+
}[];
|
|
36
|
+
};
|
|
37
|
+
response: VisaInitialsLookupEntity[];
|
|
38
|
+
};
|
|
28
39
|
}
|
|
@@ -21,6 +21,21 @@ export interface DocumentParticipantResponseEntity {
|
|
|
21
21
|
position: DocumentParticipantEntity['position'];
|
|
22
22
|
observation: DocumentParticipantEntity['observation'];
|
|
23
23
|
resolvedAt: DocumentParticipantEntity['resolvedAt'];
|
|
24
|
+
/** Plazo del turno vigente, si el tipo tiene plazo por turno (si no le toca, `null`). */
|
|
25
|
+
deadline?: DocumentDeadlineEntity | null;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Plazo de servicio (SLA) que corre, en días hábiles: cuándo vence y su semáforo (por vencer con 2 días hábiles o
|
|
29
|
+
* menos). Lo calcula el servicio con los feriados.
|
|
30
|
+
*/
|
|
31
|
+
export interface DocumentDeadlineEntity {
|
|
32
|
+
/** Días hábiles del plazo, como los fija el tipo documental. */
|
|
33
|
+
days: number;
|
|
34
|
+
startedAt: string;
|
|
35
|
+
dueAt: string;
|
|
36
|
+
dueStatus: 'OnTime' | 'DueSoon' | 'Overdue';
|
|
37
|
+
/** Días hábiles que quedan, sin contar hoy (vencido: `null`). */
|
|
38
|
+
businessDaysLeft: number | null;
|
|
24
39
|
}
|
|
25
40
|
/** Destinatario de un documento, como lo eligió el redactor: una persona o un área completa. */
|
|
26
41
|
export interface DocumentRecipientResponseEntity {
|
|
@@ -118,6 +133,9 @@ export interface DocumentGetAllResponseEntity {
|
|
|
118
133
|
total: number;
|
|
119
134
|
read: number;
|
|
120
135
|
} | null;
|
|
136
|
+
turnDeadline?: DocumentDeadlineEntity | null;
|
|
137
|
+
processingDeadline?: DocumentDeadlineEntity | null;
|
|
138
|
+
reviewDeadline?: DocumentDeadlineEntity | null;
|
|
121
139
|
}
|
|
122
140
|
/** Una entrada de la bandeja de recibidos: la entrega y el documento al que corresponde. */
|
|
123
141
|
/** Semáforo de un plazo pendiente: a tiempo, por vencer (2 días hábiles o menos) o vencido. */
|
|
@@ -243,6 +261,8 @@ export interface DocumentGetByIdResponseEntity {
|
|
|
243
261
|
/** Cómo se visa: con el sello del sistema o con la firma electrónica desatendida de cada visador (sin OTP). */
|
|
244
262
|
visaMode: DocumentTypeEntity['visaMode'];
|
|
245
263
|
participants: DocumentParticipantResponseEntity[];
|
|
264
|
+
/** Plazo de la tramitación completa mientras está en tramitación, si el tipo lo tiene. */
|
|
265
|
+
processingDeadline?: DocumentDeadlineEntity | null;
|
|
246
266
|
attachments: {
|
|
247
267
|
id: DocumentAttachmentEntity['id'];
|
|
248
268
|
name: DocumentAttachmentEntity['name'];
|
|
@@ -272,7 +292,6 @@ export interface DocumentGetByIdResponseEntity {
|
|
|
272
292
|
canResolveDraftReview: boolean;
|
|
273
293
|
inbox: DocumentDeliveryResponseEntity[];
|
|
274
294
|
};
|
|
275
|
-
signatureRequiresOtp: boolean;
|
|
276
295
|
}
|
|
277
296
|
/** Totales de las bandejas de un funcionario. */
|
|
278
297
|
export interface DocumentGetSummaryResponseEntity {
|
|
@@ -627,6 +646,27 @@ export interface DocumentEmailCopyViewEntity {
|
|
|
627
646
|
signedAt: string | null;
|
|
628
647
|
}[];
|
|
629
648
|
}
|
|
649
|
+
/**
|
|
650
|
+
* Plazo de servicio vencido de un documento (sale una sola vez): el de un turno (a quien lo tiene), el de la
|
|
651
|
+
* tramitación completa (a quienes tienen el turno vigente) o el de una revisión del borrador o del oficial (a quien
|
|
652
|
+
* revisa). El gateway avisa por correo y push a cada uno y a la jefatura de su dirección.
|
|
653
|
+
*/
|
|
654
|
+
export interface DocumentSlaReminderEntity {
|
|
655
|
+
/** Único por aviso: sirve de etiqueta del push. */
|
|
656
|
+
key: string;
|
|
657
|
+
kind: 'Turn' | 'Processing' | 'Review';
|
|
658
|
+
documentId: string;
|
|
659
|
+
/** Cómo se cita: «D.E. N° 590/2026» o el tipo. */
|
|
660
|
+
folio: string;
|
|
661
|
+
subject: string;
|
|
662
|
+
/** Días hábiles del plazo y cuándo venció. */
|
|
663
|
+
days: number;
|
|
664
|
+
dueAt: string;
|
|
665
|
+
employees: {
|
|
666
|
+
employeeId: string;
|
|
667
|
+
fullName: string;
|
|
668
|
+
}[];
|
|
669
|
+
}
|
|
630
670
|
/** Recordatorio de un plazo: al recibido y, si venció, también a su jefatura (la resuelve el gateway). */
|
|
631
671
|
export interface DocumentReminderEntity {
|
|
632
672
|
deliveryId: string;
|
|
@@ -704,6 +744,8 @@ export interface DocumentDraftReviewRoundEntity {
|
|
|
704
744
|
status: 'Pending' | 'Approved' | 'Rejected' | 'Cancelled';
|
|
705
745
|
observation: string | null;
|
|
706
746
|
resolvedAt: string | null;
|
|
747
|
+
/** Plazo de la ronda pendiente, si el tipo tiene plazo de revisión. */
|
|
748
|
+
deadline?: DocumentDeadlineEntity | null;
|
|
707
749
|
}
|
|
708
750
|
/** La revisión del borrador que exige el tipo documental. */
|
|
709
751
|
export interface DocumentDraftReviewInfoEntity {
|
|
@@ -10,16 +10,19 @@ export interface StampBox {
|
|
|
10
10
|
height: number;
|
|
11
11
|
}
|
|
12
12
|
/**
|
|
13
|
-
* Dónde van las visaciones y las firmas de un documento, en el orden de sus turnos.
|
|
14
|
-
* ubica
|
|
13
|
+
* Dónde van las visaciones y las firmas de un documento, en el orden de sus turnos. Cada clase se ubica por su lado: la
|
|
14
|
+
* que viene en `null` la ubica el sistema, al pie de la última página. Sin ninguna (todo el objeto `null`), el sistema
|
|
15
|
+
* las ubica todas, al pie o en una hoja de firmas.
|
|
15
16
|
*/
|
|
16
17
|
export interface DocumentStampPlacements {
|
|
17
|
-
visas: StampBox[];
|
|
18
|
-
signatures: StampBox[];
|
|
18
|
+
visas: StampBox[] | null;
|
|
19
|
+
signatures: StampBox[] | null;
|
|
19
20
|
}
|
|
20
21
|
/**
|
|
21
22
|
* Tamaños que admite cada sello, en puntos. La firma conserva la proporción de la imagen que dibuja FirmaGob (su alto
|
|
22
|
-
* sale del ancho); la visación
|
|
23
|
+
* sale del ancho); la visación son solo las iniciales de quien visa, que llenan su recuadro (más chico, letra más chica).
|
|
24
|
+
* `bottomReserved`: alto al pie de cada página que ningún sello puede tapar (la franja de verificación, con el QR y el
|
|
25
|
+
* código).
|
|
23
26
|
*/
|
|
24
27
|
export declare const STAMP_PLACEMENT_LIMITS: {
|
|
25
28
|
/** Ancho sobre alto del sello de firma (la imagen de firmas-ms mide ~2084x835 px). */
|
|
@@ -30,13 +33,14 @@ export declare const STAMP_PLACEMENT_LIMITS: {
|
|
|
30
33
|
readonly defaultWidth: 130;
|
|
31
34
|
};
|
|
32
35
|
readonly visa: {
|
|
33
|
-
readonly minWidth:
|
|
36
|
+
readonly minWidth: 24;
|
|
34
37
|
readonly maxWidth: 220;
|
|
35
|
-
readonly minHeight:
|
|
38
|
+
readonly minHeight: 12;
|
|
36
39
|
readonly maxHeight: 70;
|
|
37
|
-
readonly defaultWidth:
|
|
38
|
-
readonly defaultHeight:
|
|
40
|
+
readonly defaultWidth: 80;
|
|
41
|
+
readonly defaultHeight: 24;
|
|
39
42
|
};
|
|
43
|
+
readonly bottomReserved: 60;
|
|
40
44
|
};
|
|
41
45
|
/** Alto del sello de firma para un ancho dado: el de su proporción. */
|
|
42
46
|
export declare const signatureHeightFor: (width: number) => number;
|
|
@@ -3,13 +3,16 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.signatureHeightFor = exports.STAMP_PLACEMENT_LIMITS = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* Tamaños que admite cada sello, en puntos. La firma conserva la proporción de la imagen que dibuja FirmaGob (su alto
|
|
6
|
-
* sale del ancho); la visación
|
|
6
|
+
* sale del ancho); la visación son solo las iniciales de quien visa, que llenan su recuadro (más chico, letra más chica).
|
|
7
|
+
* `bottomReserved`: alto al pie de cada página que ningún sello puede tapar (la franja de verificación, con el QR y el
|
|
8
|
+
* código).
|
|
7
9
|
*/
|
|
8
10
|
exports.STAMP_PLACEMENT_LIMITS = {
|
|
9
11
|
/** Ancho sobre alto del sello de firma (la imagen de firmas-ms mide ~2084x835 px). */
|
|
10
12
|
signatureAspect: 2084 / 835,
|
|
11
13
|
signature: { minWidth: 90, maxWidth: 260, defaultWidth: 130 },
|
|
12
|
-
visa: { minWidth:
|
|
14
|
+
visa: { minWidth: 24, maxWidth: 220, minHeight: 12, maxHeight: 70, defaultWidth: 80, defaultHeight: 24 },
|
|
15
|
+
bottomReserved: 60,
|
|
13
16
|
};
|
|
14
17
|
/** Alto del sello de firma para un ancho dado: el de su proporción. */
|
|
15
18
|
const signatureHeightFor = (width) => Math.round((width / exports.STAMP_PLACEMENT_LIMITS.signatureAspect) * 100) / 100;
|
|
@@ -24,6 +24,9 @@ export interface DocumentTypeGetAllResponseEntity {
|
|
|
24
24
|
numbered: DocumentTypeEntity['numbered'];
|
|
25
25
|
numberingScope: DocumentTypeEntity['numberingScope'];
|
|
26
26
|
usesPartsOffice: DocumentTypeEntity['usesPartsOffice'];
|
|
27
|
+
processingSlaDays: DocumentTypeEntity['processingSlaDays'];
|
|
28
|
+
turnSlaDays: DocumentTypeEntity['turnSlaDays'];
|
|
29
|
+
reviewSlaDays: DocumentTypeEntity['reviewSlaDays'];
|
|
27
30
|
visaMode: DocumentTypeEntity['visaMode'];
|
|
28
31
|
/** Transparencia Activa: sus documentos se publican cada mes, en esta sección del Portal. */
|
|
29
32
|
activeTransparency: DocumentTypeEntity['activeTransparency'];
|
|
@@ -7,6 +7,11 @@ export interface VisaInitialsResponseEntity {
|
|
|
7
7
|
/** Las cambió él: no son las de su nombre. */
|
|
8
8
|
custom: boolean;
|
|
9
9
|
}
|
|
10
|
+
/** Las iniciales con que visa un funcionario. */
|
|
11
|
+
export interface VisaInitialsLookupEntity {
|
|
12
|
+
employeeId: string;
|
|
13
|
+
initials: string;
|
|
14
|
+
}
|
|
10
15
|
/** Límites de las iniciales propias: solo letras, en mayúscula. */
|
|
11
16
|
export declare const VISA_INITIALS_LIMITS: {
|
|
12
17
|
readonly maxLength: 6;
|
package/package.json
CHANGED
package/src/base/entities.ts
CHANGED
|
@@ -689,6 +689,9 @@ export interface DocumentTypeEntity {
|
|
|
689
689
|
numbered: boolean;
|
|
690
690
|
numberingScope: DocumentNumberingScope;
|
|
691
691
|
usesPartsOffice: boolean;
|
|
692
|
+
processingSlaDays?: number | null;
|
|
693
|
+
turnSlaDays?: number | null;
|
|
694
|
+
reviewSlaDays?: number | null;
|
|
692
695
|
visaMode: DocumentVisaMode;
|
|
693
696
|
activeTransparency: boolean;
|
|
694
697
|
transparencySection?: string | null;
|
|
@@ -766,6 +769,7 @@ export interface DocumentEntity {
|
|
|
766
769
|
currentFileUrl?: string | null;
|
|
767
770
|
fileFormat?: string | null;
|
|
768
771
|
submittedAt?: string | null;
|
|
772
|
+
processingOverdueRemindedAt?: string | null;
|
|
769
773
|
finishedAt?: string | null;
|
|
770
774
|
documentType?: DocumentTypeEntity;
|
|
771
775
|
documentTypeId: string;
|
|
@@ -831,6 +835,8 @@ export interface DocumentParticipantEntity {
|
|
|
831
835
|
observation?: string | null;
|
|
832
836
|
resolvedAt?: string | null;
|
|
833
837
|
initials?: string | null;
|
|
838
|
+
currentSince?: string | null;
|
|
839
|
+
overdueRemindedAt?: string | null;
|
|
834
840
|
document?: DocumentEntity;
|
|
835
841
|
documentId: string;
|
|
836
842
|
createdAt: string;
|
|
@@ -931,6 +937,9 @@ export interface DocumentTypeVersionEntity {
|
|
|
931
937
|
numberingScope: DocumentNumberingScope;
|
|
932
938
|
usesPartsOffice: boolean;
|
|
933
939
|
visaMode: DocumentVisaMode;
|
|
940
|
+
processingSlaDays?: number | null;
|
|
941
|
+
turnSlaDays?: number | null;
|
|
942
|
+
reviewSlaDays?: number | null;
|
|
934
943
|
activeTransparency: boolean;
|
|
935
944
|
transparencySection?: string | null;
|
|
936
945
|
directorateCodeReference?: number | null;
|
|
@@ -1313,6 +1322,7 @@ export interface DocumentDraftReviewEntity {
|
|
|
1313
1322
|
status: DraftReviewStatus;
|
|
1314
1323
|
observation?: string | null;
|
|
1315
1324
|
resolvedAt?: string | null;
|
|
1325
|
+
overdueRemindedAt?: string | null;
|
|
1316
1326
|
}
|
|
1317
1327
|
|
|
1318
1328
|
export interface DocumentTemplateVersionEntity {
|
|
@@ -17,6 +17,7 @@ import {
|
|
|
17
17
|
type DocumentEmailCopyIssuedEntity,
|
|
18
18
|
type DocumentEmailCopyViewEntity,
|
|
19
19
|
type DocumentReminderEntity,
|
|
20
|
+
type DocumentSlaReminderEntity,
|
|
20
21
|
type DocumentGetAllResponseEntity,
|
|
21
22
|
type DocumentGetByIdResponseEntity,
|
|
22
23
|
type DocumentGetSummaryResponseEntity,
|
|
@@ -73,6 +74,7 @@ export const DocumentPatterns = {
|
|
|
73
74
|
getEmailCopy: 'gestorDocumental.document.getEmailCopy',
|
|
74
75
|
getEmailCopyFile: 'gestorDocumental.document.getEmailCopyFile',
|
|
75
76
|
claimReminders: 'gestorDocumental.document.claimReminders',
|
|
77
|
+
claimSlaReminders: 'gestorDocumental.document.claimSlaReminders',
|
|
76
78
|
} as const;
|
|
77
79
|
|
|
78
80
|
/**
|
|
@@ -453,6 +455,11 @@ export interface DocumentContract {
|
|
|
453
455
|
payload: Record<string, never>;
|
|
454
456
|
response: DocumentReminderEntity[];
|
|
455
457
|
};
|
|
458
|
+
/** Plazos de servicio vencidos que aún no se avisan: se marcan al entregarlos, así cada uno sale una vez. */
|
|
459
|
+
[DocumentPatterns.claimSlaReminders]: {
|
|
460
|
+
payload: Record<string, never>;
|
|
461
|
+
response: DocumentSlaReminderEntity[];
|
|
462
|
+
};
|
|
456
463
|
[DocumentPatterns.getEmailCopyFile]: {
|
|
457
464
|
payload: { token: string };
|
|
458
465
|
response: DocumentPublicFileResponseEntity;
|
|
@@ -54,6 +54,10 @@ export interface DocumentTypeWritePayload {
|
|
|
54
54
|
numberingScope?: DocumentNumberingScope;
|
|
55
55
|
// Pasa por Oficina de Partes (por omisión, sí). Sin ella, el documento solo se firma: va solo a funcionarios y áreas.
|
|
56
56
|
usesPartsOffice?: boolean;
|
|
57
|
+
// Plazos de servicio en días hábiles (sin valor: sin plazo): de la tramitación, de cada turno y de cada revisión.
|
|
58
|
+
processingSlaDays?: number | null;
|
|
59
|
+
turnSlaDays?: number | null;
|
|
60
|
+
reviewSlaDays?: number | null;
|
|
57
61
|
/** Transparencia Activa: sus documentos se publican cada mes, en esta sección del Portal. */
|
|
58
62
|
activeTransparency?: boolean;
|
|
59
63
|
transparencySection?: string | null;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type VisaInitialsResponseEntity } from '../entities';
|
|
1
|
+
import { type VisaInitialsLookupEntity, type VisaInitialsResponseEntity } from '../entities';
|
|
2
2
|
import { type DocumentActor } from './document.contract';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -8,6 +8,7 @@ import { type DocumentActor } from './document.contract';
|
|
|
8
8
|
export const VisaInitialsPatterns = {
|
|
9
9
|
get: 'gestorDocumental.visaInitials.get',
|
|
10
10
|
update: 'gestorDocumental.visaInitials.update',
|
|
11
|
+
lookup: 'gestorDocumental.visaInitials.lookup',
|
|
11
12
|
} as const;
|
|
12
13
|
|
|
13
14
|
export interface VisaInitialsContract {
|
|
@@ -20,4 +21,9 @@ export interface VisaInitialsContract {
|
|
|
20
21
|
payload: { initials: string | null; fullName: string; actor: DocumentActor };
|
|
21
22
|
response: VisaInitialsResponseEntity;
|
|
22
23
|
};
|
|
24
|
+
/** Las iniciales con que visarían ahora unos funcionarios (las propias o las de su nombre), para la vista previa. */
|
|
25
|
+
[VisaInitialsPatterns.lookup]: {
|
|
26
|
+
payload: { people: { employeeId: string; fullName: string }[] };
|
|
27
|
+
response: VisaInitialsLookupEntity[];
|
|
28
|
+
};
|
|
23
29
|
}
|
|
@@ -34,6 +34,22 @@ export interface DocumentParticipantResponseEntity {
|
|
|
34
34
|
position: DocumentParticipantEntity['position'];
|
|
35
35
|
observation: DocumentParticipantEntity['observation'];
|
|
36
36
|
resolvedAt: DocumentParticipantEntity['resolvedAt'];
|
|
37
|
+
/** Plazo del turno vigente, si el tipo tiene plazo por turno (si no le toca, `null`). */
|
|
38
|
+
deadline?: DocumentDeadlineEntity | null;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Plazo de servicio (SLA) que corre, en días hábiles: cuándo vence y su semáforo (por vencer con 2 días hábiles o
|
|
43
|
+
* menos). Lo calcula el servicio con los feriados.
|
|
44
|
+
*/
|
|
45
|
+
export interface DocumentDeadlineEntity {
|
|
46
|
+
/** Días hábiles del plazo, como los fija el tipo documental. */
|
|
47
|
+
days: number;
|
|
48
|
+
startedAt: string;
|
|
49
|
+
dueAt: string;
|
|
50
|
+
dueStatus: 'OnTime' | 'DueSoon' | 'Overdue';
|
|
51
|
+
/** Días hábiles que quedan, sin contar hoy (vencido: `null`). */
|
|
52
|
+
businessDaysLeft: number | null;
|
|
37
53
|
}
|
|
38
54
|
|
|
39
55
|
/** Destinatario de un documento, como lo eligió el redactor: una persona o un área completa. */
|
|
@@ -140,6 +156,11 @@ export interface DocumentGetAllResponseEntity {
|
|
|
140
156
|
otherCurrentCount: number;
|
|
141
157
|
// A cuántos funcionarios llegó y cuántos ya lo abrieron (null si aún no se distribuye a nadie).
|
|
142
158
|
distribution: { total: number; read: number } | null;
|
|
159
|
+
// Plazos de servicio que corren (sin plazo en el tipo o sin nada pendiente, `null`): el del turno vigente (el más
|
|
160
|
+
// urgente, si visan varios a la vez), el de la tramitación completa y el de la revisión pendiente del borrador u oficial.
|
|
161
|
+
turnDeadline?: DocumentDeadlineEntity | null;
|
|
162
|
+
processingDeadline?: DocumentDeadlineEntity | null;
|
|
163
|
+
reviewDeadline?: DocumentDeadlineEntity | null;
|
|
143
164
|
}
|
|
144
165
|
|
|
145
166
|
/** Una entrada de la bandeja de recibidos: la entrega y el documento al que corresponde. */
|
|
@@ -270,6 +291,8 @@ export interface DocumentGetByIdResponseEntity {
|
|
|
270
291
|
/** Cómo se visa: con el sello del sistema o con la firma electrónica desatendida de cada visador (sin OTP). */
|
|
271
292
|
visaMode: DocumentTypeEntity['visaMode'];
|
|
272
293
|
participants: DocumentParticipantResponseEntity[];
|
|
294
|
+
/** Plazo de la tramitación completa mientras está en tramitación, si el tipo lo tiene. */
|
|
295
|
+
processingDeadline?: DocumentDeadlineEntity | null;
|
|
273
296
|
attachments: {
|
|
274
297
|
id: DocumentAttachmentEntity['id'];
|
|
275
298
|
name: DocumentAttachmentEntity['name'];
|
|
@@ -305,8 +328,6 @@ export interface DocumentGetByIdResponseEntity {
|
|
|
305
328
|
// Sus propias entregas de este documento (puede tener más de una si además se lo derivaron).
|
|
306
329
|
inbox: DocumentDeliveryResponseEntity[];
|
|
307
330
|
};
|
|
308
|
-
// Firmar exige el código OTP de quien firma (firma atendida).
|
|
309
|
-
signatureRequiresOtp: boolean;
|
|
310
331
|
}
|
|
311
332
|
|
|
312
333
|
/** Totales de las bandejas de un funcionario. */
|
|
@@ -658,6 +679,25 @@ export interface DocumentEmailCopyViewEntity {
|
|
|
658
679
|
signers: { fullName: string; position: string | null; signedAt: string | null }[];
|
|
659
680
|
}
|
|
660
681
|
|
|
682
|
+
/**
|
|
683
|
+
* Plazo de servicio vencido de un documento (sale una sola vez): el de un turno (a quien lo tiene), el de la
|
|
684
|
+
* tramitación completa (a quienes tienen el turno vigente) o el de una revisión del borrador o del oficial (a quien
|
|
685
|
+
* revisa). El gateway avisa por correo y push a cada uno y a la jefatura de su dirección.
|
|
686
|
+
*/
|
|
687
|
+
export interface DocumentSlaReminderEntity {
|
|
688
|
+
/** Único por aviso: sirve de etiqueta del push. */
|
|
689
|
+
key: string;
|
|
690
|
+
kind: 'Turn' | 'Processing' | 'Review';
|
|
691
|
+
documentId: string;
|
|
692
|
+
/** Cómo se cita: «D.E. N° 590/2026» o el tipo. */
|
|
693
|
+
folio: string;
|
|
694
|
+
subject: string;
|
|
695
|
+
/** Días hábiles del plazo y cuándo venció. */
|
|
696
|
+
days: number;
|
|
697
|
+
dueAt: string;
|
|
698
|
+
employees: { employeeId: string; fullName: string }[];
|
|
699
|
+
}
|
|
700
|
+
|
|
661
701
|
/** Recordatorio de un plazo: al recibido y, si venció, también a su jefatura (la resuelve el gateway). */
|
|
662
702
|
export interface DocumentReminderEntity {
|
|
663
703
|
deliveryId: string;
|
|
@@ -740,6 +780,8 @@ export interface DocumentDraftReviewRoundEntity {
|
|
|
740
780
|
status: 'Pending' | 'Approved' | 'Rejected' | 'Cancelled';
|
|
741
781
|
observation: string | null;
|
|
742
782
|
resolvedAt: string | null;
|
|
783
|
+
/** Plazo de la ronda pendiente, si el tipo tiene plazo de revisión. */
|
|
784
|
+
deadline?: DocumentDeadlineEntity | null;
|
|
743
785
|
}
|
|
744
786
|
|
|
745
787
|
/** La revisión del borrador que exige el tipo documental. */
|
|
@@ -11,23 +11,27 @@ export interface StampBox {
|
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
|
-
* Dónde van las visaciones y las firmas de un documento, en el orden de sus turnos.
|
|
15
|
-
* ubica
|
|
14
|
+
* Dónde van las visaciones y las firmas de un documento, en el orden de sus turnos. Cada clase se ubica por su lado: la
|
|
15
|
+
* que viene en `null` la ubica el sistema, al pie de la última página. Sin ninguna (todo el objeto `null`), el sistema
|
|
16
|
+
* las ubica todas, al pie o en una hoja de firmas.
|
|
16
17
|
*/
|
|
17
18
|
export interface DocumentStampPlacements {
|
|
18
|
-
visas: StampBox[];
|
|
19
|
-
signatures: StampBox[];
|
|
19
|
+
visas: StampBox[] | null;
|
|
20
|
+
signatures: StampBox[] | null;
|
|
20
21
|
}
|
|
21
22
|
|
|
22
23
|
/**
|
|
23
24
|
* Tamaños que admite cada sello, en puntos. La firma conserva la proporción de la imagen que dibuja FirmaGob (su alto
|
|
24
|
-
* sale del ancho); la visación
|
|
25
|
+
* sale del ancho); la visación son solo las iniciales de quien visa, que llenan su recuadro (más chico, letra más chica).
|
|
26
|
+
* `bottomReserved`: alto al pie de cada página que ningún sello puede tapar (la franja de verificación, con el QR y el
|
|
27
|
+
* código).
|
|
25
28
|
*/
|
|
26
29
|
export const STAMP_PLACEMENT_LIMITS = {
|
|
27
30
|
/** Ancho sobre alto del sello de firma (la imagen de firmas-ms mide ~2084x835 px). */
|
|
28
31
|
signatureAspect: 2084 / 835,
|
|
29
32
|
signature: { minWidth: 90, maxWidth: 260, defaultWidth: 130 },
|
|
30
|
-
visa: { minWidth:
|
|
33
|
+
visa: { minWidth: 24, maxWidth: 220, minHeight: 12, maxHeight: 70, defaultWidth: 80, defaultHeight: 24 },
|
|
34
|
+
bottomReserved: 60,
|
|
31
35
|
} as const;
|
|
32
36
|
|
|
33
37
|
/** Alto del sello de firma para un ancho dado: el de su proporción. */
|
|
@@ -33,6 +33,12 @@ export interface DocumentTypeGetAllResponseEntity {
|
|
|
33
33
|
// Pasa por Oficina de Partes: sus documentos pueden ir a otras instituciones y con copias por correo. Sin ella,
|
|
34
34
|
// solo se firman y van a funcionarios y áreas de la municipalidad.
|
|
35
35
|
usesPartsOffice: DocumentTypeEntity['usesPartsOffice'];
|
|
36
|
+
// Plazos de servicio (SLA) en días hábiles: de la tramitación completa (desde que entra a tramitación o se aprueba
|
|
37
|
+
// el oficial), de cada turno de visación o firma y de cada ronda de revisión del borrador o del oficial. `null`: sin
|
|
38
|
+
// plazo.
|
|
39
|
+
processingSlaDays: DocumentTypeEntity['processingSlaDays'];
|
|
40
|
+
turnSlaDays: DocumentTypeEntity['turnSlaDays'];
|
|
41
|
+
reviewSlaDays: DocumentTypeEntity['reviewSlaDays'];
|
|
36
42
|
// Cómo visan sus documentos: con la firma electrónica desatendida de cada visador (`Stamp`, solo versiones antiguas).
|
|
37
43
|
visaMode: DocumentTypeEntity['visaMode'];
|
|
38
44
|
/** Transparencia Activa: sus documentos se publican cada mes, en esta sección del Portal. */
|
|
@@ -8,5 +8,11 @@ export interface VisaInitialsResponseEntity {
|
|
|
8
8
|
custom: boolean;
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
+
/** Las iniciales con que visa un funcionario. */
|
|
12
|
+
export interface VisaInitialsLookupEntity {
|
|
13
|
+
employeeId: string;
|
|
14
|
+
initials: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
11
17
|
/** Límites de las iniciales propias: solo letras, en mayúscula. */
|
|
12
18
|
export const VISA_INITIALS_LIMITS = { maxLength: 6 } as const;
|