@muni-sanfer/types-gestor-documental 0.0.1-beta.50 → 0.0.1-beta.51
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 +20 -1
- package/dist/base/entities.js +7 -2
- package/dist/contracts/documentType.contract.d.ts +18 -2
- package/dist/contracts/documentType.contract.js +2 -0
- package/dist/contracts/index.d.ts +2 -0
- package/dist/entities/document/document.entity.d.ts +2 -0
- package/dist/entities/documentType/documentType.entity.d.ts +19 -1
- package/package.json +1 -1
- package/src/base/entities.ts +24 -1
- package/src/contracts/documentType.contract.ts +23 -1
- package/src/entities/document/document.entity.ts +4 -0
- package/src/entities/documentType/documentType.entity.ts +26 -1
package/dist/base/entities.d.ts
CHANGED
|
@@ -4,6 +4,11 @@ export declare const DocumentCategory: {
|
|
|
4
4
|
Communication: "Communication";
|
|
5
5
|
Other: "Other";
|
|
6
6
|
};
|
|
7
|
+
export type DocumentNumberingScope = 'Type' | 'Category';
|
|
8
|
+
export declare const DocumentNumberingScope: {
|
|
9
|
+
Type: "Type";
|
|
10
|
+
Category: "Category";
|
|
11
|
+
};
|
|
7
12
|
export type DocumentStatus = 'Drafted' | 'PendingVisa' | 'PendingSignature' | 'Finished' | 'Rejected' | 'Discarded' | 'Annulled';
|
|
8
13
|
export declare const DocumentStatus: {
|
|
9
14
|
Drafted: "Drafted";
|
|
@@ -236,7 +241,7 @@ export declare const DocumentAccessAction: {
|
|
|
236
241
|
FileDownloaded: "FileDownloaded";
|
|
237
242
|
TrailExported: "TrailExported";
|
|
238
243
|
};
|
|
239
|
-
export type AuditEntity = 'DocumentType' | 'IssuingEntity' | 'ArchivalSeries' | 'TextSnippet' | 'Holiday' | 'Procedure' | 'QualityMetric' | 'ServiceOutage' | 'Repository' | 'DataTreatment' | 'DocumentTemplate' | 'DirectorateReviewer';
|
|
244
|
+
export type AuditEntity = 'DocumentType' | 'IssuingEntity' | 'ArchivalSeries' | 'TextSnippet' | 'Holiday' | 'Procedure' | 'QualityMetric' | 'ServiceOutage' | 'Repository' | 'DataTreatment' | 'DocumentTemplate' | 'DirectorateReviewer' | 'CategoryNumbering';
|
|
240
245
|
export declare const AuditEntity: {
|
|
241
246
|
DocumentType: "DocumentType";
|
|
242
247
|
IssuingEntity: "IssuingEntity";
|
|
@@ -250,6 +255,7 @@ export declare const AuditEntity: {
|
|
|
250
255
|
DataTreatment: "DataTreatment";
|
|
251
256
|
DocumentTemplate: "DocumentTemplate";
|
|
252
257
|
DirectorateReviewer: "DirectorateReviewer";
|
|
258
|
+
CategoryNumbering: "CategoryNumbering";
|
|
253
259
|
};
|
|
254
260
|
export type AuditAction = 'Created' | 'Updated' | 'Enabled' | 'Disabled' | 'Removed' | 'Exported';
|
|
255
261
|
export declare const AuditAction: {
|
|
@@ -437,6 +443,8 @@ export interface DocumentTypeEntity {
|
|
|
437
443
|
correlativeYear?: number | null;
|
|
438
444
|
resetsYearly: boolean;
|
|
439
445
|
numbered: boolean;
|
|
446
|
+
numberingScope: DocumentNumberingScope;
|
|
447
|
+
allowsExternalNumber: boolean;
|
|
440
448
|
activeTransparency: boolean;
|
|
441
449
|
transparencySection?: string | null;
|
|
442
450
|
directorateCodeReference?: number | null;
|
|
@@ -474,6 +482,8 @@ export interface DocumentEntity {
|
|
|
474
482
|
correlative?: number | null;
|
|
475
483
|
correlativeYear?: number | null;
|
|
476
484
|
numberedAt?: string | null;
|
|
485
|
+
externalCorrelative?: number | null;
|
|
486
|
+
externalCorrelativeYear?: number | null;
|
|
477
487
|
verificationCode?: string | null;
|
|
478
488
|
signatureSheet: boolean;
|
|
479
489
|
annulledAt?: string | null;
|
|
@@ -644,6 +654,13 @@ export interface DocumentDeliveryEntity {
|
|
|
644
654
|
documentId: string;
|
|
645
655
|
createdAt: string;
|
|
646
656
|
}
|
|
657
|
+
export interface CategoryNumberingEntity {
|
|
658
|
+
category: DocumentCategory;
|
|
659
|
+
nextCorrelative: number;
|
|
660
|
+
correlativeYear?: number | null;
|
|
661
|
+
resetsYearly: boolean;
|
|
662
|
+
updatedAt: string;
|
|
663
|
+
}
|
|
647
664
|
export interface DocumentTypeVersionEntity {
|
|
648
665
|
id: string;
|
|
649
666
|
version: number;
|
|
@@ -652,6 +669,8 @@ export interface DocumentTypeVersionEntity {
|
|
|
652
669
|
category: DocumentCategory;
|
|
653
670
|
description?: string | null;
|
|
654
671
|
numbered: boolean;
|
|
672
|
+
numberingScope: DocumentNumberingScope;
|
|
673
|
+
allowsExternalNumber: boolean;
|
|
655
674
|
activeTransparency: boolean;
|
|
656
675
|
transparencySection?: string | null;
|
|
657
676
|
directorateCodeReference?: number | null;
|
package/dist/base/entities.js
CHANGED
|
@@ -1,13 +1,17 @@
|
|
|
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 = void 0;
|
|
4
|
+
exports.DataBreachEventAction = 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.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 = void 0;
|
|
6
6
|
exports.DocumentCategory = {
|
|
7
7
|
Decree: 'Decree',
|
|
8
8
|
Communication: 'Communication',
|
|
9
9
|
Other: 'Other',
|
|
10
10
|
};
|
|
11
|
+
exports.DocumentNumberingScope = {
|
|
12
|
+
Type: 'Type',
|
|
13
|
+
Category: 'Category',
|
|
14
|
+
};
|
|
11
15
|
exports.DocumentStatus = {
|
|
12
16
|
Drafted: 'Drafted',
|
|
13
17
|
PendingVisa: 'PendingVisa',
|
|
@@ -223,6 +227,7 @@ exports.AuditEntity = {
|
|
|
223
227
|
DataTreatment: 'DataTreatment',
|
|
224
228
|
DocumentTemplate: 'DocumentTemplate',
|
|
225
229
|
DirectorateReviewer: 'DirectorateReviewer',
|
|
230
|
+
CategoryNumbering: 'CategoryNumbering',
|
|
226
231
|
};
|
|
227
232
|
exports.AuditAction = {
|
|
228
233
|
Created: 'Created',
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type DocumentCategory, type DocumentParticipantRole, type DocumentTypeEntity } from '../base/entities';
|
|
2
|
-
import { type DocumentTemplateContent, type DocumentTypeCreateResponseEntity, type DocumentTypeGetAllResponseEntity, type DocumentTypeGetByIdResponseEntity, type DocumentTypeUpdateResponseEntity } from '../entities';
|
|
1
|
+
import { type DocumentCategory, type DocumentNumberingScope, type DocumentParticipantRole, type DocumentTypeEntity } from '../base/entities';
|
|
2
|
+
import { type CategoryNumberingResponseEntity, type CategoryNumberingUpdateResponseEntity, type DocumentTemplateContent, type DocumentTypeCreateResponseEntity, type DocumentTypeGetAllResponseEntity, type DocumentTypeGetByIdResponseEntity, type DocumentTypeUpdateResponseEntity } from '../entities';
|
|
3
3
|
import { type RpcPage } from './contract';
|
|
4
4
|
/** Patrones NATS de `documentType`: `<servicio>.<recurso>.<acción>`. */
|
|
5
5
|
export declare const DocumentTypePatterns: {
|
|
@@ -8,6 +8,8 @@ export declare const DocumentTypePatterns: {
|
|
|
8
8
|
readonly create: "gestorDocumental.documentType.create";
|
|
9
9
|
readonly update: "gestorDocumental.documentType.update";
|
|
10
10
|
readonly setEnabled: "gestorDocumental.documentType.setEnabled";
|
|
11
|
+
readonly getCategoryNumbering: "gestorDocumental.documentType.getCategoryNumbering";
|
|
12
|
+
readonly updateCategoryNumbering: "gestorDocumental.documentType.updateCategoryNumbering";
|
|
11
13
|
};
|
|
12
14
|
/**
|
|
13
15
|
* Paso del flujo sugerido de un tipo documental: un funcionario en particular, o quien dirija una dirección al
|
|
@@ -35,6 +37,8 @@ export interface DocumentTypeWritePayload {
|
|
|
35
37
|
nextCorrelative?: number;
|
|
36
38
|
resetsYearly?: boolean;
|
|
37
39
|
numbered?: boolean;
|
|
40
|
+
numberingScope?: DocumentNumberingScope;
|
|
41
|
+
allowsExternalNumber?: boolean;
|
|
38
42
|
/** Transparencia Activa: sus documentos se publican cada mes, en esta sección del Portal. */
|
|
39
43
|
activeTransparency?: boolean;
|
|
40
44
|
transparencySection?: string | null;
|
|
@@ -83,4 +87,16 @@ export interface DocumentTypeContract {
|
|
|
83
87
|
payload: Pick<DocumentTypeEntity, 'id' | 'enabled'>;
|
|
84
88
|
response: DocumentTypeUpdateResponseEntity;
|
|
85
89
|
};
|
|
90
|
+
[DocumentTypePatterns.getCategoryNumbering]: {
|
|
91
|
+
payload: Record<string, never>;
|
|
92
|
+
response: CategoryNumberingResponseEntity[];
|
|
93
|
+
};
|
|
94
|
+
[DocumentTypePatterns.updateCategoryNumbering]: {
|
|
95
|
+
payload: {
|
|
96
|
+
category: DocumentCategory;
|
|
97
|
+
nextCorrelative?: number;
|
|
98
|
+
resetsYearly?: boolean;
|
|
99
|
+
};
|
|
100
|
+
response: CategoryNumberingUpdateResponseEntity;
|
|
101
|
+
};
|
|
86
102
|
}
|
|
@@ -8,4 +8,6 @@ exports.DocumentTypePatterns = {
|
|
|
8
8
|
create: 'gestorDocumental.documentType.create',
|
|
9
9
|
update: 'gestorDocumental.documentType.update',
|
|
10
10
|
setEnabled: 'gestorDocumental.documentType.setEnabled',
|
|
11
|
+
getCategoryNumbering: 'gestorDocumental.documentType.getCategoryNumbering',
|
|
12
|
+
updateCategoryNumbering: 'gestorDocumental.documentType.updateCategoryNumbering',
|
|
11
13
|
};
|
|
@@ -63,6 +63,8 @@ export declare const GestorDocumentalPatterns: {
|
|
|
63
63
|
readonly create: "gestorDocumental.documentType.create";
|
|
64
64
|
readonly update: "gestorDocumental.documentType.update";
|
|
65
65
|
readonly setEnabled: "gestorDocumental.documentType.setEnabled";
|
|
66
|
+
readonly getCategoryNumbering: "gestorDocumental.documentType.getCategoryNumbering";
|
|
67
|
+
readonly updateCategoryNumbering: "gestorDocumental.documentType.updateCategoryNumbering";
|
|
66
68
|
};
|
|
67
69
|
readonly document: {
|
|
68
70
|
readonly getAll: "gestorDocumental.document.getAll";
|
|
@@ -158,6 +158,8 @@ export interface DocumentGetByIdResponseEntity {
|
|
|
158
158
|
correlative: DocumentEntity['correlative'];
|
|
159
159
|
correlativeYear: DocumentEntity['correlativeYear'];
|
|
160
160
|
numberedAt: DocumentEntity['numberedAt'];
|
|
161
|
+
externalCorrelative: DocumentEntity['externalCorrelative'];
|
|
162
|
+
externalCorrelativeYear: DocumentEntity['externalCorrelativeYear'];
|
|
161
163
|
directorateCodeReference: DocumentEntity['directorateCodeReference'];
|
|
162
164
|
departmentId: DocumentEntity['departmentId'];
|
|
163
165
|
createdByEmployeeId: DocumentEntity['createdByEmployeeId'];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DocumentTypeEntity, DocumentTypeFlowStepEntity } from '../../base/entities';
|
|
1
|
+
import { type DocumentCategory, DocumentTypeEntity, DocumentTypeFlowStepEntity } from '../../base/entities';
|
|
2
2
|
import { type DocumentTemplateContent } from '../documentTemplate/documentTemplate.entity';
|
|
3
3
|
/** Paso del flujo sugerido de un tipo documental: quién visa o firma, en su orden. */
|
|
4
4
|
export interface DocumentTypeFlowStepResponseEntity {
|
|
@@ -22,6 +22,8 @@ export interface DocumentTypeGetAllResponseEntity {
|
|
|
22
22
|
correlativeYear: DocumentTypeEntity['correlativeYear'];
|
|
23
23
|
resetsYearly: DocumentTypeEntity['resetsYearly'];
|
|
24
24
|
numbered: DocumentTypeEntity['numbered'];
|
|
25
|
+
numberingScope: DocumentTypeEntity['numberingScope'];
|
|
26
|
+
allowsExternalNumber: DocumentTypeEntity['allowsExternalNumber'];
|
|
25
27
|
/** Transparencia Activa: sus documentos se publican cada mes, en esta sección del Portal. */
|
|
26
28
|
activeTransparency: DocumentTypeEntity['activeTransparency'];
|
|
27
29
|
transparencySection: DocumentTypeEntity['transparencySection'];
|
|
@@ -73,6 +75,22 @@ export interface DocumentTypeGetByIdResponseEntity extends DocumentTypeGetAllRes
|
|
|
73
75
|
template: DocumentTypeTemplateResponseEntity | null;
|
|
74
76
|
versions: DocumentTypeVersionResponseEntity[];
|
|
75
77
|
}
|
|
78
|
+
/** Correlativo de una categoría: una sola serie para los tipos que lo heredan. */
|
|
79
|
+
export interface CategoryNumberingResponseEntity {
|
|
80
|
+
category: DocumentCategory;
|
|
81
|
+
nextCorrelative: number;
|
|
82
|
+
correlativeYear: number | null;
|
|
83
|
+
resetsYearly: boolean;
|
|
84
|
+
lastCorrelative: number | null;
|
|
85
|
+
documentTypes: {
|
|
86
|
+
id: string;
|
|
87
|
+
name: string;
|
|
88
|
+
}[];
|
|
89
|
+
}
|
|
90
|
+
export interface CategoryNumberingUpdateResponseEntity {
|
|
91
|
+
id: DocumentCategory;
|
|
92
|
+
ok: boolean;
|
|
93
|
+
}
|
|
76
94
|
export interface DocumentTypeCreateResponseEntity {
|
|
77
95
|
id: DocumentTypeEntity['id'];
|
|
78
96
|
ok: boolean;
|
package/package.json
CHANGED
package/src/base/entities.ts
CHANGED
|
@@ -8,6 +8,13 @@ export const DocumentCategory = {
|
|
|
8
8
|
Other: 'Other',
|
|
9
9
|
} satisfies Record<string, DocumentCategory>;
|
|
10
10
|
|
|
11
|
+
export type DocumentNumberingScope = 'Type' | 'Category';
|
|
12
|
+
|
|
13
|
+
export const DocumentNumberingScope = {
|
|
14
|
+
Type: 'Type',
|
|
15
|
+
Category: 'Category',
|
|
16
|
+
} satisfies Record<string, DocumentNumberingScope>;
|
|
17
|
+
|
|
11
18
|
export type DocumentStatus =
|
|
12
19
|
'Drafted' | 'PendingVisa' | 'PendingSignature' | 'Finished' | 'Rejected' | 'Discarded' | 'Annulled';
|
|
13
20
|
|
|
@@ -370,7 +377,8 @@ export type AuditEntity =
|
|
|
370
377
|
| 'Repository'
|
|
371
378
|
| 'DataTreatment'
|
|
372
379
|
| 'DocumentTemplate'
|
|
373
|
-
| 'DirectorateReviewer'
|
|
380
|
+
| 'DirectorateReviewer'
|
|
381
|
+
| 'CategoryNumbering';
|
|
374
382
|
|
|
375
383
|
export const AuditEntity = {
|
|
376
384
|
DocumentType: 'DocumentType',
|
|
@@ -385,6 +393,7 @@ export const AuditEntity = {
|
|
|
385
393
|
DataTreatment: 'DataTreatment',
|
|
386
394
|
DocumentTemplate: 'DocumentTemplate',
|
|
387
395
|
DirectorateReviewer: 'DirectorateReviewer',
|
|
396
|
+
CategoryNumbering: 'CategoryNumbering',
|
|
388
397
|
} satisfies Record<string, AuditEntity>;
|
|
389
398
|
|
|
390
399
|
export type AuditAction = 'Created' | 'Updated' | 'Enabled' | 'Disabled' | 'Removed' | 'Exported';
|
|
@@ -643,6 +652,8 @@ export interface DocumentTypeEntity {
|
|
|
643
652
|
correlativeYear?: number | null;
|
|
644
653
|
resetsYearly: boolean;
|
|
645
654
|
numbered: boolean;
|
|
655
|
+
numberingScope: DocumentNumberingScope;
|
|
656
|
+
allowsExternalNumber: boolean;
|
|
646
657
|
activeTransparency: boolean;
|
|
647
658
|
transparencySection?: string | null;
|
|
648
659
|
directorateCodeReference?: number | null;
|
|
@@ -681,6 +692,8 @@ export interface DocumentEntity {
|
|
|
681
692
|
correlative?: number | null;
|
|
682
693
|
correlativeYear?: number | null;
|
|
683
694
|
numberedAt?: string | null;
|
|
695
|
+
externalCorrelative?: number | null;
|
|
696
|
+
externalCorrelativeYear?: number | null;
|
|
684
697
|
verificationCode?: string | null;
|
|
685
698
|
signatureSheet: boolean;
|
|
686
699
|
annulledAt?: string | null;
|
|
@@ -859,6 +872,14 @@ export interface DocumentDeliveryEntity {
|
|
|
859
872
|
createdAt: string;
|
|
860
873
|
}
|
|
861
874
|
|
|
875
|
+
export interface CategoryNumberingEntity {
|
|
876
|
+
category: DocumentCategory;
|
|
877
|
+
nextCorrelative: number;
|
|
878
|
+
correlativeYear?: number | null;
|
|
879
|
+
resetsYearly: boolean;
|
|
880
|
+
updatedAt: string;
|
|
881
|
+
}
|
|
882
|
+
|
|
862
883
|
export interface DocumentTypeVersionEntity {
|
|
863
884
|
id: string;
|
|
864
885
|
version: number;
|
|
@@ -867,6 +888,8 @@ export interface DocumentTypeVersionEntity {
|
|
|
867
888
|
category: DocumentCategory;
|
|
868
889
|
description?: string | null;
|
|
869
890
|
numbered: boolean;
|
|
891
|
+
numberingScope: DocumentNumberingScope;
|
|
892
|
+
allowsExternalNumber: boolean;
|
|
870
893
|
activeTransparency: boolean;
|
|
871
894
|
transparencySection?: string | null;
|
|
872
895
|
directorateCodeReference?: number | null;
|
|
@@ -1,5 +1,12 @@
|
|
|
1
|
-
import { type DocumentCategory, type DocumentParticipantRole, type DocumentTypeEntity } from '../base/entities';
|
|
2
1
|
import {
|
|
2
|
+
type DocumentCategory,
|
|
3
|
+
type DocumentNumberingScope,
|
|
4
|
+
type DocumentParticipantRole,
|
|
5
|
+
type DocumentTypeEntity,
|
|
6
|
+
} from '../base/entities';
|
|
7
|
+
import {
|
|
8
|
+
type CategoryNumberingResponseEntity,
|
|
9
|
+
type CategoryNumberingUpdateResponseEntity,
|
|
3
10
|
type DocumentTemplateContent,
|
|
4
11
|
type DocumentTypeCreateResponseEntity,
|
|
5
12
|
type DocumentTypeGetAllResponseEntity,
|
|
@@ -15,6 +22,8 @@ export const DocumentTypePatterns = {
|
|
|
15
22
|
create: 'gestorDocumental.documentType.create',
|
|
16
23
|
update: 'gestorDocumental.documentType.update',
|
|
17
24
|
setEnabled: 'gestorDocumental.documentType.setEnabled',
|
|
25
|
+
getCategoryNumbering: 'gestorDocumental.documentType.getCategoryNumbering',
|
|
26
|
+
updateCategoryNumbering: 'gestorDocumental.documentType.updateCategoryNumbering',
|
|
18
27
|
} as const;
|
|
19
28
|
|
|
20
29
|
/**
|
|
@@ -41,6 +50,10 @@ export interface DocumentTypeWritePayload {
|
|
|
41
50
|
resetsYearly?: boolean;
|
|
42
51
|
// Sus documentos llevan número (por omisión, sí).
|
|
43
52
|
numbered?: boolean;
|
|
53
|
+
// Serie de sus números: la propia (por omisión) o la de su categoría. No con numeración compartida.
|
|
54
|
+
numberingScope?: DocumentNumberingScope;
|
|
55
|
+
// Sus documentos pueden llegar ya numerados (por omisión, no).
|
|
56
|
+
allowsExternalNumber?: boolean;
|
|
44
57
|
/** Transparencia Activa: sus documentos se publican cada mes, en esta sección del Portal. */
|
|
45
58
|
activeTransparency?: boolean;
|
|
46
59
|
transparencySection?: string | null;
|
|
@@ -97,4 +110,13 @@ export interface DocumentTypeContract {
|
|
|
97
110
|
payload: Pick<DocumentTypeEntity, 'id' | 'enabled'>;
|
|
98
111
|
response: DocumentTypeUpdateResponseEntity;
|
|
99
112
|
};
|
|
113
|
+
// El correlativo de cada categoría (Decreto, Comunicación, Otro)
|
|
114
|
+
[DocumentTypePatterns.getCategoryNumbering]: {
|
|
115
|
+
payload: Record<string, never>;
|
|
116
|
+
response: CategoryNumberingResponseEntity[];
|
|
117
|
+
};
|
|
118
|
+
[DocumentTypePatterns.updateCategoryNumbering]: {
|
|
119
|
+
payload: { category: DocumentCategory; nextCorrelative?: number; resetsYearly?: boolean };
|
|
120
|
+
response: CategoryNumberingUpdateResponseEntity;
|
|
121
|
+
};
|
|
100
122
|
}
|
|
@@ -178,6 +178,10 @@ export interface DocumentGetByIdResponseEntity {
|
|
|
178
178
|
correlative: DocumentEntity['correlative'];
|
|
179
179
|
correlativeYear: DocumentEntity['correlativeYear'];
|
|
180
180
|
numberedAt: DocumentEntity['numberedAt'];
|
|
181
|
+
// Número con que llegó el documento, si ya venía numerado: lo toma con la primera firma (y no se pierde si lo
|
|
182
|
+
// rechazan).
|
|
183
|
+
externalCorrelative: DocumentEntity['externalCorrelative'];
|
|
184
|
+
externalCorrelativeYear: DocumentEntity['externalCorrelativeYear'];
|
|
181
185
|
directorateCodeReference: DocumentEntity['directorateCodeReference'];
|
|
182
186
|
departmentId: DocumentEntity['departmentId'];
|
|
183
187
|
createdByEmployeeId: DocumentEntity['createdByEmployeeId'];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DocumentTypeEntity, DocumentTypeFlowStepEntity } from '../../base/entities';
|
|
1
|
+
import { type DocumentCategory, DocumentTypeEntity, DocumentTypeFlowStepEntity } from '../../base/entities';
|
|
2
2
|
import { type DocumentTemplateContent } from '../documentTemplate/documentTemplate.entity';
|
|
3
3
|
|
|
4
4
|
/** Paso del flujo sugerido de un tipo documental: quién visa o firma, en su orden. */
|
|
@@ -27,6 +27,11 @@ export interface DocumentTypeGetAllResponseEntity {
|
|
|
27
27
|
resetsYearly: DocumentTypeEntity['resetsYearly'];
|
|
28
28
|
// Sin numeración, sus documentos solo llevan fecha, código de verificación y QR.
|
|
29
29
|
numbered: DocumentTypeEntity['numbered'];
|
|
30
|
+
// Serie de sus números: la propia (`Type`) o la de su categoría (`Category`). Con `Category`, `nextCorrelative`,
|
|
31
|
+
// `correlativeYear` y `resetsYearly` son los de la categoría.
|
|
32
|
+
numberingScope: DocumentTypeEntity['numberingScope'];
|
|
33
|
+
// Sus documentos pueden llegar ya numerados: quien sube el PDF indica su número.
|
|
34
|
+
allowsExternalNumber: DocumentTypeEntity['allowsExternalNumber'];
|
|
30
35
|
/** Transparencia Activa: sus documentos se publican cada mes, en esta sección del Portal. */
|
|
31
36
|
activeTransparency: DocumentTypeEntity['activeTransparency'];
|
|
32
37
|
transparencySection: DocumentTypeEntity['transparencySection'];
|
|
@@ -81,6 +86,26 @@ export interface DocumentTypeGetByIdResponseEntity extends DocumentTypeGetAllRes
|
|
|
81
86
|
versions: DocumentTypeVersionResponseEntity[];
|
|
82
87
|
}
|
|
83
88
|
|
|
89
|
+
/** Correlativo de una categoría: una sola serie para los tipos que lo heredan. */
|
|
90
|
+
export interface CategoryNumberingResponseEntity {
|
|
91
|
+
category: DocumentCategory;
|
|
92
|
+
nextCorrelative: number;
|
|
93
|
+
// Año al que pertenece `nextCorrelative` (sin valor hasta numerar el primer documento).
|
|
94
|
+
correlativeYear: number | null;
|
|
95
|
+
resetsYearly: boolean;
|
|
96
|
+
// Último número usado en la serie en el año vigente (o en toda su historia, si no se reinicia): el próximo no puede
|
|
97
|
+
// quedar en él ni por debajo.
|
|
98
|
+
lastCorrelative: number | null;
|
|
99
|
+
// Tipos que lo heredan.
|
|
100
|
+
documentTypes: { id: string; name: string }[];
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export interface CategoryNumberingUpdateResponseEntity {
|
|
104
|
+
// La categoría (como id, para la bitácora de configuración).
|
|
105
|
+
id: DocumentCategory;
|
|
106
|
+
ok: boolean;
|
|
107
|
+
}
|
|
108
|
+
|
|
84
109
|
export interface DocumentTypeCreateResponseEntity {
|
|
85
110
|
id: DocumentTypeEntity['id'];
|
|
86
111
|
ok: boolean;
|