@muni-sanfer/types-gestor-documental 0.0.1-beta.22 → 0.0.1-beta.23

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.
@@ -205,7 +205,7 @@ export declare const DocumentAccessAction: {
205
205
  FileDownloaded: "FileDownloaded";
206
206
  TrailExported: "TrailExported";
207
207
  };
208
- export type AuditEntity = 'DocumentType' | 'IssuingEntity' | 'ArchivalSeries' | 'TextSnippet' | 'Holiday' | 'Procedure' | 'QualityMetric' | 'ServiceOutage';
208
+ export type AuditEntity = 'DocumentType' | 'IssuingEntity' | 'ArchivalSeries' | 'TextSnippet' | 'Holiday' | 'Procedure' | 'QualityMetric' | 'ServiceOutage' | 'Repository';
209
209
  export declare const AuditEntity: {
210
210
  DocumentType: "DocumentType";
211
211
  IssuingEntity: "IssuingEntity";
@@ -215,14 +215,16 @@ export declare const AuditEntity: {
215
215
  Procedure: "Procedure";
216
216
  QualityMetric: "QualityMetric";
217
217
  ServiceOutage: "ServiceOutage";
218
+ Repository: "Repository";
218
219
  };
219
- export type AuditAction = 'Created' | 'Updated' | 'Enabled' | 'Disabled' | 'Removed';
220
+ export type AuditAction = 'Created' | 'Updated' | 'Enabled' | 'Disabled' | 'Removed' | 'Exported';
220
221
  export declare const AuditAction: {
221
222
  Created: "Created";
222
223
  Updated: "Updated";
223
224
  Enabled: "Enabled";
224
225
  Disabled: "Disabled";
225
226
  Removed: "Removed";
227
+ Exported: "Exported";
226
228
  };
227
229
  export interface DocumentTypeEntity {
228
230
  id: string;
@@ -190,6 +190,7 @@ exports.AuditEntity = {
190
190
  Procedure: 'Procedure',
191
191
  QualityMetric: 'QualityMetric',
192
192
  ServiceOutage: 'ServiceOutage',
193
+ Repository: 'Repository',
193
194
  };
194
195
  exports.AuditAction = {
195
196
  Created: 'Created',
@@ -197,4 +198,5 @@ exports.AuditAction = {
197
198
  Enabled: 'Enabled',
198
199
  Disabled: 'Disabled',
199
200
  Removed: 'Removed',
201
+ Exported: 'Exported',
200
202
  };
@@ -8,6 +8,7 @@ import { type HolidayContract } from './holiday.contract';
8
8
  import { type IndicatorsContract } from './indicators.contract';
9
9
  import { type AuditContract } from './audit.contract';
10
10
  import { type SignatureCheckContract } from './signatureCheck.contract';
11
+ import { type RepositoryExportContract } from './repositoryExport.contract';
11
12
  import { type ScanContract } from './scan.contract';
12
13
  import { type PartsOfficeContract } from './partsOffice.contract';
13
14
  import { type ProcedureContract } from './procedure.contract';
@@ -31,6 +32,7 @@ export * from './holiday.contract';
31
32
  export * from './indicators.contract';
32
33
  export * from './audit.contract';
33
34
  export * from './signatureCheck.contract';
35
+ export * from './repositoryExport.contract';
34
36
  /** Patrones NATS de gestor-documental-ms, por recurso: `gestorDocumental.<recurso>.<acción>`. */
35
37
  export declare const GestorDocumentalPatterns: {
36
38
  readonly documentType: {
@@ -190,6 +192,12 @@ export declare const GestorDocumentalPatterns: {
190
192
  readonly signatureCheck: {
191
193
  readonly check: "gestorDocumental.signatureCheck.check";
192
194
  };
195
+ readonly repositoryExport: {
196
+ readonly getSummary: "gestorDocumental.repositoryExport.getSummary";
197
+ readonly getDocuments: "gestorDocumental.repositoryExport.getDocuments";
198
+ readonly getCaseFiles: "gestorDocumental.repositoryExport.getCaseFiles";
199
+ readonly record: "gestorDocumental.repositoryExport.record";
200
+ };
193
201
  };
194
202
  /** Contrato completo de gestor-documental-ms: la unión de los contratos de sus recursos. */
195
- export type GestorDocumentalContract = DocumentTypeContract & DocumentContract & ProcedureContract & IssuingEntityContract & CaseFileContract & PartsOfficeContract & RegisterBookContract & SignatureBatchContract & WorkFolderContract & ScanContract & ArchivalSeriesContract & TextSnippetContract & HolidayContract & IndicatorsContract & AuditContract & SignatureCheckContract;
203
+ export type GestorDocumentalContract = DocumentTypeContract & DocumentContract & ProcedureContract & IssuingEntityContract & CaseFileContract & PartsOfficeContract & RegisterBookContract & SignatureBatchContract & WorkFolderContract & ScanContract & ArchivalSeriesContract & TextSnippetContract & HolidayContract & IndicatorsContract & AuditContract & SignatureCheckContract & RepositoryExportContract;
@@ -25,6 +25,7 @@ const holiday_contract_1 = require("./holiday.contract");
25
25
  const indicators_contract_1 = require("./indicators.contract");
26
26
  const audit_contract_1 = require("./audit.contract");
27
27
  const signatureCheck_contract_1 = require("./signatureCheck.contract");
28
+ const repositoryExport_contract_1 = require("./repositoryExport.contract");
28
29
  const scan_contract_1 = require("./scan.contract");
29
30
  const partsOffice_contract_1 = require("./partsOffice.contract");
30
31
  const procedure_contract_1 = require("./procedure.contract");
@@ -48,6 +49,7 @@ __exportStar(require("./holiday.contract"), exports);
48
49
  __exportStar(require("./indicators.contract"), exports);
49
50
  __exportStar(require("./audit.contract"), exports);
50
51
  __exportStar(require("./signatureCheck.contract"), exports);
52
+ __exportStar(require("./repositoryExport.contract"), exports);
51
53
  /** Patrones NATS de gestor-documental-ms, por recurso: `gestorDocumental.<recurso>.<acción>`. */
52
54
  exports.GestorDocumentalPatterns = {
53
55
  documentType: documentType_contract_1.DocumentTypePatterns,
@@ -66,4 +68,5 @@ exports.GestorDocumentalPatterns = {
66
68
  indicators: indicators_contract_1.IndicatorsPatterns,
67
69
  audit: audit_contract_1.AuditPatterns,
68
70
  signatureCheck: signatureCheck_contract_1.SignatureCheckPatterns,
71
+ repositoryExport: repositoryExport_contract_1.RepositoryExportPatterns,
69
72
  };
@@ -0,0 +1,55 @@
1
+ import { type RepositoryExportCaseFilesPageEntity, type RepositoryExportRecordResponseEntity, type RepositoryExportDocumentsPageEntity, type RepositoryExportScope, type RepositoryExportSummaryEntity } from '../entities';
2
+ /**
3
+ * Patrones NATS de `repositoryExport`: exportación completa del repositorio (portabilidad). El ms entrega los datos
4
+ * por páginas, porque un mensaje NATS no admite más de 1 MB; el gateway arma el ZIP con ellos y los archivos.
5
+ */
6
+ export declare const RepositoryExportPatterns: {
7
+ readonly getSummary: "gestorDocumental.repositoryExport.getSummary";
8
+ readonly getDocuments: "gestorDocumental.repositoryExport.getDocuments";
9
+ readonly getCaseFiles: "gestorDocumental.repositoryExport.getCaseFiles";
10
+ readonly record: "gestorDocumental.repositoryExport.record";
11
+ };
12
+ /** Período por fecha de creación (días de Chile «AAAA-MM-DD»); sin él, todo. */
13
+ export interface RepositoryExportQuery {
14
+ from?: string | null;
15
+ to?: string | null;
16
+ scope?: RepositoryExportScope;
17
+ }
18
+ export interface RepositoryExportContract {
19
+ [RepositoryExportPatterns.getSummary]: {
20
+ payload: RepositoryExportQuery;
21
+ response: RepositoryExportSummaryEntity;
22
+ };
23
+ /** Hasta 50 documentos por página, en orden de creación. */
24
+ [RepositoryExportPatterns.getDocuments]: {
25
+ payload: RepositoryExportQuery & {
26
+ cursor?: string | null;
27
+ limit?: number;
28
+ };
29
+ response: RepositoryExportDocumentsPageEntity;
30
+ };
31
+ /** Hasta 10 expedientes por página; cada uno queda con «Exportó» en su trazabilidad, a nombre de quien exporta. */
32
+ [RepositoryExportPatterns.getCaseFiles]: {
33
+ payload: Omit<RepositoryExportQuery, 'scope'> & {
34
+ cursor?: string | null;
35
+ limit?: number;
36
+ actor: {
37
+ employeeId: string | null;
38
+ fullName: string;
39
+ };
40
+ };
41
+ response: RepositoryExportCaseFilesPageEntity;
42
+ };
43
+ /** Deja la exportación en la bitácora: quién, qué período y si llevó archivos. */
44
+ [RepositoryExportPatterns.record]: {
45
+ payload: RepositoryExportQuery & {
46
+ includeFiles: boolean;
47
+ complete: boolean;
48
+ actor: {
49
+ employeeId: string | null;
50
+ fullName: string;
51
+ };
52
+ };
53
+ response: RepositoryExportRecordResponseEntity;
54
+ };
55
+ }
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RepositoryExportPatterns = void 0;
4
+ /**
5
+ * Patrones NATS de `repositoryExport`: exportación completa del repositorio (portabilidad). El ms entrega los datos
6
+ * por páginas, porque un mensaje NATS no admite más de 1 MB; el gateway arma el ZIP con ellos y los archivos.
7
+ */
8
+ exports.RepositoryExportPatterns = {
9
+ getSummary: 'gestorDocumental.repositoryExport.getSummary',
10
+ getDocuments: 'gestorDocumental.repositoryExport.getDocuments',
11
+ getCaseFiles: 'gestorDocumental.repositoryExport.getCaseFiles',
12
+ record: 'gestorDocumental.repositoryExport.record',
13
+ };
@@ -14,3 +14,4 @@ export * from './holiday';
14
14
  export * from './indicators';
15
15
  export * from './audit';
16
16
  export * from './signatureCheck';
17
+ export * from './repositoryExport';
@@ -30,3 +30,4 @@ __exportStar(require("./holiday"), exports);
30
30
  __exportStar(require("./indicators"), exports);
31
31
  __exportStar(require("./audit"), exports);
32
32
  __exportStar(require("./signatureCheck"), exports);
33
+ __exportStar(require("./repositoryExport"), exports);
@@ -0,0 +1 @@
1
+ export * from './repositoryExport.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("./repositoryExport.entity"), exports);
@@ -0,0 +1,124 @@
1
+ import { type CaseFileExportResponseEntity } from '../caseFile';
2
+ /** Qué documentos: los oficiales (finalizados y anulados) o todos, también borradores y en tramitación. */
3
+ export type RepositoryExportScope = 'official' | 'all';
4
+ /** Un archivo que el gateway descarga y pone en el ZIP, en la ruta indicada. */
5
+ export interface RepositoryExportFile {
6
+ fileId: string;
7
+ path: string;
8
+ kind: 'document' | 'attachment';
9
+ }
10
+ /** Un documento con todos sus datos, como va en `documentos/*.jsonl`. Claves en castellano, como `expediente.json`. */
11
+ export interface RepositoryDocumentRecord {
12
+ id: string;
13
+ tipo: {
14
+ nombre: string;
15
+ sigla: string | null;
16
+ serie: {
17
+ codigo: string;
18
+ nombre: string;
19
+ } | null;
20
+ };
21
+ entidadEmisora: string;
22
+ folio: string | null;
23
+ numero: number | null;
24
+ anio: number | null;
25
+ materia: string;
26
+ palabrasClave: string[];
27
+ nivelAcceso: string;
28
+ datosSensibles: boolean;
29
+ finRestriccion: string | null;
30
+ estado: string;
31
+ origen: string;
32
+ codigoVerificacion: string | null;
33
+ redactor: {
34
+ id: string;
35
+ nombre: string;
36
+ };
37
+ unidadEmisora: {
38
+ codigoDireccion: number | null;
39
+ departamentoId: string | null;
40
+ };
41
+ creado: string;
42
+ enviado: string | null;
43
+ finalizado: string | null;
44
+ anulacion: {
45
+ fecha: string;
46
+ motivo: string | null;
47
+ } | null;
48
+ numerosAnulados: {
49
+ numero: number;
50
+ anio: number;
51
+ motivo: string;
52
+ registradoPor: string;
53
+ fecha: string;
54
+ }[];
55
+ participantes: {
56
+ rol: string;
57
+ orden: number;
58
+ etapa: number;
59
+ nombre: string;
60
+ cargo: string | null;
61
+ estado: string;
62
+ resueltoEl: string | null;
63
+ observacion: string | null;
64
+ }[];
65
+ destinatarios: {
66
+ tipo: string;
67
+ nombre: string;
68
+ cargo: string | null;
69
+ }[];
70
+ destinatariosExternos: {
71
+ entidad: string;
72
+ usuario: string | null;
73
+ }[];
74
+ despacho: {
75
+ estado: string;
76
+ folio: string | null;
77
+ despachadoEl: string | null;
78
+ idDocDigital: string | null;
79
+ } | null;
80
+ ingreso: {
81
+ folio: string | null;
82
+ remitente: string | null;
83
+ folioDeOrigen: string | null;
84
+ } | null;
85
+ anexos: {
86
+ nombre: string;
87
+ enlace: string | null;
88
+ archivo: string | null;
89
+ }[];
90
+ trazabilidad: {
91
+ accion: string;
92
+ quien: string | null;
93
+ cuando: string;
94
+ observacion: string | null;
95
+ sha256: string | null;
96
+ }[];
97
+ /** Ruta del PDF vigente (firmado) dentro del ZIP. */
98
+ archivo: string;
99
+ }
100
+ export interface RepositoryExportSummaryEntity {
101
+ /** Órgano que exporta (`ORGAN_NAME`). */
102
+ organ: string;
103
+ from: string | null;
104
+ to: string | null;
105
+ scope: RepositoryExportScope;
106
+ documents: number;
107
+ caseFiles: number;
108
+ /** Catálogos completos: tipos documentales, series, procedimientos, entidades emisoras y feriados. */
109
+ catalogs: Record<string, unknown[]>;
110
+ }
111
+ export interface RepositoryExportDocumentsPageEntity {
112
+ items: {
113
+ record: RepositoryDocumentRecord;
114
+ files: RepositoryExportFile[];
115
+ }[];
116
+ nextCursor: string | null;
117
+ }
118
+ export interface RepositoryExportCaseFilesPageEntity {
119
+ items: CaseFileExportResponseEntity[];
120
+ nextCursor: string | null;
121
+ }
122
+ export interface RepositoryExportRecordResponseEntity {
123
+ ok: boolean;
124
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@muni-sanfer/types-gestor-documental",
3
- "version": "0.0.1-beta.22",
3
+ "version": "0.0.1-beta.23",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "scripts": {
@@ -318,7 +318,8 @@ export type AuditEntity =
318
318
  | 'Holiday'
319
319
  | 'Procedure'
320
320
  | 'QualityMetric'
321
- | 'ServiceOutage';
321
+ | 'ServiceOutage'
322
+ | 'Repository';
322
323
 
323
324
  export const AuditEntity = {
324
325
  DocumentType: 'DocumentType',
@@ -329,9 +330,10 @@ export const AuditEntity = {
329
330
  Procedure: 'Procedure',
330
331
  QualityMetric: 'QualityMetric',
331
332
  ServiceOutage: 'ServiceOutage',
333
+ Repository: 'Repository',
332
334
  } satisfies Record<string, AuditEntity>;
333
335
 
334
- export type AuditAction = 'Created' | 'Updated' | 'Enabled' | 'Disabled' | 'Removed';
336
+ export type AuditAction = 'Created' | 'Updated' | 'Enabled' | 'Disabled' | 'Removed' | 'Exported';
335
337
 
336
338
  export const AuditAction = {
337
339
  Created: 'Created',
@@ -339,6 +341,7 @@ export const AuditAction = {
339
341
  Enabled: 'Enabled',
340
342
  Disabled: 'Disabled',
341
343
  Removed: 'Removed',
344
+ Exported: 'Exported',
342
345
  } satisfies Record<string, AuditAction>;
343
346
 
344
347
  export interface DocumentTypeEntity {
@@ -8,6 +8,7 @@ import { HolidayPatterns, type HolidayContract } from './holiday.contract';
8
8
  import { IndicatorsPatterns, type IndicatorsContract } from './indicators.contract';
9
9
  import { AuditPatterns, type AuditContract } from './audit.contract';
10
10
  import { SignatureCheckPatterns, type SignatureCheckContract } from './signatureCheck.contract';
11
+ import { RepositoryExportPatterns, type RepositoryExportContract } from './repositoryExport.contract';
11
12
  import { ScanPatterns, type ScanContract } from './scan.contract';
12
13
  import { PartsOfficePatterns, type PartsOfficeContract } from './partsOffice.contract';
13
14
  import { ProcedurePatterns, type ProcedureContract } from './procedure.contract';
@@ -32,6 +33,7 @@ export * from './holiday.contract';
32
33
  export * from './indicators.contract';
33
34
  export * from './audit.contract';
34
35
  export * from './signatureCheck.contract';
36
+ export * from './repositoryExport.contract';
35
37
 
36
38
  /** Patrones NATS de gestor-documental-ms, por recurso: `gestorDocumental.<recurso>.<acción>`. */
37
39
  export const GestorDocumentalPatterns = {
@@ -51,6 +53,7 @@ export const GestorDocumentalPatterns = {
51
53
  indicators: IndicatorsPatterns,
52
54
  audit: AuditPatterns,
53
55
  signatureCheck: SignatureCheckPatterns,
56
+ repositoryExport: RepositoryExportPatterns,
54
57
  } as const;
55
58
 
56
59
  /** Contrato completo de gestor-documental-ms: la unión de los contratos de sus recursos. */
@@ -69,4 +72,5 @@ export type GestorDocumentalContract = DocumentTypeContract &
69
72
  HolidayContract &
70
73
  IndicatorsContract &
71
74
  AuditContract &
72
- SignatureCheckContract;
75
+ SignatureCheckContract &
76
+ RepositoryExportContract;
@@ -0,0 +1,52 @@
1
+ import {
2
+ type RepositoryExportCaseFilesPageEntity,
3
+ type RepositoryExportRecordResponseEntity,
4
+ type RepositoryExportDocumentsPageEntity,
5
+ type RepositoryExportScope,
6
+ type RepositoryExportSummaryEntity,
7
+ } from '../entities';
8
+
9
+ /**
10
+ * Patrones NATS de `repositoryExport`: exportación completa del repositorio (portabilidad). El ms entrega los datos
11
+ * por páginas, porque un mensaje NATS no admite más de 1 MB; el gateway arma el ZIP con ellos y los archivos.
12
+ */
13
+ export const RepositoryExportPatterns = {
14
+ getSummary: 'gestorDocumental.repositoryExport.getSummary',
15
+ getDocuments: 'gestorDocumental.repositoryExport.getDocuments',
16
+ getCaseFiles: 'gestorDocumental.repositoryExport.getCaseFiles',
17
+ record: 'gestorDocumental.repositoryExport.record',
18
+ } as const;
19
+
20
+ /** Período por fecha de creación (días de Chile «AAAA-MM-DD»); sin él, todo. */
21
+ export interface RepositoryExportQuery {
22
+ from?: string | null;
23
+ to?: string | null;
24
+ scope?: RepositoryExportScope;
25
+ }
26
+
27
+ export interface RepositoryExportContract {
28
+ [RepositoryExportPatterns.getSummary]: { payload: RepositoryExportQuery; response: RepositoryExportSummaryEntity };
29
+ /** Hasta 50 documentos por página, en orden de creación. */
30
+ [RepositoryExportPatterns.getDocuments]: {
31
+ payload: RepositoryExportQuery & { cursor?: string | null; limit?: number };
32
+ response: RepositoryExportDocumentsPageEntity;
33
+ };
34
+ /** Hasta 10 expedientes por página; cada uno queda con «Exportó» en su trazabilidad, a nombre de quien exporta. */
35
+ [RepositoryExportPatterns.getCaseFiles]: {
36
+ payload: Omit<RepositoryExportQuery, 'scope'> & {
37
+ cursor?: string | null;
38
+ limit?: number;
39
+ actor: { employeeId: string | null; fullName: string };
40
+ };
41
+ response: RepositoryExportCaseFilesPageEntity;
42
+ };
43
+ /** Deja la exportación en la bitácora: quién, qué período y si llevó archivos. */
44
+ [RepositoryExportPatterns.record]: {
45
+ payload: RepositoryExportQuery & {
46
+ includeFiles: boolean;
47
+ complete: boolean;
48
+ actor: { employeeId: string | null; fullName: string };
49
+ };
50
+ response: RepositoryExportRecordResponseEntity;
51
+ };
52
+ }
@@ -14,3 +14,4 @@ export * from './holiday';
14
14
  export * from './indicators';
15
15
  export * from './audit';
16
16
  export * from './signatureCheck';
17
+ export * from './repositoryExport';
@@ -0,0 +1 @@
1
+ export * from './repositoryExport.entity';
@@ -0,0 +1,86 @@
1
+ import { type CaseFileExportResponseEntity } from '../caseFile';
2
+
3
+ /** Qué documentos: los oficiales (finalizados y anulados) o todos, también borradores y en tramitación. */
4
+ export type RepositoryExportScope = 'official' | 'all';
5
+
6
+ /** Un archivo que el gateway descarga y pone en el ZIP, en la ruta indicada. */
7
+ export interface RepositoryExportFile {
8
+ fileId: string;
9
+ path: string;
10
+ kind: 'document' | 'attachment';
11
+ }
12
+
13
+ /** Un documento con todos sus datos, como va en `documentos/*.jsonl`. Claves en castellano, como `expediente.json`. */
14
+ export interface RepositoryDocumentRecord {
15
+ id: string;
16
+ tipo: { nombre: string; sigla: string | null; serie: { codigo: string; nombre: string } | null };
17
+ entidadEmisora: string;
18
+ folio: string | null;
19
+ numero: number | null;
20
+ anio: number | null;
21
+ materia: string;
22
+ palabrasClave: string[];
23
+ nivelAcceso: string;
24
+ datosSensibles: boolean;
25
+ finRestriccion: string | null;
26
+ estado: string;
27
+ origen: string;
28
+ codigoVerificacion: string | null;
29
+ redactor: { id: string; nombre: string };
30
+ unidadEmisora: { codigoDireccion: number | null; departamentoId: string | null };
31
+ creado: string;
32
+ enviado: string | null;
33
+ finalizado: string | null;
34
+ anulacion: { fecha: string; motivo: string | null } | null;
35
+ numerosAnulados: { numero: number; anio: number; motivo: string; registradoPor: string; fecha: string }[];
36
+ participantes: {
37
+ rol: string;
38
+ orden: number;
39
+ etapa: number;
40
+ nombre: string;
41
+ cargo: string | null;
42
+ estado: string;
43
+ resueltoEl: string | null;
44
+ observacion: string | null;
45
+ }[];
46
+ destinatarios: { tipo: string; nombre: string; cargo: string | null }[];
47
+ destinatariosExternos: { entidad: string; usuario: string | null }[];
48
+ despacho: { estado: string; folio: string | null; despachadoEl: string | null; idDocDigital: string | null } | null;
49
+ ingreso: { folio: string | null; remitente: string | null; folioDeOrigen: string | null } | null;
50
+ anexos: { nombre: string; enlace: string | null; archivo: string | null }[];
51
+ trazabilidad: {
52
+ accion: string;
53
+ quien: string | null;
54
+ cuando: string;
55
+ observacion: string | null;
56
+ sha256: string | null;
57
+ }[];
58
+ /** Ruta del PDF vigente (firmado) dentro del ZIP. */
59
+ archivo: string;
60
+ }
61
+
62
+ export interface RepositoryExportSummaryEntity {
63
+ /** Órgano que exporta (`ORGAN_NAME`). */
64
+ organ: string;
65
+ from: string | null;
66
+ to: string | null;
67
+ scope: RepositoryExportScope;
68
+ documents: number;
69
+ caseFiles: number;
70
+ /** Catálogos completos: tipos documentales, series, procedimientos, entidades emisoras y feriados. */
71
+ catalogs: Record<string, unknown[]>;
72
+ }
73
+
74
+ export interface RepositoryExportDocumentsPageEntity {
75
+ items: { record: RepositoryDocumentRecord; files: RepositoryExportFile[] }[];
76
+ nextCursor: string | null;
77
+ }
78
+
79
+ export interface RepositoryExportCaseFilesPageEntity {
80
+ items: CaseFileExportResponseEntity[];
81
+ nextCursor: string | null;
82
+ }
83
+
84
+ export interface RepositoryExportRecordResponseEntity {
85
+ ok: boolean;
86
+ }