@muni-sanfer/types-gestor-documental 0.0.1-beta.54 → 0.0.1-beta.55
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 +8 -0
- package/dist/base/entities.js +6 -2
- package/dist/contracts/document.contract.d.ts +2 -0
- package/dist/entities/document/document.entity.d.ts +19 -1
- package/package.json +1 -1
- package/src/base/entities.ts +10 -0
- package/src/contracts/document.contract.ts +3 -0
- package/src/entities/document/document.entity.ts +20 -1
package/dist/base/entities.d.ts
CHANGED
|
@@ -70,6 +70,11 @@ export declare const DocumentTrackingAction: {
|
|
|
70
70
|
DraftReviewRejected: "DraftReviewRejected";
|
|
71
71
|
DraftReviewCancelled: "DraftReviewCancelled";
|
|
72
72
|
};
|
|
73
|
+
export type DraftReviewStage = 'Draft' | 'Official';
|
|
74
|
+
export declare const DraftReviewStage: {
|
|
75
|
+
Draft: "Draft";
|
|
76
|
+
Official: "Official";
|
|
77
|
+
};
|
|
73
78
|
export type DraftReviewStatus = 'Pending' | 'Approved' | 'Rejected' | 'Cancelled';
|
|
74
79
|
export declare const DraftReviewStatus: {
|
|
75
80
|
Pending: "Pending";
|
|
@@ -512,6 +517,8 @@ export interface DocumentEntity {
|
|
|
512
517
|
departmentId?: string | null;
|
|
513
518
|
issuingUnitName?: string | null;
|
|
514
519
|
issuingDirectorateName?: string | null;
|
|
520
|
+
selfValidated: boolean;
|
|
521
|
+
selfValidationNote?: string | null;
|
|
515
522
|
createdByEmployeeId: string;
|
|
516
523
|
createdByFullName: string;
|
|
517
524
|
originalFileId: string;
|
|
@@ -1023,6 +1030,7 @@ export interface DocumentDraftReviewEntity {
|
|
|
1023
1030
|
documentId: string;
|
|
1024
1031
|
document?: DocumentEntity;
|
|
1025
1032
|
round: number;
|
|
1033
|
+
stage: DraftReviewStage;
|
|
1026
1034
|
versionNumber: number;
|
|
1027
1035
|
directorateCodeReference: number;
|
|
1028
1036
|
directorateName: string;
|
package/dist/base/entities.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// This file was auto-generated by prisma-generator-typescript-interfaces
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.
|
|
5
|
-
exports.DraftingRequestEventAction = exports.DraftingRequestStatus = exports.MailAuthentication = exports.MailIntakeStatus = exports.DeskFileTarget = exports.DeskFileSource = exports.DataBreachNoticeMeans = void 0;
|
|
4
|
+
exports.DataBreachStatus = exports.DataBreachKind = exports.DataRightsEventAction = exports.DataRightsResolution = exports.DataRightsRequestStatus = exports.DataRightsChannel = exports.DataRight = exports.DataLegalBasis = exports.TransparencyStatus = exports.AccessRequestEventAction = exports.AccessRequestResolution = exports.AccessRequestStatus = exports.AccessRequestChannel = exports.DispositionKind = exports.FinalDisposition = exports.AuditAction = exports.AuditEntity = exports.DocumentAccessAction = exports.QualityMetricKey = exports.ServiceOutageKind = exports.WorkFolderItemKind = exports.HolidaySource = exports.TextSnippetSection = exports.ScanSessionStatus = exports.CaseFileAccessAction = exports.CaseFileTrackingAction = exports.CaseFileActorType = exports.CaseFileActorRelation = exports.CaseFileEntryKind = exports.CaseFileActuationType = exports.CaseFileIncorporationMechanism = exports.CaseFileStatus = exports.DocumentInstruction = exports.DocumentDeliveryOrigin = exports.DocumentRecipientType = exports.DocumentAttachmentType = exports.DocumentFlowStepType = exports.DocDigitalInboundStatus = exports.DocumentDispatchStatus = exports.CommunicationMeans = exports.DocumentOrigin = exports.DraftReviewStatus = exports.DraftReviewStage = exports.DocumentTrackingAction = exports.DocumentParticipantStatus = exports.DocumentParticipantRole = exports.DocumentAccessLevel = exports.DocumentStatus = exports.DocumentNumberingScope = exports.DocumentCategory = void 0;
|
|
5
|
+
exports.DraftingRequestEventAction = exports.DraftingRequestStatus = exports.MailAuthentication = exports.MailIntakeStatus = exports.DeskFileTarget = exports.DeskFileSource = exports.DataBreachNoticeMeans = exports.DataBreachEventAction = void 0;
|
|
6
6
|
exports.DocumentCategory = {
|
|
7
7
|
Decree: 'Decree',
|
|
8
8
|
Communication: 'Communication',
|
|
@@ -68,6 +68,10 @@ exports.DocumentTrackingAction = {
|
|
|
68
68
|
DraftReviewRejected: 'DraftReviewRejected',
|
|
69
69
|
DraftReviewCancelled: 'DraftReviewCancelled',
|
|
70
70
|
};
|
|
71
|
+
exports.DraftReviewStage = {
|
|
72
|
+
Draft: 'Draft',
|
|
73
|
+
Official: 'Official',
|
|
74
|
+
};
|
|
71
75
|
exports.DraftReviewStatus = {
|
|
72
76
|
Pending: 'Pending',
|
|
73
77
|
Approved: 'Approved',
|
|
@@ -92,6 +92,8 @@ export interface DocumentWritePayload extends Pick<DocumentEntity, 'subject' | '
|
|
|
92
92
|
departmentId?: string | null;
|
|
93
93
|
issuingUnitName?: string | null;
|
|
94
94
|
issuingDirectorateName?: string | null;
|
|
95
|
+
selfValidated?: boolean;
|
|
96
|
+
selfValidationNote?: string | null;
|
|
95
97
|
externalCorrelative?: number | null;
|
|
96
98
|
externalCorrelativeYear?: number | null;
|
|
97
99
|
file: {
|
|
@@ -211,6 +211,8 @@ export interface DocumentGetByIdResponseEntity {
|
|
|
211
211
|
* más reciente primero) y si la versión vigente ya está aprobada. `null` si el tipo no la exige.
|
|
212
212
|
*/
|
|
213
213
|
draftReview: DocumentDraftReviewInfoEntity | null;
|
|
214
|
+
/** Se subió como validado: no pasó por la revisión del tipo. */
|
|
215
|
+
selfValidation: DocumentSelfValidationEntity | null;
|
|
214
216
|
/** Solicitud de redacción que atiende, si se redactó a pedido de otra área. */
|
|
215
217
|
draftingRequest: DocumentDraftingRequestEntity | null;
|
|
216
218
|
replies: DocumentLinkEntity[];
|
|
@@ -304,6 +306,8 @@ export interface DocumentCreateResponseEntity {
|
|
|
304
306
|
export interface DocumentUpdateResponseEntity {
|
|
305
307
|
id: DocumentEntity['id'];
|
|
306
308
|
ok: boolean;
|
|
309
|
+
/** Se envió con el borrador aprobado: el documento oficial quedó en revisión (hay que avisar a quien lo revisa). */
|
|
310
|
+
officialReview?: DocumentDraftReviewResponseEntity;
|
|
307
311
|
}
|
|
308
312
|
export interface DocumentReviewResponseEntity {
|
|
309
313
|
id: DocumentEntity['id'];
|
|
@@ -683,6 +687,8 @@ export interface DocumentCommentsResponseEntity {
|
|
|
683
687
|
export interface DocumentDraftReviewRoundEntity {
|
|
684
688
|
id: string;
|
|
685
689
|
round: number;
|
|
690
|
+
/** Qué se revisó: el borrador (su contenido) o el documento oficial, antes de entrar a tramitación. */
|
|
691
|
+
stage: 'Draft' | 'Official';
|
|
686
692
|
/** Versión del borrador que se revisó. */
|
|
687
693
|
versionNumber: number;
|
|
688
694
|
directorateName: string;
|
|
@@ -699,20 +705,32 @@ export interface DocumentDraftReviewInfoEntity {
|
|
|
699
705
|
directorateCodeReference: number;
|
|
700
706
|
directorateName: string;
|
|
701
707
|
rounds: DocumentDraftReviewRoundEntity[];
|
|
702
|
-
/**
|
|
708
|
+
/**
|
|
709
|
+
* La versión vigente del borrador está aprobada: quien redacta completa visación, firma y destinatarios y lo envía,
|
|
710
|
+
* y el documento oficial va a revisión de quien aprobó el borrador.
|
|
711
|
+
*/
|
|
703
712
|
approved: boolean;
|
|
704
713
|
/** Hay una ronda esperando respuesta: el borrador no se edita mientras tanto. */
|
|
705
714
|
pending: boolean;
|
|
715
|
+
/** Qué espera la ronda pendiente, si la hay. */
|
|
716
|
+
pendingStage: DocumentDraftReviewRoundEntity['stage'] | null;
|
|
717
|
+
}
|
|
718
|
+
/** PDF subido que quien redacta declaró validado, con su justificación: se saltó la revisión que exige el tipo. */
|
|
719
|
+
export interface DocumentSelfValidationEntity {
|
|
720
|
+
note: string;
|
|
706
721
|
}
|
|
707
722
|
/** Resultado de pedir, resolver o retirar una revisión del borrador. */
|
|
708
723
|
export interface DocumentDraftReviewResponseEntity {
|
|
709
724
|
id: string;
|
|
710
725
|
ok: boolean;
|
|
711
726
|
round: number;
|
|
727
|
+
stage: DocumentDraftReviewRoundEntity['stage'];
|
|
712
728
|
status: DocumentDraftReviewRoundEntity['status'];
|
|
713
729
|
/** A quién avisar: la jefatura revisora (al pedirla) o el redactor (al resolverla). */
|
|
714
730
|
notify: {
|
|
715
731
|
employeeId: string;
|
|
716
732
|
fullName: string;
|
|
717
733
|
} | null;
|
|
734
|
+
/** Al aprobar el oficial, el documento entró a tramitación: hay que avisar a quien tiene el primer turno. */
|
|
735
|
+
submitted?: boolean;
|
|
718
736
|
}
|
package/package.json
CHANGED
package/src/base/entities.ts
CHANGED
|
@@ -116,6 +116,13 @@ export const DocumentTrackingAction = {
|
|
|
116
116
|
DraftReviewCancelled: 'DraftReviewCancelled',
|
|
117
117
|
} satisfies Record<string, DocumentTrackingAction>;
|
|
118
118
|
|
|
119
|
+
export type DraftReviewStage = 'Draft' | 'Official';
|
|
120
|
+
|
|
121
|
+
export const DraftReviewStage = {
|
|
122
|
+
Draft: 'Draft',
|
|
123
|
+
Official: 'Official',
|
|
124
|
+
} satisfies Record<string, DraftReviewStage>;
|
|
125
|
+
|
|
119
126
|
export type DraftReviewStatus = 'Pending' | 'Approved' | 'Rejected' | 'Cancelled';
|
|
120
127
|
|
|
121
128
|
export const DraftReviewStatus = {
|
|
@@ -722,6 +729,8 @@ export interface DocumentEntity {
|
|
|
722
729
|
departmentId?: string | null;
|
|
723
730
|
issuingUnitName?: string | null;
|
|
724
731
|
issuingDirectorateName?: string | null;
|
|
732
|
+
selfValidated: boolean;
|
|
733
|
+
selfValidationNote?: string | null;
|
|
725
734
|
createdByEmployeeId: string;
|
|
726
735
|
createdByFullName: string;
|
|
727
736
|
originalFileId: string;
|
|
@@ -1264,6 +1273,7 @@ export interface DocumentDraftReviewEntity {
|
|
|
1264
1273
|
documentId: string;
|
|
1265
1274
|
document?: DocumentEntity;
|
|
1266
1275
|
round: number;
|
|
1276
|
+
stage: DraftReviewStage;
|
|
1267
1277
|
versionNumber: number;
|
|
1268
1278
|
directorateCodeReference: number;
|
|
1269
1279
|
directorateName: string;
|
|
@@ -134,6 +134,9 @@ export interface DocumentWritePayload extends Pick<DocumentEntity, 'subject' | '
|
|
|
134
134
|
// Nombres del área responsable y de su dirección: los pone el gateway, no el navegador.
|
|
135
135
|
issuingUnitName?: string | null;
|
|
136
136
|
issuingDirectorateName?: string | null;
|
|
137
|
+
// PDF subido que quien redacta declara validado, con su justificación: no pasa por la revisión que exige el tipo.
|
|
138
|
+
selfValidated?: boolean;
|
|
139
|
+
selfValidationNote?: string | null;
|
|
137
140
|
// El documento llegó ya numerado (su tipo lo admite): su número y año.
|
|
138
141
|
externalCorrelative?: number | null;
|
|
139
142
|
externalCorrelativeYear?: number | null;
|
|
@@ -244,6 +244,8 @@ export interface DocumentGetByIdResponseEntity {
|
|
|
244
244
|
* más reciente primero) y si la versión vigente ya está aprobada. `null` si el tipo no la exige.
|
|
245
245
|
*/
|
|
246
246
|
draftReview: DocumentDraftReviewInfoEntity | null;
|
|
247
|
+
/** Se subió como validado: no pasó por la revisión del tipo. */
|
|
248
|
+
selfValidation: DocumentSelfValidationEntity | null;
|
|
247
249
|
/** Solicitud de redacción que atiende, si se redactó a pedido de otra área. */
|
|
248
250
|
draftingRequest: DocumentDraftingRequestEntity | null;
|
|
249
251
|
replies: DocumentLinkEntity[];
|
|
@@ -338,6 +340,8 @@ export interface DocumentCreateResponseEntity {
|
|
|
338
340
|
export interface DocumentUpdateResponseEntity {
|
|
339
341
|
id: DocumentEntity['id'];
|
|
340
342
|
ok: boolean;
|
|
343
|
+
/** Se envió con el borrador aprobado: el documento oficial quedó en revisión (hay que avisar a quien lo revisa). */
|
|
344
|
+
officialReview?: DocumentDraftReviewResponseEntity;
|
|
341
345
|
}
|
|
342
346
|
|
|
343
347
|
export interface DocumentReviewResponseEntity {
|
|
@@ -721,6 +725,8 @@ export interface DocumentCommentsResponseEntity {
|
|
|
721
725
|
export interface DocumentDraftReviewRoundEntity {
|
|
722
726
|
id: string;
|
|
723
727
|
round: number;
|
|
728
|
+
/** Qué se revisó: el borrador (su contenido) o el documento oficial, antes de entrar a tramitación. */
|
|
729
|
+
stage: 'Draft' | 'Official';
|
|
724
730
|
/** Versión del borrador que se revisó. */
|
|
725
731
|
versionNumber: number;
|
|
726
732
|
directorateName: string;
|
|
@@ -738,10 +744,20 @@ export interface DocumentDraftReviewInfoEntity {
|
|
|
738
744
|
directorateCodeReference: number;
|
|
739
745
|
directorateName: string;
|
|
740
746
|
rounds: DocumentDraftReviewRoundEntity[];
|
|
741
|
-
/**
|
|
747
|
+
/**
|
|
748
|
+
* La versión vigente del borrador está aprobada: quien redacta completa visación, firma y destinatarios y lo envía,
|
|
749
|
+
* y el documento oficial va a revisión de quien aprobó el borrador.
|
|
750
|
+
*/
|
|
742
751
|
approved: boolean;
|
|
743
752
|
/** Hay una ronda esperando respuesta: el borrador no se edita mientras tanto. */
|
|
744
753
|
pending: boolean;
|
|
754
|
+
/** Qué espera la ronda pendiente, si la hay. */
|
|
755
|
+
pendingStage: DocumentDraftReviewRoundEntity['stage'] | null;
|
|
756
|
+
}
|
|
757
|
+
|
|
758
|
+
/** PDF subido que quien redacta declaró validado, con su justificación: se saltó la revisión que exige el tipo. */
|
|
759
|
+
export interface DocumentSelfValidationEntity {
|
|
760
|
+
note: string;
|
|
745
761
|
}
|
|
746
762
|
|
|
747
763
|
/** Resultado de pedir, resolver o retirar una revisión del borrador. */
|
|
@@ -749,7 +765,10 @@ export interface DocumentDraftReviewResponseEntity {
|
|
|
749
765
|
id: string;
|
|
750
766
|
ok: boolean;
|
|
751
767
|
round: number;
|
|
768
|
+
stage: DocumentDraftReviewRoundEntity['stage'];
|
|
752
769
|
status: DocumentDraftReviewRoundEntity['status'];
|
|
753
770
|
/** A quién avisar: la jefatura revisora (al pedirla) o el redactor (al resolverla). */
|
|
754
771
|
notify: { employeeId: string; fullName: string } | null;
|
|
772
|
+
/** Al aprobar el oficial, el documento entró a tramitación: hay que avisar a quien tiene el primer turno. */
|
|
773
|
+
submitted?: boolean;
|
|
755
774
|
}
|