@muni-sanfer/types-gestor-documental 0.0.1-beta.2 → 0.0.1-beta.21

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 (146) hide show
  1. package/dist/base/entities.d.ts +607 -1
  2. package/dist/base/entities.js +133 -1
  3. package/dist/contracts/archivalSeries.contract.d.ts +50 -0
  4. package/dist/contracts/archivalSeries.contract.js +11 -0
  5. package/dist/contracts/audit.contract.d.ts +32 -0
  6. package/dist/contracts/audit.contract.js +8 -0
  7. package/dist/contracts/caseFile.contract.d.ts +262 -0
  8. package/dist/contracts/caseFile.contract.js +26 -0
  9. package/dist/contracts/document.contract.d.ts +145 -2
  10. package/dist/contracts/document.contract.js +9 -0
  11. package/dist/contracts/documentType.contract.d.ts +24 -1
  12. package/dist/contracts/holiday.contract.d.ts +30 -0
  13. package/dist/contracts/holiday.contract.js +9 -0
  14. package/dist/contracts/index.d.ts +162 -1
  15. package/dist/contracts/index.js +42 -0
  16. package/dist/contracts/indicators.contract.d.ts +103 -0
  17. package/dist/contracts/indicators.contract.js +15 -0
  18. package/dist/contracts/issuingEntity.contract.d.ts +52 -0
  19. package/dist/contracts/issuingEntity.contract.js +11 -0
  20. package/dist/contracts/partsOffice.contract.d.ts +177 -0
  21. package/dist/contracts/partsOffice.contract.js +23 -0
  22. package/dist/contracts/procedure.contract.d.ts +50 -0
  23. package/dist/contracts/procedure.contract.js +11 -0
  24. package/dist/contracts/registerBook.contract.d.ts +27 -0
  25. package/dist/contracts/registerBook.contract.js +8 -0
  26. package/dist/contracts/scan.contract.d.ts +63 -0
  27. package/dist/contracts/scan.contract.js +12 -0
  28. package/dist/contracts/signatureBatch.contract.d.ts +109 -0
  29. package/dist/contracts/signatureBatch.contract.js +12 -0
  30. package/dist/contracts/signatureCheck.contract.d.ts +14 -0
  31. package/dist/contracts/signatureCheck.contract.js +7 -0
  32. package/dist/contracts/textSnippet.contract.d.ts +51 -0
  33. package/dist/contracts/textSnippet.contract.js +11 -0
  34. package/dist/contracts/workFolder.contract.d.ts +114 -0
  35. package/dist/contracts/workFolder.contract.js +16 -0
  36. package/dist/entities/archivalSeries/archivalSeries.entity.d.ts +27 -0
  37. package/dist/entities/archivalSeries/archivalSeries.entity.js +2 -0
  38. package/dist/entities/archivalSeries/index.d.ts +1 -0
  39. package/dist/entities/archivalSeries/index.js +17 -0
  40. package/dist/entities/audit/audit.entity.d.ts +27 -0
  41. package/dist/entities/audit/audit.entity.js +2 -0
  42. package/dist/entities/audit/index.d.ts +1 -0
  43. package/dist/entities/audit/index.js +17 -0
  44. package/dist/entities/caseFile/caseFile.entity.d.ts +300 -0
  45. package/dist/entities/caseFile/caseFile.entity.js +2 -0
  46. package/dist/entities/caseFile/index.d.ts +1 -0
  47. package/dist/entities/caseFile/index.js +17 -0
  48. package/dist/entities/document/document.entity.d.ts +252 -0
  49. package/dist/entities/documentType/documentType.entity.d.ts +37 -1
  50. package/dist/entities/holiday/holiday.entity.d.ts +10 -0
  51. package/dist/entities/holiday/holiday.entity.js +2 -0
  52. package/dist/entities/holiday/index.d.ts +1 -0
  53. package/dist/entities/holiday/index.js +17 -0
  54. package/dist/entities/index.d.ts +14 -0
  55. package/dist/entities/index.js +14 -0
  56. package/dist/entities/indicators/index.d.ts +1 -0
  57. package/dist/entities/indicators/index.js +17 -0
  58. package/dist/entities/indicators/indicators.entity.d.ts +152 -0
  59. package/dist/entities/indicators/indicators.entity.js +2 -0
  60. package/dist/entities/issuingEntity/index.d.ts +1 -0
  61. package/dist/entities/issuingEntity/index.js +17 -0
  62. package/dist/entities/issuingEntity/issuingEntity.entity.d.ts +20 -0
  63. package/dist/entities/issuingEntity/issuingEntity.entity.js +2 -0
  64. package/dist/entities/partsOffice/index.d.ts +1 -0
  65. package/dist/entities/partsOffice/index.js +17 -0
  66. package/dist/entities/partsOffice/partsOffice.entity.d.ts +105 -0
  67. package/dist/entities/partsOffice/partsOffice.entity.js +2 -0
  68. package/dist/entities/procedure/index.d.ts +1 -0
  69. package/dist/entities/procedure/index.js +17 -0
  70. package/dist/entities/procedure/procedure.entity.d.ts +20 -0
  71. package/dist/entities/procedure/procedure.entity.js +2 -0
  72. package/dist/entities/registerBook/index.d.ts +1 -0
  73. package/dist/entities/registerBook/index.js +17 -0
  74. package/dist/entities/registerBook/registerBook.entity.d.ts +48 -0
  75. package/dist/entities/registerBook/registerBook.entity.js +2 -0
  76. package/dist/entities/scan/index.d.ts +1 -0
  77. package/dist/entities/scan/index.js +17 -0
  78. package/dist/entities/scan/scan.entity.d.ts +29 -0
  79. package/dist/entities/scan/scan.entity.js +2 -0
  80. package/dist/entities/signatureBatch/index.d.ts +1 -0
  81. package/dist/entities/signatureBatch/index.js +17 -0
  82. package/dist/entities/signatureBatch/signatureBatch.entity.d.ts +107 -0
  83. package/dist/entities/signatureBatch/signatureBatch.entity.js +2 -0
  84. package/dist/entities/signatureCheck/index.d.ts +1 -0
  85. package/dist/entities/signatureCheck/index.js +17 -0
  86. package/dist/entities/signatureCheck/signatureCheck.entity.d.ts +49 -0
  87. package/dist/entities/signatureCheck/signatureCheck.entity.js +2 -0
  88. package/dist/entities/textSnippet/index.d.ts +1 -0
  89. package/dist/entities/textSnippet/index.js +17 -0
  90. package/dist/entities/textSnippet/textSnippet.entity.d.ts +20 -0
  91. package/dist/entities/textSnippet/textSnippet.entity.js +2 -0
  92. package/dist/entities/workFolder/index.d.ts +1 -0
  93. package/dist/entities/workFolder/index.js +17 -0
  94. package/dist/entities/workFolder/workFolder.entity.d.ts +83 -0
  95. package/dist/entities/workFolder/workFolder.entity.js +2 -0
  96. package/package.json +1 -1
  97. package/src/base/entities.ts +716 -1
  98. package/src/contracts/archivalSeries.contract.ts +53 -0
  99. package/src/contracts/audit.contract.ts +30 -0
  100. package/src/contracts/caseFile.contract.ts +228 -0
  101. package/src/contracts/document.contract.ts +151 -2
  102. package/src/contracts/documentType.contract.ts +32 -2
  103. package/src/contracts/holiday.contract.ts +16 -0
  104. package/src/contracts/index.ts +58 -1
  105. package/src/contracts/indicators.contract.ts +80 -0
  106. package/src/contracts/issuingEntity.contract.ts +55 -0
  107. package/src/contracts/partsOffice.contract.ts +123 -0
  108. package/src/contracts/procedure.contract.ts +53 -0
  109. package/src/contracts/registerBook.contract.ts +24 -0
  110. package/src/contracts/scan.contract.ts +52 -0
  111. package/src/contracts/signatureBatch.contract.ts +96 -0
  112. package/src/contracts/signatureCheck.contract.ts +11 -0
  113. package/src/contracts/textSnippet.contract.ts +53 -0
  114. package/src/contracts/workFolder.contract.ts +75 -0
  115. package/src/entities/archivalSeries/archivalSeries.entity.ts +32 -0
  116. package/src/entities/archivalSeries/index.ts +1 -0
  117. package/src/entities/audit/audit.entity.ts +30 -0
  118. package/src/entities/audit/index.ts +1 -0
  119. package/src/entities/caseFile/caseFile.entity.ts +324 -0
  120. package/src/entities/caseFile/index.ts +1 -0
  121. package/src/entities/document/document.entity.ts +250 -0
  122. package/src/entities/documentType/documentType.entity.ts +31 -1
  123. package/src/entities/holiday/holiday.entity.ts +11 -0
  124. package/src/entities/holiday/index.ts +1 -0
  125. package/src/entities/index.ts +14 -0
  126. package/src/entities/indicators/index.ts +1 -0
  127. package/src/entities/indicators/indicators.entity.ts +157 -0
  128. package/src/entities/issuingEntity/index.ts +1 -0
  129. package/src/entities/issuingEntity/issuingEntity.entity.ts +24 -0
  130. package/src/entities/partsOffice/index.ts +1 -0
  131. package/src/entities/partsOffice/partsOffice.entity.ts +110 -0
  132. package/src/entities/procedure/index.ts +1 -0
  133. package/src/entities/procedure/procedure.entity.ts +24 -0
  134. package/src/entities/registerBook/index.ts +1 -0
  135. package/src/entities/registerBook/registerBook.entity.ts +52 -0
  136. package/src/entities/scan/index.ts +1 -0
  137. package/src/entities/scan/scan.entity.ts +32 -0
  138. package/src/entities/signatureBatch/index.ts +1 -0
  139. package/src/entities/signatureBatch/signatureBatch.entity.ts +110 -0
  140. package/src/entities/signatureCheck/index.ts +1 -0
  141. package/src/entities/signatureCheck/signatureCheck.entity.ts +51 -0
  142. package/src/entities/textSnippet/index.ts +1 -0
  143. package/src/entities/textSnippet/textSnippet.entity.ts +24 -0
  144. package/src/entities/workFolder/index.ts +1 -0
  145. package/src/entities/workFolder/workFolder.entity.ts +84 -0
  146. package/tsconfig.json +1 -3
