@muni-sanfer/types-gestor-documental 0.0.1-beta.3 → 0.0.1-beta.31

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.
Files changed (200) hide show
  1. package/dist/base/entities.d.ts +1012 -1
  2. package/dist/base/entities.js +263 -1
  3. package/dist/contracts/accessRequest.contract.d.ts +109 -0
  4. package/dist/contracts/accessRequest.contract.js +12 -0
  5. package/dist/contracts/archivalSeries.contract.d.ts +56 -0
  6. package/dist/contracts/archivalSeries.contract.js +11 -0
  7. package/dist/contracts/audit.contract.d.ts +32 -0
  8. package/dist/contracts/audit.contract.js +8 -0
  9. package/dist/contracts/caseFile.contract.d.ts +262 -0
  10. package/dist/contracts/caseFile.contract.js +26 -0
  11. package/dist/contracts/dataProtection.contract.d.ts +251 -0
  12. package/dist/contracts/dataProtection.contract.js +23 -0
  13. package/dist/contracts/desk.contract.d.ts +86 -0
  14. package/dist/contracts/desk.contract.js +13 -0
  15. package/dist/contracts/document.contract.d.ts +189 -2
  16. package/dist/contracts/document.contract.js +13 -0
  17. package/dist/contracts/documentType.contract.d.ts +11 -1
  18. package/dist/contracts/holiday.contract.d.ts +30 -0
  19. package/dist/contracts/holiday.contract.js +9 -0
  20. package/dist/contracts/index.d.ts +239 -1
  21. package/dist/contracts/index.js +60 -0
  22. package/dist/contracts/indicators.contract.d.ts +103 -0
  23. package/dist/contracts/indicators.contract.js +15 -0
  24. package/dist/contracts/issuingEntity.contract.d.ts +52 -0
  25. package/dist/contracts/issuingEntity.contract.js +11 -0
  26. package/dist/contracts/partsOffice.contract.d.ts +263 -0
  27. package/dist/contracts/partsOffice.contract.js +27 -0
  28. package/dist/contracts/procedure.contract.d.ts +50 -0
  29. package/dist/contracts/procedure.contract.js +11 -0
  30. package/dist/contracts/registerBook.contract.d.ts +27 -0
  31. package/dist/contracts/registerBook.contract.js +8 -0
  32. package/dist/contracts/repositoryExport.contract.d.ts +57 -0
  33. package/dist/contracts/repositoryExport.contract.js +13 -0
  34. package/dist/contracts/retention.contract.d.ts +58 -0
  35. package/dist/contracts/retention.contract.js +11 -0
  36. package/dist/contracts/scan.contract.d.ts +63 -0
  37. package/dist/contracts/scan.contract.js +12 -0
  38. package/dist/contracts/signatureBatch.contract.d.ts +109 -0
  39. package/dist/contracts/signatureBatch.contract.js +12 -0
  40. package/dist/contracts/signatureCheck.contract.d.ts +14 -0
  41. package/dist/contracts/signatureCheck.contract.js +7 -0
  42. package/dist/contracts/textSnippet.contract.d.ts +51 -0
  43. package/dist/contracts/textSnippet.contract.js +11 -0
  44. package/dist/contracts/transparency.contract.d.ts +96 -0
  45. package/dist/contracts/transparency.contract.js +12 -0
  46. package/dist/contracts/workFolder.contract.d.ts +114 -0
  47. package/dist/contracts/workFolder.contract.js +16 -0
  48. package/dist/entities/accessRequest/accessRequest.entity.d.ts +73 -0
  49. package/dist/entities/accessRequest/accessRequest.entity.js +2 -0
  50. package/dist/entities/accessRequest/index.d.ts +1 -0
  51. package/dist/entities/accessRequest/index.js +17 -0
  52. package/dist/entities/archivalSeries/archivalSeries.entity.d.ts +32 -0
  53. package/dist/entities/archivalSeries/archivalSeries.entity.js +2 -0
  54. package/dist/entities/archivalSeries/index.d.ts +1 -0
  55. package/dist/entities/archivalSeries/index.js +17 -0
  56. package/dist/entities/audit/audit.entity.d.ts +27 -0
  57. package/dist/entities/audit/audit.entity.js +2 -0
  58. package/dist/entities/audit/index.d.ts +1 -0
  59. package/dist/entities/audit/index.js +17 -0
  60. package/dist/entities/caseFile/caseFile.entity.d.ts +302 -0
  61. package/dist/entities/caseFile/caseFile.entity.js +2 -0
  62. package/dist/entities/caseFile/index.d.ts +1 -0
  63. package/dist/entities/caseFile/index.js +17 -0
  64. package/dist/entities/dataProtection/dataProtection.entity.d.ts +174 -0
  65. package/dist/entities/dataProtection/dataProtection.entity.js +2 -0
  66. package/dist/entities/dataProtection/index.d.ts +1 -0
  67. package/dist/entities/dataProtection/index.js +17 -0
  68. package/dist/entities/desk/desk.entity.d.ts +21 -0
  69. package/dist/entities/desk/desk.entity.js +2 -0
  70. package/dist/entities/desk/index.d.ts +1 -0
  71. package/dist/entities/desk/index.js +17 -0
  72. package/dist/entities/document/document.entity.d.ts +300 -1
  73. package/dist/entities/documentType/documentType.entity.d.ts +23 -0
  74. package/dist/entities/holiday/holiday.entity.d.ts +10 -0
  75. package/dist/entities/holiday/holiday.entity.js +2 -0
  76. package/dist/entities/holiday/index.d.ts +1 -0
  77. package/dist/entities/holiday/index.js +17 -0
  78. package/dist/entities/index.d.ts +20 -0
  79. package/dist/entities/index.js +20 -0
  80. package/dist/entities/indicators/index.d.ts +1 -0
  81. package/dist/entities/indicators/index.js +17 -0
  82. package/dist/entities/indicators/indicators.entity.d.ts +152 -0
  83. package/dist/entities/indicators/indicators.entity.js +2 -0
  84. package/dist/entities/issuingEntity/index.d.ts +1 -0
  85. package/dist/entities/issuingEntity/index.js +17 -0
  86. package/dist/entities/issuingEntity/issuingEntity.entity.d.ts +20 -0
  87. package/dist/entities/issuingEntity/issuingEntity.entity.js +2 -0
  88. package/dist/entities/partsOffice/index.d.ts +1 -0
  89. package/dist/entities/partsOffice/index.js +17 -0
  90. package/dist/entities/partsOffice/partsOffice.entity.d.ts +137 -0
  91. package/dist/entities/partsOffice/partsOffice.entity.js +2 -0
  92. package/dist/entities/procedure/index.d.ts +1 -0
  93. package/dist/entities/procedure/index.js +17 -0
  94. package/dist/entities/procedure/procedure.entity.d.ts +20 -0
  95. package/dist/entities/procedure/procedure.entity.js +2 -0
  96. package/dist/entities/registerBook/index.d.ts +1 -0
  97. package/dist/entities/registerBook/index.js +17 -0
  98. package/dist/entities/registerBook/registerBook.entity.d.ts +48 -0
  99. package/dist/entities/registerBook/registerBook.entity.js +2 -0
  100. package/dist/entities/repositoryExport/index.d.ts +1 -0
  101. package/dist/entities/repositoryExport/index.js +17 -0
  102. package/dist/entities/repositoryExport/repositoryExport.entity.d.ts +124 -0
  103. package/dist/entities/repositoryExport/repositoryExport.entity.js +2 -0
  104. package/dist/entities/retention/index.d.ts +1 -0
  105. package/dist/entities/retention/index.js +17 -0
  106. package/dist/entities/retention/retention.entity.d.ts +49 -0
  107. package/dist/entities/retention/retention.entity.js +2 -0
  108. package/dist/entities/scan/index.d.ts +1 -0
  109. package/dist/entities/scan/index.js +17 -0
  110. package/dist/entities/scan/scan.entity.d.ts +29 -0
  111. package/dist/entities/scan/scan.entity.js +2 -0
  112. package/dist/entities/signatureBatch/index.d.ts +1 -0
  113. package/dist/entities/signatureBatch/index.js +17 -0
  114. package/dist/entities/signatureBatch/signatureBatch.entity.d.ts +107 -0
  115. package/dist/entities/signatureBatch/signatureBatch.entity.js +2 -0
  116. package/dist/entities/signatureCheck/index.d.ts +1 -0
  117. package/dist/entities/signatureCheck/index.js +17 -0
  118. package/dist/entities/signatureCheck/signatureCheck.entity.d.ts +49 -0
  119. package/dist/entities/signatureCheck/signatureCheck.entity.js +2 -0
  120. package/dist/entities/textSnippet/index.d.ts +1 -0
  121. package/dist/entities/textSnippet/index.js +17 -0
  122. package/dist/entities/textSnippet/textSnippet.entity.d.ts +20 -0
  123. package/dist/entities/textSnippet/textSnippet.entity.js +2 -0
  124. package/dist/entities/transparency/index.d.ts +1 -0
  125. package/dist/entities/transparency/index.js +17 -0
  126. package/dist/entities/transparency/transparency.entity.d.ts +77 -0
  127. package/dist/entities/transparency/transparency.entity.js +2 -0
  128. package/dist/entities/workFolder/index.d.ts +1 -0
  129. package/dist/entities/workFolder/index.js +17 -0
  130. package/dist/entities/workFolder/workFolder.entity.d.ts +83 -0
  131. package/dist/entities/workFolder/workFolder.entity.js +2 -0
  132. package/package.json +1 -1
  133. package/src/base/entities.ts +1199 -1
  134. package/src/contracts/accessRequest.contract.ts +81 -0
  135. package/src/contracts/archivalSeries.contract.ts +59 -0
  136. package/src/contracts/audit.contract.ts +30 -0
  137. package/src/contracts/caseFile.contract.ts +228 -0
  138. package/src/contracts/dataProtection.contract.ts +195 -0
  139. package/src/contracts/desk.contract.ts +68 -0
  140. package/src/contracts/document.contract.ts +174 -2
  141. package/src/contracts/documentType.contract.ts +25 -3
  142. package/src/contracts/holiday.contract.ts +16 -0
  143. package/src/contracts/index.ts +82 -1
  144. package/src/contracts/indicators.contract.ts +80 -0
  145. package/src/contracts/issuingEntity.contract.ts +55 -0
  146. package/src/contracts/partsOffice.contract.ts +199 -0
  147. package/src/contracts/procedure.contract.ts +53 -0
  148. package/src/contracts/registerBook.contract.ts +24 -0
  149. package/src/contracts/repositoryExport.contract.ts +54 -0
  150. package/src/contracts/retention.contract.ts +44 -0
  151. package/src/contracts/scan.contract.ts +52 -0
  152. package/src/contracts/signatureBatch.contract.ts +96 -0
  153. package/src/contracts/signatureCheck.contract.ts +11 -0
  154. package/src/contracts/textSnippet.contract.ts +53 -0
  155. package/src/contracts/transparency.contract.ts +55 -0
  156. package/src/contracts/workFolder.contract.ts +75 -0
  157. package/src/entities/accessRequest/accessRequest.entity.ts +78 -0
  158. package/src/entities/accessRequest/index.ts +1 -0
  159. package/src/entities/archivalSeries/archivalSeries.entity.ts +37 -0
  160. package/src/entities/archivalSeries/index.ts +1 -0
  161. package/src/entities/audit/audit.entity.ts +30 -0
  162. package/src/entities/audit/index.ts +1 -0
  163. package/src/entities/caseFile/caseFile.entity.ts +326 -0
  164. package/src/entities/caseFile/index.ts +1 -0
  165. package/src/entities/dataProtection/dataProtection.entity.ts +185 -0
  166. package/src/entities/dataProtection/index.ts +1 -0
  167. package/src/entities/desk/desk.entity.ts +24 -0
  168. package/src/entities/desk/index.ts +1 -0
  169. package/src/entities/document/document.entity.ts +301 -0
  170. package/src/entities/documentType/documentType.entity.ts +16 -0
  171. package/src/entities/holiday/holiday.entity.ts +11 -0
  172. package/src/entities/holiday/index.ts +1 -0
  173. package/src/entities/index.ts +20 -0
  174. package/src/entities/indicators/index.ts +1 -0
  175. package/src/entities/indicators/indicators.entity.ts +157 -0
  176. package/src/entities/issuingEntity/index.ts +1 -0
  177. package/src/entities/issuingEntity/issuingEntity.entity.ts +24 -0
  178. package/src/entities/partsOffice/index.ts +1 -0
  179. package/src/entities/partsOffice/partsOffice.entity.ts +138 -0
  180. package/src/entities/procedure/index.ts +1 -0
  181. package/src/entities/procedure/procedure.entity.ts +24 -0
  182. package/src/entities/registerBook/index.ts +1 -0
  183. package/src/entities/registerBook/registerBook.entity.ts +52 -0
  184. package/src/entities/repositoryExport/index.ts +1 -0
  185. package/src/entities/repositoryExport/repositoryExport.entity.ts +86 -0
  186. package/src/entities/retention/index.ts +1 -0
  187. package/src/entities/retention/retention.entity.ts +53 -0
  188. package/src/entities/scan/index.ts +1 -0
  189. package/src/entities/scan/scan.entity.ts +32 -0
  190. package/src/entities/signatureBatch/index.ts +1 -0
  191. package/src/entities/signatureBatch/signatureBatch.entity.ts +110 -0
  192. package/src/entities/signatureCheck/index.ts +1 -0
  193. package/src/entities/signatureCheck/signatureCheck.entity.ts +51 -0
  194. package/src/entities/textSnippet/index.ts +1 -0
  195. package/src/entities/textSnippet/textSnippet.entity.ts +24 -0
  196. package/src/entities/transparency/index.ts +1 -0
  197. package/src/entities/transparency/transparency.entity.ts +78 -0
  198. package/src/entities/workFolder/index.ts +1 -0
  199. package/src/entities/workFolder/workFolder.entity.ts +84 -0
  200. package/tsconfig.json +1 -3
