@muni-sanfer/types-gestor-documental 0.0.1-beta.50 → 0.0.1-beta.52
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 +22 -1
- package/dist/base/entities.js +7 -2
- package/dist/contracts/documentType.contract.d.ts +19 -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 +20 -1
- package/package.json +1 -1
- package/src/base/entities.ts +26 -1
- package/src/contracts/documentType.contract.ts +25 -1
- package/src/entities/document/document.entity.ts +4 -0
- package/src/entities/documentType/documentType.entity.ts +29 -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,9 @@ export interface DocumentTypeEntity {
|
|
|
437
443
|
correlativeYear?: number | null;
|
|
438
444
|
resetsYearly: boolean;
|
|
439
445
|
numbered: boolean;
|
|
446
|
+
numberingScope: DocumentNumberingScope;
|
|
447
|
+
allowsExternalNumber: boolean;
|
|
448
|
+
usesPartsOffice: boolean;
|
|
440
449
|
activeTransparency: boolean;
|
|
441
450
|
transparencySection?: string | null;
|
|
442
451
|
directorateCodeReference?: number | null;
|
|
@@ -474,6 +483,8 @@ export interface DocumentEntity {
|
|
|
474
483
|
correlative?: number | null;
|
|
475
484
|
correlativeYear?: number | null;
|
|
476
485
|
numberedAt?: string | null;
|
|
486
|
+
externalCorrelative?: number | null;
|
|
487
|
+
externalCorrelativeYear?: number | null;
|
|
477
488
|
verificationCode?: string | null;
|
|
478
489
|
signatureSheet: boolean;
|
|
479
490
|
annulledAt?: string | null;
|
|
@@ -644,6 +655,13 @@ export interface DocumentDeliveryEntity {
|
|
|
644
655
|
documentId: string;
|
|
645
656
|
createdAt: string;
|
|
646
657
|
}
|
|
658
|
+
export interface CategoryNumberingEntity {
|
|
659
|
+
category: DocumentCategory;
|
|
660
|
+
nextCorrelative: number;
|
|
661
|
+
correlativeYear?: number | null;
|
|
662
|
+
resetsYearly: boolean;
|
|
663
|
+
updatedAt: string;
|
|
664
|
+
}
|
|
647
665
|
export interface DocumentTypeVersionEntity {
|
|
648
666
|
id: string;
|
|
649
667
|
version: number;
|
|
@@ -652,6 +670,9 @@ export interface DocumentTypeVersionEntity {
|
|
|
652
670
|
category: DocumentCategory;
|
|
653
671
|
description?: string | null;
|
|
654
672
|
numbered: boolean;
|
|
673
|
+
numberingScope: DocumentNumberingScope;
|
|
674
|
+
allowsExternalNumber: boolean;
|
|
675
|
+
usesPartsOffice: boolean;
|
|
655
676
|
activeTransparency: boolean;
|
|
656
677
|
transparencySection?: string | null;
|
|
657
678
|
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,9 @@ export interface DocumentTypeWritePayload {
|
|
|
35
37
|
nextCorrelative?: number;
|
|
36
38
|
resetsYearly?: boolean;
|
|
37
39
|
numbered?: boolean;
|
|
40
|
+
numberingScope?: DocumentNumberingScope;
|
|
41
|
+
allowsExternalNumber?: boolean;
|
|
42
|
+
usesPartsOffice?: boolean;
|
|
38
43
|
/** Transparencia Activa: sus documentos se publican cada mes, en esta sección del Portal. */
|
|
39
44
|
activeTransparency?: boolean;
|
|
40
45
|
transparencySection?: string | null;
|
|
@@ -83,4 +88,16 @@ export interface DocumentTypeContract {
|
|
|
83
88
|
payload: Pick<DocumentTypeEntity, 'id' | 'enabled'>;
|
|
84
89
|
response: DocumentTypeUpdateResponseEntity;
|
|
85
90
|
};
|
|
91
|
+
[DocumentTypePatterns.getCategoryNumbering]: {
|
|
92
|
+
payload: Record<string, never>;
|
|
93
|
+
response: CategoryNumberingResponseEntity[];
|
|
94
|
+
};
|
|
95
|
+
[DocumentTypePatterns.updateCategoryNumbering]: {
|
|
96
|
+
payload: {
|
|
97
|
+
category: DocumentCategory;
|
|
98
|
+
nextCorrelative?: number;
|
|
99
|
+
resetsYearly?: boolean;
|
|
100
|
+
};
|
|
101
|
+
response: CategoryNumberingUpdateResponseEntity;
|
|
102
|
+
};
|
|
86
103
|
}
|
|
@@ -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,9 @@ 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'];
|
|
27
|
+
usesPartsOffice: DocumentTypeEntity['usesPartsOffice'];
|
|
25
28
|
/** Transparencia Activa: sus documentos se publican cada mes, en esta sección del Portal. */
|
|
26
29
|
activeTransparency: DocumentTypeEntity['activeTransparency'];
|
|
27
30
|
transparencySection: DocumentTypeEntity['transparencySection'];
|
|
@@ -73,6 +76,22 @@ export interface DocumentTypeGetByIdResponseEntity extends DocumentTypeGetAllRes
|
|
|
73
76
|
template: DocumentTypeTemplateResponseEntity | null;
|
|
74
77
|
versions: DocumentTypeVersionResponseEntity[];
|
|
75
78
|
}
|
|
79
|
+
/** Correlativo de una categoría: una sola serie para los tipos que lo heredan. */
|
|
80
|
+
export interface CategoryNumberingResponseEntity {
|
|
81
|
+
category: DocumentCategory;
|
|
82
|
+
nextCorrelative: number;
|
|
83
|
+
correlativeYear: number | null;
|
|
84
|
+
resetsYearly: boolean;
|
|
85
|
+
lastCorrelative: number | null;
|
|
86
|
+
documentTypes: {
|
|
87
|
+
id: string;
|
|
88
|
+
name: string;
|
|
89
|
+
}[];
|
|
90
|
+
}
|
|
91
|
+
export interface CategoryNumberingUpdateResponseEntity {
|
|
92
|
+
id: DocumentCategory;
|
|
93
|
+
ok: boolean;
|
|
94
|
+
}
|
|
76
95
|
export interface DocumentTypeCreateResponseEntity {
|
|
77
96
|
id: DocumentTypeEntity['id'];
|
|
78
97
|
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,9 @@ export interface DocumentTypeEntity {
|
|
|
643
652
|
correlativeYear?: number | null;
|
|
644
653
|
resetsYearly: boolean;
|
|
645
654
|
numbered: boolean;
|
|
655
|
+
numberingScope: DocumentNumberingScope;
|
|
656
|
+
allowsExternalNumber: boolean;
|
|
657
|
+
usesPartsOffice: boolean;
|
|
646
658
|
activeTransparency: boolean;
|
|
647
659
|
transparencySection?: string | null;
|
|
648
660
|
directorateCodeReference?: number | null;
|
|
@@ -681,6 +693,8 @@ export interface DocumentEntity {
|
|
|
681
693
|
correlative?: number | null;
|
|
682
694
|
correlativeYear?: number | null;
|
|
683
695
|
numberedAt?: string | null;
|
|
696
|
+
externalCorrelative?: number | null;
|
|
697
|
+
externalCorrelativeYear?: number | null;
|
|
684
698
|
verificationCode?: string | null;
|
|
685
699
|
signatureSheet: boolean;
|
|
686
700
|
annulledAt?: string | null;
|
|
@@ -859,6 +873,14 @@ export interface DocumentDeliveryEntity {
|
|
|
859
873
|
createdAt: string;
|
|
860
874
|
}
|
|
861
875
|
|
|
876
|
+
export interface CategoryNumberingEntity {
|
|
877
|
+
category: DocumentCategory;
|
|
878
|
+
nextCorrelative: number;
|
|
879
|
+
correlativeYear?: number | null;
|
|
880
|
+
resetsYearly: boolean;
|
|
881
|
+
updatedAt: string;
|
|
882
|
+
}
|
|
883
|
+
|
|
862
884
|
export interface DocumentTypeVersionEntity {
|
|
863
885
|
id: string;
|
|
864
886
|
version: number;
|
|
@@ -867,6 +889,9 @@ export interface DocumentTypeVersionEntity {
|
|
|
867
889
|
category: DocumentCategory;
|
|
868
890
|
description?: string | null;
|
|
869
891
|
numbered: boolean;
|
|
892
|
+
numberingScope: DocumentNumberingScope;
|
|
893
|
+
allowsExternalNumber: boolean;
|
|
894
|
+
usesPartsOffice: boolean;
|
|
870
895
|
activeTransparency: boolean;
|
|
871
896
|
transparencySection?: string | null;
|
|
872
897
|
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,12 @@ 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;
|
|
57
|
+
// Pasa por Oficina de Partes (por omisión, sí). Sin ella, el documento solo se firma: va solo a funcionarios y áreas.
|
|
58
|
+
usesPartsOffice?: boolean;
|
|
44
59
|
/** Transparencia Activa: sus documentos se publican cada mes, en esta sección del Portal. */
|
|
45
60
|
activeTransparency?: boolean;
|
|
46
61
|
transparencySection?: string | null;
|
|
@@ -97,4 +112,13 @@ export interface DocumentTypeContract {
|
|
|
97
112
|
payload: Pick<DocumentTypeEntity, 'id' | 'enabled'>;
|
|
98
113
|
response: DocumentTypeUpdateResponseEntity;
|
|
99
114
|
};
|
|
115
|
+
// El correlativo de cada categoría (Decreto, Comunicación, Otro)
|
|
116
|
+
[DocumentTypePatterns.getCategoryNumbering]: {
|
|
117
|
+
payload: Record<string, never>;
|
|
118
|
+
response: CategoryNumberingResponseEntity[];
|
|
119
|
+
};
|
|
120
|
+
[DocumentTypePatterns.updateCategoryNumbering]: {
|
|
121
|
+
payload: { category: DocumentCategory; nextCorrelative?: number; resetsYearly?: boolean };
|
|
122
|
+
response: CategoryNumberingUpdateResponseEntity;
|
|
123
|
+
};
|
|
100
124
|
}
|
|
@@ -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,14 @@ 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'];
|
|
35
|
+
// Pasa por Oficina de Partes: sus documentos pueden ir a otras instituciones y con copias por correo. Sin ella,
|
|
36
|
+
// solo se firman y van a funcionarios y áreas de la municipalidad.
|
|
37
|
+
usesPartsOffice: DocumentTypeEntity['usesPartsOffice'];
|
|
30
38
|
/** Transparencia Activa: sus documentos se publican cada mes, en esta sección del Portal. */
|
|
31
39
|
activeTransparency: DocumentTypeEntity['activeTransparency'];
|
|
32
40
|
transparencySection: DocumentTypeEntity['transparencySection'];
|
|
@@ -81,6 +89,26 @@ export interface DocumentTypeGetByIdResponseEntity extends DocumentTypeGetAllRes
|
|
|
81
89
|
versions: DocumentTypeVersionResponseEntity[];
|
|
82
90
|
}
|
|
83
91
|
|
|
92
|
+
/** Correlativo de una categoría: una sola serie para los tipos que lo heredan. */
|
|
93
|
+
export interface CategoryNumberingResponseEntity {
|
|
94
|
+
category: DocumentCategory;
|
|
95
|
+
nextCorrelative: number;
|
|
96
|
+
// Año al que pertenece `nextCorrelative` (sin valor hasta numerar el primer documento).
|
|
97
|
+
correlativeYear: number | null;
|
|
98
|
+
resetsYearly: boolean;
|
|
99
|
+
// Ú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
|
|
100
|
+
// quedar en él ni por debajo.
|
|
101
|
+
lastCorrelative: number | null;
|
|
102
|
+
// Tipos que lo heredan.
|
|
103
|
+
documentTypes: { id: string; name: string }[];
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export interface CategoryNumberingUpdateResponseEntity {
|
|
107
|
+
// La categoría (como id, para la bitácora de configuración).
|
|
108
|
+
id: DocumentCategory;
|
|
109
|
+
ok: boolean;
|
|
110
|
+
}
|
|
111
|
+
|
|
84
112
|
export interface DocumentTypeCreateResponseEntity {
|
|
85
113
|
id: DocumentTypeEntity['id'];
|
|
86
114
|
ok: boolean;
|