@@ -10,6 +10,8 @@ export interface DocumentParticipantResponseEntity {
10
10
  id: DocumentParticipantEntity['id'];
11
11
  role: DocumentParticipantEntity['role'];
12
12
  order: DocumentParticipantEntity['order'];
13
+ /** Los visadores de una misma etapa visan a la vez. */
14
+ stage: DocumentParticipantEntity['stage'];
13
15
  status: DocumentParticipantEntity['status'];
14
16
  employeeId: DocumentParticipantEntity['employeeId'];
15
17
  fullName: DocumentParticipantEntity['fullName'];
@@ -55,6 +57,31 @@ export interface DocumentLinkEntity {
55
57
  createdByFullName: DocumentEntity['createdByFullName'];
56
58
  finishedAt: DocumentEntity['finishedAt'];
57
59
  documentType: DocumentTypeSummaryEntity;
60
+ /** Folio de ingreso de Oficina de Partes, si llegó por DocDigital. */
61
+ intakeNumber: DocumentEntity['intakeNumber'];
62
+ intakeYear: DocumentEntity['intakeYear'];
63
+ }
64
+ /** Institución (y usuario) de DocDigital a la que va dirigido un documento. */
65
+ export interface DocumentExternalRecipientResponseEntity {
66
+ id: string;
67
+ entityId: number;
68
+ entityName: string;
69
+ userId: number | null;
70
+ userName: string | null;
71
+ userPosition: string | null;
72
+ }
73
+ /** Despacho de un documento por DocDigital. */
74
+ export interface DocumentDispatchResponseEntity {
75
+ id: string;
76
+ status: 'Pending' | 'Dispatched' | 'Returned';
77
+ folio: string | null;
78
+ docDigitalTypeName: string | null;
79
+ docDigitalDocumentId: string | null;
80
+ dispatchedAt: string | null;
81
+ dispatchedByFullName: string | null;
82
+ returnedAt: string | null;
83
+ returnedByFullName: string | null;
84
+ returnReason: string | null;
58
85
  }
59
86
  export interface DocumentGetAllResponseEntity {
60
87
  id: DocumentEntity['id'];
@@ -69,18 +96,37 @@ export interface DocumentGetAllResponseEntity {
69
96
  createdByEmployeeId: DocumentEntity['createdByEmployeeId'];
70
97
  createdByFullName: DocumentEntity['createdByFullName'];
71
98
  documentType: DocumentTypeSummaryEntity;
99
+ intakeNumber: DocumentEntity['intakeNumber'];
100
+ intakeYear: DocumentEntity['intakeYear'];
101
+ origin: DocumentEntity['origin'];
102
+ /** Con búsqueda de texto completo: el fragmento donde aparece lo buscado, con lo encontrado entre ⟦ y ⟧. */
103
+ snippet?: string | null;
72
104
  currentParticipant: Pick<DocumentParticipantResponseEntity, 'role' | 'employeeId' | 'fullName'> | null;
105
+ otherCurrentCount: number;
73
106
  distribution: {
74
107
  total: number;
75
108
  read: number;
76
109
  } | null;
77
110
  }
78
111
  /** Una entrada de la bandeja de recibidos: la entrega y el documento al que corresponde. */
112
+ /** Semáforo de un plazo pendiente: a tiempo, por vencer (2 días hábiles o menos) o vencido. */
113
+ export type DocumentDueStatus = 'OnTime' | 'DueSoon' | 'Overdue';
79
114
  export interface DocumentInboxItemEntity extends DocumentDeliveryResponseEntity {
115
+ /** Semáforo de lo pendiente con plazo (sin plazo o ya atendido, `null`). */
116
+ dueStatus: DocumentDueStatus | null;
117
+ /** Días hábiles que quedan, sin contar hoy (vencido: `null`). */
118
+ businessDaysLeft: number | null;
80
119
  document: DocumentLinkEntity;
81
120
  }
82
121
  export interface DocumentGetByIdResponseEntity {
83
122
  id: DocumentEntity['id'];
123
+ issuerName: string;
124
+ archivalSeries: {
125
+ id: string;
126
+ code: string;
127
+ name: string;
128
+ } | null;
129
+ restrictionEndsAt: string | null;
84
130
  subject: DocumentEntity['subject'];
85
131
  keywords: DocumentEntity['keywords'];
86
132
  accessLevel: DocumentEntity['accessLevel'];
@@ -115,7 +161,32 @@ export interface DocumentGetByIdResponseEntity {
115
161
  recipients: DocumentRecipientResponseEntity[];
116
162
  deliveries: DocumentDeliveryResponseEntity[];
117
163
  replyTo: DocumentLinkEntity | null;
164
+ /** Lote de firma al que pertenece. */
165
+ batch: {
166
+ id: string;
167
+ name: string;
168
+ } | null;
169
+ /** Contenido redactado en el sistema con una plantilla, para volver a editarlo (sin valor si se subió un PDF). */
170
+ composition: DocumentComposition | null;
118
171
  replies: DocumentLinkEntity[];
172
+ /** Expedientes en que está incorporado y que quien consulta puede ver. */
173
+ caseFiles: {
174
+ id: string;
175
+ code: string;
176
+ title: string;
177
+ status: 'Open' | 'Closed';
178
+ }[];
179
+ /** De dónde viene: del gestor o recibido por DocDigital, con su folio de ingreso y los datos de quien lo envió. */
180
+ origin: DocumentEntity['origin'];
181
+ intakeNumber: DocumentEntity['intakeNumber'];
182
+ intakeYear: DocumentEntity['intakeYear'];
183
+ externalFolio: DocumentEntity['externalFolio'];
184
+ externalSender: DocumentEntity['externalSender'];
185
+ externalDate: DocumentEntity['externalDate'];
186
+ /** Instituciones de DocDigital a quienes va dirigido, y su despacho por Oficina de Partes. */
187
+ externalRecipients: DocumentExternalRecipientResponseEntity[];
188
+ dispatch: DocumentDispatchResponseEntity | null;
189
+ emailCopies: DocumentEmailCopyResponseEntity[];
119
190
  documentType: DocumentTypeSummaryEntity;
120
191
  participants: DocumentParticipantResponseEntity[];
121
192
  attachments: {
@@ -129,6 +200,7 @@ export interface DocumentGetByIdResponseEntity {
129
200
  id: DocumentTrackingEntity['id'];
130
201
  action: DocumentTrackingEntity['action'];
131
202
  observation: DocumentTrackingEntity['observation'];
203
+ sha256: DocumentTrackingEntity['sha256'];
132
204
  employeeId: DocumentTrackingEntity['employeeId'];
133
205
  employeeFullName: DocumentTrackingEntity['employeeFullName'];
134
206
  createdAt: DocumentTrackingEntity['createdAt'];
@@ -139,6 +211,9 @@ export interface DocumentGetByIdResponseEntity {
139
211
  canDiscard: boolean;
140
212
  canDerive: boolean;
141
213
  canReply: boolean;
214
+ canReassign: boolean;
215
+ /** Quien consulta redactó el documento (o lo ingresó, si llegó por DocDigital). */
216
+ isAuthor: boolean;
142
217
  inbox: DocumentDeliveryResponseEntity[];
143
218
  };
144
219
  signatureRequiresOtp: boolean;
@@ -147,6 +222,11 @@ export interface DocumentGetByIdResponseEntity {
147
222
  export interface DocumentGetSummaryResponseEntity {
148
223
  toVisa: number;
149
224
  toSign: number;
225
+ /** Lotes de firma con documentos en su turno (los documentos de un lote no se cuentan en `toVisa` ni `toSign`). */
226
+ batches: {
227
+ toVisa: number;
228
+ toSign: number;
229
+ };
150
230
  created: {
151
231
  drafted: number;
152
232
  inProgress: number;
@@ -172,6 +252,27 @@ export interface DocumentReviewResponseEntity {
172
252
  ok: boolean;
173
253
  status: DocumentEntity['status'];
174
254
  }
255
+ /** Resultado de un documento en una firma de varios documentos. */
256
+ export interface DocumentSignManyResultEntity {
257
+ id: DocumentEntity['id'];
258
+ ok: boolean;
259
+ /** Estado en que quedó, si se firmó. */
260
+ status?: DocumentEntity['status'];
261
+ /** Por qué no se firmó. */
262
+ message?: string;
263
+ }
264
+ /**
265
+ * Firma de varios documentos con un solo OTP. FirmaGob admite 5 MB por solicitud: los que no cupieron quedan en
266
+ * `remaining`, en el turno del firmante, para firmarlos con un OTP nuevo.
267
+ */
268
+ export interface DocumentSignManyResponseEntity {
269
+ results: DocumentSignManyResultEntity[];
270
+ signed: number;
271
+ failed: number;
272
+ remaining: DocumentEntity['id'][];
273
+ /** FirmaGob avisó que el OTP venció antes de firmar todos los documentos de la solicitud. */
274
+ otpExpired: boolean;
275
+ }
175
276
  export interface DocumentDiscardResponseEntity {
176
277
  id: DocumentEntity['id'];
177
278
  ok: boolean;
@@ -195,6 +296,7 @@ export interface DocumentVerifyResponseEntity {
195
296
  state: DocumentVerificationState;
196
297
  verificationCode: string;
197
298
  documentType: Pick<DocumentTypeSummaryEntity, 'name' | 'abbreviation'>;
299
+ issuerName: string;
198
300
  correlative: DocumentEntity['correlative'];
199
301
  correlativeYear: DocumentEntity['correlativeYear'];
200
302
  numberedAt: DocumentEntity['numberedAt'];
@@ -222,3 +324,153 @@ export interface DocumentCloseDeliveryResponseEntity {
222
324
  id: DocumentDeliveryEntity['id'];
223
325
  ok: boolean;
224
326
  }
327
+ export interface DocumentReassignResponseEntity {
328
+ id: DocumentEntity['id'];
329
+ ok: boolean;
330
+ }
331
+ /**
332
+ * Un plazo en la agenda de un funcionario: lo que recibió (como destinatario o por derivación) y debe atender, o un
333
+ * documento que envió y del que espera respuesta.
334
+ */
335
+ export interface DocumentAgendaItemEntity {
336
+ kind: 'Received' | 'Sent';
337
+ /** Semáforo de lo pendiente (atendido o ya respondido por todos: `null`). */
338
+ dueStatus: DocumentDueStatus | null;
339
+ /** Días hábiles que quedan, sin contar hoy (vencido: `null`). */
340
+ businessDaysLeft: number | null;
341
+ /** La entrega (lo recibido) o el documento (lo enviado). */
342
+ id: string;
343
+ documentId: DocumentEntity['id'];
344
+ subject: DocumentEntity['subject'];
345
+ documentType: {
346
+ name: string;
347
+ abbreviation: string | null;
348
+ };
349
+ correlative: DocumentEntity['correlative'];
350
+ correlativeYear: DocumentEntity['correlativeYear'];
351
+ intakeNumber: DocumentEntity['intakeNumber'];
352
+ intakeYear: DocumentEntity['intakeYear'];
353
+ /** Plazo, en ISO 8601. */
354
+ dueAt: string;
355
+ /** Lo recibido: cuándo lo marcó como atendido (sin valor si sigue pendiente). */
356
+ closedAt: string | null;
357
+ /** Lo recibido: la providencia y quién lo derivó. */
358
+ instruction: DocumentDeliveryEntity['instruction'] | null;
359
+ sentByFullName: string | null;
360
+ /** Lo enviado: a cuántos les llegó y cuántos aún no lo atienden. */
361
+ recipients: {
362
+ total: number;
363
+ pending: number;
364
+ } | null;
365
+ }
366
+ export interface DocumentAgendaResponseEntity {
367
+ /** Plazos dentro del período pedido. */
368
+ items: DocumentAgendaItemEntity[];
369
+ /** Lo recibido con el plazo vencido y sin atender, de cualquier fecha (los 50 más antiguos). */
370
+ overdue: DocumentAgendaItemEntity[];
371
+ }
372
+ /** Trazabilidad de un documento en PDF, lista para descargar. */
373
+ export interface DocumentTrailExportEntity {
374
+ fileName: string;
375
+ contentType: string;
376
+ contentBase64: string;
377
+ }
378
+ /** Plantilla oficial con que se redacta un documento en el sistema. */
379
+ export type DocumentTemplateKind = 'Decree' | 'Office' | 'Memorandum' | 'General';
380
+ /**
381
+ * Contenido de un documento redactado en el sistema. Cada plantilla tiene su estructura; los párrafos son texto
382
+ * (un salto de línea dentro de un párrafo se respeta). La materia es el asunto del documento.
383
+ */
384
+ export type DocumentComposition = {
385
+ template: 'Decree';
386
+ /** VISTOS: las normas y antecedentes. */
387
+ vistos: string[];
388
+ /** CONSIDERANDO: cada fundamento, numerado. */
389
+ considerando: string[];
390
+ /** DECRETO: cada punto resolutivo, numerado. */
391
+ resolutive: string[];
392
+ /** Fórmula de cierre: «Anótese, comuníquese y archívese». */
393
+ closing: string;
394
+ distribution: string[];
395
+ } | {
396
+ template: 'Office';
397
+ /** ANT.: antecedentes (otro oficio, una solicitud). */
398
+ antecedents?: string | null;
399
+ from: string;
400
+ to: string;
401
+ body: string[];
402
+ closing: string;
403
+ distribution: string[];
404
+ } | {
405
+ template: 'Memorandum';
406
+ from: string;
407
+ to: string;
408
+ body: string[];
409
+ closing?: string | null;
410
+ distribution: string[];
411
+ } | {
412
+ template: 'General';
413
+ title: string;
414
+ body: string[];
415
+ closing?: string | null;
416
+ };
417
+ /** PDF armado con una plantilla: para la vista previa (`contentBase64`) o ya subido (`fileId`). */
418
+ export interface DocumentComposeResponseEntity {
419
+ fileName: string;
420
+ fileId?: string;
421
+ contentBase64?: string;
422
+ }
423
+ /** Copia por correo de un documento, como la ve quien lo consulta en el gestor. */
424
+ export interface DocumentEmailCopyResponseEntity {
425
+ id: string;
426
+ name: string;
427
+ email: string;
428
+ /** Cuándo se envió (sin valor: aún no corresponde). */
429
+ issuedAt: string | null;
430
+ expiresAt: string | null;
431
+ openedAt: string | null;
432
+ downloadCount: number;
433
+ }
434
+ /** Copia recién emitida: el gateway le envía el enlace a su destinatario. El token viaja solo aquí. */
435
+ export interface DocumentEmailCopyIssuedEntity {
436
+ copyId: string;
437
+ documentId: string;
438
+ name: string;
439
+ email: string;
440
+ token: string;
441
+ expiresAt: string;
442
+ /** Cómo se cita: «D.E. N° 590/2026», o el tipo si no lleva número. */
443
+ folio: string;
444
+ subject: string;
445
+ issuerName: string;
446
+ }
447
+ /** El documento como lo ve quien abre su copia por correo. */
448
+ export interface DocumentEmailCopyViewEntity {
449
+ recipientName: string;
450
+ expiresAt: string;
451
+ documentTypeName: string;
452
+ folio: string;
453
+ subject: string;
454
+ issuerName: string;
455
+ finishedAt: string | null;
456
+ verificationCode: string | null;
457
+ signers: {
458
+ fullName: string;
459
+ position: string | null;
460
+ signedAt: string | null;
461
+ }[];
462
+ }
463
+ /** Recordatorio de un plazo: al recibido y, si venció, también a su jefatura (la resuelve el gateway). */
464
+ export interface DocumentReminderEntity {
465
+ deliveryId: string;
466
+ kind: 'DueSoon' | 'Overdue';
467
+ employeeId: string;
468
+ fullName: string;
469
+ documentId: string;
470
+ /** Cómo se cita: «D.E. N° 590/2026», el folio de ingreso o el tipo. */
471
+ folio: string;
472
+ subject: string;
473
+ dueAt: string;
474
+ instruction: DocumentDeliveryEntity['instruction'];
475
+ sentByFullName: string | null;
476
+ }
@@ -1,4 +1,16 @@
1
- import { DocumentTypeEntity } from '../../base/entities';
1
+ import { DocumentTypeEntity, DocumentTypeFlowStepEntity } from '../../base/entities';
2
+ /** Paso del flujo sugerido de un tipo documental: quién visa o firma, en su orden. */
3
+ export interface DocumentTypeFlowStepResponseEntity {
4
+ id: DocumentTypeFlowStepEntity['id'];
5
+ role: DocumentTypeFlowStepEntity['role'];
6
+ order: DocumentTypeFlowStepEntity['order'];
7
+ type: DocumentTypeFlowStepEntity['type'];
8
+ employeeId: DocumentTypeFlowStepEntity['employeeId'];
9
+ directorateCodeReference: DocumentTypeFlowStepEntity['directorateCodeReference'];
10
+ name: DocumentTypeFlowStepEntity['name'];
11
+ position: DocumentTypeFlowStepEntity['position'];
12
+ withPrevious: DocumentTypeFlowStepEntity['withPrevious'];
13
+ }
2
14
  export interface DocumentTypeGetAllResponseEntity {
3
15
  id: DocumentTypeEntity['id'];
4
16
  name: DocumentTypeEntity['name'];
@@ -8,11 +20,35 @@ export interface DocumentTypeGetAllResponseEntity {
8
20
  nextCorrelative: DocumentTypeEntity['nextCorrelative'];
9
21
  correlativeYear: DocumentTypeEntity['correlativeYear'];
10
22
  resetsYearly: DocumentTypeEntity['resetsYearly'];
23
+ numbered: DocumentTypeEntity['numbered'];
11
24
  directorateCodeReference: DocumentTypeEntity['directorateCodeReference'];
25
+ archivalSeries: {
26
+ id: string;
27
+ code: string;
28
+ name: string;
29
+ } | null;
30
+ issuingEntity: {
31
+ id: string;
32
+ name: string;
33
+ shortName: string | null;
34
+ } | null;
35
+ sharesNumberingWith: {
36
+ id: string;
37
+ name: string;
38
+ } | null;
39
+ numberingMembers: {
40
+ id: string;
41
+ name: string;
42
+ }[];
12
43
  enabled: DocumentTypeEntity['enabled'];
44
+ flow: {
45
+ visa: number;
46
+ signature: number;
47
+ };
13
48
  }
14
49
  export interface DocumentTypeGetByIdResponseEntity extends DocumentTypeGetAllResponseEntity {
15
50
  lastCorrelative: number | null;
51
+ flowSteps: DocumentTypeFlowStepResponseEntity[];
16
52
  }
17
53
  export interface DocumentTypeCreateResponseEntity {
18
54
  id: DocumentTypeEntity['id'];
@@ -0,0 +1,10 @@
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
+ export interface HolidayRemoveResponseEntity {
8
+ id: string;
9
+ ok: boolean;
10
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export * from './holiday.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("./holiday.entity"), exports);
@@ -1,2 +1,16 @@
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';
@@ -16,3 +16,17 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./documentType"), exports);
18
18
  __exportStar(require("./document"), exports);
19
+ __exportStar(require("./procedure"), exports);
20
+ __exportStar(require("./issuingEntity"), exports);
21
+ __exportStar(require("./caseFile"), exports);
22
+ __exportStar(require("./partsOffice"), exports);
23
+ __exportStar(require("./registerBook"), exports);
24
+ __exportStar(require("./signatureBatch"), exports);
25
+ __exportStar(require("./workFolder"), exports);
26
+ __exportStar(require("./scan"), exports);
27
+ __exportStar(require("./archivalSeries"), exports);
28
+ __exportStar(require("./textSnippet"), exports);
29
+ __exportStar(require("./holiday"), exports);
30
+ __exportStar(require("./indicators"), exports);
31
+ __exportStar(require("./audit"), exports);
32
+ __exportStar(require("./signatureCheck"), exports);
@@ -0,0 +1 @@
1
+ export * from './indicators.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("./indicators.entity"), exports);
@@ -0,0 +1,152 @@
1
+ import { type DocumentParticipantRole, type QualityMetricKey, type ServiceOutageKind } from '../../base/entities';
2
+ /** Tiempos de tramitación, desde el primer envío a tramitación hasta la última firma. En días corridos y hábiles. */
3
+ export interface ProcessingTimeEntity {
4
+ count: number;
5
+ averageDays: number | null;
6
+ medianDays: number | null;
7
+ p90Days: number | null;
8
+ averageBusinessDays: number | null;
9
+ }
10
+ export interface IndicatorsByTypeEntity {
11
+ documentTypeId: string;
12
+ name: string;
13
+ submitted: number;
14
+ finished: number;
15
+ rejections: number;
16
+ averageDays: number | null;
17
+ averageBusinessDays: number | null;
18
+ }
19
+ /** Unidad emisora: una dirección (código de caschile) o un departamento; el nombre lo pone el front. */
20
+ export interface IndicatorsByUnitEntity {
21
+ directorateCode: number | null;
22
+ departmentId: string | null;
23
+ submitted: number;
24
+ finished: number;
25
+ averageDays: number | null;
26
+ averageBusinessDays: number | null;
27
+ }
28
+ /** Quién demora más en su turno de visación o firma, y cuánto tiene pendiente hoy. */
29
+ export interface IndicatorsBottleneckEntity {
30
+ employeeId: string;
31
+ fullName: string;
32
+ role: DocumentParticipantRole;
33
+ resolved: number;
34
+ averageDays: number | null;
35
+ pending: number;
36
+ oldestPendingDays: number | null;
37
+ }
38
+ export interface ManagementIndicatorsEntity {
39
+ /** Período consultado, días de Chile «AAAA-MM-DD». */
40
+ from: string;
41
+ to: string;
42
+ generatedAt: string;
43
+ filters: {
44
+ documentTypeId: string | null;
45
+ directorateCode: number | null;
46
+ };
47
+ volume: {
48
+ /** Enviados a tramitación por primera vez en el período. */
49
+ submitted: number;
50
+ finished: number;
51
+ /** Rechazos de visadores y firmantes (un documento puede tener varios). */
52
+ rejections: number;
53
+ annulled: number;
54
+ discarded: number;
55
+ /** En tramitación hoy, sin importar el período. */
56
+ inProcess: number;
57
+ };
58
+ processing: ProcessingTimeEntity;
59
+ byType: IndicatorsByTypeEntity[];
60
+ byUnit: IndicatorsByUnitEntity[];
61
+ /** Por mes de Chile «AAAA-MM». */
62
+ monthly: {
63
+ month: string;
64
+ submitted: number;
65
+ finished: number;
66
+ }[];
67
+ bottlenecks: IndicatorsBottleneckEntity[];
68
+ /** Plazos de lo recibido y derivado que vencían en el período. */
69
+ deadlines: {
70
+ withDeadline: number;
71
+ onTime: number;
72
+ late: number;
73
+ /** Vencidos sin atender. */
74
+ overdue: number;
75
+ /** Sin atender, todavía en plazo. */
76
+ pending: number;
77
+ /** A tiempo sobre los ya resueltos o vencidos, en %. */
78
+ onTimeRate: number | null;
79
+ };
80
+ partsOffice: {
81
+ received: number;
82
+ registered: number;
83
+ returned: number;
84
+ /** Días desde que llegó por DocDigital hasta que Partes lo ingresó. */
85
+ averageIntakeDays: number | null;
86
+ dispatched: number;
87
+ dispatchReturned: number;
88
+ };
89
+ }
90
+ export type QualityMetricUnit = 'Percent' | 'Ratio' | 'Milliseconds';
91
+ export type QualityMetricDirection = 'AtLeast' | 'AtMost';
92
+ /** Una métrica del Plan de Mejora Continua, con su valor en el período y su umbral. */
93
+ export interface QualityMetricEntity {
94
+ key: QualityMetricKey;
95
+ /** Subcaracterística de la ISO/IEC 25010 que mide. */
96
+ subcharacteristic: string;
97
+ model: 'Product' | 'InUse';
98
+ name: string;
99
+ description: string;
100
+ /** La mide el sistema o la declara quien administra la calidad, con su respaldo. */
101
+ source: 'Measured' | 'Declared';
102
+ value: number | null;
103
+ unit: QualityMetricUnit;
104
+ threshold: number;
105
+ direction: QualityMetricDirection;
106
+ /** Cumple el umbral. `null` sin valor. */
107
+ meets: boolean | null;
108
+ /** Con qué se calculó: cantidades del período. */
109
+ detail: string | null;
110
+ declaredNote: string | null;
111
+ declaredAt: string | null;
112
+ declaredByFullName: string | null;
113
+ }
114
+ export interface ServiceOutageResponseEntity {
115
+ id: string;
116
+ kind: ServiceOutageKind;
117
+ startedAt: string;
118
+ endedAt: string | null;
119
+ /** Duración en minutos; si sigue caído, hasta ahora. */
120
+ minutes: number;
121
+ cause: string;
122
+ affectedServices: string | null;
123
+ createdByFullName: string;
124
+ updatedByFullName: string | null;
125
+ createdAt: string;
126
+ }
127
+ export interface QualityReportEntity {
128
+ from: string;
129
+ to: string;
130
+ generatedAt: string;
131
+ metrics: QualityMetricEntity[];
132
+ /** Caídas que tocan el período. */
133
+ outages: ServiceOutageResponseEntity[];
134
+ }
135
+ export interface QualityMetricSettingResponseEntity {
136
+ key: QualityMetricKey;
137
+ threshold: number;
138
+ declaredValue: number | null;
139
+ declaredNote: string | null;
140
+ declaredAt: string | null;
141
+ declaredByFullName: string | null;
142
+ }
143
+ export interface ServiceOutageRemoveResponseEntity {
144
+ id: string;
145
+ ok: boolean;
146
+ }
147
+ /** Un archivo generado (planilla o certificado), en base64. */
148
+ export interface IndicatorsFileEntity {
149
+ fileName: string;
150
+ contentType: string;
151
+ contentBase64: string;
152
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export * from './issuingEntity.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("./issuingEntity.entity"), exports);
@@ -0,0 +1,20 @@
1
+ import { IssuingEntityEntity } from '../../base/entities';
2
+ export interface IssuingEntityGetAllResponseEntity {
3
+ id: IssuingEntityEntity['id'];
4
+ name: IssuingEntityEntity['name'];
5
+ shortName: IssuingEntityEntity['shortName'];
6
+ directorateCodeReferences: IssuingEntityEntity['directorateCodeReferences'];
7
+ docDigitalEntityId: IssuingEntityEntity['docDigitalEntityId'];
8
+ enabled: IssuingEntityEntity['enabled'];
9
+ /** Cuántos tipos documentales emite. */
10
+ documentTypes: number;
11
+ }
12
+ export type IssuingEntityGetByIdResponseEntity = IssuingEntityGetAllResponseEntity;
13
+ export interface IssuingEntityCreateResponseEntity {
14
+ id: IssuingEntityEntity['id'];
15
+ ok: boolean;
16
+ }
17
+ export interface IssuingEntityUpdateResponseEntity {
18
+ id: IssuingEntityEntity['id'];
19
+ ok: boolean;
20
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });