@muni-sanfer/types-gestor-documental 0.0.1-beta.27 → 0.0.1-beta.29
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 +200 -1
- package/dist/base/entities.js +67 -1
- package/dist/contracts/dataProtection.contract.d.ts +251 -0
- package/dist/contracts/dataProtection.contract.js +23 -0
- package/dist/contracts/index.d.ts +23 -1
- package/dist/contracts/index.js +3 -0
- package/dist/contracts/partsOffice.contract.d.ts +16 -1
- package/dist/contracts/partsOffice.contract.js +1 -0
- package/dist/entities/caseFile/caseFile.entity.d.ts +2 -0
- package/dist/entities/dataProtection/dataProtection.entity.d.ts +174 -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/index.d.ts +1 -0
- package/dist/entities/index.js +1 -0
- package/dist/entities/transparency/transparency.entity.d.ts +3 -0
- package/package.json +1 -1
- package/src/base/entities.ts +79 -0
- package/src/contracts/dataProtection.contract.ts +195 -0
- package/src/contracts/index.ts +5 -1
- package/src/contracts/partsOffice.contract.ts +10 -0
- package/src/entities/caseFile/caseFile.entity.ts +2 -0
- package/src/entities/dataProtection/dataProtection.entity.ts +185 -0
- package/src/entities/dataProtection/index.ts +1 -0
- package/src/entities/index.ts +1 -0
- package/src/entities/transparency/transparency.entity.ts +3 -0
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
import {
|
|
2
|
+
type CommunicationMeans,
|
|
3
|
+
type DataBreachEventAction,
|
|
4
|
+
type DataBreachKind,
|
|
5
|
+
type DataBreachNoticeMeans,
|
|
6
|
+
type DataBreachStatus,
|
|
7
|
+
type DataLegalBasis,
|
|
8
|
+
type DataRight,
|
|
9
|
+
type DataRightsChannel,
|
|
10
|
+
type DataRightsEventAction,
|
|
11
|
+
type DataRightsRequestStatus,
|
|
12
|
+
type DataRightsResolution,
|
|
13
|
+
} from '../../base/entities';
|
|
14
|
+
|
|
15
|
+
/** Tratamiento de datos personales de la municipalidad: lo que se informa al público (Ley 19.628, art. 14 ter). */
|
|
16
|
+
export interface DataTreatmentResponseEntity {
|
|
17
|
+
id: string;
|
|
18
|
+
name: string;
|
|
19
|
+
purpose: string;
|
|
20
|
+
legalBasis: DataLegalBasis;
|
|
21
|
+
legalBasisDetail: string | null;
|
|
22
|
+
dataCategories: string[];
|
|
23
|
+
sensitiveData: boolean;
|
|
24
|
+
dataSubjects: string;
|
|
25
|
+
recipients: string | null;
|
|
26
|
+
source: string | null;
|
|
27
|
+
retention: string | null;
|
|
28
|
+
securityMeasures: string | null;
|
|
29
|
+
internationalTransfer: string | null;
|
|
30
|
+
responsibleUnit: string | null;
|
|
31
|
+
published: boolean;
|
|
32
|
+
enabled: boolean;
|
|
33
|
+
/** Solicitudes de titulares que lo mencionan. */
|
|
34
|
+
requests: number;
|
|
35
|
+
updatedAt: string;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/** Página pública de protección de datos: quién es el responsable, cómo ejercer los derechos y qué se trata. */
|
|
39
|
+
export interface DataProtectionPolicyEntity {
|
|
40
|
+
organ: string;
|
|
41
|
+
/** Correo o medio en que se reciben las solicitudes de los titulares (art. 14 ter letra c). */
|
|
42
|
+
contact: string | null;
|
|
43
|
+
/** Dirección de la política de tratamiento, si está publicada aparte. */
|
|
44
|
+
policyUrl: string | null;
|
|
45
|
+
treatments: Omit<DataTreatmentResponseEntity, 'published' | 'enabled' | 'requests' | 'securityMeasures'>[];
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/** Semáforo del plazo: a tiempo, por vencer (5 días corridos o menos) o vencido. */
|
|
49
|
+
export type DataRightsDueStatus = 'OnTime' | 'DueSoon' | 'Overdue';
|
|
50
|
+
|
|
51
|
+
export interface DataRightsRequestListItemEntity {
|
|
52
|
+
id: string;
|
|
53
|
+
/** «N° 4/2026». */
|
|
54
|
+
label: string;
|
|
55
|
+
channel: DataRightsChannel;
|
|
56
|
+
rights: DataRight[];
|
|
57
|
+
requesterName: string;
|
|
58
|
+
requestText: string;
|
|
59
|
+
treatmentName: string | null;
|
|
60
|
+
receivedAt: string;
|
|
61
|
+
dueAt: string;
|
|
62
|
+
status: DataRightsRequestStatus;
|
|
63
|
+
resolution: DataRightsResolution | null;
|
|
64
|
+
assigneeFullName: string | null;
|
|
65
|
+
acknowledged: boolean;
|
|
66
|
+
identityVerified: boolean;
|
|
67
|
+
/** Bloqueo temporal pedido y sin resolver. */
|
|
68
|
+
blockingPending: boolean;
|
|
69
|
+
/** Solo mientras está abierta. */
|
|
70
|
+
dueStatus: DataRightsDueStatus | null;
|
|
71
|
+
daysLeft: number | null;
|
|
72
|
+
resolvedOnTime: boolean | null;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export interface DataRightsDocumentLinkEntity {
|
|
76
|
+
id: string;
|
|
77
|
+
folio: string | null;
|
|
78
|
+
subject: string;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export interface DataRightsRequestDetailEntity extends DataRightsRequestListItemEntity {
|
|
82
|
+
year: number;
|
|
83
|
+
number: number;
|
|
84
|
+
requesterRut: string | null;
|
|
85
|
+
requesterEmail: string | null;
|
|
86
|
+
requesterAddress: string | null;
|
|
87
|
+
representativeName: string | null;
|
|
88
|
+
identityVerifiedAt: string | null;
|
|
89
|
+
identityNote: string | null;
|
|
90
|
+
treatmentId: string | null;
|
|
91
|
+
acknowledgedAt: string | null;
|
|
92
|
+
extendedAt: string | null;
|
|
93
|
+
extensionNote: string | null;
|
|
94
|
+
blockingRequested: boolean;
|
|
95
|
+
blockingReason: string | null;
|
|
96
|
+
blockingDueAt: string | null;
|
|
97
|
+
blockingGranted: boolean | null;
|
|
98
|
+
blockingResolvedAt: string | null;
|
|
99
|
+
blockingNote: string | null;
|
|
100
|
+
assigneeEmployeeId: string | null;
|
|
101
|
+
resolvedAt: string | null;
|
|
102
|
+
denialGrounds: string[];
|
|
103
|
+
resolutionNote: string | null;
|
|
104
|
+
responseDocument: DataRightsDocumentLinkEntity | null;
|
|
105
|
+
responseSentAt: string | null;
|
|
106
|
+
responseSentTo: string | null;
|
|
107
|
+
responseSentMeans: CommunicationMeans | null;
|
|
108
|
+
/** Hasta cuándo el titular puede reclamar ante la Agencia (30 días hábiles), si se denegó en todo o en parte. */
|
|
109
|
+
complaintDeadline: string | null;
|
|
110
|
+
complaintAt: string | null;
|
|
111
|
+
complaintNote: string | null;
|
|
112
|
+
createdByFullName: string;
|
|
113
|
+
/** Se puede prorrogar: abierta, sin prórroga y antes de vencer. */
|
|
114
|
+
canExtend: boolean;
|
|
115
|
+
/** El titular ya puede reclamar ante la Agencia: denegación o plazo vencido sin respuesta. */
|
|
116
|
+
canRegisterComplaint: boolean;
|
|
117
|
+
events: { action: DataRightsEventAction; note: string | null; employeeFullName: string; createdAt: string }[];
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
export interface DataRightsSummaryEntity {
|
|
121
|
+
year: number;
|
|
122
|
+
total: number;
|
|
123
|
+
open: number;
|
|
124
|
+
overdue: number;
|
|
125
|
+
dueSoon: number;
|
|
126
|
+
/** Abiertas sin acuse de recibo. */
|
|
127
|
+
unacknowledged: number;
|
|
128
|
+
/** Bloqueos temporales pedidos y sin resolver. */
|
|
129
|
+
blockingPending: number;
|
|
130
|
+
byRight: Record<DataRight, number>;
|
|
131
|
+
resolved: Record<DataRightsResolution, number>;
|
|
132
|
+
/** Respondidas dentro del plazo sobre las respondidas, en %. */
|
|
133
|
+
onTimeRate: number | null;
|
|
134
|
+
complaints: number;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/** Datos personales que se reconocen en el texto de un documento, enmascarados: ayudan a tarjar. */
|
|
138
|
+
export interface PersonalDataHintsEntity {
|
|
139
|
+
ruts: number;
|
|
140
|
+
emails: number;
|
|
141
|
+
phones: number;
|
|
142
|
+
/** Algunos ejemplos enmascarados («11.1••.•••-1»). */
|
|
143
|
+
samples: string[];
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
/** Vulneración de las medidas de seguridad que afecta datos personales (Ley 19.628, art. 14 sexies). */
|
|
147
|
+
export interface DataBreachResponseEntity {
|
|
148
|
+
id: string;
|
|
149
|
+
/** «N° 2/2026». */
|
|
150
|
+
label: string;
|
|
151
|
+
year: number;
|
|
152
|
+
number: number;
|
|
153
|
+
detectedAt: string;
|
|
154
|
+
occurredAt: string | null;
|
|
155
|
+
kinds: DataBreachKind[];
|
|
156
|
+
description: string;
|
|
157
|
+
effects: string | null;
|
|
158
|
+
dataCategories: string[];
|
|
159
|
+
affectedCount: number | null;
|
|
160
|
+
measures: string | null;
|
|
161
|
+
sensitiveData: boolean;
|
|
162
|
+
minorsData: boolean;
|
|
163
|
+
financialData: boolean;
|
|
164
|
+
riskToRights: boolean;
|
|
165
|
+
treatmentId: string | null;
|
|
166
|
+
treatmentName: string | null;
|
|
167
|
+
status: DataBreachStatus;
|
|
168
|
+
/** Hay riesgo razonable para los titulares: se reporta a la Agencia sin dilaciones indebidas. */
|
|
169
|
+
mustReportAgency: boolean;
|
|
170
|
+
/** Además, datos sensibles, de menores de 14 o de obligaciones económicas: se comunica a los titulares. */
|
|
171
|
+
mustNotifyHolders: boolean;
|
|
172
|
+
agencyReportedAt: string | null;
|
|
173
|
+
agencyReportNote: string | null;
|
|
174
|
+
/** Horas entre la detección y el reporte a la Agencia (o hasta ahora, si falta reportarla). */
|
|
175
|
+
agencyDelayHours: number | null;
|
|
176
|
+
holdersNotifiedAt: string | null;
|
|
177
|
+
holdersNoticeMeans: DataBreachNoticeMeans | null;
|
|
178
|
+
holdersNoticeNote: string | null;
|
|
179
|
+
closedAt: string | null;
|
|
180
|
+
closeNote: string | null;
|
|
181
|
+
createdByFullName: string;
|
|
182
|
+
/** Por qué todavía no se puede cerrar, o `null` si se puede. */
|
|
183
|
+
closeBlock: string | null;
|
|
184
|
+
events: { action: DataBreachEventAction; note: string | null; employeeFullName: string; createdAt: string }[];
|
|
185
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './dataProtection.entity';
|
package/src/entities/index.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type DocumentAccessLevel, type DocumentStatus } from '../../base/entities';
|
|
2
|
+
import { type PersonalDataHintsEntity } from '../dataProtection';
|
|
2
3
|
|
|
3
4
|
/** En qué quedó un documento en Transparencia Activa: aún sin decidir, publicado o excluido con su motivo. */
|
|
4
5
|
export type TransparencyItemStatus = 'Pending' | 'Published' | 'Excluded';
|
|
@@ -26,6 +27,8 @@ export interface TransparencyItemEntity {
|
|
|
26
27
|
/** Para publicarlo hace falta antes la versión tarjada. */
|
|
27
28
|
needsRedacted: boolean;
|
|
28
29
|
redactedFileName: string | null;
|
|
30
|
+
/** RUN, correos y teléfonos que se reconocen en el texto del original (`null` si no tiene texto): ayudan a tarjar. */
|
|
31
|
+
personalData: PersonalDataHintsEntity | null;
|
|
29
32
|
status: TransparencyItemStatus;
|
|
30
33
|
/** Dirección de la publicación en el Portal de Transparencia, si se anotó. */
|
|
31
34
|
transparencyUrl: string | null;
|