@muni-sanfer/types-gestor-documental 0.0.1-beta.27 → 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.
@@ -220,7 +220,7 @@ export declare const DocumentAccessAction: {
220
220
  FileDownloaded: "FileDownloaded";
221
221
  TrailExported: "TrailExported";
222
222
  };
223
- export type AuditEntity = 'DocumentType' | 'IssuingEntity' | 'ArchivalSeries' | 'TextSnippet' | 'Holiday' | 'Procedure' | 'QualityMetric' | 'ServiceOutage' | 'Repository';
223
+ export type AuditEntity = 'DocumentType' | 'IssuingEntity' | 'ArchivalSeries' | 'TextSnippet' | 'Holiday' | 'Procedure' | 'QualityMetric' | 'ServiceOutage' | 'Repository' | 'DataTreatment';
224
224
  export declare const AuditEntity: {
225
225
  DocumentType: "DocumentType";
226
226
  IssuingEntity: "IssuingEntity";
@@ -231,6 +231,7 @@ export declare const AuditEntity: {
231
231
  QualityMetric: "QualityMetric";
232
232
  ServiceOutage: "ServiceOutage";
233
233
  Repository: "Repository";
234
+ DataTreatment: "DataTreatment";
234
235
  };
235
236
  export type AuditAction = 'Created' | 'Updated' | 'Enabled' | 'Disabled' | 'Removed' | 'Exported';
236
237
  export declare const AuditAction: {
@@ -293,6 +294,55 @@ export declare const TransparencyStatus: {
293
294
  Published: "Published";
294
295
  Excluded: "Excluded";
295
296
  };
297
+ export type DataLegalBasis = 'LegalFunction' | 'LegalObligation' | 'Consent' | 'Contract' | 'VitalInterest';
298
+ export declare const DataLegalBasis: {
299
+ LegalFunction: "LegalFunction";
300
+ LegalObligation: "LegalObligation";
301
+ Consent: "Consent";
302
+ Contract: "Contract";
303
+ VitalInterest: "VitalInterest";
304
+ };
305
+ export type DataRight = 'Access' | 'Rectification' | 'Suppression' | 'Opposition' | 'Portability';
306
+ export declare const DataRight: {
307
+ Access: "Access";
308
+ Rectification: "Rectification";
309
+ Suppression: "Suppression";
310
+ Opposition: "Opposition";
311
+ Portability: "Portability";
312
+ };
313
+ export type DataRightsChannel = 'Email' | 'WebForm' | 'InPerson' | 'Letter';
314
+ export declare const DataRightsChannel: {
315
+ Email: "Email";
316
+ WebForm: "WebForm";
317
+ InPerson: "InPerson";
318
+ Letter: "Letter";
319
+ };
320
+ export type DataRightsRequestStatus = 'Received' | 'InProgress' | 'Resolved';
321
+ export declare const DataRightsRequestStatus: {
322
+ Received: "Received";
323
+ InProgress: "InProgress";
324
+ Resolved: "Resolved";
325
+ };
326
+ export type DataRightsResolution = 'Granted' | 'PartiallyGranted' | 'Denied' | 'Withdrawn';
327
+ export declare const DataRightsResolution: {
328
+ Granted: "Granted";
329
+ PartiallyGranted: "PartiallyGranted";
330
+ Denied: "Denied";
331
+ Withdrawn: "Withdrawn";
332
+ };
333
+ export type DataRightsEventAction = 'Received' | 'Updated' | 'Acknowledged' | 'IdentityVerified' | 'Assigned' | 'BlockingResolved' | 'Extended' | 'Resolved' | 'ResponseSent' | 'ComplaintRegistered';
334
+ export declare const DataRightsEventAction: {
335
+ Received: "Received";
336
+ Updated: "Updated";
337
+ Acknowledged: "Acknowledged";
338
+ IdentityVerified: "IdentityVerified";
339
+ Assigned: "Assigned";
340
+ BlockingResolved: "BlockingResolved";
341
+ Extended: "Extended";
342
+ Resolved: "Resolved";
343
+ ResponseSent: "ResponseSent";
344
+ ComplaintRegistered: "ComplaintRegistered";
345
+ };
296
346
  export interface DocumentTypeEntity {
297
347
  id: string;
298
348
  name: string;
@@ -386,6 +436,7 @@ export interface DocumentEntity {
386
436
  redactedFileId?: string | null;
387
437
  redactedFileName?: string | null;
388
438
  accessRequestResponses?: AccessRequestEntity[];
439
+ dataRightsResponses?: DataRightsRequestEntity[];
389
440
  accessRequestDeliveries?: AccessRequestDocumentEntity[];
390
441
  dispatch?: DocumentDispatchEntity | null;
391
442
  docDigitalInbound?: DocDigitalInboundEntity | null;
@@ -978,6 +1029,85 @@ export interface AccessRequestEventEntity {
978
1029
  accessRequestId: string;
979
1030
  createdAt: string;
980
1031
  }
1032
+ export interface DataTreatmentEntity {
1033
+ id: string;
1034
+ name: string;
1035
+ purpose: string;
1036
+ legalBasis: DataLegalBasis;
1037
+ legalBasisDetail?: string | null;
1038
+ dataCategories: string[];
1039
+ sensitiveData: boolean;
1040
+ dataSubjects: string;
1041
+ recipients?: string | null;
1042
+ source?: string | null;
1043
+ retention?: string | null;
1044
+ securityMeasures?: string | null;
1045
+ internationalTransfer?: string | null;
1046
+ responsibleUnit?: string | null;
1047
+ published: boolean;
1048
+ requests?: DataRightsRequestEntity[];
1049
+ enabled: boolean;
1050
+ deleted: boolean;
1051
+ createdAt: string;
1052
+ updatedAt: string;
1053
+ }
1054
+ export interface DataRightsRequestEntity {
1055
+ id: string;
1056
+ number: number;
1057
+ year: number;
1058
+ channel: DataRightsChannel;
1059
+ receivedAt: string;
1060
+ rights: DataRight[];
1061
+ requesterName: string;
1062
+ requesterRut?: string | null;
1063
+ requesterEmail?: string | null;
1064
+ requesterAddress?: string | null;
1065
+ representativeName?: string | null;
1066
+ identityVerifiedAt?: string | null;
1067
+ identityNote?: string | null;
1068
+ requestText: string;
1069
+ treatment?: DataTreatmentEntity | null;
1070
+ treatmentId?: string | null;
1071
+ status: DataRightsRequestStatus;
1072
+ acknowledgedAt?: string | null;
1073
+ dueAt: string;
1074
+ extendedAt?: string | null;
1075
+ extensionNote?: string | null;
1076
+ blockingRequested: boolean;
1077
+ blockingReason?: string | null;
1078
+ blockingDueAt?: string | null;
1079
+ blockingGranted?: boolean | null;
1080
+ blockingResolvedAt?: string | null;
1081
+ blockingNote?: string | null;
1082
+ assigneeEmployeeId?: string | null;
1083
+ assigneeFullName?: string | null;
1084
+ resolution?: DataRightsResolution | null;
1085
+ resolvedAt?: string | null;
1086
+ denialGrounds: string[];
1087
+ resolutionNote?: string | null;
1088
+ responseDocument?: DocumentEntity | null;
1089
+ responseDocumentId?: string | null;
1090
+ responseSentAt?: string | null;
1091
+ responseSentTo?: string | null;
1092
+ responseSentMeans?: CommunicationMeans | null;
1093
+ complaintAt?: string | null;
1094
+ complaintNote?: string | null;
1095
+ createdByEmployeeId: string;
1096
+ createdByFullName: string;
1097
+ events?: DataRightsEventEntity[];
1098
+ createdAt: string;
1099
+ updatedAt: string;
1100
+ }
1101
+ export interface DataRightsEventEntity {
1102
+ id: string;
1103
+ action: DataRightsEventAction;
1104
+ note?: string | null;
1105
+ employeeId?: string | null;
1106
+ employeeFullName: string;
1107
+ request?: DataRightsRequestEntity;
1108
+ requestId: string;
1109
+ createdAt: string;
1110
+ }
981
1111
  type JsonValue = string | number | boolean | {
982
1112
  [key in string]?: JsonValue;
983
1113
  } | Array<JsonValue> | null;
@@ -1,7 +1,7 @@
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.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.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.DocumentTrackingAction = exports.DocumentParticipantStatus = exports.DocumentParticipantRole = exports.DocumentAccessLevel = exports.DocumentStatus = exports.DocumentCategory = void 0;
4
+ 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.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.DocumentTrackingAction = exports.DocumentParticipantStatus = exports.DocumentParticipantRole = exports.DocumentAccessLevel = exports.DocumentStatus = exports.DocumentCategory = void 0;
5
5
  exports.DocumentCategory = {
6
6
  Decree: 'Decree',
7
7
  Communication: 'Communication',
@@ -205,6 +205,7 @@ exports.AuditEntity = {
205
205
  QualityMetric: 'QualityMetric',
206
206
  ServiceOutage: 'ServiceOutage',
207
207
  Repository: 'Repository',
208
+ DataTreatment: 'DataTreatment',
208
209
  };
209
210
  exports.AuditAction = {
210
211
  Created: 'Created',
@@ -259,3 +260,46 @@ exports.TransparencyStatus = {
259
260
  Published: 'Published',
260
261
  Excluded: 'Excluded',
261
262
  };
263
+ exports.DataLegalBasis = {
264
+ LegalFunction: 'LegalFunction',
265
+ LegalObligation: 'LegalObligation',
266
+ Consent: 'Consent',
267
+ Contract: 'Contract',
268
+ VitalInterest: 'VitalInterest',
269
+ };
270
+ exports.DataRight = {
271
+ Access: 'Access',
272
+ Rectification: 'Rectification',
273
+ Suppression: 'Suppression',
274
+ Opposition: 'Opposition',
275
+ Portability: 'Portability',
276
+ };
277
+ exports.DataRightsChannel = {
278
+ Email: 'Email',
279
+ WebForm: 'WebForm',
280
+ InPerson: 'InPerson',
281
+ Letter: 'Letter',
282
+ };
283
+ exports.DataRightsRequestStatus = {
284
+ Received: 'Received',
285
+ InProgress: 'InProgress',
286
+ Resolved: 'Resolved',
287
+ };
288
+ exports.DataRightsResolution = {
289
+ Granted: 'Granted',
290
+ PartiallyGranted: 'PartiallyGranted',
291
+ Denied: 'Denied',
292
+ Withdrawn: 'Withdrawn',
293
+ };
294
+ exports.DataRightsEventAction = {
295
+ Received: 'Received',
296
+ Updated: 'Updated',
297
+ Acknowledged: 'Acknowledged',
298
+ IdentityVerified: 'IdentityVerified',
299
+ Assigned: 'Assigned',
300
+ BlockingResolved: 'BlockingResolved',
301
+ Extended: 'Extended',
302
+ Resolved: 'Resolved',
303
+ ResponseSent: 'ResponseSent',
304
+ ComplaintRegistered: 'ComplaintRegistered',
305
+ };
@@ -0,0 +1,168 @@
1
+ import { type CommunicationMeans, type DataLegalBasis, type DataRight, type DataRightsChannel, type DataRightsResolution } from '../base/entities';
2
+ import { type DataProtectionPolicyEntity, type DataRightsRequestDetailEntity, type DataRightsRequestListItemEntity, type DataRightsSummaryEntity, type DataTreatmentResponseEntity } from '../entities';
3
+ import { type RpcPage } from './contract';
4
+ /** Patrones NATS de `dataProtection`: tratamientos de datos y solicitudes de los titulares (Ley 19.628). */
5
+ export declare const DataProtectionPatterns: {
6
+ readonly getTreatments: "gestorDocumental.dataProtection.getTreatments";
7
+ readonly createTreatment: "gestorDocumental.dataProtection.createTreatment";
8
+ readonly updateTreatment: "gestorDocumental.dataProtection.updateTreatment";
9
+ readonly setTreatmentEnabled: "gestorDocumental.dataProtection.setTreatmentEnabled";
10
+ readonly getPolicy: "gestorDocumental.dataProtection.getPolicy";
11
+ readonly getRequests: "gestorDocumental.dataProtection.getRequests";
12
+ readonly getRequest: "gestorDocumental.dataProtection.getRequest";
13
+ readonly getSummary: "gestorDocumental.dataProtection.getSummary";
14
+ readonly createRequest: "gestorDocumental.dataProtection.createRequest";
15
+ readonly updateRequest: "gestorDocumental.dataProtection.updateRequest";
16
+ readonly actOnRequest: "gestorDocumental.dataProtection.actOnRequest";
17
+ };
18
+ type TActor = {
19
+ employeeId: string;
20
+ fullName: string;
21
+ };
22
+ /** Datos de un tratamiento al crearlo o editarlo. */
23
+ export interface DataTreatmentWritePayload {
24
+ name: string;
25
+ purpose: string;
26
+ legalBasis: DataLegalBasis;
27
+ legalBasisDetail?: string | null;
28
+ dataCategories: string[];
29
+ sensitiveData?: boolean;
30
+ dataSubjects: string;
31
+ recipients?: string | null;
32
+ source?: string | null;
33
+ retention?: string | null;
34
+ securityMeasures?: string | null;
35
+ internationalTransfer?: string | null;
36
+ responsibleUnit?: string | null;
37
+ published?: boolean;
38
+ }
39
+ /** Datos de una solicitud al ingresarla o corregirla. */
40
+ export interface DataRightsRequestWritePayload {
41
+ channel: DataRightsChannel;
42
+ receivedAt: string;
43
+ rights: DataRight[];
44
+ requesterName: string;
45
+ requesterRut?: string | null;
46
+ requesterEmail?: string | null;
47
+ requesterAddress?: string | null;
48
+ representativeName?: string | null;
49
+ requestText: string;
50
+ treatmentId?: string | null;
51
+ /** Bloqueo temporal: solo con rectificación, supresión u oposición, y fundado. */
52
+ blockingRequested?: boolean;
53
+ blockingReason?: string | null;
54
+ }
55
+ /** Un paso de la tramitación. */
56
+ export type DataRightsAction = {
57
+ type: 'acknowledge';
58
+ note?: string | null;
59
+ } | {
60
+ type: 'verifyIdentity';
61
+ note?: string | null;
62
+ } | {
63
+ type: 'assign';
64
+ employeeId: string;
65
+ fullName: string;
66
+ note?: string | null;
67
+ }
68
+ /** Bloqueo temporal, en 2 días hábiles; si se rechaza, fundado (y se comunica a la Agencia). */
69
+ | {
70
+ type: 'resolveBlocking';
71
+ granted: boolean;
72
+ note?: string | null;
73
+ } | {
74
+ type: 'extend';
75
+ note: string;
76
+ } | {
77
+ type: 'resolve';
78
+ resolution: DataRightsResolution;
79
+ grounds?: string[];
80
+ note?: string | null;
81
+ responseDocumentId?: string | null;
82
+ }
83
+ /** Respaldo del envío de la respuesta escrita (art. 11). */
84
+ | {
85
+ type: 'registerResponseSent';
86
+ sentAt?: string | null;
87
+ sentTo: string;
88
+ means: CommunicationMeans;
89
+ note?: string | null;
90
+ } | {
91
+ type: 'registerComplaint';
92
+ complaintAt?: string | null;
93
+ note: string;
94
+ };
95
+ export interface DataProtectionContract {
96
+ [DataProtectionPatterns.getTreatments]: {
97
+ payload: {
98
+ enabled?: boolean | null;
99
+ };
100
+ response: DataTreatmentResponseEntity[];
101
+ };
102
+ [DataProtectionPatterns.createTreatment]: {
103
+ payload: DataTreatmentWritePayload;
104
+ response: DataTreatmentResponseEntity;
105
+ };
106
+ [DataProtectionPatterns.updateTreatment]: {
107
+ payload: DataTreatmentWritePayload & {
108
+ id: string;
109
+ };
110
+ response: DataTreatmentResponseEntity;
111
+ };
112
+ [DataProtectionPatterns.setTreatmentEnabled]: {
113
+ payload: {
114
+ id: string;
115
+ enabled: boolean;
116
+ };
117
+ response: DataTreatmentResponseEntity;
118
+ };
119
+ /** Lo que se publica sin sesión (art. 14 ter): los tratamientos habilitados y publicados. */
120
+ [DataProtectionPatterns.getPolicy]: {
121
+ payload: Record<string, never>;
122
+ response: DataProtectionPolicyEntity;
123
+ };
124
+ [DataProtectionPatterns.getRequests]: {
125
+ payload: {
126
+ status?: 'open' | 'resolved' | 'all';
127
+ year?: number | null;
128
+ search?: string;
129
+ page?: number;
130
+ limit?: number;
131
+ };
132
+ response: RpcPage<DataRightsRequestListItemEntity[]>;
133
+ };
134
+ [DataProtectionPatterns.getRequest]: {
135
+ payload: {
136
+ id: string;
137
+ };
138
+ response: DataRightsRequestDetailEntity;
139
+ };
140
+ [DataProtectionPatterns.getSummary]: {
141
+ payload: {
142
+ year: number;
143
+ };
144
+ response: DataRightsSummaryEntity;
145
+ };
146
+ [DataProtectionPatterns.createRequest]: {
147
+ payload: DataRightsRequestWritePayload & {
148
+ actor: TActor;
149
+ };
150
+ response: DataRightsRequestDetailEntity;
151
+ };
152
+ [DataProtectionPatterns.updateRequest]: {
153
+ payload: DataRightsRequestWritePayload & {
154
+ id: string;
155
+ actor: TActor;
156
+ };
157
+ response: DataRightsRequestDetailEntity;
158
+ };
159
+ [DataProtectionPatterns.actOnRequest]: {
160
+ payload: {
161
+ id: string;
162
+ action: DataRightsAction;
163
+ actor: TActor;
164
+ };
165
+ response: DataRightsRequestDetailEntity;
166
+ };
167
+ }
168
+ export {};
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DataProtectionPatterns = void 0;
4
+ /** Patrones NATS de `dataProtection`: tratamientos de datos y solicitudes de los titulares (Ley 19.628). */
5
+ exports.DataProtectionPatterns = {
6
+ getTreatments: 'gestorDocumental.dataProtection.getTreatments',
7
+ createTreatment: 'gestorDocumental.dataProtection.createTreatment',
8
+ updateTreatment: 'gestorDocumental.dataProtection.updateTreatment',
9
+ setTreatmentEnabled: 'gestorDocumental.dataProtection.setTreatmentEnabled',
10
+ getPolicy: 'gestorDocumental.dataProtection.getPolicy',
11
+ getRequests: 'gestorDocumental.dataProtection.getRequests',
12
+ getRequest: 'gestorDocumental.dataProtection.getRequest',
13
+ getSummary: 'gestorDocumental.dataProtection.getSummary',
14
+ createRequest: 'gestorDocumental.dataProtection.createRequest',
15
+ updateRequest: 'gestorDocumental.dataProtection.updateRequest',
16
+ actOnRequest: 'gestorDocumental.dataProtection.actOnRequest',
17
+ };
@@ -12,6 +12,7 @@ import { type RepositoryExportContract } from './repositoryExport.contract';
12
12
  import { type RetentionContract } from './retention.contract';
13
13
  import { type AccessRequestContract } from './accessRequest.contract';
14
14
  import { type TransparencyContract } from './transparency.contract';
15
+ import { type DataProtectionContract } from './dataProtection.contract';
15
16
  import { type ScanContract } from './scan.contract';
16
17
  import { type PartsOfficeContract } from './partsOffice.contract';
17
18
  import { type ProcedureContract } from './procedure.contract';
@@ -39,6 +40,7 @@ export * from './repositoryExport.contract';
39
40
  export * from './retention.contract';
40
41
  export * from './accessRequest.contract';
41
42
  export * from './transparency.contract';
43
+ export * from './dataProtection.contract';
42
44
  /** Patrones NATS de gestor-documental-ms, por recurso: `gestorDocumental.<recurso>.<acción>`. */
43
45
  export declare const GestorDocumentalPatterns: {
44
46
  readonly documentType: {
@@ -229,6 +231,19 @@ export declare const GestorDocumentalPatterns: {
229
231
  readonly getPublic: "gestorDocumental.transparency.getPublic";
230
232
  readonly getPublicFile: "gestorDocumental.transparency.getPublicFile";
231
233
  };
234
+ readonly dataProtection: {
235
+ readonly getTreatments: "gestorDocumental.dataProtection.getTreatments";
236
+ readonly createTreatment: "gestorDocumental.dataProtection.createTreatment";
237
+ readonly updateTreatment: "gestorDocumental.dataProtection.updateTreatment";
238
+ readonly setTreatmentEnabled: "gestorDocumental.dataProtection.setTreatmentEnabled";
239
+ readonly getPolicy: "gestorDocumental.dataProtection.getPolicy";
240
+ readonly getRequests: "gestorDocumental.dataProtection.getRequests";
241
+ readonly getRequest: "gestorDocumental.dataProtection.getRequest";
242
+ readonly getSummary: "gestorDocumental.dataProtection.getSummary";
243
+ readonly createRequest: "gestorDocumental.dataProtection.createRequest";
244
+ readonly updateRequest: "gestorDocumental.dataProtection.updateRequest";
245
+ readonly actOnRequest: "gestorDocumental.dataProtection.actOnRequest";
246
+ };
232
247
  };
233
248
  /** Contrato completo de gestor-documental-ms: la unión de los contratos de sus recursos. */
234
- export type GestorDocumentalContract = DocumentTypeContract & DocumentContract & ProcedureContract & IssuingEntityContract & CaseFileContract & PartsOfficeContract & RegisterBookContract & SignatureBatchContract & WorkFolderContract & ScanContract & ArchivalSeriesContract & TextSnippetContract & HolidayContract & IndicatorsContract & AuditContract & SignatureCheckContract & RepositoryExportContract & RetentionContract & AccessRequestContract & TransparencyContract;
249
+ export type GestorDocumentalContract = DocumentTypeContract & DocumentContract & ProcedureContract & IssuingEntityContract & CaseFileContract & PartsOfficeContract & RegisterBookContract & SignatureBatchContract & WorkFolderContract & ScanContract & ArchivalSeriesContract & TextSnippetContract & HolidayContract & IndicatorsContract & AuditContract & SignatureCheckContract & RepositoryExportContract & RetentionContract & AccessRequestContract & TransparencyContract & DataProtectionContract;
@@ -29,6 +29,7 @@ const repositoryExport_contract_1 = require("./repositoryExport.contract");
29
29
  const retention_contract_1 = require("./retention.contract");
30
30
  const accessRequest_contract_1 = require("./accessRequest.contract");
31
31
  const transparency_contract_1 = require("./transparency.contract");
32
+ const dataProtection_contract_1 = require("./dataProtection.contract");
32
33
  const scan_contract_1 = require("./scan.contract");
33
34
  const partsOffice_contract_1 = require("./partsOffice.contract");
34
35
  const procedure_contract_1 = require("./procedure.contract");
@@ -56,6 +57,7 @@ __exportStar(require("./repositoryExport.contract"), exports);
56
57
  __exportStar(require("./retention.contract"), exports);
57
58
  __exportStar(require("./accessRequest.contract"), exports);
58
59
  __exportStar(require("./transparency.contract"), exports);
60
+ __exportStar(require("./dataProtection.contract"), exports);
59
61
  /** Patrones NATS de gestor-documental-ms, por recurso: `gestorDocumental.<recurso>.<acción>`. */
60
62
  exports.GestorDocumentalPatterns = {
61
63
  documentType: documentType_contract_1.DocumentTypePatterns,
@@ -78,4 +80,5 @@ exports.GestorDocumentalPatterns = {
78
80
  retention: retention_contract_1.RetentionPatterns,
79
81
  accessRequest: accessRequest_contract_1.AccessRequestPatterns,
80
82
  transparency: transparency_contract_1.TransparencyPatterns,
83
+ dataProtection: dataProtection_contract_1.DataProtectionPatterns,
81
84
  };
@@ -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,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -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);
@@ -18,3 +18,4 @@ export * from './repositoryExport';
18
18
  export * from './retention';
19
19
  export * from './accessRequest';
20
20
  export * from './transparency';
21
+ export * from './dataProtection';
@@ -34,3 +34,4 @@ __exportStar(require("./repositoryExport"), exports);
34
34
  __exportStar(require("./retention"), exports);
35
35
  __exportStar(require("./accessRequest"), exports);
36
36
  __exportStar(require("./transparency"), exports);
37
+ __exportStar(require("./dataProtection"), exports);
@@ -1,4 +1,5 @@
1
1
  import { type DocumentAccessLevel, type DocumentStatus } from '../../base/entities';
2
+ import { type PersonalDataHintsEntity } from '../dataProtection';
2
3
  /** En qué quedó un documento en Transparencia Activa: aún sin decidir, publicado o excluido con su motivo. */
3
4
  export type TransparencyItemStatus = 'Pending' | 'Published' | 'Excluded';
4
5
  /** Un documento que se publica en Transparencia Activa (Ley 20.285, art. 7°), con lo que se decidió de él. */
@@ -24,6 +25,8 @@ export interface TransparencyItemEntity {
24
25
  /** Para publicarlo hace falta antes la versión tarjada. */
25
26
  needsRedacted: boolean;
26
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;
27
30
  status: TransparencyItemStatus;
28
31
  /** Dirección de la publicación en el Portal de Transparencia, si se anotó. */
29
32
  transparencyUrl: string | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@muni-sanfer/types-gestor-documental",
3
- "version": "0.0.1-beta.27",
3
+ "version": "0.0.1-beta.28",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "scripts": {
@@ -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
+ }
@@ -12,6 +12,7 @@ import { RepositoryExportPatterns, type RepositoryExportContract } from './repos
12
12
  import { RetentionPatterns, type RetentionContract } from './retention.contract';
13
13
  import { AccessRequestPatterns, type AccessRequestContract } from './accessRequest.contract';
14
14
  import { TransparencyPatterns, type TransparencyContract } from './transparency.contract';
15
+ import { DataProtectionPatterns, type DataProtectionContract } from './dataProtection.contract';
15
16
  import { ScanPatterns, type ScanContract } from './scan.contract';
16
17
  import { PartsOfficePatterns, type PartsOfficeContract } from './partsOffice.contract';
17
18
  import { ProcedurePatterns, type ProcedureContract } from './procedure.contract';
@@ -40,6 +41,7 @@ export * from './repositoryExport.contract';
40
41
  export * from './retention.contract';
41
42
  export * from './accessRequest.contract';
42
43
  export * from './transparency.contract';
44
+ export * from './dataProtection.contract';
43
45
 
44
46
  /** Patrones NATS de gestor-documental-ms, por recurso: `gestorDocumental.<recurso>.<acción>`. */
45
47
  export const GestorDocumentalPatterns = {
@@ -63,6 +65,7 @@ export const GestorDocumentalPatterns = {
63
65
  retention: RetentionPatterns,
64
66
  accessRequest: AccessRequestPatterns,
65
67
  transparency: TransparencyPatterns,
68
+ dataProtection: DataProtectionPatterns,
66
69
  } as const;
67
70
 
68
71
  /** Contrato completo de gestor-documental-ms: la unión de los contratos de sus recursos. */
@@ -85,4 +88,5 @@ export type GestorDocumentalContract = DocumentTypeContract &
85
88
  RepositoryExportContract &
86
89
  RetentionContract &
87
90
  AccessRequestContract &
88
- TransparencyContract;
91
+ TransparencyContract &
92
+ DataProtectionContract;
@@ -0,0 +1,140 @@
1
+ import {
2
+ type CommunicationMeans,
3
+ type DataLegalBasis,
4
+ type DataRight,
5
+ type DataRightsChannel,
6
+ type DataRightsEventAction,
7
+ type DataRightsRequestStatus,
8
+ type DataRightsResolution,
9
+ } from '../../base/entities';
10
+
11
+ /** Tratamiento de datos personales de la municipalidad: lo que se informa al público (Ley 19.628, art. 14 ter). */
12
+ export interface DataTreatmentResponseEntity {
13
+ id: string;
14
+ name: string;
15
+ purpose: string;
16
+ legalBasis: DataLegalBasis;
17
+ legalBasisDetail: string | null;
18
+ dataCategories: string[];
19
+ sensitiveData: boolean;
20
+ dataSubjects: string;
21
+ recipients: string | null;
22
+ source: string | null;
23
+ retention: string | null;
24
+ securityMeasures: string | null;
25
+ internationalTransfer: string | null;
26
+ responsibleUnit: string | null;
27
+ published: boolean;
28
+ enabled: boolean;
29
+ /** Solicitudes de titulares que lo mencionan. */
30
+ requests: number;
31
+ updatedAt: string;
32
+ }
33
+
34
+ /** Página pública de protección de datos: quién es el responsable, cómo ejercer los derechos y qué se trata. */
35
+ export interface DataProtectionPolicyEntity {
36
+ organ: string;
37
+ /** Correo o medio en que se reciben las solicitudes de los titulares (art. 14 ter letra c). */
38
+ contact: string | null;
39
+ /** Dirección de la política de tratamiento, si está publicada aparte. */
40
+ policyUrl: string | null;
41
+ treatments: Omit<DataTreatmentResponseEntity, 'published' | 'enabled' | 'requests' | 'securityMeasures'>[];
42
+ }
43
+
44
+ /** Semáforo del plazo: a tiempo, por vencer (5 días corridos o menos) o vencido. */
45
+ export type DataRightsDueStatus = 'OnTime' | 'DueSoon' | 'Overdue';
46
+
47
+ export interface DataRightsRequestListItemEntity {
48
+ id: string;
49
+ /** «N° 4/2026». */
50
+ label: string;
51
+ channel: DataRightsChannel;
52
+ rights: DataRight[];
53
+ requesterName: string;
54
+ requestText: string;
55
+ treatmentName: string | null;
56
+ receivedAt: string;
57
+ dueAt: string;
58
+ status: DataRightsRequestStatus;
59
+ resolution: DataRightsResolution | null;
60
+ assigneeFullName: string | null;
61
+ acknowledged: boolean;
62
+ identityVerified: boolean;
63
+ /** Bloqueo temporal pedido y sin resolver. */
64
+ blockingPending: boolean;
65
+ /** Solo mientras está abierta. */
66
+ dueStatus: DataRightsDueStatus | null;
67
+ daysLeft: number | null;
68
+ resolvedOnTime: boolean | null;
69
+ }
70
+
71
+ export interface DataRightsDocumentLinkEntity {
72
+ id: string;
73
+ folio: string | null;
74
+ subject: string;
75
+ }
76
+
77
+ export interface DataRightsRequestDetailEntity extends DataRightsRequestListItemEntity {
78
+ year: number;
79
+ number: number;
80
+ requesterRut: string | null;
81
+ requesterEmail: string | null;
82
+ requesterAddress: string | null;
83
+ representativeName: string | null;
84
+ identityVerifiedAt: string | null;
85
+ identityNote: string | null;
86
+ treatmentId: string | null;
87
+ acknowledgedAt: string | null;
88
+ extendedAt: string | null;
89
+ extensionNote: string | null;
90
+ blockingRequested: boolean;
91
+ blockingReason: string | null;
92
+ blockingDueAt: string | null;
93
+ blockingGranted: boolean | null;
94
+ blockingResolvedAt: string | null;
95
+ blockingNote: string | null;
96
+ assigneeEmployeeId: string | null;
97
+ resolvedAt: string | null;
98
+ denialGrounds: string[];
99
+ resolutionNote: string | null;
100
+ responseDocument: DataRightsDocumentLinkEntity | null;
101
+ responseSentAt: string | null;
102
+ responseSentTo: string | null;
103
+ responseSentMeans: CommunicationMeans | null;
104
+ /** Hasta cuándo el titular puede reclamar ante la Agencia (30 días hábiles), si se denegó en todo o en parte. */
105
+ complaintDeadline: string | null;
106
+ complaintAt: string | null;
107
+ complaintNote: string | null;
108
+ createdByFullName: string;
109
+ /** Se puede prorrogar: abierta, sin prórroga y antes de vencer. */
110
+ canExtend: boolean;
111
+ /** El titular ya puede reclamar ante la Agencia: denegación o plazo vencido sin respuesta. */
112
+ canRegisterComplaint: boolean;
113
+ events: { action: DataRightsEventAction; note: string | null; employeeFullName: string; createdAt: string }[];
114
+ }
115
+
116
+ export interface DataRightsSummaryEntity {
117
+ year: number;
118
+ total: number;
119
+ open: number;
120
+ overdue: number;
121
+ dueSoon: number;
122
+ /** Abiertas sin acuse de recibo. */
123
+ unacknowledged: number;
124
+ /** Bloqueos temporales pedidos y sin resolver. */
125
+ blockingPending: number;
126
+ byRight: Record<DataRight, number>;
127
+ resolved: Record<DataRightsResolution, number>;
128
+ /** Respondidas dentro del plazo sobre las respondidas, en %. */
129
+ onTimeRate: number | null;
130
+ complaints: number;
131
+ }
132
+
133
+ /** Datos personales que se reconocen en el texto de un documento, enmascarados: ayudan a tarjar. */
134
+ export interface PersonalDataHintsEntity {
135
+ ruts: number;
136
+ emails: number;
137
+ phones: number;
138
+ /** Algunos ejemplos enmascarados («11.1••.•••-1»). */
139
+ samples: string[];
140
+ }
@@ -0,0 +1 @@
1
+ export * from './dataProtection.entity';
@@ -18,3 +18,4 @@ export * from './repositoryExport';
18
18
  export * from './retention';
19
19
  export * from './accessRequest';
20
20
  export * from './transparency';
21
+ export * from './dataProtection';
@@ -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;