@muni-sanfer/types-gestor-documental 0.0.1-beta.26 → 0.0.1-beta.28
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 +150 -2
- package/dist/base/entities.js +53 -1
- package/dist/contracts/dataProtection.contract.d.ts +168 -0
- package/dist/contracts/dataProtection.contract.js +17 -0
- package/dist/contracts/documentType.contract.d.ts +3 -0
- package/dist/contracts/index.d.ts +26 -1
- package/dist/contracts/index.js +6 -0
- package/dist/contracts/transparency.contract.d.ts +96 -0
- package/dist/contracts/transparency.contract.js +12 -0
- package/dist/entities/dataProtection/dataProtection.entity.d.ts +129 -0
- package/dist/entities/dataProtection/dataProtection.entity.js +2 -0
- package/dist/entities/dataProtection/index.d.ts +1 -0
- package/dist/entities/dataProtection/index.js +17 -0
- package/dist/entities/documentType/documentType.entity.d.ts +3 -0
- package/dist/entities/index.d.ts +2 -0
- package/dist/entities/index.js +2 -0
- package/dist/entities/transparency/index.d.ts +1 -0
- package/dist/entities/transparency/index.js +17 -0
- package/dist/entities/transparency/transparency.entity.d.ts +77 -0
- package/dist/entities/transparency/transparency.entity.js +2 -0
- package/package.json +1 -1
- package/src/base/entities.ts +182 -2
- package/src/contracts/dataProtection.contract.ts +137 -0
- package/src/contracts/documentType.contract.ts +3 -0
- package/src/contracts/index.ts +9 -1
- package/src/contracts/transparency.contract.ts +55 -0
- package/src/entities/dataProtection/dataProtection.entity.ts +140 -0
- package/src/entities/dataProtection/index.ts +1 -0
- package/src/entities/documentType/documentType.entity.ts +3 -0
- package/src/entities/index.ts +2 -0
- package/src/entities/transparency/index.ts +1 -0
- package/src/entities/transparency/transparency.entity.ts +78 -0
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { type CommunicationMeans, type DataLegalBasis, type DataRight, type DataRightsChannel, type DataRightsEventAction, type DataRightsRequestStatus, type DataRightsResolution } from '../../base/entities';
|
|
2
|
+
/** Tratamiento de datos personales de la municipalidad: lo que se informa al público (Ley 19.628, art. 14 ter). */
|
|
3
|
+
export interface DataTreatmentResponseEntity {
|
|
4
|
+
id: string;
|
|
5
|
+
name: string;
|
|
6
|
+
purpose: string;
|
|
7
|
+
legalBasis: DataLegalBasis;
|
|
8
|
+
legalBasisDetail: string | null;
|
|
9
|
+
dataCategories: string[];
|
|
10
|
+
sensitiveData: boolean;
|
|
11
|
+
dataSubjects: string;
|
|
12
|
+
recipients: string | null;
|
|
13
|
+
source: string | null;
|
|
14
|
+
retention: string | null;
|
|
15
|
+
securityMeasures: string | null;
|
|
16
|
+
internationalTransfer: string | null;
|
|
17
|
+
responsibleUnit: string | null;
|
|
18
|
+
published: boolean;
|
|
19
|
+
enabled: boolean;
|
|
20
|
+
/** Solicitudes de titulares que lo mencionan. */
|
|
21
|
+
requests: number;
|
|
22
|
+
updatedAt: string;
|
|
23
|
+
}
|
|
24
|
+
/** Página pública de protección de datos: quién es el responsable, cómo ejercer los derechos y qué se trata. */
|
|
25
|
+
export interface DataProtectionPolicyEntity {
|
|
26
|
+
organ: string;
|
|
27
|
+
/** Correo o medio en que se reciben las solicitudes de los titulares (art. 14 ter letra c). */
|
|
28
|
+
contact: string | null;
|
|
29
|
+
/** Dirección de la política de tratamiento, si está publicada aparte. */
|
|
30
|
+
policyUrl: string | null;
|
|
31
|
+
treatments: Omit<DataTreatmentResponseEntity, 'published' | 'enabled' | 'requests' | 'securityMeasures'>[];
|
|
32
|
+
}
|
|
33
|
+
/** Semáforo del plazo: a tiempo, por vencer (5 días corridos o menos) o vencido. */
|
|
34
|
+
export type DataRightsDueStatus = 'OnTime' | 'DueSoon' | 'Overdue';
|
|
35
|
+
export interface DataRightsRequestListItemEntity {
|
|
36
|
+
id: string;
|
|
37
|
+
/** «N° 4/2026». */
|
|
38
|
+
label: string;
|
|
39
|
+
channel: DataRightsChannel;
|
|
40
|
+
rights: DataRight[];
|
|
41
|
+
requesterName: string;
|
|
42
|
+
requestText: string;
|
|
43
|
+
treatmentName: string | null;
|
|
44
|
+
receivedAt: string;
|
|
45
|
+
dueAt: string;
|
|
46
|
+
status: DataRightsRequestStatus;
|
|
47
|
+
resolution: DataRightsResolution | null;
|
|
48
|
+
assigneeFullName: string | null;
|
|
49
|
+
acknowledged: boolean;
|
|
50
|
+
identityVerified: boolean;
|
|
51
|
+
/** Bloqueo temporal pedido y sin resolver. */
|
|
52
|
+
blockingPending: boolean;
|
|
53
|
+
/** Solo mientras está abierta. */
|
|
54
|
+
dueStatus: DataRightsDueStatus | null;
|
|
55
|
+
daysLeft: number | null;
|
|
56
|
+
resolvedOnTime: boolean | null;
|
|
57
|
+
}
|
|
58
|
+
export interface DataRightsDocumentLinkEntity {
|
|
59
|
+
id: string;
|
|
60
|
+
folio: string | null;
|
|
61
|
+
subject: string;
|
|
62
|
+
}
|
|
63
|
+
export interface DataRightsRequestDetailEntity extends DataRightsRequestListItemEntity {
|
|
64
|
+
year: number;
|
|
65
|
+
number: number;
|
|
66
|
+
requesterRut: string | null;
|
|
67
|
+
requesterEmail: string | null;
|
|
68
|
+
requesterAddress: string | null;
|
|
69
|
+
representativeName: string | null;
|
|
70
|
+
identityVerifiedAt: string | null;
|
|
71
|
+
identityNote: string | null;
|
|
72
|
+
treatmentId: string | null;
|
|
73
|
+
acknowledgedAt: string | null;
|
|
74
|
+
extendedAt: string | null;
|
|
75
|
+
extensionNote: string | null;
|
|
76
|
+
blockingRequested: boolean;
|
|
77
|
+
blockingReason: string | null;
|
|
78
|
+
blockingDueAt: string | null;
|
|
79
|
+
blockingGranted: boolean | null;
|
|
80
|
+
blockingResolvedAt: string | null;
|
|
81
|
+
blockingNote: string | null;
|
|
82
|
+
assigneeEmployeeId: string | null;
|
|
83
|
+
resolvedAt: string | null;
|
|
84
|
+
denialGrounds: string[];
|
|
85
|
+
resolutionNote: string | null;
|
|
86
|
+
responseDocument: DataRightsDocumentLinkEntity | null;
|
|
87
|
+
responseSentAt: string | null;
|
|
88
|
+
responseSentTo: string | null;
|
|
89
|
+
responseSentMeans: CommunicationMeans | null;
|
|
90
|
+
/** Hasta cuándo el titular puede reclamar ante la Agencia (30 días hábiles), si se denegó en todo o en parte. */
|
|
91
|
+
complaintDeadline: string | null;
|
|
92
|
+
complaintAt: string | null;
|
|
93
|
+
complaintNote: string | null;
|
|
94
|
+
createdByFullName: string;
|
|
95
|
+
/** Se puede prorrogar: abierta, sin prórroga y antes de vencer. */
|
|
96
|
+
canExtend: boolean;
|
|
97
|
+
/** El titular ya puede reclamar ante la Agencia: denegación o plazo vencido sin respuesta. */
|
|
98
|
+
canRegisterComplaint: boolean;
|
|
99
|
+
events: {
|
|
100
|
+
action: DataRightsEventAction;
|
|
101
|
+
note: string | null;
|
|
102
|
+
employeeFullName: string;
|
|
103
|
+
createdAt: string;
|
|
104
|
+
}[];
|
|
105
|
+
}
|
|
106
|
+
export interface DataRightsSummaryEntity {
|
|
107
|
+
year: number;
|
|
108
|
+
total: number;
|
|
109
|
+
open: number;
|
|
110
|
+
overdue: number;
|
|
111
|
+
dueSoon: number;
|
|
112
|
+
/** Abiertas sin acuse de recibo. */
|
|
113
|
+
unacknowledged: number;
|
|
114
|
+
/** Bloqueos temporales pedidos y sin resolver. */
|
|
115
|
+
blockingPending: number;
|
|
116
|
+
byRight: Record<DataRight, number>;
|
|
117
|
+
resolved: Record<DataRightsResolution, number>;
|
|
118
|
+
/** Respondidas dentro del plazo sobre las respondidas, en %. */
|
|
119
|
+
onTimeRate: number | null;
|
|
120
|
+
complaints: number;
|
|
121
|
+
}
|
|
122
|
+
/** Datos personales que se reconocen en el texto de un documento, enmascarados: ayudan a tarjar. */
|
|
123
|
+
export interface PersonalDataHintsEntity {
|
|
124
|
+
ruts: number;
|
|
125
|
+
emails: number;
|
|
126
|
+
phones: number;
|
|
127
|
+
/** Algunos ejemplos enmascarados («11.1••.•••-1»). */
|
|
128
|
+
samples: string[];
|
|
129
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './dataProtection.entity';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./dataProtection.entity"), exports);
|
|
@@ -21,6 +21,9 @@ export interface DocumentTypeGetAllResponseEntity {
|
|
|
21
21
|
correlativeYear: DocumentTypeEntity['correlativeYear'];
|
|
22
22
|
resetsYearly: DocumentTypeEntity['resetsYearly'];
|
|
23
23
|
numbered: DocumentTypeEntity['numbered'];
|
|
24
|
+
/** Transparencia Activa: sus documentos se publican cada mes, en esta sección del Portal. */
|
|
25
|
+
activeTransparency: DocumentTypeEntity['activeTransparency'];
|
|
26
|
+
transparencySection: DocumentTypeEntity['transparencySection'];
|
|
24
27
|
directorateCodeReference: DocumentTypeEntity['directorateCodeReference'];
|
|
25
28
|
archivalSeries: {
|
|
26
29
|
id: string;
|
package/dist/entities/index.d.ts
CHANGED
package/dist/entities/index.js
CHANGED
|
@@ -33,3 +33,5 @@ __exportStar(require("./signatureCheck"), exports);
|
|
|
33
33
|
__exportStar(require("./repositoryExport"), exports);
|
|
34
34
|
__exportStar(require("./retention"), exports);
|
|
35
35
|
__exportStar(require("./accessRequest"), exports);
|
|
36
|
+
__exportStar(require("./transparency"), exports);
|
|
37
|
+
__exportStar(require("./dataProtection"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './transparency.entity';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./transparency.entity"), exports);
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { type DocumentAccessLevel, type DocumentStatus } from '../../base/entities';
|
|
2
|
+
import { type PersonalDataHintsEntity } from '../dataProtection';
|
|
3
|
+
/** En qué quedó un documento en Transparencia Activa: aún sin decidir, publicado o excluido con su motivo. */
|
|
4
|
+
export type TransparencyItemStatus = 'Pending' | 'Published' | 'Excluded';
|
|
5
|
+
/** Un documento que se publica en Transparencia Activa (Ley 20.285, art. 7°), con lo que se decidió de él. */
|
|
6
|
+
export interface TransparencyItemEntity {
|
|
7
|
+
documentId: string;
|
|
8
|
+
documentStatus: DocumentStatus;
|
|
9
|
+
verificationCode: string | null;
|
|
10
|
+
documentTypeName: string;
|
|
11
|
+
documentTypeAbbreviation: string | null;
|
|
12
|
+
/** Sección del Portal en que se publica, según su tipo documental. */
|
|
13
|
+
section: string | null;
|
|
14
|
+
/** Folio del documento (`Decreto Alcaldicio N° 15/2026`), o el nombre del tipo si no lleva número. */
|
|
15
|
+
reference: string;
|
|
16
|
+
correlative: number | null;
|
|
17
|
+
correlativeYear: number | null;
|
|
18
|
+
subject: string;
|
|
19
|
+
finishedAt: string | null;
|
|
20
|
+
annulledAt: string | null;
|
|
21
|
+
accessLevel: DocumentAccessLevel;
|
|
22
|
+
hasSensitiveData: boolean;
|
|
23
|
+
/** El original se puede publicar tal cual: es público (o su restricción terminó) y no tiene datos sensibles. */
|
|
24
|
+
originalIsPublic: boolean;
|
|
25
|
+
/** Para publicarlo hace falta antes la versión tarjada. */
|
|
26
|
+
needsRedacted: boolean;
|
|
27
|
+
redactedFileName: string | null;
|
|
28
|
+
/** RUN, correos y teléfonos que se reconocen en el texto del original (`null` si no tiene texto): ayudan a tarjar. */
|
|
29
|
+
personalData: PersonalDataHintsEntity | null;
|
|
30
|
+
status: TransparencyItemStatus;
|
|
31
|
+
/** Dirección de la publicación en el Portal de Transparencia, si se anotó. */
|
|
32
|
+
transparencyUrl: string | null;
|
|
33
|
+
/** Motivo de la exclusión, u observación de la publicación. */
|
|
34
|
+
transparencyNote: string | null;
|
|
35
|
+
transparencyAt: string | null;
|
|
36
|
+
transparencyByFullName: string | null;
|
|
37
|
+
/** Enlace público estable a la versión que se publica (`<TRANSPARENCY_URL>/<código>`), si está configurado. */
|
|
38
|
+
publicLink: string | null;
|
|
39
|
+
}
|
|
40
|
+
export interface TransparencyMonthCountsEntity {
|
|
41
|
+
total: number;
|
|
42
|
+
pending: number;
|
|
43
|
+
published: number;
|
|
44
|
+
excluded: number;
|
|
45
|
+
/** Publicados que después se anularon: hay que retirarlos o actualizarlos en el Portal. */
|
|
46
|
+
annulledPublished: number;
|
|
47
|
+
}
|
|
48
|
+
/** Lo firmado en un mes de los tipos documentales que se publican, con lo que falta por decidir. */
|
|
49
|
+
export interface TransparencyMonthEntity {
|
|
50
|
+
year: number;
|
|
51
|
+
month: number;
|
|
52
|
+
counts: TransparencyMonthCountsEntity;
|
|
53
|
+
/** Tipos documentales marcados para Transparencia Activa. Sin ninguno, la bandeja queda vacía. */
|
|
54
|
+
documentTypes: {
|
|
55
|
+
id: string;
|
|
56
|
+
name: string;
|
|
57
|
+
section: string | null;
|
|
58
|
+
}[];
|
|
59
|
+
items: TransparencyItemEntity[];
|
|
60
|
+
}
|
|
61
|
+
/** Lo que muestra la página pública de un documento publicado en Transparencia Activa. No exige sesión. */
|
|
62
|
+
export interface TransparencyPublicEntity {
|
|
63
|
+
verificationCode: string;
|
|
64
|
+
documentTypeName: string;
|
|
65
|
+
issuerName: string;
|
|
66
|
+
section: string | null;
|
|
67
|
+
reference: string;
|
|
68
|
+
/** La materia solo se muestra si el original es público; si se publicó tarjado, se lee en el archivo. */
|
|
69
|
+
subject: string | null;
|
|
70
|
+
finishedAt: string | null;
|
|
71
|
+
/** Anulado después de publicarse: se informa y ya no se descarga. */
|
|
72
|
+
annulled: boolean;
|
|
73
|
+
/** Se publicó una versión tarjada (sin datos personales o reservados). */
|
|
74
|
+
redacted: boolean;
|
|
75
|
+
canDownload: boolean;
|
|
76
|
+
publishedAt: string | null;
|
|
77
|
+
}
|
package/package.json
CHANGED
package/src/base/entities.ts
CHANGED
|
@@ -67,7 +67,11 @@ export type DocumentTrackingAction =
|
|
|
67
67
|
| 'Received'
|
|
68
68
|
| 'EmailCopySent'
|
|
69
69
|
| 'EmailCopyOpened'
|
|
70
|
-
| 'DispositionRecorded'
|
|
70
|
+
| 'DispositionRecorded'
|
|
71
|
+
| 'TransparencyRedacted'
|
|
72
|
+
| 'TransparencyPublished'
|
|
73
|
+
| 'TransparencyExcluded'
|
|
74
|
+
| 'TransparencyWithdrawn';
|
|
71
75
|
|
|
72
76
|
export const DocumentTrackingAction = {
|
|
73
77
|
Created: 'Created',
|
|
@@ -91,6 +95,10 @@ export const DocumentTrackingAction = {
|
|
|
91
95
|
EmailCopySent: 'EmailCopySent',
|
|
92
96
|
EmailCopyOpened: 'EmailCopyOpened',
|
|
93
97
|
DispositionRecorded: 'DispositionRecorded',
|
|
98
|
+
TransparencyRedacted: 'TransparencyRedacted',
|
|
99
|
+
TransparencyPublished: 'TransparencyPublished',
|
|
100
|
+
TransparencyExcluded: 'TransparencyExcluded',
|
|
101
|
+
TransparencyWithdrawn: 'TransparencyWithdrawn',
|
|
94
102
|
} satisfies Record<string, DocumentTrackingAction>;
|
|
95
103
|
|
|
96
104
|
export type DocumentOrigin = 'Internal' | 'DocDigital' | 'Manual';
|
|
@@ -335,7 +343,8 @@ export type AuditEntity =
|
|
|
335
343
|
| 'Procedure'
|
|
336
344
|
| 'QualityMetric'
|
|
337
345
|
| 'ServiceOutage'
|
|
338
|
-
| 'Repository'
|
|
346
|
+
| 'Repository'
|
|
347
|
+
| 'DataTreatment';
|
|
339
348
|
|
|
340
349
|
export const AuditEntity = {
|
|
341
350
|
DocumentType: 'DocumentType',
|
|
@@ -347,6 +356,7 @@ export const AuditEntity = {
|
|
|
347
356
|
QualityMetric: 'QualityMetric',
|
|
348
357
|
ServiceOutage: 'ServiceOutage',
|
|
349
358
|
Repository: 'Repository',
|
|
359
|
+
DataTreatment: 'DataTreatment',
|
|
350
360
|
} satisfies Record<string, AuditEntity>;
|
|
351
361
|
|
|
352
362
|
export type AuditAction = 'Created' | 'Updated' | 'Enabled' | 'Disabled' | 'Removed' | 'Exported';
|
|
@@ -430,6 +440,84 @@ export const AccessRequestEventAction = {
|
|
|
430
440
|
AppealRegistered: 'AppealRegistered',
|
|
431
441
|
} satisfies Record<string, AccessRequestEventAction>;
|
|
432
442
|
|
|
443
|
+
export type TransparencyStatus = 'Published' | 'Excluded';
|
|
444
|
+
|
|
445
|
+
export const TransparencyStatus = {
|
|
446
|
+
Published: 'Published',
|
|
447
|
+
Excluded: 'Excluded',
|
|
448
|
+
} satisfies Record<string, TransparencyStatus>;
|
|
449
|
+
|
|
450
|
+
export type DataLegalBasis = 'LegalFunction' | 'LegalObligation' | 'Consent' | 'Contract' | 'VitalInterest';
|
|
451
|
+
|
|
452
|
+
export const DataLegalBasis = {
|
|
453
|
+
LegalFunction: 'LegalFunction',
|
|
454
|
+
LegalObligation: 'LegalObligation',
|
|
455
|
+
Consent: 'Consent',
|
|
456
|
+
Contract: 'Contract',
|
|
457
|
+
VitalInterest: 'VitalInterest',
|
|
458
|
+
} satisfies Record<string, DataLegalBasis>;
|
|
459
|
+
|
|
460
|
+
export type DataRight = 'Access' | 'Rectification' | 'Suppression' | 'Opposition' | 'Portability';
|
|
461
|
+
|
|
462
|
+
export const DataRight = {
|
|
463
|
+
Access: 'Access',
|
|
464
|
+
Rectification: 'Rectification',
|
|
465
|
+
Suppression: 'Suppression',
|
|
466
|
+
Opposition: 'Opposition',
|
|
467
|
+
Portability: 'Portability',
|
|
468
|
+
} satisfies Record<string, DataRight>;
|
|
469
|
+
|
|
470
|
+
export type DataRightsChannel = 'Email' | 'WebForm' | 'InPerson' | 'Letter';
|
|
471
|
+
|
|
472
|
+
export const DataRightsChannel = {
|
|
473
|
+
Email: 'Email',
|
|
474
|
+
WebForm: 'WebForm',
|
|
475
|
+
InPerson: 'InPerson',
|
|
476
|
+
Letter: 'Letter',
|
|
477
|
+
} satisfies Record<string, DataRightsChannel>;
|
|
478
|
+
|
|
479
|
+
export type DataRightsRequestStatus = 'Received' | 'InProgress' | 'Resolved';
|
|
480
|
+
|
|
481
|
+
export const DataRightsRequestStatus = {
|
|
482
|
+
Received: 'Received',
|
|
483
|
+
InProgress: 'InProgress',
|
|
484
|
+
Resolved: 'Resolved',
|
|
485
|
+
} satisfies Record<string, DataRightsRequestStatus>;
|
|
486
|
+
|
|
487
|
+
export type DataRightsResolution = 'Granted' | 'PartiallyGranted' | 'Denied' | 'Withdrawn';
|
|
488
|
+
|
|
489
|
+
export const DataRightsResolution = {
|
|
490
|
+
Granted: 'Granted',
|
|
491
|
+
PartiallyGranted: 'PartiallyGranted',
|
|
492
|
+
Denied: 'Denied',
|
|
493
|
+
Withdrawn: 'Withdrawn',
|
|
494
|
+
} satisfies Record<string, DataRightsResolution>;
|
|
495
|
+
|
|
496
|
+
export type DataRightsEventAction =
|
|
497
|
+
| 'Received'
|
|
498
|
+
| 'Updated'
|
|
499
|
+
| 'Acknowledged'
|
|
500
|
+
| 'IdentityVerified'
|
|
501
|
+
| 'Assigned'
|
|
502
|
+
| 'BlockingResolved'
|
|
503
|
+
| 'Extended'
|
|
504
|
+
| 'Resolved'
|
|
505
|
+
| 'ResponseSent'
|
|
506
|
+
| 'ComplaintRegistered';
|
|
507
|
+
|
|
508
|
+
export const DataRightsEventAction = {
|
|
509
|
+
Received: 'Received',
|
|
510
|
+
Updated: 'Updated',
|
|
511
|
+
Acknowledged: 'Acknowledged',
|
|
512
|
+
IdentityVerified: 'IdentityVerified',
|
|
513
|
+
Assigned: 'Assigned',
|
|
514
|
+
BlockingResolved: 'BlockingResolved',
|
|
515
|
+
Extended: 'Extended',
|
|
516
|
+
Resolved: 'Resolved',
|
|
517
|
+
ResponseSent: 'ResponseSent',
|
|
518
|
+
ComplaintRegistered: 'ComplaintRegistered',
|
|
519
|
+
} satisfies Record<string, DataRightsEventAction>;
|
|
520
|
+
|
|
433
521
|
export interface DocumentTypeEntity {
|
|
434
522
|
id: string;
|
|
435
523
|
name: string;
|
|
@@ -440,6 +528,8 @@ export interface DocumentTypeEntity {
|
|
|
440
528
|
correlativeYear?: number | null;
|
|
441
529
|
resetsYearly: boolean;
|
|
442
530
|
numbered: boolean;
|
|
531
|
+
activeTransparency: boolean;
|
|
532
|
+
transparencySection?: string | null;
|
|
443
533
|
directorateCodeReference?: number | null;
|
|
444
534
|
archivalSeries?: ArchivalSeriesEntity | null;
|
|
445
535
|
archivalSeriesId?: string | null;
|
|
@@ -514,7 +604,15 @@ export interface DocumentEntity {
|
|
|
514
604
|
accesses?: DocumentAccessEntity[];
|
|
515
605
|
disposition?: DispositionRecordEntity | null;
|
|
516
606
|
dispositionId?: string | null;
|
|
607
|
+
transparencyStatus?: TransparencyStatus | null;
|
|
608
|
+
transparencyUrl?: string | null;
|
|
609
|
+
transparencyNote?: string | null;
|
|
610
|
+
transparencyAt?: string | null;
|
|
611
|
+
transparencyByFullName?: string | null;
|
|
612
|
+
redactedFileId?: string | null;
|
|
613
|
+
redactedFileName?: string | null;
|
|
517
614
|
accessRequestResponses?: AccessRequestEntity[];
|
|
615
|
+
dataRightsResponses?: DataRightsRequestEntity[];
|
|
518
616
|
accessRequestDeliveries?: AccessRequestDocumentEntity[];
|
|
519
617
|
dispatch?: DocumentDispatchEntity | null;
|
|
520
618
|
docDigitalInbound?: DocDigitalInboundEntity | null;
|
|
@@ -1148,4 +1246,86 @@ export interface AccessRequestEventEntity {
|
|
|
1148
1246
|
createdAt: string;
|
|
1149
1247
|
}
|
|
1150
1248
|
|
|
1249
|
+
export interface DataTreatmentEntity {
|
|
1250
|
+
id: string;
|
|
1251
|
+
name: string;
|
|
1252
|
+
purpose: string;
|
|
1253
|
+
legalBasis: DataLegalBasis;
|
|
1254
|
+
legalBasisDetail?: string | null;
|
|
1255
|
+
dataCategories: string[];
|
|
1256
|
+
sensitiveData: boolean;
|
|
1257
|
+
dataSubjects: string;
|
|
1258
|
+
recipients?: string | null;
|
|
1259
|
+
source?: string | null;
|
|
1260
|
+
retention?: string | null;
|
|
1261
|
+
securityMeasures?: string | null;
|
|
1262
|
+
internationalTransfer?: string | null;
|
|
1263
|
+
responsibleUnit?: string | null;
|
|
1264
|
+
published: boolean;
|
|
1265
|
+
requests?: DataRightsRequestEntity[];
|
|
1266
|
+
enabled: boolean;
|
|
1267
|
+
deleted: boolean;
|
|
1268
|
+
createdAt: string;
|
|
1269
|
+
updatedAt: string;
|
|
1270
|
+
}
|
|
1271
|
+
|
|
1272
|
+
export interface DataRightsRequestEntity {
|
|
1273
|
+
id: string;
|
|
1274
|
+
number: number;
|
|
1275
|
+
year: number;
|
|
1276
|
+
channel: DataRightsChannel;
|
|
1277
|
+
receivedAt: string;
|
|
1278
|
+
rights: DataRight[];
|
|
1279
|
+
requesterName: string;
|
|
1280
|
+
requesterRut?: string | null;
|
|
1281
|
+
requesterEmail?: string | null;
|
|
1282
|
+
requesterAddress?: string | null;
|
|
1283
|
+
representativeName?: string | null;
|
|
1284
|
+
identityVerifiedAt?: string | null;
|
|
1285
|
+
identityNote?: string | null;
|
|
1286
|
+
requestText: string;
|
|
1287
|
+
treatment?: DataTreatmentEntity | null;
|
|
1288
|
+
treatmentId?: string | null;
|
|
1289
|
+
status: DataRightsRequestStatus;
|
|
1290
|
+
acknowledgedAt?: string | null;
|
|
1291
|
+
dueAt: string;
|
|
1292
|
+
extendedAt?: string | null;
|
|
1293
|
+
extensionNote?: string | null;
|
|
1294
|
+
blockingRequested: boolean;
|
|
1295
|
+
blockingReason?: string | null;
|
|
1296
|
+
blockingDueAt?: string | null;
|
|
1297
|
+
blockingGranted?: boolean | null;
|
|
1298
|
+
blockingResolvedAt?: string | null;
|
|
1299
|
+
blockingNote?: string | null;
|
|
1300
|
+
assigneeEmployeeId?: string | null;
|
|
1301
|
+
assigneeFullName?: string | null;
|
|
1302
|
+
resolution?: DataRightsResolution | null;
|
|
1303
|
+
resolvedAt?: string | null;
|
|
1304
|
+
denialGrounds: string[];
|
|
1305
|
+
resolutionNote?: string | null;
|
|
1306
|
+
responseDocument?: DocumentEntity | null;
|
|
1307
|
+
responseDocumentId?: string | null;
|
|
1308
|
+
responseSentAt?: string | null;
|
|
1309
|
+
responseSentTo?: string | null;
|
|
1310
|
+
responseSentMeans?: CommunicationMeans | null;
|
|
1311
|
+
complaintAt?: string | null;
|
|
1312
|
+
complaintNote?: string | null;
|
|
1313
|
+
createdByEmployeeId: string;
|
|
1314
|
+
createdByFullName: string;
|
|
1315
|
+
events?: DataRightsEventEntity[];
|
|
1316
|
+
createdAt: string;
|
|
1317
|
+
updatedAt: string;
|
|
1318
|
+
}
|
|
1319
|
+
|
|
1320
|
+
export interface DataRightsEventEntity {
|
|
1321
|
+
id: string;
|
|
1322
|
+
action: DataRightsEventAction;
|
|
1323
|
+
note?: string | null;
|
|
1324
|
+
employeeId?: string | null;
|
|
1325
|
+
employeeFullName: string;
|
|
1326
|
+
request?: DataRightsRequestEntity;
|
|
1327
|
+
requestId: string;
|
|
1328
|
+
createdAt: string;
|
|
1329
|
+
}
|
|
1330
|
+
|
|
1151
1331
|
type JsonValue = string | number | boolean | { [key in string]?: JsonValue } | Array<JsonValue> | null;
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import {
|
|
2
|
+
type CommunicationMeans,
|
|
3
|
+
type DataLegalBasis,
|
|
4
|
+
type DataRight,
|
|
5
|
+
type DataRightsChannel,
|
|
6
|
+
type DataRightsResolution,
|
|
7
|
+
} from '../base/entities';
|
|
8
|
+
import {
|
|
9
|
+
type DataProtectionPolicyEntity,
|
|
10
|
+
type DataRightsRequestDetailEntity,
|
|
11
|
+
type DataRightsRequestListItemEntity,
|
|
12
|
+
type DataRightsSummaryEntity,
|
|
13
|
+
type DataTreatmentResponseEntity,
|
|
14
|
+
} from '../entities';
|
|
15
|
+
import { type RpcPage } from './contract';
|
|
16
|
+
|
|
17
|
+
/** Patrones NATS de `dataProtection`: tratamientos de datos y solicitudes de los titulares (Ley 19.628). */
|
|
18
|
+
export const DataProtectionPatterns = {
|
|
19
|
+
getTreatments: 'gestorDocumental.dataProtection.getTreatments',
|
|
20
|
+
createTreatment: 'gestorDocumental.dataProtection.createTreatment',
|
|
21
|
+
updateTreatment: 'gestorDocumental.dataProtection.updateTreatment',
|
|
22
|
+
setTreatmentEnabled: 'gestorDocumental.dataProtection.setTreatmentEnabled',
|
|
23
|
+
getPolicy: 'gestorDocumental.dataProtection.getPolicy',
|
|
24
|
+
getRequests: 'gestorDocumental.dataProtection.getRequests',
|
|
25
|
+
getRequest: 'gestorDocumental.dataProtection.getRequest',
|
|
26
|
+
getSummary: 'gestorDocumental.dataProtection.getSummary',
|
|
27
|
+
createRequest: 'gestorDocumental.dataProtection.createRequest',
|
|
28
|
+
updateRequest: 'gestorDocumental.dataProtection.updateRequest',
|
|
29
|
+
actOnRequest: 'gestorDocumental.dataProtection.actOnRequest',
|
|
30
|
+
} as const;
|
|
31
|
+
|
|
32
|
+
type TActor = { employeeId: string; fullName: string };
|
|
33
|
+
|
|
34
|
+
/** Datos de un tratamiento al crearlo o editarlo. */
|
|
35
|
+
export interface DataTreatmentWritePayload {
|
|
36
|
+
name: string;
|
|
37
|
+
purpose: string;
|
|
38
|
+
legalBasis: DataLegalBasis;
|
|
39
|
+
legalBasisDetail?: string | null;
|
|
40
|
+
dataCategories: string[];
|
|
41
|
+
sensitiveData?: boolean;
|
|
42
|
+
dataSubjects: string;
|
|
43
|
+
recipients?: string | null;
|
|
44
|
+
source?: string | null;
|
|
45
|
+
retention?: string | null;
|
|
46
|
+
securityMeasures?: string | null;
|
|
47
|
+
internationalTransfer?: string | null;
|
|
48
|
+
responsibleUnit?: string | null;
|
|
49
|
+
published?: boolean;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/** Datos de una solicitud al ingresarla o corregirla. */
|
|
53
|
+
export interface DataRightsRequestWritePayload {
|
|
54
|
+
channel: DataRightsChannel;
|
|
55
|
+
receivedAt: string;
|
|
56
|
+
rights: DataRight[];
|
|
57
|
+
requesterName: string;
|
|
58
|
+
requesterRut?: string | null;
|
|
59
|
+
requesterEmail?: string | null;
|
|
60
|
+
requesterAddress?: string | null;
|
|
61
|
+
representativeName?: string | null;
|
|
62
|
+
requestText: string;
|
|
63
|
+
treatmentId?: string | null;
|
|
64
|
+
/** Bloqueo temporal: solo con rectificación, supresión u oposición, y fundado. */
|
|
65
|
+
blockingRequested?: boolean;
|
|
66
|
+
blockingReason?: string | null;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/** Un paso de la tramitación. */
|
|
70
|
+
export type DataRightsAction =
|
|
71
|
+
| { type: 'acknowledge'; note?: string | null }
|
|
72
|
+
| { type: 'verifyIdentity'; note?: string | null }
|
|
73
|
+
| { type: 'assign'; employeeId: string; fullName: string; note?: string | null }
|
|
74
|
+
/** Bloqueo temporal, en 2 días hábiles; si se rechaza, fundado (y se comunica a la Agencia). */
|
|
75
|
+
| { type: 'resolveBlocking'; granted: boolean; note?: string | null }
|
|
76
|
+
| { type: 'extend'; note: string }
|
|
77
|
+
| {
|
|
78
|
+
type: 'resolve';
|
|
79
|
+
resolution: DataRightsResolution;
|
|
80
|
+
grounds?: string[];
|
|
81
|
+
note?: string | null;
|
|
82
|
+
responseDocumentId?: string | null;
|
|
83
|
+
}
|
|
84
|
+
/** Respaldo del envío de la respuesta escrita (art. 11). */
|
|
85
|
+
| {
|
|
86
|
+
type: 'registerResponseSent';
|
|
87
|
+
sentAt?: string | null;
|
|
88
|
+
sentTo: string;
|
|
89
|
+
means: CommunicationMeans;
|
|
90
|
+
note?: string | null;
|
|
91
|
+
}
|
|
92
|
+
| { type: 'registerComplaint'; complaintAt?: string | null; note: string };
|
|
93
|
+
|
|
94
|
+
export interface DataProtectionContract {
|
|
95
|
+
[DataProtectionPatterns.getTreatments]: {
|
|
96
|
+
payload: { enabled?: boolean | null };
|
|
97
|
+
response: DataTreatmentResponseEntity[];
|
|
98
|
+
};
|
|
99
|
+
[DataProtectionPatterns.createTreatment]: {
|
|
100
|
+
payload: DataTreatmentWritePayload;
|
|
101
|
+
response: DataTreatmentResponseEntity;
|
|
102
|
+
};
|
|
103
|
+
[DataProtectionPatterns.updateTreatment]: {
|
|
104
|
+
payload: DataTreatmentWritePayload & { id: string };
|
|
105
|
+
response: DataTreatmentResponseEntity;
|
|
106
|
+
};
|
|
107
|
+
[DataProtectionPatterns.setTreatmentEnabled]: {
|
|
108
|
+
payload: { id: string; enabled: boolean };
|
|
109
|
+
response: DataTreatmentResponseEntity;
|
|
110
|
+
};
|
|
111
|
+
/** Lo que se publica sin sesión (art. 14 ter): los tratamientos habilitados y publicados. */
|
|
112
|
+
[DataProtectionPatterns.getPolicy]: { payload: Record<string, never>; response: DataProtectionPolicyEntity };
|
|
113
|
+
[DataProtectionPatterns.getRequests]: {
|
|
114
|
+
payload: {
|
|
115
|
+
status?: 'open' | 'resolved' | 'all';
|
|
116
|
+
year?: number | null;
|
|
117
|
+
search?: string;
|
|
118
|
+
page?: number;
|
|
119
|
+
limit?: number;
|
|
120
|
+
};
|
|
121
|
+
response: RpcPage<DataRightsRequestListItemEntity[]>;
|
|
122
|
+
};
|
|
123
|
+
[DataProtectionPatterns.getRequest]: { payload: { id: string }; response: DataRightsRequestDetailEntity };
|
|
124
|
+
[DataProtectionPatterns.getSummary]: { payload: { year: number }; response: DataRightsSummaryEntity };
|
|
125
|
+
[DataProtectionPatterns.createRequest]: {
|
|
126
|
+
payload: DataRightsRequestWritePayload & { actor: TActor };
|
|
127
|
+
response: DataRightsRequestDetailEntity;
|
|
128
|
+
};
|
|
129
|
+
[DataProtectionPatterns.updateRequest]: {
|
|
130
|
+
payload: DataRightsRequestWritePayload & { id: string; actor: TActor };
|
|
131
|
+
response: DataRightsRequestDetailEntity;
|
|
132
|
+
};
|
|
133
|
+
[DataProtectionPatterns.actOnRequest]: {
|
|
134
|
+
payload: { id: string; action: DataRightsAction; actor: TActor };
|
|
135
|
+
response: DataRightsRequestDetailEntity;
|
|
136
|
+
};
|
|
137
|
+
}
|
|
@@ -40,6 +40,9 @@ export interface DocumentTypeWritePayload {
|
|
|
40
40
|
resetsYearly?: boolean;
|
|
41
41
|
// Sus documentos llevan número (por omisión, sí).
|
|
42
42
|
numbered?: boolean;
|
|
43
|
+
/** Transparencia Activa: sus documentos se publican cada mes, en esta sección del Portal. */
|
|
44
|
+
activeTransparency?: boolean;
|
|
45
|
+
transparencySection?: string | null;
|
|
43
46
|
directorateCodeReference?: number | null;
|
|
44
47
|
// Serie documental del Cuadro de Clasificación (sin valor: sin clasificar).
|
|
45
48
|
archivalSeriesId?: string | null;
|