@muni-sanfer/types-gestor-documental 0.0.1-beta.30 → 0.0.1-beta.31
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 +34 -0
- package/dist/contracts/document.contract.d.ts +60 -1
- package/dist/contracts/document.contract.js +5 -0
- package/dist/contracts/index.d.ts +5 -0
- package/dist/entities/document/document.entity.d.ts +45 -1
- package/package.json +1 -1
- package/src/base/entities.ts +36 -0
- package/src/contracts/document.contract.ts +41 -0
- package/src/entities/document/document.entity.ts +49 -0
package/dist/base/entities.d.ts
CHANGED
|
@@ -473,6 +473,8 @@ export interface DocumentEntity {
|
|
|
473
473
|
redactedFileName?: string | null;
|
|
474
474
|
accessRequestResponses?: AccessRequestEntity[];
|
|
475
475
|
dataRightsResponses?: DataRightsRequestEntity[];
|
|
476
|
+
versions?: DocumentVersionEntity[];
|
|
477
|
+
comments?: DocumentCommentEntity[];
|
|
476
478
|
accessRequestDeliveries?: AccessRequestDocumentEntity[];
|
|
477
479
|
dispatch?: DocumentDispatchEntity | null;
|
|
478
480
|
docDigitalInbound?: DocDigitalInboundEntity | null;
|
|
@@ -1204,6 +1206,38 @@ export interface DeskFileEntity {
|
|
|
1204
1206
|
createdAt: string;
|
|
1205
1207
|
updatedAt: string;
|
|
1206
1208
|
}
|
|
1209
|
+
export interface DocumentVersionEntity {
|
|
1210
|
+
id: string;
|
|
1211
|
+
documentId: string;
|
|
1212
|
+
document?: DocumentEntity;
|
|
1213
|
+
number: number;
|
|
1214
|
+
subject: string;
|
|
1215
|
+
fileId: string;
|
|
1216
|
+
fileName: string;
|
|
1217
|
+
sha256?: string | null;
|
|
1218
|
+
composition?: JsonValue | null;
|
|
1219
|
+
note?: string | null;
|
|
1220
|
+
status: DocumentStatus;
|
|
1221
|
+
createdByEmployeeId: string;
|
|
1222
|
+
createdByFullName: string;
|
|
1223
|
+
createdAt: string;
|
|
1224
|
+
}
|
|
1225
|
+
export interface DocumentCommentEntity {
|
|
1226
|
+
id: string;
|
|
1227
|
+
documentId: string;
|
|
1228
|
+
document?: DocumentEntity;
|
|
1229
|
+
versionNumber: number;
|
|
1230
|
+
section?: string | null;
|
|
1231
|
+
quote?: string | null;
|
|
1232
|
+
text: string;
|
|
1233
|
+
authorEmployeeId: string;
|
|
1234
|
+
authorFullName: string;
|
|
1235
|
+
authorRole: string;
|
|
1236
|
+
resolvedAt?: string | null;
|
|
1237
|
+
resolvedByFullName?: string | null;
|
|
1238
|
+
resolutionNote?: string | null;
|
|
1239
|
+
createdAt: string;
|
|
1240
|
+
}
|
|
1207
1241
|
type JsonValue = string | number | boolean | {
|
|
1208
1242
|
[key in string]?: JsonValue;
|
|
1209
1243
|
} | Array<JsonValue> | null;
|
|
@@ -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 } 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 } 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: {
|
|
@@ -17,6 +17,11 @@ export declare const DocumentPatterns: {
|
|
|
17
17
|
readonly derive: "gestorDocumental.document.derive";
|
|
18
18
|
readonly closeDelivery: "gestorDocumental.document.closeDelivery";
|
|
19
19
|
readonly verify: "gestorDocumental.document.verify";
|
|
20
|
+
readonly getVersions: "gestorDocumental.document.getVersions";
|
|
21
|
+
readonly getVersionFile: "gestorDocumental.document.getVersionFile";
|
|
22
|
+
readonly getComments: "gestorDocumental.document.getComments";
|
|
23
|
+
readonly addComment: "gestorDocumental.document.addComment";
|
|
24
|
+
readonly resolveComment: "gestorDocumental.document.resolveComment";
|
|
20
25
|
readonly getPublicFile: "gestorDocumental.document.getPublicFile";
|
|
21
26
|
readonly getFilesFolder: "gestorDocumental.document.getFilesFolder";
|
|
22
27
|
readonly getAgenda: "gestorDocumental.document.getAgenda";
|
|
@@ -66,6 +71,8 @@ export type DocumentReviewAction = 'Visa' | 'Sign' | 'Reject';
|
|
|
66
71
|
*/
|
|
67
72
|
export interface DocumentWritePayload extends Pick<DocumentEntity, 'subject' | 'documentTypeId'> {
|
|
68
73
|
keywords: string[];
|
|
74
|
+
/** Qué cambió, si el guardado crea una versión nueva (otro PDF, otro texto u otro asunto). */
|
|
75
|
+
versionNote?: string | null;
|
|
69
76
|
accessLevel?: DocumentAccessLevel;
|
|
70
77
|
hasSensitiveData?: boolean;
|
|
71
78
|
directorateCodeReference?: number | null;
|
|
@@ -299,6 +306,58 @@ export interface DocumentContract {
|
|
|
299
306
|
};
|
|
300
307
|
response: DocumentCloseDeliveryResponseEntity;
|
|
301
308
|
};
|
|
309
|
+
/** Versiones del documento, de la más reciente a la primera, con quién visó o firmó cada una. */
|
|
310
|
+
[DocumentPatterns.getVersions]: {
|
|
311
|
+
payload: {
|
|
312
|
+
id: string;
|
|
313
|
+
actor?: DocumentActor;
|
|
314
|
+
viewAll?: boolean;
|
|
315
|
+
};
|
|
316
|
+
response: DocumentVersionResponseEntity[];
|
|
317
|
+
};
|
|
318
|
+
/** El PDF original de una versión (sin estampar), con las mismas reglas de acceso. */
|
|
319
|
+
[DocumentPatterns.getVersionFile]: {
|
|
320
|
+
payload: {
|
|
321
|
+
id: string;
|
|
322
|
+
number: number;
|
|
323
|
+
actor?: DocumentActor;
|
|
324
|
+
viewAll?: boolean;
|
|
325
|
+
};
|
|
326
|
+
response: DocumentPublicFileResponseEntity;
|
|
327
|
+
};
|
|
328
|
+
/** Comentarios de redacción: los ven el redactor y quienes tienen un turno (y quien ve todo el historial). */
|
|
329
|
+
[DocumentPatterns.getComments]: {
|
|
330
|
+
payload: {
|
|
331
|
+
id: string;
|
|
332
|
+
actor?: DocumentActor;
|
|
333
|
+
viewAll?: boolean;
|
|
334
|
+
};
|
|
335
|
+
response: DocumentCommentsResponseEntity;
|
|
336
|
+
};
|
|
337
|
+
/** Comenta el redactor o quien tiene un turno, mientras el documento no termina, sobre la versión vigente. */
|
|
338
|
+
[DocumentPatterns.addComment]: {
|
|
339
|
+
payload: {
|
|
340
|
+
id: string;
|
|
341
|
+
section?: string | null;
|
|
342
|
+
quote?: string | null;
|
|
343
|
+
text: string;
|
|
344
|
+
actor: DocumentActor & {
|
|
345
|
+
fullName: string;
|
|
346
|
+
};
|
|
347
|
+
};
|
|
348
|
+
response: DocumentCommentResponseEntity;
|
|
349
|
+
};
|
|
350
|
+
/** Lo marca como resuelto el redactor o quien lo escribió, con una nota opcional. */
|
|
351
|
+
[DocumentPatterns.resolveComment]: {
|
|
352
|
+
payload: {
|
|
353
|
+
commentId: string;
|
|
354
|
+
note?: string | null;
|
|
355
|
+
actor: DocumentActor & {
|
|
356
|
+
fullName: string;
|
|
357
|
+
};
|
|
358
|
+
};
|
|
359
|
+
response: DocumentCommentResponseEntity;
|
|
360
|
+
};
|
|
302
361
|
/** Comprobación pública de un documento con el código que lleva impreso. No exige sesión. */
|
|
303
362
|
[DocumentPatterns.verify]: {
|
|
304
363
|
payload: {
|
|
@@ -17,6 +17,11 @@ exports.DocumentPatterns = {
|
|
|
17
17
|
derive: 'gestorDocumental.document.derive',
|
|
18
18
|
closeDelivery: 'gestorDocumental.document.closeDelivery',
|
|
19
19
|
verify: 'gestorDocumental.document.verify',
|
|
20
|
+
getVersions: 'gestorDocumental.document.getVersions',
|
|
21
|
+
getVersionFile: 'gestorDocumental.document.getVersionFile',
|
|
22
|
+
getComments: 'gestorDocumental.document.getComments',
|
|
23
|
+
addComment: 'gestorDocumental.document.addComment',
|
|
24
|
+
resolveComment: 'gestorDocumental.document.resolveComment',
|
|
20
25
|
getPublicFile: 'gestorDocumental.document.getPublicFile',
|
|
21
26
|
getFilesFolder: 'gestorDocumental.document.getFilesFolder',
|
|
22
27
|
getAgenda: 'gestorDocumental.document.getAgenda',
|
|
@@ -67,6 +67,11 @@ export declare const GestorDocumentalPatterns: {
|
|
|
67
67
|
readonly derive: "gestorDocumental.document.derive";
|
|
68
68
|
readonly closeDelivery: "gestorDocumental.document.closeDelivery";
|
|
69
69
|
readonly verify: "gestorDocumental.document.verify";
|
|
70
|
+
readonly getVersions: "gestorDocumental.document.getVersions";
|
|
71
|
+
readonly getVersionFile: "gestorDocumental.document.getVersionFile";
|
|
72
|
+
readonly getComments: "gestorDocumental.document.getComments";
|
|
73
|
+
readonly addComment: "gestorDocumental.document.addComment";
|
|
74
|
+
readonly resolveComment: "gestorDocumental.document.resolveComment";
|
|
70
75
|
readonly getPublicFile: "gestorDocumental.document.getPublicFile";
|
|
71
76
|
readonly getFilesFolder: "gestorDocumental.document.getFilesFolder";
|
|
72
77
|
readonly getAgenda: "gestorDocumental.document.getAgenda";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type CommunicationMeans, DocumentAnnulledNumberEntity, DocumentAttachmentEntity, DocumentDeliveryEntity, DocumentEntity, DocumentParticipantEntity, DocumentRecipientEntity, DocumentTrackingEntity, DocumentTypeEntity } from '../../base/entities';
|
|
1
|
+
import { type CommunicationMeans, DocumentAnnulledNumberEntity, DocumentAttachmentEntity, DocumentDeliveryEntity, DocumentEntity, DocumentParticipantEntity, DocumentRecipientEntity, type DocumentStatus, DocumentTrackingEntity, DocumentTypeEntity } from '../../base/entities';
|
|
2
2
|
/** Tipo documental de un documento, con lo necesario para citarlo. */
|
|
3
3
|
export interface DocumentTypeSummaryEntity {
|
|
4
4
|
id: DocumentTypeEntity['id'];
|
|
@@ -482,3 +482,47 @@ export interface DocumentReminderEntity {
|
|
|
482
482
|
instruction: DocumentDeliveryEntity['instruction'];
|
|
483
483
|
sentByFullName: string | null;
|
|
484
484
|
}
|
|
485
|
+
/** Quien visó, firmó o rechazó una versión, según la trazabilidad. */
|
|
486
|
+
export interface DocumentVersionReviewEntity {
|
|
487
|
+
action: 'Visaed' | 'Signed' | 'Rejected';
|
|
488
|
+
employeeFullName: string;
|
|
489
|
+
createdAt: string;
|
|
490
|
+
}
|
|
491
|
+
/** Una versión de un documento: lo que se guardó cada vez que cambió su PDF, su texto o su asunto. */
|
|
492
|
+
export interface DocumentVersionResponseEntity {
|
|
493
|
+
number: number;
|
|
494
|
+
subject: string;
|
|
495
|
+
fileName: string;
|
|
496
|
+
sha256: string | null;
|
|
497
|
+
/** Lo redactado con plantilla, para compararla con otra versión. `null` si se subió un PDF. */
|
|
498
|
+
composition: DocumentComposition | null;
|
|
499
|
+
note: string | null;
|
|
500
|
+
status: DocumentStatus;
|
|
501
|
+
createdByFullName: string;
|
|
502
|
+
createdAt: string;
|
|
503
|
+
/** Visaciones, firmas y rechazos mientras fue la versión vigente. */
|
|
504
|
+
reviews: DocumentVersionReviewEntity[];
|
|
505
|
+
}
|
|
506
|
+
/** Comentario de redacción de un visador, un firmante o el redactor. */
|
|
507
|
+
export interface DocumentCommentResponseEntity {
|
|
508
|
+
id: string;
|
|
509
|
+
versionNumber: number;
|
|
510
|
+
section: string | null;
|
|
511
|
+
quote: string | null;
|
|
512
|
+
text: string;
|
|
513
|
+
authorEmployeeId: string;
|
|
514
|
+
authorFullName: string;
|
|
515
|
+
authorRole: 'Author' | 'Visa' | 'Signature';
|
|
516
|
+
createdAt: string;
|
|
517
|
+
resolvedAt: string | null;
|
|
518
|
+
resolvedByFullName: string | null;
|
|
519
|
+
resolutionNote: string | null;
|
|
520
|
+
/** Quien consulta lo puede marcar como resuelto: el redactor o quien lo escribió, mientras el documento se tramita. */
|
|
521
|
+
canResolve: boolean;
|
|
522
|
+
}
|
|
523
|
+
export interface DocumentCommentsResponseEntity {
|
|
524
|
+
comments: DocumentCommentResponseEntity[];
|
|
525
|
+
/** Quien consulta puede comentar: es el redactor o tiene un turno, y el documento no ha terminado. */
|
|
526
|
+
canComment: boolean;
|
|
527
|
+
currentVersion: number;
|
|
528
|
+
}
|
package/package.json
CHANGED
package/src/base/entities.ts
CHANGED
|
@@ -661,6 +661,8 @@ export interface DocumentEntity {
|
|
|
661
661
|
redactedFileName?: string | null;
|
|
662
662
|
accessRequestResponses?: AccessRequestEntity[];
|
|
663
663
|
dataRightsResponses?: DataRightsRequestEntity[];
|
|
664
|
+
versions?: DocumentVersionEntity[];
|
|
665
|
+
comments?: DocumentCommentEntity[];
|
|
664
666
|
accessRequestDeliveries?: AccessRequestDocumentEntity[];
|
|
665
667
|
dispatch?: DocumentDispatchEntity | null;
|
|
666
668
|
docDigitalInbound?: DocDigitalInboundEntity | null;
|
|
@@ -1439,4 +1441,38 @@ export interface DeskFileEntity {
|
|
|
1439
1441
|
updatedAt: string;
|
|
1440
1442
|
}
|
|
1441
1443
|
|
|
1444
|
+
export interface DocumentVersionEntity {
|
|
1445
|
+
id: string;
|
|
1446
|
+
documentId: string;
|
|
1447
|
+
document?: DocumentEntity;
|
|
1448
|
+
number: number;
|
|
1449
|
+
subject: string;
|
|
1450
|
+
fileId: string;
|
|
1451
|
+
fileName: string;
|
|
1452
|
+
sha256?: string | null;
|
|
1453
|
+
composition?: JsonValue | null;
|
|
1454
|
+
note?: string | null;
|
|
1455
|
+
status: DocumentStatus;
|
|
1456
|
+
createdByEmployeeId: string;
|
|
1457
|
+
createdByFullName: string;
|
|
1458
|
+
createdAt: string;
|
|
1459
|
+
}
|
|
1460
|
+
|
|
1461
|
+
export interface DocumentCommentEntity {
|
|
1462
|
+
id: string;
|
|
1463
|
+
documentId: string;
|
|
1464
|
+
document?: DocumentEntity;
|
|
1465
|
+
versionNumber: number;
|
|
1466
|
+
section?: string | null;
|
|
1467
|
+
quote?: string | null;
|
|
1468
|
+
text: string;
|
|
1469
|
+
authorEmployeeId: string;
|
|
1470
|
+
authorFullName: string;
|
|
1471
|
+
authorRole: string;
|
|
1472
|
+
resolvedAt?: string | null;
|
|
1473
|
+
resolvedByFullName?: string | null;
|
|
1474
|
+
resolutionNote?: string | null;
|
|
1475
|
+
createdAt: string;
|
|
1476
|
+
}
|
|
1477
|
+
|
|
1442
1478
|
type JsonValue = string | number | boolean | { [key in string]?: JsonValue } | Array<JsonValue> | null;
|
|
@@ -31,6 +31,9 @@ import {
|
|
|
31
31
|
type DocumentTrailExportEntity,
|
|
32
32
|
type DocumentUpdateResponseEntity,
|
|
33
33
|
type DocumentVerifyResponseEntity,
|
|
34
|
+
type DocumentCommentResponseEntity,
|
|
35
|
+
type DocumentCommentsResponseEntity,
|
|
36
|
+
type DocumentVersionResponseEntity,
|
|
34
37
|
} from '../entities';
|
|
35
38
|
import { type RpcPage } from './contract';
|
|
36
39
|
|
|
@@ -50,6 +53,11 @@ export const DocumentPatterns = {
|
|
|
50
53
|
derive: 'gestorDocumental.document.derive',
|
|
51
54
|
closeDelivery: 'gestorDocumental.document.closeDelivery',
|
|
52
55
|
verify: 'gestorDocumental.document.verify',
|
|
56
|
+
getVersions: 'gestorDocumental.document.getVersions',
|
|
57
|
+
getVersionFile: 'gestorDocumental.document.getVersionFile',
|
|
58
|
+
getComments: 'gestorDocumental.document.getComments',
|
|
59
|
+
addComment: 'gestorDocumental.document.addComment',
|
|
60
|
+
resolveComment: 'gestorDocumental.document.resolveComment',
|
|
53
61
|
getPublicFile: 'gestorDocumental.document.getPublicFile',
|
|
54
62
|
getFilesFolder: 'gestorDocumental.document.getFilesFolder',
|
|
55
63
|
getAgenda: 'gestorDocumental.document.getAgenda',
|
|
@@ -101,6 +109,8 @@ export type DocumentReviewAction = 'Visa' | 'Sign' | 'Reject';
|
|
|
101
109
|
*/
|
|
102
110
|
export interface DocumentWritePayload extends Pick<DocumentEntity, 'subject' | 'documentTypeId'> {
|
|
103
111
|
keywords: string[];
|
|
112
|
+
/** Qué cambió, si el guardado crea una versión nueva (otro PDF, otro texto u otro asunto). */
|
|
113
|
+
versionNote?: string | null;
|
|
104
114
|
accessLevel?: DocumentAccessLevel;
|
|
105
115
|
hasSensitiveData?: boolean;
|
|
106
116
|
directorateCodeReference?: number | null;
|
|
@@ -320,6 +330,37 @@ export interface DocumentContract {
|
|
|
320
330
|
payload: { deliveryId: DocumentDeliveryEntity['id']; note?: string | null; actor: DocumentActor };
|
|
321
331
|
response: DocumentCloseDeliveryResponseEntity;
|
|
322
332
|
};
|
|
333
|
+
/** Versiones del documento, de la más reciente a la primera, con quién visó o firmó cada una. */
|
|
334
|
+
[DocumentPatterns.getVersions]: {
|
|
335
|
+
payload: { id: string; actor?: DocumentActor; viewAll?: boolean };
|
|
336
|
+
response: DocumentVersionResponseEntity[];
|
|
337
|
+
};
|
|
338
|
+
/** El PDF original de una versión (sin estampar), con las mismas reglas de acceso. */
|
|
339
|
+
[DocumentPatterns.getVersionFile]: {
|
|
340
|
+
payload: { id: string; number: number; actor?: DocumentActor; viewAll?: boolean };
|
|
341
|
+
response: DocumentPublicFileResponseEntity;
|
|
342
|
+
};
|
|
343
|
+
/** Comentarios de redacción: los ven el redactor y quienes tienen un turno (y quien ve todo el historial). */
|
|
344
|
+
[DocumentPatterns.getComments]: {
|
|
345
|
+
payload: { id: string; actor?: DocumentActor; viewAll?: boolean };
|
|
346
|
+
response: DocumentCommentsResponseEntity;
|
|
347
|
+
};
|
|
348
|
+
/** Comenta el redactor o quien tiene un turno, mientras el documento no termina, sobre la versión vigente. */
|
|
349
|
+
[DocumentPatterns.addComment]: {
|
|
350
|
+
payload: {
|
|
351
|
+
id: string;
|
|
352
|
+
section?: string | null;
|
|
353
|
+
quote?: string | null;
|
|
354
|
+
text: string;
|
|
355
|
+
actor: DocumentActor & { fullName: string };
|
|
356
|
+
};
|
|
357
|
+
response: DocumentCommentResponseEntity;
|
|
358
|
+
};
|
|
359
|
+
/** Lo marca como resuelto el redactor o quien lo escribió, con una nota opcional. */
|
|
360
|
+
[DocumentPatterns.resolveComment]: {
|
|
361
|
+
payload: { commentId: string; note?: string | null; actor: DocumentActor & { fullName: string } };
|
|
362
|
+
response: DocumentCommentResponseEntity;
|
|
363
|
+
};
|
|
323
364
|
/** Comprobación pública de un documento con el código que lleva impreso. No exige sesión. */
|
|
324
365
|
[DocumentPatterns.verify]: {
|
|
325
366
|
payload: { code: string };
|
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
DocumentEntity,
|
|
7
7
|
DocumentParticipantEntity,
|
|
8
8
|
DocumentRecipientEntity,
|
|
9
|
+
type DocumentStatus,
|
|
9
10
|
DocumentTrackingEntity,
|
|
10
11
|
DocumentTypeEntity,
|
|
11
12
|
} from '../../base/entities';
|
|
@@ -530,3 +531,51 @@ export interface DocumentReminderEntity {
|
|
|
530
531
|
instruction: DocumentDeliveryEntity['instruction'];
|
|
531
532
|
sentByFullName: string | null;
|
|
532
533
|
}
|
|
534
|
+
|
|
535
|
+
/** Quien visó, firmó o rechazó una versión, según la trazabilidad. */
|
|
536
|
+
export interface DocumentVersionReviewEntity {
|
|
537
|
+
action: 'Visaed' | 'Signed' | 'Rejected';
|
|
538
|
+
employeeFullName: string;
|
|
539
|
+
createdAt: string;
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
/** Una versión de un documento: lo que se guardó cada vez que cambió su PDF, su texto o su asunto. */
|
|
543
|
+
export interface DocumentVersionResponseEntity {
|
|
544
|
+
number: number;
|
|
545
|
+
subject: string;
|
|
546
|
+
fileName: string;
|
|
547
|
+
sha256: string | null;
|
|
548
|
+
/** Lo redactado con plantilla, para compararla con otra versión. `null` si se subió un PDF. */
|
|
549
|
+
composition: DocumentComposition | null;
|
|
550
|
+
note: string | null;
|
|
551
|
+
status: DocumentStatus;
|
|
552
|
+
createdByFullName: string;
|
|
553
|
+
createdAt: string;
|
|
554
|
+
/** Visaciones, firmas y rechazos mientras fue la versión vigente. */
|
|
555
|
+
reviews: DocumentVersionReviewEntity[];
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
/** Comentario de redacción de un visador, un firmante o el redactor. */
|
|
559
|
+
export interface DocumentCommentResponseEntity {
|
|
560
|
+
id: string;
|
|
561
|
+
versionNumber: number;
|
|
562
|
+
section: string | null;
|
|
563
|
+
quote: string | null;
|
|
564
|
+
text: string;
|
|
565
|
+
authorEmployeeId: string;
|
|
566
|
+
authorFullName: string;
|
|
567
|
+
authorRole: 'Author' | 'Visa' | 'Signature';
|
|
568
|
+
createdAt: string;
|
|
569
|
+
resolvedAt: string | null;
|
|
570
|
+
resolvedByFullName: string | null;
|
|
571
|
+
resolutionNote: string | null;
|
|
572
|
+
/** Quien consulta lo puede marcar como resuelto: el redactor o quien lo escribió, mientras el documento se tramita. */
|
|
573
|
+
canResolve: boolean;
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
export interface DocumentCommentsResponseEntity {
|
|
577
|
+
comments: DocumentCommentResponseEntity[];
|
|
578
|
+
/** Quien consulta puede comentar: es el redactor o tiene un turno, y el documento no ha terminado. */
|
|
579
|
+
canComment: boolean;
|
|
580
|
+
currentVersion: number;
|
|
581
|
+
}
|