@muni-sanfer/types-gestor-documental 0.0.1-beta.4 → 0.0.1-beta.6

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 (32) hide show
  1. package/dist/base/entities.d.ts +103 -1
  2. package/dist/base/entities.js +18 -1
  3. package/dist/contracts/document.contract.d.ts +12 -0
  4. package/dist/contracts/index.d.ts +27 -1
  5. package/dist/contracts/index.js +6 -0
  6. package/dist/contracts/partsOffice.contract.d.ts +171 -0
  7. package/dist/contracts/partsOffice.contract.js +22 -0
  8. package/dist/contracts/registerBook.contract.d.ts +27 -0
  9. package/dist/contracts/registerBook.contract.js +8 -0
  10. package/dist/entities/document/document.entity.d.ts +42 -0
  11. package/dist/entities/index.d.ts +2 -0
  12. package/dist/entities/index.js +2 -0
  13. package/dist/entities/partsOffice/index.d.ts +1 -0
  14. package/dist/entities/partsOffice/index.js +17 -0
  15. package/dist/entities/partsOffice/partsOffice.entity.d.ts +98 -0
  16. package/dist/entities/partsOffice/partsOffice.entity.js +2 -0
  17. package/dist/entities/registerBook/index.d.ts +1 -0
  18. package/dist/entities/registerBook/index.js +17 -0
  19. package/dist/entities/registerBook/registerBook.entity.d.ts +42 -0
  20. package/dist/entities/registerBook/registerBook.entity.js +2 -0
  21. package/package.json +1 -1
  22. package/src/base/entities.ts +114 -1
  23. package/src/contracts/document.contract.ts +16 -0
  24. package/src/contracts/index.ts +12 -1
  25. package/src/contracts/partsOffice.contract.ts +120 -0
  26. package/src/contracts/registerBook.contract.ts +24 -0
  27. package/src/entities/document/document.entity.ts +44 -0
  28. package/src/entities/index.ts +2 -0
  29. package/src/entities/partsOffice/index.ts +1 -0
  30. package/src/entities/partsOffice/partsOffice.entity.ts +103 -0
  31. package/src/entities/registerBook/index.ts +1 -0
  32. package/src/entities/registerBook/registerBook.entity.ts +46 -0
