@muni-sanfer/types-gestor-documental 0.0.1-beta.55 → 0.0.1-beta.57

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.
@@ -38,7 +38,7 @@ export declare const DocumentParticipantStatus: {
38
38
  Resolved: "Resolved";
39
39
  Rejected: "Rejected";
40
40
  };
41
- export type DocumentTrackingAction = 'Created' | 'Updated' | 'Submitted' | 'Visaed' | 'Signed' | 'Rejected' | 'Finished' | 'Discarded' | 'Numbered' | 'NumberAnnulled' | 'Annulled' | 'Delivered' | 'Derived' | 'Reassigned' | 'Dispatched' | 'DispatchReturned' | 'DispatchedByContingency' | 'Received' | 'EmailCopySent' | 'EmailCopyOpened' | 'DispositionRecorded' | 'TransparencyRedacted' | 'TransparencyPublished' | 'TransparencyExcluded' | 'TransparencyWithdrawn' | 'DraftReviewRequested' | 'DraftReviewApproved' | 'DraftReviewRejected' | 'DraftReviewCancelled';
41
+ export type DocumentTrackingAction = 'Created' | 'Updated' | 'Submitted' | 'Visaed' | 'Signed' | 'Rejected' | 'Finished' | 'Discarded' | 'Numbered' | 'NumberAnnulled' | 'Annulled' | 'Delivered' | 'Derived' | 'Reassigned' | 'Dispatched' | 'DispatchReturned' | 'DispatchedByContingency' | 'Received' | 'EmailCopySent' | 'EmailCopyOpened' | 'DispositionRecorded' | 'TransparencyRedacted' | 'TransparencyPublished' | 'TransparencyExcluded' | 'TransparencyWithdrawn' | 'DraftReviewRequested' | 'DraftReviewApproved' | 'DraftReviewRejected' | 'DraftReviewCancelled' | 'DraftCorrected';
42
42
  export declare const DocumentTrackingAction: {
43
43
  Created: "Created";
44
44
  Updated: "Updated";
@@ -69,6 +69,7 @@ export declare const DocumentTrackingAction: {
69
69
  DraftReviewApproved: "DraftReviewApproved";
70
70
  DraftReviewRejected: "DraftReviewRejected";
71
71
  DraftReviewCancelled: "DraftReviewCancelled";
72
+ DraftCorrected: "DraftCorrected";
72
73
  };
73
74
  export type DraftReviewStage = 'Draft' | 'Official';
74
75
  export declare const DraftReviewStage: {
@@ -589,6 +590,7 @@ export interface DocumentParticipantEntity {
589
590
  position?: string | null;
590
591
  observation?: string | null;
591
592
  resolvedAt?: string | null;
593
+ initials?: string | null;
592
594
  document?: DocumentEntity;
593
595
  documentId: string;
594
596
  createdAt: string;
@@ -1414,6 +1416,12 @@ export interface MailIntakeEntity {
1414
1416
  createdAt: string;
1415
1417
  updatedAt: string;
1416
1418
  }
1419
+ export interface VisaInitialsEntity {
1420
+ employeeId: string;
1421
+ initials: string;
1422
+ createdAt: string;
1423
+ updatedAt: string;
1424
+ }
1417
1425
  export interface PushSubscriptionEntity {
1418
1426
  id: string;
1419
1427
  employeeId: string;
@@ -1438,6 +1446,7 @@ export interface DocumentVersionEntity {
1438
1446
  composition?: JsonValue | null;
1439
1447
  note?: string | null;
1440
1448
  status: DocumentStatus;
1449
+ correction: boolean;
1441
1450
  createdByEmployeeId: string;
1442
1451
  createdByFullName: string;
1443
1452
  createdAt: string;
@@ -67,6 +67,7 @@ exports.DocumentTrackingAction = {
67
67
  DraftReviewApproved: 'DraftReviewApproved',
68
68
  DraftReviewRejected: 'DraftReviewRejected',
69
69
  DraftReviewCancelled: 'DraftReviewCancelled',
70
+ DraftCorrected: 'DraftCorrected',
70
71
  };
71
72
  exports.DraftReviewStage = {
72
73
  Draft: 'Draft',
@@ -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 DocumentDraftReviewResponseEntity } from '../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 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: {
@@ -14,6 +14,7 @@ export declare const DocumentPatterns: {
14
14
  readonly reassign: "gestorDocumental.document.reassign";
15
15
  readonly requestDraftReview: "gestorDocumental.document.requestDraftReview";
16
16
  readonly resolveDraftReview: "gestorDocumental.document.resolveDraftReview";
17
+ readonly correctDraft: "gestorDocumental.document.correctDraft";
17
18
  readonly discard: "gestorDocumental.document.discard";
18
19
  readonly annul: "gestorDocumental.document.annul";
19
20
  readonly derive: "gestorDocumental.document.derive";
@@ -298,6 +299,20 @@ export interface DocumentContract {
298
299
  };
299
300
  response: DocumentDraftReviewResponseEntity;
300
301
  };
302
+ /**
303
+ * La jefatura que tiene la revisión pendiente corrige el texto redactado con la plantilla, sin devolverlo: el sistema
304
+ * arma el PDF y guarda una versión nueva a su nombre con la justificación. La revisión sigue pendiente, ahora de esa
305
+ * versión.
306
+ */
307
+ [DocumentPatterns.correctDraft]: {
308
+ payload: Pick<DocumentEntity, 'id'> & {
309
+ subject: string;
310
+ composition: DocumentComposition;
311
+ reason: string;
312
+ actor: DocumentActor;
313
+ };
314
+ response: DocumentDraftCorrectionResponseEntity;
315
+ };
301
316
  [DocumentPatterns.reassign]: {
302
317
  payload: Pick<DocumentEntity, 'id'> & {
303
318
  participantId: DocumentParticipantEntity['id'];
@@ -14,6 +14,7 @@ exports.DocumentPatterns = {
14
14
  reassign: 'gestorDocumental.document.reassign',
15
15
  requestDraftReview: 'gestorDocumental.document.requestDraftReview',
16
16
  resolveDraftReview: 'gestorDocumental.document.resolveDraftReview',
17
+ correctDraft: 'gestorDocumental.document.correctDraft',
17
18
  discard: 'gestorDocumental.document.discard',
18
19
  annul: 'gestorDocumental.document.annul',
19
20
  derive: 'gestorDocumental.document.derive',
@@ -17,6 +17,7 @@ import { type DataProtectionContract } from './dataProtection.contract';
17
17
  import { type DeskContract } from './desk.contract';
18
18
  import { type MailIntakeContract } from './mailIntake.contract';
19
19
  import { type PushContract } from './push.contract';
20
+ import { type VisaInitialsContract } from './visaInitials.contract';
20
21
  import { type ScanContract } from './scan.contract';
21
22
  import { type PartsOfficeContract } from './partsOffice.contract';
22
23
  import { type ProcedureContract } from './procedure.contract';
@@ -55,6 +56,7 @@ export * from './push.contract';
55
56
  export * from './draftingRequest.contract';
56
57
  export * from './internalReview.contract';
57
58
  export * from './richImage.contract';
59
+ export * from './visaInitials.contract';
58
60
  /** Patrones NATS de gestor-documental-ms, por recurso: `gestorDocumental.<recurso>.<acción>`. */
59
61
  export declare const GestorDocumentalPatterns: {
60
62
  readonly documentType: {
@@ -78,6 +80,7 @@ export declare const GestorDocumentalPatterns: {
78
80
  readonly reassign: "gestorDocumental.document.reassign";
79
81
  readonly requestDraftReview: "gestorDocumental.document.requestDraftReview";
80
82
  readonly resolveDraftReview: "gestorDocumental.document.resolveDraftReview";
83
+ readonly correctDraft: "gestorDocumental.document.correctDraft";
81
84
  readonly discard: "gestorDocumental.document.discard";
82
85
  readonly annul: "gestorDocumental.document.annul";
83
86
  readonly derive: "gestorDocumental.document.derive";
@@ -317,6 +320,10 @@ export declare const GestorDocumentalPatterns: {
317
320
  readonly register: "gestorDocumental.richImage.register";
318
321
  readonly getFile: "gestorDocumental.richImage.getFile";
319
322
  };
323
+ readonly visaInitials: {
324
+ readonly get: "gestorDocumental.visaInitials.get";
325
+ readonly update: "gestorDocumental.visaInitials.update";
326
+ };
320
327
  };
321
328
  /** Contrato completo de gestor-documental-ms: la unión de los contratos de sus recursos. */
322
- export type GestorDocumentalContract = DocumentTypeContract & DocumentContract & ProcedureContract & IssuingEntityContract & CaseFileContract & PartsOfficeContract & RegisterBookContract & SignatureBatchContract & WorkFolderContract & ScanContract & ArchivalSeriesContract & TextSnippetContract & DocumentTemplateContract & HolidayContract & IndicatorsContract & AuditContract & SignatureCheckContract & RepositoryExportContract & RetentionContract & AccessRequestContract & TransparencyContract & DataProtectionContract & DeskContract & MailIntakeContract & PushContract & DraftingRequestContract & InternalReviewContract & RichImageContract;
329
+ export type GestorDocumentalContract = DocumentTypeContract & DocumentContract & ProcedureContract & IssuingEntityContract & CaseFileContract & PartsOfficeContract & RegisterBookContract & SignatureBatchContract & WorkFolderContract & ScanContract & ArchivalSeriesContract & TextSnippetContract & DocumentTemplateContract & HolidayContract & IndicatorsContract & AuditContract & SignatureCheckContract & RepositoryExportContract & RetentionContract & AccessRequestContract & TransparencyContract & DataProtectionContract & DeskContract & MailIntakeContract & PushContract & DraftingRequestContract & InternalReviewContract & RichImageContract & VisaInitialsContract;
@@ -34,6 +34,7 @@ const dataProtection_contract_1 = require("./dataProtection.contract");
34
34
  const desk_contract_1 = require("./desk.contract");
35
35
  const mailIntake_contract_1 = require("./mailIntake.contract");
36
36
  const push_contract_1 = require("./push.contract");
37
+ const visaInitials_contract_1 = require("./visaInitials.contract");
37
38
  const scan_contract_1 = require("./scan.contract");
38
39
  const partsOffice_contract_1 = require("./partsOffice.contract");
39
40
  const procedure_contract_1 = require("./procedure.contract");
@@ -72,6 +73,7 @@ __exportStar(require("./push.contract"), exports);
72
73
  __exportStar(require("./draftingRequest.contract"), exports);
73
74
  __exportStar(require("./internalReview.contract"), exports);
74
75
  __exportStar(require("./richImage.contract"), exports);
76
+ __exportStar(require("./visaInitials.contract"), exports);
75
77
  /** Patrones NATS de gestor-documental-ms, por recurso: `gestorDocumental.<recurso>.<acción>`. */
76
78
  exports.GestorDocumentalPatterns = {
77
79
  documentType: documentType_contract_1.DocumentTypePatterns,
@@ -102,4 +104,5 @@ exports.GestorDocumentalPatterns = {
102
104
  draftingRequest: draftingRequest_contract_1.DraftingRequestPatterns,
103
105
  internalReview: internalReview_contract_1.InternalReviewPatterns,
104
106
  richImage: richImage_contract_1.RichImagePatterns,
107
+ visaInitials: visaInitials_contract_1.VisaInitialsPatterns,
105
108
  };
@@ -0,0 +1,28 @@
1
+ import { type VisaInitialsResponseEntity } from '../entities';
2
+ import { type DocumentActor } from './document.contract';
3
+ /**
4
+ * Patrones NATS de `visaInitials`: las iniciales con que visa quien tiene la sesión. Salen de su nombre y las puede
5
+ * cambiar; el sello de cada visación lleva las que tenía al visar. `fullName` lo pone el gateway desde la sesión.
6
+ */
7
+ export declare const VisaInitialsPatterns: {
8
+ readonly get: "gestorDocumental.visaInitials.get";
9
+ readonly update: "gestorDocumental.visaInitials.update";
10
+ };
11
+ export interface VisaInitialsContract {
12
+ [VisaInitialsPatterns.get]: {
13
+ payload: {
14
+ fullName: string;
15
+ actor: DocumentActor;
16
+ };
17
+ response: VisaInitialsResponseEntity;
18
+ };
19
+ /** Guarda las iniciales propias; `null` vuelve a las de su nombre. */
20
+ [VisaInitialsPatterns.update]: {
21
+ payload: {
22
+ initials: string | null;
23
+ fullName: string;
24
+ actor: DocumentActor;
25
+ };
26
+ response: VisaInitialsResponseEntity;
27
+ };
28
+ }
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.VisaInitialsPatterns = void 0;
4
+ /**
5
+ * Patrones NATS de `visaInitials`: las iniciales con que visa quien tiene la sesión. Salen de su nombre y las puede
6
+ * cambiar; el sello de cada visación lleva las que tenía al visar. `fullName` lo pone el gateway desde la sesión.
7
+ */
8
+ exports.VisaInitialsPatterns = {
9
+ get: 'gestorDocumental.visaInitials.get',
10
+ update: 'gestorDocumental.visaInitials.update',
11
+ };
@@ -654,6 +654,8 @@ export interface DocumentVersionResponseEntity {
654
654
  composition: DocumentComposition | null;
655
655
  note: string | null;
656
656
  status: DocumentStatus;
657
+ /** La guardó la jefatura revisora al corregir el texto; `note` es su justificación. */
658
+ correction: boolean;
657
659
  createdByFullName: string;
658
660
  createdAt: string;
659
661
  /** Visaciones, firmas y rechazos mientras fue la versión vigente. */
@@ -734,3 +736,13 @@ export interface DocumentDraftReviewResponseEntity {
734
736
  /** Al aprobar el oficial, el documento entró a tramitación: hay que avisar a quien tiene el primer turno. */
735
737
  submitted?: boolean;
736
738
  }
739
+ /** Resultado de la corrección de la jefatura revisora: la versión nueva y a quién avisar (quien redacta). */
740
+ export interface DocumentDraftCorrectionResponseEntity {
741
+ id: string;
742
+ ok: boolean;
743
+ versionNumber: number;
744
+ notify: {
745
+ employeeId: string;
746
+ fullName: string;
747
+ } | null;
748
+ }
@@ -25,3 +25,4 @@ export * from './push';
25
25
  export * from './documentTemplate';
26
26
  export * from './draftingRequest';
27
27
  export * from './internalReview';
28
+ export * from './visaInitials';
@@ -41,3 +41,4 @@ __exportStar(require("./push"), exports);
41
41
  __exportStar(require("./documentTemplate"), exports);
42
42
  __exportStar(require("./draftingRequest"), exports);
43
43
  __exportStar(require("./internalReview"), exports);
44
+ __exportStar(require("./visaInitials"), exports);
@@ -0,0 +1 @@
1
+ export * from './visaInitials.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("./visaInitials.entity"), exports);
@@ -0,0 +1,13 @@
1
+ /** Iniciales con que visa un funcionario: van en el sello de cada visación. */
2
+ export interface VisaInitialsResponseEntity {
3
+ /** Las que usa hoy: las suyas, si las cambió, o las que salen de su nombre. */
4
+ initials: string;
5
+ /** Las que salen de su nombre. */
6
+ suggested: string;
7
+ /** Las cambió él: no son las de su nombre. */
8
+ custom: boolean;
9
+ }
10
+ /** Límites de las iniciales propias: solo letras, en mayúscula. */
11
+ export declare const VISA_INITIALS_LIMITS: {
12
+ readonly maxLength: 6;
13
+ };
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.VISA_INITIALS_LIMITS = void 0;
4
+ /** Límites de las iniciales propias: solo letras, en mayúscula. */
5
+ exports.VISA_INITIALS_LIMITS = { 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.55",
3
+ "version": "0.0.1-beta.57",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "scripts": {
@@ -82,7 +82,8 @@ export type DocumentTrackingAction =
82
82
  | 'DraftReviewRequested'
83
83
  | 'DraftReviewApproved'
84
84
  | 'DraftReviewRejected'
85
- | 'DraftReviewCancelled';
85
+ | 'DraftReviewCancelled'
86
+ | 'DraftCorrected';
86
87
 
87
88
  export const DocumentTrackingAction = {
88
89
  Created: 'Created',
@@ -114,6 +115,7 @@ export const DocumentTrackingAction = {
114
115
  DraftReviewApproved: 'DraftReviewApproved',
115
116
  DraftReviewRejected: 'DraftReviewRejected',
116
117
  DraftReviewCancelled: 'DraftReviewCancelled',
118
+ DraftCorrected: 'DraftCorrected',
117
119
  } satisfies Record<string, DocumentTrackingAction>;
118
120
 
119
121
  export type DraftReviewStage = 'Draft' | 'Official';
@@ -803,6 +805,7 @@ export interface DocumentParticipantEntity {
803
805
  position?: string | null;
804
806
  observation?: string | null;
805
807
  resolvedAt?: string | null;
808
+ initials?: string | null;
806
809
  document?: DocumentEntity;
807
810
  documentId: string;
808
811
  createdAt: string;
@@ -1681,6 +1684,13 @@ export interface MailIntakeEntity {
1681
1684
  updatedAt: string;
1682
1685
  }
1683
1686
 
1687
+ export interface VisaInitialsEntity {
1688
+ employeeId: string;
1689
+ initials: string;
1690
+ createdAt: string;
1691
+ updatedAt: string;
1692
+ }
1693
+
1684
1694
  export interface PushSubscriptionEntity {
1685
1695
  id: string;
1686
1696
  employeeId: string;
@@ -1706,6 +1716,7 @@ export interface DocumentVersionEntity {
1706
1716
  composition?: JsonValue | null;
1707
1717
  note?: string | null;
1708
1718
  status: DocumentStatus;
1719
+ correction: boolean;
1709
1720
  createdByEmployeeId: string;
1710
1721
  createdByFullName: string;
1711
1722
  createdAt: string;
@@ -34,6 +34,7 @@ import {
34
34
  type DocumentCommentResponseEntity,
35
35
  type DocumentCommentsResponseEntity,
36
36
  type DocumentVersionResponseEntity,
37
+ type DocumentDraftCorrectionResponseEntity,
37
38
  type DocumentDraftReviewResponseEntity,
38
39
  } from '../entities';
39
40
  import { type RpcPage } from './contract';
@@ -51,6 +52,7 @@ export const DocumentPatterns = {
51
52
  reassign: 'gestorDocumental.document.reassign',
52
53
  requestDraftReview: 'gestorDocumental.document.requestDraftReview',
53
54
  resolveDraftReview: 'gestorDocumental.document.resolveDraftReview',
55
+ correctDraft: 'gestorDocumental.document.correctDraft',
54
56
  discard: 'gestorDocumental.document.discard',
55
57
  annul: 'gestorDocumental.document.annul',
56
58
  derive: 'gestorDocumental.document.derive',
@@ -331,6 +333,20 @@ export interface DocumentContract {
331
333
  };
332
334
  response: DocumentDraftReviewResponseEntity;
333
335
  };
336
+ /**
337
+ * La jefatura que tiene la revisión pendiente corrige el texto redactado con la plantilla, sin devolverlo: el sistema
338
+ * arma el PDF y guarda una versión nueva a su nombre con la justificación. La revisión sigue pendiente, ahora de esa
339
+ * versión.
340
+ */
341
+ [DocumentPatterns.correctDraft]: {
342
+ payload: Pick<DocumentEntity, 'id'> & {
343
+ subject: string;
344
+ composition: DocumentComposition;
345
+ reason: string;
346
+ actor: DocumentActor;
347
+ };
348
+ response: DocumentDraftCorrectionResponseEntity;
349
+ };
334
350
  [DocumentPatterns.reassign]: {
335
351
  payload: Pick<DocumentEntity, 'id'> & {
336
352
  participantId: DocumentParticipantEntity['id'];
@@ -17,6 +17,7 @@ import { DataProtectionPatterns, type DataProtectionContract } from './dataProte
17
17
  import { DeskPatterns, type DeskContract } from './desk.contract';
18
18
  import { MailIntakePatterns, type MailIntakeContract } from './mailIntake.contract';
19
19
  import { PushPatterns, type PushContract } from './push.contract';
20
+ import { VisaInitialsPatterns, type VisaInitialsContract } from './visaInitials.contract';
20
21
  import { ScanPatterns, type ScanContract } from './scan.contract';
21
22
  import { PartsOfficePatterns, type PartsOfficeContract } from './partsOffice.contract';
22
23
  import { ProcedurePatterns, type ProcedureContract } from './procedure.contract';
@@ -56,6 +57,7 @@ export * from './push.contract';
56
57
  export * from './draftingRequest.contract';
57
58
  export * from './internalReview.contract';
58
59
  export * from './richImage.contract';
60
+ export * from './visaInitials.contract';
59
61
 
60
62
  /** Patrones NATS de gestor-documental-ms, por recurso: `gestorDocumental.<recurso>.<acción>`. */
61
63
  export const GestorDocumentalPatterns = {
@@ -87,6 +89,7 @@ export const GestorDocumentalPatterns = {
87
89
  draftingRequest: DraftingRequestPatterns,
88
90
  internalReview: InternalReviewPatterns,
89
91
  richImage: RichImagePatterns,
92
+ visaInitials: VisaInitialsPatterns,
90
93
  } as const;
91
94
 
92
95
  /** Contrato completo de gestor-documental-ms: la unión de los contratos de sus recursos. */
@@ -117,4 +120,5 @@ export type GestorDocumentalContract = DocumentTypeContract &
117
120
  PushContract &
118
121
  DraftingRequestContract &
119
122
  InternalReviewContract &
120
- RichImageContract;
123
+ RichImageContract &
124
+ VisaInitialsContract;
@@ -0,0 +1,23 @@
1
+ import { type VisaInitialsResponseEntity } from '../entities';
2
+ import { type DocumentActor } from './document.contract';
3
+
4
+ /**
5
+ * Patrones NATS de `visaInitials`: las iniciales con que visa quien tiene la sesión. Salen de su nombre y las puede
6
+ * cambiar; el sello de cada visación lleva las que tenía al visar. `fullName` lo pone el gateway desde la sesión.
7
+ */
8
+ export const VisaInitialsPatterns = {
9
+ get: 'gestorDocumental.visaInitials.get',
10
+ update: 'gestorDocumental.visaInitials.update',
11
+ } as const;
12
+
13
+ export interface VisaInitialsContract {
14
+ [VisaInitialsPatterns.get]: {
15
+ payload: { fullName: string; actor: DocumentActor };
16
+ response: VisaInitialsResponseEntity;
17
+ };
18
+ /** Guarda las iniciales propias; `null` vuelve a las de su nombre. */
19
+ [VisaInitialsPatterns.update]: {
20
+ payload: { initials: string | null; fullName: string; actor: DocumentActor };
21
+ response: VisaInitialsResponseEntity;
22
+ };
23
+ }
@@ -689,6 +689,8 @@ export interface DocumentVersionResponseEntity {
689
689
  composition: DocumentComposition | null;
690
690
  note: string | null;
691
691
  status: DocumentStatus;
692
+ /** La guardó la jefatura revisora al corregir el texto; `note` es su justificación. */
693
+ correction: boolean;
692
694
  createdByFullName: string;
693
695
  createdAt: string;
694
696
  /** Visaciones, firmas y rechazos mientras fue la versión vigente. */
@@ -772,3 +774,11 @@ export interface DocumentDraftReviewResponseEntity {
772
774
  /** Al aprobar el oficial, el documento entró a tramitación: hay que avisar a quien tiene el primer turno. */
773
775
  submitted?: boolean;
774
776
  }
777
+
778
+ /** Resultado de la corrección de la jefatura revisora: la versión nueva y a quién avisar (quien redacta). */
779
+ export interface DocumentDraftCorrectionResponseEntity {
780
+ id: string;
781
+ ok: boolean;
782
+ versionNumber: number;
783
+ notify: { employeeId: string; fullName: string } | null;
784
+ }
@@ -25,3 +25,4 @@ export * from './push';
25
25
  export * from './documentTemplate';
26
26
  export * from './draftingRequest';
27
27
  export * from './internalReview';
28
+ export * from './visaInitials';
@@ -0,0 +1 @@
1
+ export * from './visaInitials.entity';
@@ -0,0 +1,12 @@
1
+ /** Iniciales con que visa un funcionario: van en el sello de cada visación. */
2
+ export interface VisaInitialsResponseEntity {
3
+ /** Las que usa hoy: las suyas, si las cambió, o las que salen de su nombre. */
4
+ initials: string;
5
+ /** Las que salen de su nombre. */
6
+ suggested: string;
7
+ /** Las cambió él: no son las de su nombre. */
8
+ custom: boolean;
9
+ }
10
+
11
+ /** Límites de las iniciales propias: solo letras, en mayúscula. */
12
+ export const VISA_INITIALS_LIMITS = { maxLength: 6 } as const;