@muni-sanfer/types-gestor-documental 0.0.1-beta.85 → 0.0.1-beta.87
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 +2 -1
- package/dist/base/entities.js +1 -0
- package/dist/contracts/document.contract.d.ts +19 -4
- package/dist/contracts/document.contract.js +1 -0
- package/dist/contracts/index.d.ts +1 -0
- package/dist/entities/document/document.entity.d.ts +6 -0
- package/package.json +1 -1
- package/src/base/entities.ts +2 -0
- package/src/contracts/document.contract.ts +21 -4
- package/src/entities/document/document.entity.ts +9 -0
package/dist/base/entities.d.ts
CHANGED
|
@@ -51,7 +51,7 @@ export declare const DocumentParticipantStatus: {
|
|
|
51
51
|
Resolved: "Resolved";
|
|
52
52
|
Rejected: "Rejected";
|
|
53
53
|
};
|
|
54
|
-
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';
|
|
54
|
+
export type DocumentTrackingAction = 'Created' | 'Updated' | 'Submitted' | 'Visaed' | 'Signed' | 'Rejected' | 'Finished' | 'Discarded' | 'Numbered' | 'NumberAnnulled' | 'Annulled' | 'Delivered' | 'Derived' | 'RecipientsAdded' | 'Reassigned' | 'Dispatched' | 'DispatchReturned' | 'DispatchedByContingency' | 'Received' | 'EmailCopySent' | 'EmailCopyOpened' | 'DispositionRecorded' | 'TransparencyRedacted' | 'TransparencyPublished' | 'TransparencyExcluded' | 'TransparencyWithdrawn' | 'DraftReviewRequested' | 'DraftReviewApproved' | 'DraftReviewRejected' | 'DraftReviewCancelled' | 'DraftCorrected';
|
|
55
55
|
export declare const DocumentTrackingAction: {
|
|
56
56
|
Created: "Created";
|
|
57
57
|
Updated: "Updated";
|
|
@@ -66,6 +66,7 @@ export declare const DocumentTrackingAction: {
|
|
|
66
66
|
Annulled: "Annulled";
|
|
67
67
|
Delivered: "Delivered";
|
|
68
68
|
Derived: "Derived";
|
|
69
|
+
RecipientsAdded: "RecipientsAdded";
|
|
69
70
|
Reassigned: "Reassigned";
|
|
70
71
|
Dispatched: "Dispatched";
|
|
71
72
|
DispatchReturned: "DispatchReturned";
|
package/dist/base/entities.js
CHANGED
|
@@ -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 DocumentSlaReminderEntity, type DocumentGetAllResponseEntity, type DocumentGetByIdResponseEntity, type DocumentGetSummaryResponseEntity, type DocumentReviewAreaEntity, 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 DocumentAddRecipientsResponseEntity, type DocumentDeriveResponseEntity, type DocumentDiscardResponseEntity, type DocumentEmailCopyIssuedEntity, type DocumentEmailCopyViewEntity, type DocumentReminderEntity, type DocumentSlaReminderEntity, type DocumentGetAllResponseEntity, type DocumentGetByIdResponseEntity, type DocumentGetSummaryResponseEntity, type DocumentReviewAreaEntity, 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: {
|
|
@@ -19,6 +19,7 @@ export declare const DocumentPatterns: {
|
|
|
19
19
|
readonly discard: "gestorDocumental.document.discard";
|
|
20
20
|
readonly annul: "gestorDocumental.document.annul";
|
|
21
21
|
readonly derive: "gestorDocumental.document.derive";
|
|
22
|
+
readonly addRecipients: "gestorDocumental.document.addRecipients";
|
|
22
23
|
readonly closeDelivery: "gestorDocumental.document.closeDelivery";
|
|
23
24
|
readonly verify: "gestorDocumental.document.verify";
|
|
24
25
|
readonly getVersions: "gestorDocumental.document.getVersions";
|
|
@@ -57,10 +58,11 @@ export interface DocumentActor {
|
|
|
57
58
|
*/
|
|
58
59
|
areaDepartmentIds?: string[];
|
|
59
60
|
/**
|
|
60
|
-
*
|
|
61
|
-
*
|
|
61
|
+
* Departamentos cuyas entregas le llegan: los que integra o encarga y todos los de las direcciones que integra o
|
|
62
|
+
* dirige (lo dirigido a un departamento lo ve también su dirección; lo dirigido a una dirección, solo ella). Lo
|
|
63
|
+
* resuelve el gateway.
|
|
62
64
|
*/
|
|
63
|
-
|
|
65
|
+
inboxDepartmentIds?: string[];
|
|
64
66
|
}
|
|
65
67
|
/** Bandeja desde la que se lista. Todas son del funcionario (`actor`), salvo `all`. */
|
|
66
68
|
export type DocumentBucket = 'created' | 'area' | 'sent' | 'toVisa' | 'toSign' | 'participated' | 'visaed' | 'signed' | 'reviewed' | 'toReview' | 'visaAll' | 'signAll' | 'reviewAll' | 'all';
|
|
@@ -228,6 +230,7 @@ export interface DocumentContract {
|
|
|
228
230
|
filters?: {
|
|
229
231
|
search?: string;
|
|
230
232
|
state?: DocumentInboxState;
|
|
233
|
+
mailboxes?: string[];
|
|
231
234
|
};
|
|
232
235
|
actor: DocumentActor;
|
|
233
236
|
};
|
|
@@ -374,6 +377,18 @@ export interface DocumentContract {
|
|
|
374
377
|
};
|
|
375
378
|
response: DocumentDeriveResponseEntity;
|
|
376
379
|
};
|
|
380
|
+
/**
|
|
381
|
+
* Agrega destinatarios a un documento ya finalizado (las áreas o personas que faltaron): les llega de inmediato y
|
|
382
|
+
* queda en la trazabilidad quién los agregó. Lo hace quien lo redactó o, con `viewAll`, quien lleva el historial.
|
|
383
|
+
*/
|
|
384
|
+
[DocumentPatterns.addRecipients]: {
|
|
385
|
+
payload: Pick<DocumentEntity, 'id'> & {
|
|
386
|
+
recipients: DocumentRecipientInput[];
|
|
387
|
+
actor: DocumentActor;
|
|
388
|
+
viewAll?: boolean;
|
|
389
|
+
};
|
|
390
|
+
response: DocumentAddRecipientsResponseEntity;
|
|
391
|
+
};
|
|
377
392
|
/** Quien recibió un documento lo marca como atendido, con una nota opcional. */
|
|
378
393
|
[DocumentPatterns.closeDelivery]: {
|
|
379
394
|
payload: {
|
|
@@ -19,6 +19,7 @@ exports.DocumentPatterns = {
|
|
|
19
19
|
discard: 'gestorDocumental.document.discard',
|
|
20
20
|
annul: 'gestorDocumental.document.annul',
|
|
21
21
|
derive: 'gestorDocumental.document.derive',
|
|
22
|
+
addRecipients: 'gestorDocumental.document.addRecipients',
|
|
22
23
|
closeDelivery: 'gestorDocumental.document.closeDelivery',
|
|
23
24
|
verify: 'gestorDocumental.document.verify',
|
|
24
25
|
getVersions: 'gestorDocumental.document.getVersions',
|
|
@@ -89,6 +89,7 @@ export declare const GestorDocumentalPatterns: {
|
|
|
89
89
|
readonly discard: "gestorDocumental.document.discard";
|
|
90
90
|
readonly annul: "gestorDocumental.document.annul";
|
|
91
91
|
readonly derive: "gestorDocumental.document.derive";
|
|
92
|
+
readonly addRecipients: "gestorDocumental.document.addRecipients";
|
|
92
93
|
readonly closeDelivery: "gestorDocumental.document.closeDelivery";
|
|
93
94
|
readonly verify: "gestorDocumental.document.verify";
|
|
94
95
|
readonly getVersions: "gestorDocumental.document.getVersions";
|
|
@@ -296,6 +296,7 @@ export interface DocumentGetByIdResponseEntity {
|
|
|
296
296
|
canDiscard: boolean;
|
|
297
297
|
canDerive: boolean;
|
|
298
298
|
canReply: boolean;
|
|
299
|
+
canAddRecipients: boolean;
|
|
299
300
|
canReassign: boolean;
|
|
300
301
|
/** Quien consulta redactó el documento (o lo ingresó, si llegó por DocDigital). */
|
|
301
302
|
isAuthor: boolean;
|
|
@@ -415,6 +416,11 @@ export interface DocumentPublicFileResponseEntity {
|
|
|
415
416
|
fileId: string;
|
|
416
417
|
fileName: string;
|
|
417
418
|
}
|
|
419
|
+
export interface DocumentAddRecipientsResponseEntity {
|
|
420
|
+
id: DocumentEntity['id'];
|
|
421
|
+
ok: boolean;
|
|
422
|
+
delivered: number;
|
|
423
|
+
}
|
|
418
424
|
export interface DocumentDeriveResponseEntity {
|
|
419
425
|
id: DocumentEntity['id'];
|
|
420
426
|
ok: boolean;
|
package/package.json
CHANGED
package/src/base/entities.ts
CHANGED
|
@@ -93,6 +93,7 @@ export type DocumentTrackingAction =
|
|
|
93
93
|
| 'Annulled'
|
|
94
94
|
| 'Delivered'
|
|
95
95
|
| 'Derived'
|
|
96
|
+
| 'RecipientsAdded'
|
|
96
97
|
| 'Reassigned'
|
|
97
98
|
| 'Dispatched'
|
|
98
99
|
| 'DispatchReturned'
|
|
@@ -125,6 +126,7 @@ export const DocumentTrackingAction = {
|
|
|
125
126
|
Annulled: 'Annulled',
|
|
126
127
|
Delivered: 'Delivered',
|
|
127
128
|
Derived: 'Derived',
|
|
129
|
+
RecipientsAdded: 'RecipientsAdded',
|
|
128
130
|
Reassigned: 'Reassigned',
|
|
129
131
|
Dispatched: 'Dispatched',
|
|
130
132
|
DispatchReturned: 'DispatchReturned',
|
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
type DocumentAnnulResponseEntity,
|
|
13
13
|
type DocumentCloseDeliveryResponseEntity,
|
|
14
14
|
type DocumentCreateResponseEntity,
|
|
15
|
+
type DocumentAddRecipientsResponseEntity,
|
|
15
16
|
type DocumentDeriveResponseEntity,
|
|
16
17
|
type DocumentDiscardResponseEntity,
|
|
17
18
|
type DocumentEmailCopyIssuedEntity,
|
|
@@ -60,6 +61,7 @@ export const DocumentPatterns = {
|
|
|
60
61
|
discard: 'gestorDocumental.document.discard',
|
|
61
62
|
annul: 'gestorDocumental.document.annul',
|
|
62
63
|
derive: 'gestorDocumental.document.derive',
|
|
64
|
+
addRecipients: 'gestorDocumental.document.addRecipients',
|
|
63
65
|
closeDelivery: 'gestorDocumental.document.closeDelivery',
|
|
64
66
|
verify: 'gestorDocumental.document.verify',
|
|
65
67
|
getVersions: 'gestorDocumental.document.getVersions',
|
|
@@ -99,10 +101,11 @@ export interface DocumentActor {
|
|
|
99
101
|
*/
|
|
100
102
|
areaDepartmentIds?: string[];
|
|
101
103
|
/**
|
|
102
|
-
*
|
|
103
|
-
*
|
|
104
|
+
* Departamentos cuyas entregas le llegan: los que integra o encarga y todos los de las direcciones que integra o
|
|
105
|
+
* dirige (lo dirigido a un departamento lo ve también su dirección; lo dirigido a una dirección, solo ella). Lo
|
|
106
|
+
* resuelve el gateway.
|
|
104
107
|
*/
|
|
105
|
-
|
|
108
|
+
inboxDepartmentIds?: string[];
|
|
106
109
|
}
|
|
107
110
|
|
|
108
111
|
/** Bandeja desde la que se lista. Todas son del funcionario (`actor`), salvo `all`. */
|
|
@@ -283,7 +286,9 @@ export interface DocumentContract {
|
|
|
283
286
|
[DocumentPatterns.getInbox]: {
|
|
284
287
|
payload: {
|
|
285
288
|
pagination?: { page?: number; limit?: number };
|
|
286
|
-
|
|
289
|
+
// `mailboxes`: los buzones que se listan: el personal (`personal`), el de una dirección (`d-9`, solo lo dirigido a
|
|
290
|
+
// ella) o el de un departamento (`p-<id>`); una dirección con sus departamentos son varios. Sin ellos, todos los suyos
|
|
291
|
+
filters?: { search?: string; state?: DocumentInboxState; mailboxes?: string[] };
|
|
287
292
|
actor: DocumentActor;
|
|
288
293
|
};
|
|
289
294
|
response: RpcPage<DocumentInboxItemEntity[]>;
|
|
@@ -416,6 +421,18 @@ export interface DocumentContract {
|
|
|
416
421
|
};
|
|
417
422
|
response: DocumentDeriveResponseEntity;
|
|
418
423
|
};
|
|
424
|
+
/**
|
|
425
|
+
* Agrega destinatarios a un documento ya finalizado (las áreas o personas que faltaron): les llega de inmediato y
|
|
426
|
+
* queda en la trazabilidad quién los agregó. Lo hace quien lo redactó o, con `viewAll`, quien lleva el historial.
|
|
427
|
+
*/
|
|
428
|
+
[DocumentPatterns.addRecipients]: {
|
|
429
|
+
payload: Pick<DocumentEntity, 'id'> & {
|
|
430
|
+
recipients: DocumentRecipientInput[];
|
|
431
|
+
actor: DocumentActor;
|
|
432
|
+
viewAll?: boolean;
|
|
433
|
+
};
|
|
434
|
+
response: DocumentAddRecipientsResponseEntity;
|
|
435
|
+
};
|
|
419
436
|
/** Quien recibió un documento lo marca como atendido, con una nota opcional. */
|
|
420
437
|
[DocumentPatterns.closeDelivery]: {
|
|
421
438
|
payload: { deliveryId: DocumentDeliveryEntity['id']; note?: string | null; actor: DocumentActor };
|
|
@@ -329,6 +329,8 @@ export interface DocumentGetByIdResponseEntity {
|
|
|
329
329
|
// Puede derivarlo a otros funcionarios y responderlo: el documento ya es oficial y está a su alcance.
|
|
330
330
|
canDerive: boolean;
|
|
331
331
|
canReply: boolean;
|
|
332
|
+
// Ya finalizado, puede agregarle destinatarios (quien lo redactó o quien lleva el historial).
|
|
333
|
+
canAddRecipients: boolean;
|
|
332
334
|
// Es quien redactó un documento en tramitación: puede pasar un turno pendiente a otro funcionario.
|
|
333
335
|
canReassign: boolean;
|
|
334
336
|
/** Quien consulta redactó el documento (o lo ingresó, si llegó por DocDigital). */
|
|
@@ -461,6 +463,13 @@ export interface DocumentPublicFileResponseEntity {
|
|
|
461
463
|
fileName: string;
|
|
462
464
|
}
|
|
463
465
|
|
|
466
|
+
export interface DocumentAddRecipientsResponseEntity {
|
|
467
|
+
id: DocumentEntity['id'];
|
|
468
|
+
ok: boolean;
|
|
469
|
+
// Cuántas entregas nuevas hubo (una por persona y una por área); lo que ya era destinatario no se repite.
|
|
470
|
+
delivered: number;
|
|
471
|
+
}
|
|
472
|
+
|
|
464
473
|
export interface DocumentDeriveResponseEntity {
|
|
465
474
|
id: DocumentEntity['id'];
|
|
466
475
|
ok: boolean;
|