@@ -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';
@@ -0,0 +1,24 @@
1
+ import { type DeskFileSource } from '../../base/entities';
2
+
3
+ /** Archivo suelto del escritorio de un funcionario («Sin clasificar»). */
4
+ export interface DeskFileResponseEntity {
5
+ id: string;
6
+ fileName: string;
7
+ size: number;
8
+ sha256: string;
9
+ source: DeskFileSource;
10
+ description: string | null;
11
+ /** Es un PDF: se puede redactar una comunicación con él o firmarlo como documento suelto. */
12
+ isPdf: boolean;
13
+ createdAt: string;
14
+ }
15
+
16
+ export interface DeskSummaryEntity {
17
+ /** Archivos del escritorio aún sin clasificar. */
18
+ unclassified: number;
19
+ }
20
+
21
+ export interface DeskOkResponseEntity {
22
+ id: string;
23
+ ok: boolean;
24
+ }
@@ -0,0 +1 @@
1
+ export * from './desk.entity';
@@ -1,10 +1,12 @@
1
1
  import {
2
+ type CommunicationMeans,
2
3
  DocumentAnnulledNumberEntity,
3
4
  DocumentAttachmentEntity,
4
5
  DocumentDeliveryEntity,
5
6
  DocumentEntity,
6
7
  DocumentParticipantEntity,
7
8
  DocumentRecipientEntity,
9
+ type DocumentStatus,
8
10
  DocumentTrackingEntity,
9
11
  DocumentTypeEntity,
10
12
  } from '../../base/entities';