@@ -0,0 +1,103 @@
1
+ import {
2
+ type DocumentDispatchResponseEntity,
3
+ type DocumentExternalRecipientResponseEntity,
4
+ type DocumentLinkEntity,
5
+ } from '../document';
6
+
7
+ /** Institución del Estado en DocDigital. */
8
+ export interface DocDigitalEntityEntity {
9
+ id: number;
10
+ name: string;
11
+ /** Organismo al que pertenece (la entidad padre). */
12
+ organism: string | null;
13
+ }
14
+
15
+ /** Usuario habilitado de una institución en DocDigital. */
16
+ export interface DocDigitalUserEntity {
17
+ id: number;
18
+ name: string;
19
+ position: string | null;
20
+ }
21
+
22
+ export interface DocDigitalDocumentTypeEntity {
23
+ id: number;
24
+ name: string;
25
+ }
26
+
27
+ /** Si DocDigital está configurado en el gestor y cada cuánto se revisa lo recibido. */
28
+ export interface PartsOfficeStatusEntity {
29
+ configured: boolean;
30
+ syncMinutes: number;
31
+ }
32
+
33
+ /** Totales del Panel de Partes. */
34
+ export interface PartsOfficeSummaryEntity {
35
+ toDispatch: number;
36
+ received: number;
37
+ }
38
+
39
+ /** Documento firmado que va a otras instituciones: lo despacha Oficina de Partes. */
40
+ export interface PartsOfficeDispatchEntity extends DocumentDispatchResponseEntity {
41
+ document: DocumentLinkEntity & { accessLevel: string };
42
+ externalRecipients: DocumentExternalRecipientResponseEntity[];
43
+ createdAt: string;
44
+ }
45
+
46
+ /** Documento que llegó por DocDigital. */
47
+ export interface PartsOfficeInboundEntity {
48
+ id: string;
49
+ docDigitalDocumentId: string;
50
+ status: 'Pending' | 'Registered' | 'Returned';
51
+ subject: string;
52
+ description: string | null;
53
+ folio: string | null;
54
+ folioDate: string | null;
55
+ typeName: string | null;
56
+ reserved: boolean;
57
+ senderEntityName: string | null;
58
+ senderName: string | null;
59
+ senderPosition: string | null;
60
+ fileName: string | null;
61
+ hasFile: boolean;
62
+ attachments: { name: string; url: string | null; hasFile: boolean }[];
63
+ createdAt: string;
64
+ registeredAt: string | null;
65
+ registeredByFullName: string | null;
66
+ acknowledgedAt: string | null;
67
+ acknowledgeError: string | null;
68
+ returnedAt: string | null;
69
+ returnedByFullName: string | null;
70
+ returnReason: string | null;
71
+ /** El documento con que quedó ingresado al gestor. */
72
+ document: { id: string; intakeNumber: number | null; intakeYear: number | null } | null;
73
+ }
74
+
75
+ export interface PartsOfficeOkResponseEntity {
76
+ id: string;
77
+ ok: boolean;
78
+ /** Documento al que corresponde el despacho (al despachar o devolver). */
79
+ documentId?: string;
80
+ }
81
+
82
+ export interface PartsOfficeSyncResponseEntity {
83
+ /** Recibidos nuevos que se trajeron. */
84
+ created: number;
85
+ /** Los que no se pudieron traer (se reintentan en la próxima revisión). */
86
+ failed: number;
87
+ }
88
+
89
+ export interface PartsOfficeRegisterResponseEntity {
90
+ id: string;
91
+ documentId: string;
92
+ intakeNumber: number;
93
+ intakeYear: number;
94
+ /** `false` si DocDigital no aceptó el acuse de recibo: se puede reintentar. */
95
+ acknowledged: boolean;
96
+ ok: boolean;
97
+ }
98
+
99
+ /** Archivo de un recibido, ya copiado al gestor. */
100
+ export interface PartsOfficeFileEntity {
101
+ fileId: string;
102
+ fileName: string;
103
+ }
@@ -0,0 +1 @@
1
+ export * from './registerBook.entity';
@@ -0,0 +1,46 @@
1
+ /** Libro de registro: el de un tipo documental (sus números) o el de ingresos de Oficina de Partes. */
2
+ export type RegisterBookKind = 'documentType' | 'intake';
3
+
4
+ /**
5
+ * Estado de un número en el libro: vigente, en tramitación (numerado con la primera firma, aún sin todas las firmas),
6
+ * documento anulado, número anulado por un rechazo, o número sin registro en el gestor (un salto en la numeración).
7
+ */
8
+ export type RegisterBookRowState = 'Valid' | 'InProgress' | 'Annulled' | 'NumberAnnulled' | 'Unused';
9
+
10
+ export interface RegisterBookRowEntity {
11
+ number: number;
12
+ /** Fecha del número (o del ingreso), en ISO 8601. `null` en un salto. */
13
+ date: string | null;
14
+ state: RegisterBookRowState;
15
+ documentId: string | null;
16
+ subject: string | null;
17
+ /** Quién redactó el documento (o, en el libro de ingresos, quién lo ingresó). */
18
+ author: string | null;
19
+ signers: string[];
20
+ /** Libro de ingresos: institución que lo envió y su folio. */
21
+ sender: string | null;
22
+ externalFolio: string | null;
23
+ /** Libro de ingresos: a quiénes se derivó. */
24
+ recipients: string[];
25
+ /** Despacho por DocDigital: «DocDigital N° 777001 · 14-10-2026». */
26
+ dispatch: string | null;
27
+ /** Motivo de la anulación (del documento o del número). */
28
+ observation: string | null;
29
+ }
30
+
31
+ export interface RegisterBookEntity {
32
+ kind: RegisterBookKind;
33
+ /** «Decreto alcaldicio exento» o «Ingresos de Oficina de Partes». */
34
+ title: string;
35
+ year: number;
36
+ month: number | null;
37
+ rows: RegisterBookRowEntity[];
38
+ totals: Record<RegisterBookRowState, number>;
39
+ }
40
+
41
+ /** Libro exportado, listo para descargar. */
42
+ export interface RegisterBookExportEntity {
43
+ fileName: string;
44
+ contentType: string;
45
+ contentBase64: string;
46
+ }