@muni-sanfer/types-gestor-documental 0.0.1-beta.62 → 0.0.1-beta.63

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.
@@ -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
  }
@@ -8,4 +8,5 @@ exports.VisaInitialsPatterns = void 0;
8
8
  exports.VisaInitialsPatterns = {
9
9
  get: 'gestorDocumental.visaInitials.get',
10
10
  update: 'gestorDocumental.visaInitials.update',
11
+ lookup: 'gestorDocumental.visaInitials.lookup',
11
12
  };
@@ -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'];
@@ -627,6 +647,27 @@ export interface DocumentEmailCopyViewEntity {
627
647
  signedAt: string | null;
628
648
  }[];
629
649
  }
650
+ /**
651
+ * Plazo de servicio vencido de un documento (sale una sola vez): el de un turno (a quien lo tiene), el de la
652
+ * tramitación completa (a quienes tienen el turno vigente) o el de una revisión del borrador o del oficial (a quien
653
+ * revisa). El gateway avisa por correo y push a cada uno y a la jefatura de su dirección.
654
+ */
655
+ export interface DocumentSlaReminderEntity {
656
+ /** Único por aviso: sirve de etiqueta del push. */
657
+ key: string;
658
+ kind: 'Turn' | 'Processing' | 'Review';
659
+ documentId: string;
660
+ /** Cómo se cita: «D.E. N° 590/2026» o el tipo. */
661
+ folio: string;
662
+ subject: string;
663
+ /** Días hábiles del plazo y cuándo venció. */
664
+ days: number;
665
+ dueAt: string;
666
+ employees: {
667
+ employeeId: string;
668
+ fullName: string;
669
+ }[];
670
+ }
630
671
  /** Recordatorio de un plazo: al recibido y, si venció, también a su jefatura (la resuelve el gateway). */
631
672
  export interface DocumentReminderEntity {
632
673
  deliveryId: string;
@@ -704,6 +745,8 @@ export interface DocumentDraftReviewRoundEntity {
704
745
  status: 'Pending' | 'Approved' | 'Rejected' | 'Cancelled';
705
746
  observation: string | null;
706
747
  resolvedAt: string | null;
748
+ /** Plazo de la ronda pendiente, si el tipo tiene plazo de revisión. */
749
+ deadline?: DocumentDeadlineEntity | null;
707
750
  }
708
751
  /** La revisión del borrador que exige el tipo documental. */
709
752
  export interface DocumentDraftReviewInfoEntity {
@@ -10,12 +10,13 @@ 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. Sin ellas (`null`), el sistema las
14
- * ubica solo: al pie de la última página o en una hoja de firmas.
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
@@ -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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@muni-sanfer/types-gestor-documental",
3
- "version": "0.0.1-beta.62",
3
+ "version": "0.0.1-beta.63",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "scripts": {
@@ -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'];
@@ -658,6 +681,25 @@ export interface DocumentEmailCopyViewEntity {
658
681
  signers: { fullName: string; position: string | null; signedAt: string | null }[];
659
682
  }
660
683
 
684
+ /**
685
+ * Plazo de servicio vencido de un documento (sale una sola vez): el de un turno (a quien lo tiene), el de la
686
+ * tramitación completa (a quienes tienen el turno vigente) o el de una revisión del borrador o del oficial (a quien
687
+ * revisa). El gateway avisa por correo y push a cada uno y a la jefatura de su dirección.
688
+ */
689
+ export interface DocumentSlaReminderEntity {
690
+ /** Único por aviso: sirve de etiqueta del push. */
691
+ key: string;
692
+ kind: 'Turn' | 'Processing' | 'Review';
693
+ documentId: string;
694
+ /** Cómo se cita: «D.E. N° 590/2026» o el tipo. */
695
+ folio: string;
696
+ subject: string;
697
+ /** Días hábiles del plazo y cuándo venció. */
698
+ days: number;
699
+ dueAt: string;
700
+ employees: { employeeId: string; fullName: string }[];
701
+ }
702
+
661
703
  /** Recordatorio de un plazo: al recibido y, si venció, también a su jefatura (la resuelve el gateway). */
662
704
  export interface DocumentReminderEntity {
663
705
  deliveryId: string;
@@ -740,6 +782,8 @@ export interface DocumentDraftReviewRoundEntity {
740
782
  status: 'Pending' | 'Approved' | 'Rejected' | 'Cancelled';
741
783
  observation: string | null;
742
784
  resolvedAt: string | null;
785
+ /** Plazo de la ronda pendiente, si el tipo tiene plazo de revisión. */
786
+ deadline?: DocumentDeadlineEntity | null;
743
787
  }
744
788
 
745
789
  /** La revisión del borrador que exige el tipo documental. */
@@ -11,12 +11,13 @@ 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. Sin ellas (`null`), el sistema las
15
- * ubica solo: al pie de la última página o en una hoja de firmas.
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
  /**
@@ -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;