@@ -21,6 +23,8 @@ export interface DocumentParticipantResponseEntity {
21
23
  id: DocumentParticipantEntity['id'];
22
24
  role: DocumentParticipantEntity['role'];
23
25
  order: DocumentParticipantEntity['order'];
26
+ /** Los visadores de una misma etapa visan a la vez. */
27
+ stage: DocumentParticipantEntity['stage'];
24
28
  status: DocumentParticipantEntity['status'];
25
29
  employeeId: DocumentParticipantEntity['employeeId'];
26
30
  fullName: DocumentParticipantEntity['fullName'];
@@ -72,6 +76,41 @@ export interface DocumentLinkEntity {
72
76
  createdByFullName: DocumentEntity['createdByFullName'];
73
77
  finishedAt: DocumentEntity['finishedAt'];
74
78
  documentType: DocumentTypeSummaryEntity;
79
+ /** Folio de ingreso de Oficina de Partes, si llegó por DocDigital. */
80
+ intakeNumber: DocumentEntity['intakeNumber'];
81
+ intakeYear: DocumentEntity['intakeYear'];
82
+ }
83
+
84
+ /** Institución (y usuario) de DocDigital a la que va dirigido un documento. */
85
+ export interface DocumentExternalRecipientResponseEntity {
86
+ id: string;
87
+ entityId: number;
88
+ entityName: string;
89
+ userId: number | null;
90
+ userName: string | null;
91
+ userPosition: string | null;
92
+ }
93
+
94
+ /** Despacho de un documento por DocDigital. */
95
+ export interface DocumentDispatchResponseEntity {
96
+ id: string;
97
+ status: 'Pending' | 'Dispatched' | 'Returned';
98
+ folio: string | null;
99
+ docDigitalTypeName: string | null;
100
+ docDigitalDocumentId: string | null;
101
+ dispatchedAt: string | null;
102
+ dispatchedByFullName: string | null;
103
+ returnedAt: string | null;
104
+ returnedByFullName: string | null;
105
+ returnReason: string | null;
106
+ /** Registro por contingencia: salió por otro medio porque no se pudo por DocDigital. */
107
+ contingency: {
108
+ means: CommunicationMeans;
109
+ sentTo: string | null;
110
+ reason: string | null;
111
+ /** Nombre del comprobante, si se adjuntó. */
112
+ receiptName: string | null;
113
+ } | null;
75
114
  }
76
115
 
77
116
  export interface DocumentGetAllResponseEntity {
@@ -87,19 +126,39 @@ export interface DocumentGetAllResponseEntity {
87
126
  createdByEmployeeId: DocumentEntity['createdByEmployeeId'];
88
127
  createdByFullName: DocumentEntity['createdByFullName'];
89
128
  documentType: DocumentTypeSummaryEntity;
129
+ intakeNumber: DocumentEntity['intakeNumber'];
130
+ intakeYear: DocumentEntity['intakeYear'];
131
+ origin: DocumentEntity['origin'];
132
+ /** Con búsqueda de texto completo: el fragmento donde aparece lo buscado, con lo encontrado entre ⟦ y ⟧. */
133
+ snippet?: string | null;
90
134
  // A quién le toca visar o firmar (null si el documento no está en tramitación).
91
135
  currentParticipant: Pick<DocumentParticipantResponseEntity, 'role' | 'employeeId' | 'fullName'> | null;
136
+ // Cuántos más tienen el turno a la vez (visación en paralelo).
137
+ otherCurrentCount: number;
92
138
  // A cuántos funcionarios llegó y cuántos ya lo abrieron (null si aún no se distribuye a nadie).
93
139
  distribution: { total: number; read: number } | null;
94
140
  }
95
141
 
96
142
  /** Una entrada de la bandeja de recibidos: la entrega y el documento al que corresponde. */
143
+ /** Semáforo de un plazo pendiente: a tiempo, por vencer (2 días hábiles o menos) o vencido. */
144
+ export type DocumentDueStatus = 'OnTime' | 'DueSoon' | 'Overdue';
145
+
97
146
  export interface DocumentInboxItemEntity extends DocumentDeliveryResponseEntity {
147
+ /** Semáforo de lo pendiente con plazo (sin plazo o ya atendido, `null`). */
148
+ dueStatus: DocumentDueStatus | null;
149
+ /** Días hábiles que quedan, sin contar hoy (vencido: `null`). */
150
+ businessDaysLeft: number | null;
98
151
  document: DocumentLinkEntity;
99
152
  }
100
153
 
101
154
  export interface DocumentGetByIdResponseEntity {
102
155
  id: DocumentEntity['id'];
156
+ // Quién lo emite: la entidad emisora del tipo (Educación, Salud, Juzgado) o la municipalidad.
157
+ issuerName: string;
158
+ // Serie documental del Cuadro de Clasificación (la de su tipo documental; MGDDE1_2).
159
+ archivalSeries: { id: string; code: string; name: string } | null;
160
+ // Fin de la restricción de acceso: desde entonces se consulta como público si no tiene datos sensibles.
161
+ restrictionEndsAt: string | null;
103
162
  subject: DocumentEntity['subject'];
104
163
  keywords: DocumentEntity['keywords'];
105
164
  accessLevel: DocumentEntity['accessLevel'];
@@ -144,7 +203,25 @@ export interface DocumentGetByIdResponseEntity {
144
203
  deliveries: DocumentDeliveryResponseEntity[];
145
204
  // Documento al que este responde, y los que le responden (solo los ya finalizados, más los propios de quien consulta).
146
205
  replyTo: DocumentLinkEntity | null;
206
+ /** Lote de firma al que pertenece. */
207
+ batch: { id: string; name: string } | null;
208
+ /** Contenido redactado en el sistema con una plantilla, para volver a editarlo (sin valor si se subió un PDF). */
209
+ composition: DocumentComposition | null;
147
210
  replies: DocumentLinkEntity[];
211
+ /** Expedientes en que está incorporado y que quien consulta puede ver. */
212
+ caseFiles: { id: string; code: string; title: string; status: 'Open' | 'Closed' }[];
213
+ /** De dónde viene: del gestor o recibido por DocDigital, con su folio de ingreso y los datos de quien lo envió. */
214
+ origin: DocumentEntity['origin'];
215
+ intakeNumber: DocumentEntity['intakeNumber'];
216
+ intakeYear: DocumentEntity['intakeYear'];
217
+ externalFolio: DocumentEntity['externalFolio'];
218
+ externalSender: DocumentEntity['externalSender'];
219
+ externalDate: DocumentEntity['externalDate'];
220
+ /** Instituciones de DocDigital a quienes va dirigido, y su despacho por Oficina de Partes. */
221
+ externalRecipients: DocumentExternalRecipientResponseEntity[];
222
+ dispatch: DocumentDispatchResponseEntity | null;
223
+ // Copias por correo a quienes están fuera del Estado, con su envío y apertura.
224
+ emailCopies: DocumentEmailCopyResponseEntity[];
148
225
  documentType: DocumentTypeSummaryEntity;
149
226
  participants: DocumentParticipantResponseEntity[];
150
227
  attachments: {
@@ -158,6 +235,8 @@ export interface DocumentGetByIdResponseEntity {
158
235
  id: DocumentTrackingEntity['id'];
159
236
  action: DocumentTrackingEntity['action'];
160
237
  observation: DocumentTrackingEntity['observation'];
238
+ // Huella SHA-256 del PDF en ese hecho (firma, despacho o ingreso por DocDigital).
239
+ sha256: DocumentTrackingEntity['sha256'];
161
240
  employeeId: DocumentTrackingEntity['employeeId'];
162
241
  employeeFullName: DocumentTrackingEntity['employeeFullName'];
163
242
  createdAt: DocumentTrackingEntity['createdAt'];
@@ -173,6 +252,8 @@ export interface DocumentGetByIdResponseEntity {
173
252
  canReply: boolean;
174
253
  // Es quien redactó un documento en tramitación: puede pasar un turno pendiente a otro funcionario.
175
254
  canReassign: boolean;
255
+ /** Quien consulta redactó el documento (o lo ingresó, si llegó por DocDigital). */
256
+ isAuthor: boolean;
176
257
  // Sus propias entregas de este documento (puede tener más de una si además se lo derivaron).
177
258
  inbox: DocumentDeliveryResponseEntity[];
178
259
  };
@@ -184,6 +265,8 @@ export interface DocumentGetByIdResponseEntity {
184
265
  export interface DocumentGetSummaryResponseEntity {
185
266
  toVisa: number;
186
267
  toSign: number;
268
+ /** Lotes de firma con documentos en su turno (los documentos de un lote no se cuentan en `toVisa` ni `toSign`). */
269
+ batches: { toVisa: number; toSign: number };
187
270
  created: {
188
271
  drafted: number;
189
272
  inProgress: number;
@@ -214,6 +297,29 @@ export interface DocumentReviewResponseEntity {
214
297
  status: DocumentEntity['status'];
215
298
  }
216
299
 
300
+ /** Resultado de un documento en una firma de varios documentos. */
301
+ export interface DocumentSignManyResultEntity {
302
+ id: DocumentEntity['id'];
303
+ ok: boolean;
304
+ /** Estado en que quedó, si se firmó. */
305
+ status?: DocumentEntity['status'];
306
+ /** Por qué no se firmó. */
307
+ message?: string;
308
+ }
309
+
310
+ /**
311
+ * Firma de varios documentos con un solo OTP. FirmaGob admite 5 MB por solicitud: los que no cupieron quedan en
312
+ * `remaining`, en el turno del firmante, para firmarlos con un OTP nuevo.
313
+ */
314
+ export interface DocumentSignManyResponseEntity {
315
+ results: DocumentSignManyResultEntity[];
316
+ signed: number;
317
+ failed: number;
318
+ remaining: DocumentEntity['id'][];
319
+ /** FirmaGob avisó que el OTP venció antes de firmar todos los documentos de la solicitud. */
320
+ otpExpired: boolean;
321
+ }
322
+
217
323
  export interface DocumentDiscardResponseEntity {
218
324
  id: DocumentEntity['id'];
219
325
  ok: boolean;
@@ -240,6 +346,8 @@ export interface DocumentVerifyResponseEntity {
240
346
  state: DocumentVerificationState;
241
347
  verificationCode: string;
242
348
  documentType: Pick<DocumentTypeSummaryEntity, 'name' | 'abbreviation'>;
349
+ // Quién lo emite: la entidad emisora del tipo (Educación, Salud, Juzgado) o la municipalidad.
350
+ issuerName: string;
243
351
  correlative: DocumentEntity['correlative'];
244
352
  correlativeYear: DocumentEntity['correlativeYear'];
245
353
  numberedAt: DocumentEntity['numberedAt'];
@@ -278,3 +386,196 @@ export interface DocumentReassignResponseEntity {
278
386
  id: DocumentEntity['id'];
279
387
  ok: boolean;
280
388
  }
389
+
390
+ /**
391
+ * Un plazo en la agenda de un funcionario: lo que recibió (como destinatario o por derivación) y debe atender, o un
392
+ * documento que envió y del que espera respuesta.
393
+ */
394
+ export interface DocumentAgendaItemEntity {
395
+ kind: 'Received' | 'Sent';
396
+ /** Semáforo de lo pendiente (atendido o ya respondido por todos: `null`). */
397
+ dueStatus: DocumentDueStatus | null;
398
+ /** Días hábiles que quedan, sin contar hoy (vencido: `null`). */
399
+ businessDaysLeft: number | null;
400
+ /** La entrega (lo recibido) o el documento (lo enviado). */
401
+ id: string;
402
+ documentId: DocumentEntity['id'];
403
+ subject: DocumentEntity['subject'];
404
+ documentType: { name: string; abbreviation: string | null };
405
+ correlative: DocumentEntity['correlative'];
406
+ correlativeYear: DocumentEntity['correlativeYear'];
407
+ intakeNumber: DocumentEntity['intakeNumber'];
408
+ intakeYear: DocumentEntity['intakeYear'];
409
+ /** Plazo, en ISO 8601. */
410
+ dueAt: string;
411
+ /** Lo recibido: cuándo lo marcó como atendido (sin valor si sigue pendiente). */
412
+ closedAt: string | null;
413
+ /** Lo recibido: la providencia y quién lo derivó. */
414
+ instruction: DocumentDeliveryEntity['instruction'] | null;
415
+ sentByFullName: string | null;
416
+ /** Lo enviado: a cuántos les llegó y cuántos aún no lo atienden. */
417
+ recipients: { total: number; pending: number } | null;
418
+ }
419
+
420
+ export interface DocumentAgendaResponseEntity {
421
+ /** Plazos dentro del período pedido. */
422
+ items: DocumentAgendaItemEntity[];
423
+ /** Lo recibido con el plazo vencido y sin atender, de cualquier fecha (los 50 más antiguos). */
424
+ overdue: DocumentAgendaItemEntity[];
425
+ }
426
+
427
+ /** Trazabilidad de un documento en PDF, lista para descargar. */
428
+ export interface DocumentTrailExportEntity {
429
+ fileName: string;
430
+ contentType: string;
431
+ contentBase64: string;
432
+ }
433
+
434
+ /** Plantilla oficial con que se redacta un documento en el sistema. */
435
+ export type DocumentTemplateKind = 'Decree' | 'Office' | 'Memorandum' | 'General';
436
+
437
+ /**
438
+ * Contenido de un documento redactado en el sistema. Cada plantilla tiene su estructura; los párrafos son texto
439
+ * (un salto de línea dentro de un párrafo se respeta). La materia es el asunto del documento.
440
+ */
441
+ export type DocumentComposition =
442
+ | {
443
+ template: 'Decree';
444
+ /** VISTOS: las normas y antecedentes. */
445
+ vistos: string[];
446
+ /** CONSIDERANDO: cada fundamento, numerado. */
447
+ considerando: string[];
448
+ /** DECRETO: cada punto resolutivo, numerado. */
449
+ resolutive: string[];
450
+ /** Fórmula de cierre: «Anótese, comuníquese y archívese». */
451
+ closing: string;
452
+ distribution: string[];
453
+ }
454
+ | {
455
+ template: 'Office';
456
+ /** ANT.: antecedentes (otro oficio, una solicitud). */
457
+ antecedents?: string | null;
458
+ from: string;
459
+ to: string;
460
+ body: string[];
461
+ closing: string;
462
+ distribution: string[];
463
+ }
464
+ | {
465
+ template: 'Memorandum';
466
+ from: string;
467
+ to: string;
468
+ body: string[];
469
+ closing?: string | null;
470
+ distribution: string[];
471
+ }
472
+ | { template: 'General'; title: string; body: string[]; closing?: string | null };
473
+
474
+ /** PDF armado con una plantilla: para la vista previa (`contentBase64`) o ya subido (`fileId`). */
475
+ export interface DocumentComposeResponseEntity {
476
+ fileName: string;
477
+ fileId?: string;
478
+ contentBase64?: string;
479
+ }
480
+
481
+ /** Copia por correo de un documento, como la ve quien lo consulta en el gestor. */
482
+ export interface DocumentEmailCopyResponseEntity {
483
+ id: string;
484
+ name: string;
485
+ email: string;
486
+ /** Cuándo se envió (sin valor: aún no corresponde). */
487
+ issuedAt: string | null;
488
+ expiresAt: string | null;
489
+ openedAt: string | null;
490
+ downloadCount: number;
491
+ }
492
+
493
+ /** Copia recién emitida: el gateway le envía el enlace a su destinatario. El token viaja solo aquí. */
494
+ export interface DocumentEmailCopyIssuedEntity {
495
+ copyId: string;
496
+ documentId: string;
497
+ name: string;
498
+ email: string;
499
+ token: string;
500
+ expiresAt: string;
501
+ /** Cómo se cita: «D.E. N° 590/2026», o el tipo si no lleva número. */
502
+ folio: string;
503
+ subject: string;
504
+ issuerName: string;
505
+ }
506
+
507
+ /** El documento como lo ve quien abre su copia por correo. */
508
+ export interface DocumentEmailCopyViewEntity {
509
+ recipientName: string;
510
+ expiresAt: string;
511
+ documentTypeName: string;
512
+ folio: string;
513
+ subject: string;
514
+ issuerName: string;
515
+ finishedAt: string | null;
516
+ verificationCode: string | null;
517
+ signers: { fullName: string; position: string | null; signedAt: string | null }[];
518
+ }
519
+
520
+ /** Recordatorio de un plazo: al recibido y, si venció, también a su jefatura (la resuelve el gateway). */
521
+ export interface DocumentReminderEntity {
522
+ deliveryId: string;
523
+ kind: 'DueSoon' | 'Overdue';
524
+ employeeId: string;
525
+ fullName: string;
526
+ documentId: string;
527
+ /** Cómo se cita: «D.E. N° 590/2026», el folio de ingreso o el tipo. */
528
+ folio: string;
529
+ subject: string;
530
+ dueAt: string;
531
+ instruction: DocumentDeliveryEntity['instruction'];
532
+ sentByFullName: string | null;
533
+ }
534
+
535
+ /** Quien visó, firmó o rechazó una versión, según la trazabilidad. */
536
+ export interface DocumentVersionReviewEntity {
537
+ action: 'Visaed' | 'Signed' | 'Rejected';
538
+ employeeFullName: string;
539
+ createdAt: string;
540
+ }
541
+
542
+ /** Una versión de un documento: lo que se guardó cada vez que cambió su PDF, su texto o su asunto. */
543
+ export interface DocumentVersionResponseEntity {
544
+ number: number;
545
+ subject: string;
546
+ fileName: string;
547
+ sha256: string | null;
548
+ /** Lo redactado con plantilla, para compararla con otra versión. `null` si se subió un PDF. */
549
+ composition: DocumentComposition | null;
550
+ note: string | null;
551
+ status: DocumentStatus;
552
+ createdByFullName: string;
553
+ createdAt: string;
554
+ /** Visaciones, firmas y rechazos mientras fue la versión vigente. */
555
+ reviews: DocumentVersionReviewEntity[];
556
+ }
557
+
558
+ /** Comentario de redacción de un visador, un firmante o el redactor. */
559
+ export interface DocumentCommentResponseEntity {
560
+ id: string;
561
+ versionNumber: number;
562
+ section: string | null;
563
+ quote: string | null;
564
+ text: string;
565
+ authorEmployeeId: string;
566
+ authorFullName: string;
567
+ authorRole: 'Author' | 'Visa' | 'Signature';
568
+ createdAt: string;
569
+ resolvedAt: string | null;
570
+ resolvedByFullName: string | null;
571
+ resolutionNote: string | null;
572
+ /** Quien consulta lo puede marcar como resuelto: el redactor o quien lo escribió, mientras el documento se tramita. */
573
+ canResolve: boolean;
574
+ }
575
+
576
+ export interface DocumentCommentsResponseEntity {
577
+ comments: DocumentCommentResponseEntity[];
578
+ /** Quien consulta puede comentar: es el redactor o tiene un turno, y el documento no ha terminado. */
579
+ canComment: boolean;
580
+ currentVersion: number;
581
+ }
@@ -11,6 +11,8 @@ export interface DocumentTypeFlowStepResponseEntity {
11
11
  // Nombre del funcionario o de la dirección, como estaba al definir el flujo.
12
12
  name: DocumentTypeFlowStepEntity['name'];
13
13
  position: DocumentTypeFlowStepEntity['position'];
14
+ // Visa a la vez con el paso anterior (visación en paralelo).
15
+ withPrevious: DocumentTypeFlowStepEntity['withPrevious'];
14
16
  }
15
17
 
16
18
  export interface DocumentTypeGetAllResponseEntity {
@@ -22,7 +24,21 @@ export interface DocumentTypeGetAllResponseEntity {
22
24
  nextCorrelative: DocumentTypeEntity['nextCorrelative'];
23
25
  correlativeYear: DocumentTypeEntity['correlativeYear'];
24
26
  resetsYearly: DocumentTypeEntity['resetsYearly'];
27
+ // Sin numeración, sus documentos solo llevan fecha, código de verificación y QR.
28
+ numbered: DocumentTypeEntity['numbered'];
29
+ /** Transparencia Activa: sus documentos se publican cada mes, en esta sección del Portal. */
30
+ activeTransparency: DocumentTypeEntity['activeTransparency'];
31
+ transparencySection: DocumentTypeEntity['transparencySection'];
25
32
  directorateCodeReference: DocumentTypeEntity['directorateCodeReference'];
33
+ // Serie documental del Cuadro de Clasificación a la que van sus documentos (MGDDE1_2).
34
+ archivalSeries: { id: string; code: string; name: string } | null;
35
+ // Entidad que emite sus documentos (Educación, Salud, Juzgado). `null`: la municipalidad.
36
+ issuingEntity: { id: string; name: string; shortName: string | null } | null;
37
+ // Tipo cuyo correlativo comparte: sus números salen de esa serie (y `nextCorrelative`, `correlativeYear` y
38
+ // `resetsYearly` son los de ese tipo). `null`: lleva su propio correlativo.
39
+ sharesNumberingWith: { id: string; name: string } | null;
40
+ // Tipos que toman sus números del correlativo de este.
41
+ numberingMembers: { id: string; name: string }[];
26
42
  enabled: DocumentTypeEntity['enabled'];
27
43
  // Cuántos visadores y firmantes tiene su flujo sugerido.
28
44
  flow: { visa: number; signature: number };
@@ -0,0 +1,11 @@
1
+ /** Feriado: el día («AAAA-MM-DD») no cuenta como hábil en los plazos. */
2
+ export interface HolidayResponseEntity {
3
+ id: string;
4
+ date: string;
5
+ name: string;
6
+ }
7
+
8
+ export interface HolidayRemoveResponseEntity {
9
+ id: string;
10
+ ok: boolean;
11
+ }
@@ -0,0 +1 @@
1
+ export * from './holiday.entity';
@@ -1,2 +1,22 @@
1
1
  export * from './documentType';
2
2
  export * from './document';
3
+ export * from './procedure';
4
+ export * from './issuingEntity';
5
+ export * from './caseFile';
6
+ export * from './partsOffice';
7
+ export * from './registerBook';
8
+ export * from './signatureBatch';
9
+ export * from './workFolder';
10
+ export * from './scan';
11
+ export * from './archivalSeries';
12
+ export * from './textSnippet';
13
+ export * from './holiday';
14
+ export * from './indicators';
15
+ export * from './audit';
16
+ export * from './signatureCheck';
17
+ export * from './repositoryExport';
18
+ export * from './retention';
19
+ export * from './accessRequest';
20
+ export * from './transparency';
21
+ export * from './dataProtection';
22
+ export * from './desk';
@@ -0,0 +1 @@
1
+ export * from './indicators.entity';