@muni-sanfer/types-gestor-documental 0.0.1-beta.60 → 0.0.1-beta.62
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 +10 -6
- package/dist/base/entities.js +9 -1
- package/dist/contracts/document.contract.d.ts +0 -2
- package/dist/contracts/documentType.contract.d.ts +0 -1
- package/dist/entities/document/document.entity.d.ts +0 -2
- package/dist/entities/documentType/documentCategory.d.ts +15 -0
- package/dist/entities/documentType/documentCategory.js +39 -0
- package/dist/entities/documentType/documentType.entity.d.ts +0 -1
- package/dist/entities/documentType/index.d.ts +1 -0
- package/dist/entities/documentType/index.js +1 -0
- package/package.json +1 -1
- package/src/base/entities.ts +21 -6
- package/src/contracts/document.contract.ts +0 -3
- package/src/contracts/documentType.contract.ts +0 -2
- package/src/entities/document/document.entity.ts +0 -4
- package/src/entities/documentType/documentCategory.ts +40 -0
- package/src/entities/documentType/documentType.entity.ts +0 -2
- package/src/entities/documentType/index.ts +1 -0
package/dist/base/entities.d.ts
CHANGED
|
@@ -1,7 +1,15 @@
|
|
|
1
|
-
export type DocumentCategory = 'Decree' | '
|
|
1
|
+
export type DocumentCategory = 'Letter' | 'Circular' | 'Memorandum' | 'Office' | 'Opinion' | 'Report' | 'Agreement' | 'Decree' | 'Resolution' | 'ResolutionWithReview' | 'Other';
|
|
2
2
|
export declare const DocumentCategory: {
|
|
3
|
+
Letter: "Letter";
|
|
4
|
+
Circular: "Circular";
|
|
5
|
+
Memorandum: "Memorandum";
|
|
6
|
+
Office: "Office";
|
|
7
|
+
Opinion: "Opinion";
|
|
8
|
+
Report: "Report";
|
|
9
|
+
Agreement: "Agreement";
|
|
3
10
|
Decree: "Decree";
|
|
4
|
-
|
|
11
|
+
Resolution: "Resolution";
|
|
12
|
+
ResolutionWithReview: "ResolutionWithReview";
|
|
5
13
|
Other: "Other";
|
|
6
14
|
};
|
|
7
15
|
export type DocumentVisaMode = 'Stamp' | 'Signature';
|
|
@@ -455,7 +463,6 @@ export interface DocumentTypeEntity {
|
|
|
455
463
|
resetsYearly: boolean;
|
|
456
464
|
numbered: boolean;
|
|
457
465
|
numberingScope: DocumentNumberingScope;
|
|
458
|
-
allowsExternalNumber: boolean;
|
|
459
466
|
usesPartsOffice: boolean;
|
|
460
467
|
visaMode: DocumentVisaMode;
|
|
461
468
|
activeTransparency: boolean;
|
|
@@ -495,8 +502,6 @@ export interface DocumentEntity {
|
|
|
495
502
|
correlative?: number | null;
|
|
496
503
|
correlativeYear?: number | null;
|
|
497
504
|
numberedAt?: string | null;
|
|
498
|
-
externalCorrelative?: number | null;
|
|
499
|
-
externalCorrelativeYear?: number | null;
|
|
500
505
|
verificationCode?: string | null;
|
|
501
506
|
signatureSheet: boolean;
|
|
502
507
|
annulledAt?: string | null;
|
|
@@ -689,7 +694,6 @@ export interface DocumentTypeVersionEntity {
|
|
|
689
694
|
description?: string | null;
|
|
690
695
|
numbered: boolean;
|
|
691
696
|
numberingScope: DocumentNumberingScope;
|
|
692
|
-
allowsExternalNumber: boolean;
|
|
693
697
|
usesPartsOffice: boolean;
|
|
694
698
|
visaMode: DocumentVisaMode;
|
|
695
699
|
activeTransparency: boolean;
|
package/dist/base/entities.js
CHANGED
|
@@ -4,8 +4,16 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
4
4
|
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.DocumentVisaMode = exports.DocumentCategory = void 0;
|
|
5
5
|
exports.DraftingRequestEventAction = exports.DraftingRequestStatus = exports.MailAuthentication = exports.MailIntakeStatus = exports.DeskFileTarget = exports.DeskFileSource = exports.DataBreachNoticeMeans = exports.DataBreachEventAction = exports.DataBreachStatus = void 0;
|
|
6
6
|
exports.DocumentCategory = {
|
|
7
|
+
Letter: 'Letter',
|
|
8
|
+
Circular: 'Circular',
|
|
9
|
+
Memorandum: 'Memorandum',
|
|
10
|
+
Office: 'Office',
|
|
11
|
+
Opinion: 'Opinion',
|
|
12
|
+
Report: 'Report',
|
|
13
|
+
Agreement: 'Agreement',
|
|
7
14
|
Decree: 'Decree',
|
|
8
|
-
|
|
15
|
+
Resolution: 'Resolution',
|
|
16
|
+
ResolutionWithReview: 'ResolutionWithReview',
|
|
9
17
|
Other: 'Other',
|
|
10
18
|
};
|
|
11
19
|
exports.DocumentVisaMode = {
|
|
@@ -96,8 +96,6 @@ export interface DocumentWritePayload extends Pick<DocumentEntity, 'subject' | '
|
|
|
96
96
|
stampPlacements?: DocumentStampPlacements | null;
|
|
97
97
|
selfValidated?: boolean;
|
|
98
98
|
selfValidationNote?: string | null;
|
|
99
|
-
externalCorrelative?: number | null;
|
|
100
|
-
externalCorrelativeYear?: number | null;
|
|
101
99
|
file: {
|
|
102
100
|
fileId: string;
|
|
103
101
|
name: string;
|
|
@@ -38,7 +38,6 @@ export interface DocumentTypeWritePayload {
|
|
|
38
38
|
resetsYearly?: boolean;
|
|
39
39
|
numbered?: boolean;
|
|
40
40
|
numberingScope?: DocumentNumberingScope;
|
|
41
|
-
allowsExternalNumber?: boolean;
|
|
42
41
|
usesPartsOffice?: boolean;
|
|
43
42
|
/** Transparencia Activa: sus documentos se publican cada mes, en esta sección del Portal. */
|
|
44
43
|
activeTransparency?: boolean;
|
|
@@ -169,8 +169,6 @@ export interface DocumentGetByIdResponseEntity {
|
|
|
169
169
|
correlative: DocumentEntity['correlative'];
|
|
170
170
|
correlativeYear: DocumentEntity['correlativeYear'];
|
|
171
171
|
numberedAt: DocumentEntity['numberedAt'];
|
|
172
|
-
externalCorrelative: DocumentEntity['externalCorrelative'];
|
|
173
|
-
externalCorrelativeYear: DocumentEntity['externalCorrelativeYear'];
|
|
174
172
|
directorateCodeReference: DocumentEntity['directorateCodeReference'];
|
|
175
173
|
departmentId: DocumentEntity['departmentId'];
|
|
176
174
|
responsibleArea: DocumentResponsibleAreaEntity | null;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type DocumentCategory } from '../../base/entities';
|
|
2
|
+
/**
|
|
3
|
+
* Categorías de los tipos documentales: los tipos de documento de DocDigital, con sus mismos nombres y agrupados como
|
|
4
|
+
* allí. Con la categoría, Oficina de Partes despacha con el tipo de DocDigital ya elegido, y los tipos que heredan el
|
|
5
|
+
* correlativo de su categoría comparten una serie por categoría.
|
|
6
|
+
*/
|
|
7
|
+
export declare const DOCUMENT_CATEGORY_NAME: Record<DocumentCategory, string>;
|
|
8
|
+
/** Los grupos de DocDigital, en su orden, con sus categorías. */
|
|
9
|
+
export declare const DOCUMENT_CATEGORY_GROUPS: {
|
|
10
|
+
key: string;
|
|
11
|
+
label: string;
|
|
12
|
+
categories: DocumentCategory[];
|
|
13
|
+
}[];
|
|
14
|
+
/** El grupo de DocDigital de una categoría. */
|
|
15
|
+
export declare const documentCategoryGroupOf: (category: DocumentCategory) => string;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.documentCategoryGroupOf = exports.DOCUMENT_CATEGORY_GROUPS = exports.DOCUMENT_CATEGORY_NAME = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Categorías de los tipos documentales: los tipos de documento de DocDigital, con sus mismos nombres y agrupados como
|
|
6
|
+
* allí. Con la categoría, Oficina de Partes despacha con el tipo de DocDigital ya elegido, y los tipos que heredan el
|
|
7
|
+
* correlativo de su categoría comparten una serie por categoría.
|
|
8
|
+
*/
|
|
9
|
+
exports.DOCUMENT_CATEGORY_NAME = {
|
|
10
|
+
Letter: 'Cartas',
|
|
11
|
+
Circular: 'Circulares',
|
|
12
|
+
Memorandum: 'Memorandos',
|
|
13
|
+
Office: 'Oficios',
|
|
14
|
+
Opinion: 'Dictámenes',
|
|
15
|
+
Report: 'Informes',
|
|
16
|
+
Agreement: 'Convenios',
|
|
17
|
+
Decree: 'Decretos',
|
|
18
|
+
Resolution: 'Resoluciones',
|
|
19
|
+
ResolutionWithReview: 'Resoluciones con Toma de Razón',
|
|
20
|
+
Other: 'Otro tipo de documento',
|
|
21
|
+
};
|
|
22
|
+
/** Los grupos de DocDigital, en su orden, con sus categorías. */
|
|
23
|
+
exports.DOCUMENT_CATEGORY_GROUPS = [
|
|
24
|
+
{
|
|
25
|
+
key: 'Communication',
|
|
26
|
+
label: 'Documentos de Comunicación',
|
|
27
|
+
categories: ['Letter', 'Circular', 'Memorandum', 'Office'],
|
|
28
|
+
},
|
|
29
|
+
{ key: 'Judgment', label: 'Documentos de Juicio', categories: ['Opinion', 'Report'] },
|
|
30
|
+
{
|
|
31
|
+
key: 'Decision',
|
|
32
|
+
label: 'Documentos de Decisión',
|
|
33
|
+
categories: ['Agreement', 'Decree', 'Resolution', 'ResolutionWithReview'],
|
|
34
|
+
},
|
|
35
|
+
{ key: 'Other', label: 'Otros', categories: ['Other'] },
|
|
36
|
+
];
|
|
37
|
+
/** El grupo de DocDigital de una categoría. */
|
|
38
|
+
const documentCategoryGroupOf = (category) => exports.DOCUMENT_CATEGORY_GROUPS.find(group => group.categories.includes(category))?.label ?? 'Otros';
|
|
39
|
+
exports.documentCategoryGroupOf = documentCategoryGroupOf;
|
|
@@ -23,7 +23,6 @@ export interface DocumentTypeGetAllResponseEntity {
|
|
|
23
23
|
resetsYearly: DocumentTypeEntity['resetsYearly'];
|
|
24
24
|
numbered: DocumentTypeEntity['numbered'];
|
|
25
25
|
numberingScope: DocumentTypeEntity['numberingScope'];
|
|
26
|
-
allowsExternalNumber: DocumentTypeEntity['allowsExternalNumber'];
|
|
27
26
|
usesPartsOffice: DocumentTypeEntity['usesPartsOffice'];
|
|
28
27
|
visaMode: DocumentTypeEntity['visaMode'];
|
|
29
28
|
/** Transparencia Activa: sus documentos se publican cada mes, en esta sección del Portal. */
|
package/package.json
CHANGED
package/src/base/entities.ts
CHANGED
|
@@ -1,10 +1,29 @@
|
|
|
1
1
|
// This file was auto-generated by prisma-generator-typescript-interfaces
|
|
2
2
|
|
|
3
|
-
export type DocumentCategory =
|
|
3
|
+
export type DocumentCategory =
|
|
4
|
+
| 'Letter'
|
|
5
|
+
| 'Circular'
|
|
6
|
+
| 'Memorandum'
|
|
7
|
+
| 'Office'
|
|
8
|
+
| 'Opinion'
|
|
9
|
+
| 'Report'
|
|
10
|
+
| 'Agreement'
|
|
11
|
+
| 'Decree'
|
|
12
|
+
| 'Resolution'
|
|
13
|
+
| 'ResolutionWithReview'
|
|
14
|
+
| 'Other';
|
|
4
15
|
|
|
5
16
|
export const DocumentCategory = {
|
|
17
|
+
Letter: 'Letter',
|
|
18
|
+
Circular: 'Circular',
|
|
19
|
+
Memorandum: 'Memorandum',
|
|
20
|
+
Office: 'Office',
|
|
21
|
+
Opinion: 'Opinion',
|
|
22
|
+
Report: 'Report',
|
|
23
|
+
Agreement: 'Agreement',
|
|
6
24
|
Decree: 'Decree',
|
|
7
|
-
|
|
25
|
+
Resolution: 'Resolution',
|
|
26
|
+
ResolutionWithReview: 'ResolutionWithReview',
|
|
8
27
|
Other: 'Other',
|
|
9
28
|
} satisfies Record<string, DocumentCategory>;
|
|
10
29
|
|
|
@@ -669,7 +688,6 @@ export interface DocumentTypeEntity {
|
|
|
669
688
|
resetsYearly: boolean;
|
|
670
689
|
numbered: boolean;
|
|
671
690
|
numberingScope: DocumentNumberingScope;
|
|
672
|
-
allowsExternalNumber: boolean;
|
|
673
691
|
usesPartsOffice: boolean;
|
|
674
692
|
visaMode: DocumentVisaMode;
|
|
675
693
|
activeTransparency: boolean;
|
|
@@ -710,8 +728,6 @@ export interface DocumentEntity {
|
|
|
710
728
|
correlative?: number | null;
|
|
711
729
|
correlativeYear?: number | null;
|
|
712
730
|
numberedAt?: string | null;
|
|
713
|
-
externalCorrelative?: number | null;
|
|
714
|
-
externalCorrelativeYear?: number | null;
|
|
715
731
|
verificationCode?: string | null;
|
|
716
732
|
signatureSheet: boolean;
|
|
717
733
|
annulledAt?: string | null;
|
|
@@ -913,7 +929,6 @@ export interface DocumentTypeVersionEntity {
|
|
|
913
929
|
description?: string | null;
|
|
914
930
|
numbered: boolean;
|
|
915
931
|
numberingScope: DocumentNumberingScope;
|
|
916
|
-
allowsExternalNumber: boolean;
|
|
917
932
|
usesPartsOffice: boolean;
|
|
918
933
|
visaMode: DocumentVisaMode;
|
|
919
934
|
activeTransparency: boolean;
|
|
@@ -142,9 +142,6 @@ export interface DocumentWritePayload extends Pick<DocumentEntity, 'subject' | '
|
|
|
142
142
|
// PDF subido que quien redacta declara validado, con su justificación: no pasa por la revisión que exige el tipo.
|
|
143
143
|
selfValidated?: boolean;
|
|
144
144
|
selfValidationNote?: string | null;
|
|
145
|
-
// El documento llegó ya numerado (su tipo lo admite): su número y año.
|
|
146
|
-
externalCorrelative?: number | null;
|
|
147
|
-
externalCorrelativeYear?: number | null;
|
|
148
145
|
// PDF del documento, ya subido al gestor de archivos.
|
|
149
146
|
file: { fileId: string; name: string };
|
|
150
147
|
attachments?: Pick<DocumentAttachmentEntity, 'name' | 'type' | 'fileId' | 'url'>[];
|
|
@@ -52,8 +52,6 @@ export interface DocumentTypeWritePayload {
|
|
|
52
52
|
numbered?: boolean;
|
|
53
53
|
// Serie de sus números: la propia (por omisión) o la de su categoría. No con numeración compartida.
|
|
54
54
|
numberingScope?: DocumentNumberingScope;
|
|
55
|
-
// Sus documentos pueden llegar ya numerados (por omisión, no).
|
|
56
|
-
allowsExternalNumber?: boolean;
|
|
57
55
|
// Pasa por Oficina de Partes (por omisión, sí). Sin ella, el documento solo se firma: va solo a funcionarios y áreas.
|
|
58
56
|
usesPartsOffice?: boolean;
|
|
59
57
|
/** Transparencia Activa: sus documentos se publican cada mes, en esta sección del Portal. */
|
|
@@ -190,10 +190,6 @@ export interface DocumentGetByIdResponseEntity {
|
|
|
190
190
|
correlative: DocumentEntity['correlative'];
|
|
191
191
|
correlativeYear: DocumentEntity['correlativeYear'];
|
|
192
192
|
numberedAt: DocumentEntity['numberedAt'];
|
|
193
|
-
// Número con que llegó el documento, si ya venía numerado: lo toma con la primera firma (y no se pierde si lo
|
|
194
|
-
// rechazan).
|
|
195
|
-
externalCorrelative: DocumentEntity['externalCorrelative'];
|
|
196
|
-
externalCorrelativeYear: DocumentEntity['externalCorrelativeYear'];
|
|
197
193
|
directorateCodeReference: DocumentEntity['directorateCodeReference'];
|
|
198
194
|
departmentId: DocumentEntity['departmentId'];
|
|
199
195
|
// Área responsable con sus nombres, como estaban al guardarlo (sin valor si no se registraron).
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { type DocumentCategory } from '../../base/entities';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Categorías de los tipos documentales: los tipos de documento de DocDigital, con sus mismos nombres y agrupados como
|
|
5
|
+
* allí. Con la categoría, Oficina de Partes despacha con el tipo de DocDigital ya elegido, y los tipos que heredan el
|
|
6
|
+
* correlativo de su categoría comparten una serie por categoría.
|
|
7
|
+
*/
|
|
8
|
+
export const DOCUMENT_CATEGORY_NAME: Record<DocumentCategory, string> = {
|
|
9
|
+
Letter: 'Cartas',
|
|
10
|
+
Circular: 'Circulares',
|
|
11
|
+
Memorandum: 'Memorandos',
|
|
12
|
+
Office: 'Oficios',
|
|
13
|
+
Opinion: 'Dictámenes',
|
|
14
|
+
Report: 'Informes',
|
|
15
|
+
Agreement: 'Convenios',
|
|
16
|
+
Decree: 'Decretos',
|
|
17
|
+
Resolution: 'Resoluciones',
|
|
18
|
+
ResolutionWithReview: 'Resoluciones con Toma de Razón',
|
|
19
|
+
Other: 'Otro tipo de documento',
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
/** Los grupos de DocDigital, en su orden, con sus categorías. */
|
|
23
|
+
export const DOCUMENT_CATEGORY_GROUPS: { key: string; label: string; categories: DocumentCategory[] }[] = [
|
|
24
|
+
{
|
|
25
|
+
key: 'Communication',
|
|
26
|
+
label: 'Documentos de Comunicación',
|
|
27
|
+
categories: ['Letter', 'Circular', 'Memorandum', 'Office'],
|
|
28
|
+
},
|
|
29
|
+
{ key: 'Judgment', label: 'Documentos de Juicio', categories: ['Opinion', 'Report'] },
|
|
30
|
+
{
|
|
31
|
+
key: 'Decision',
|
|
32
|
+
label: 'Documentos de Decisión',
|
|
33
|
+
categories: ['Agreement', 'Decree', 'Resolution', 'ResolutionWithReview'],
|
|
34
|
+
},
|
|
35
|
+
{ key: 'Other', label: 'Otros', categories: ['Other'] },
|
|
36
|
+
];
|
|
37
|
+
|
|
38
|
+
/** El grupo de DocDigital de una categoría. */
|
|
39
|
+
export const documentCategoryGroupOf = (category: DocumentCategory): string =>
|
|
40
|
+
DOCUMENT_CATEGORY_GROUPS.find(group => group.categories.includes(category))?.label ?? 'Otros';
|
|
@@ -30,8 +30,6 @@ export interface DocumentTypeGetAllResponseEntity {
|
|
|
30
30
|
// Serie de sus números: la propia (`Type`) o la de su categoría (`Category`). Con `Category`, `nextCorrelative`,
|
|
31
31
|
// `correlativeYear` y `resetsYearly` son los de la categoría.
|
|
32
32
|
numberingScope: DocumentTypeEntity['numberingScope'];
|
|
33
|
-
// Sus documentos pueden llegar ya numerados: quien sube el PDF indica su número.
|
|
34
|
-
allowsExternalNumber: DocumentTypeEntity['allowsExternalNumber'];
|
|
35
33
|
// Pasa por Oficina de Partes: sus documentos pueden ir a otras instituciones y con copias por correo. Sin ella,
|
|
36
34
|
// solo se firman y van a funcionarios y áreas de la municipalidad.
|
|
37
35
|
usesPartsOffice: DocumentTypeEntity['usesPartsOffice'];
|