@muni-sanfer/types-gestor-documental 0.0.1-beta.13 → 0.0.1-beta.15

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 (40) hide show
  1. package/dist/base/entities.d.ts +61 -3
  2. package/dist/base/entities.js +4 -0
  3. package/dist/contracts/caseFile.contract.d.ts +59 -1
  4. package/dist/contracts/caseFile.contract.js +6 -0
  5. package/dist/contracts/document.contract.d.ts +33 -1
  6. package/dist/contracts/document.contract.js +3 -0
  7. package/dist/contracts/documentType.contract.d.ts +2 -0
  8. package/dist/contracts/index.d.ts +20 -1
  9. package/dist/contracts/index.js +3 -0
  10. package/dist/contracts/issuingEntity.contract.d.ts +52 -0
  11. package/dist/contracts/issuingEntity.contract.js +11 -0
  12. package/dist/contracts/partsOffice.contract.d.ts +6 -0
  13. package/dist/contracts/partsOffice.contract.js +1 -0
  14. package/dist/entities/caseFile/caseFile.entity.d.ts +77 -0
  15. package/dist/entities/document/document.entity.d.ts +43 -0
  16. package/dist/entities/documentType/documentType.entity.d.ts +13 -0
  17. package/dist/entities/index.d.ts +1 -0
  18. package/dist/entities/index.js +1 -0
  19. package/dist/entities/issuingEntity/index.d.ts +1 -0
  20. package/dist/entities/issuingEntity/index.js +17 -0
  21. package/dist/entities/issuingEntity/issuingEntity.entity.d.ts +20 -0
  22. package/dist/entities/issuingEntity/issuingEntity.entity.js +2 -0
  23. package/dist/entities/partsOffice/partsOffice.entity.d.ts +4 -0
  24. package/dist/entities/registerBook/registerBook.entity.d.ts +6 -0
  25. package/package.json +1 -1
  26. package/src/base/entities.ts +68 -3
  27. package/src/contracts/caseFile.contract.ts +50 -0
  28. package/src/contracts/document.contract.ts +30 -0
  29. package/src/contracts/documentType.contract.ts +6 -1
  30. package/src/contracts/index.ts +4 -0
  31. package/src/contracts/issuingEntity.contract.ts +55 -0
  32. package/src/contracts/partsOffice.contract.ts +3 -0
  33. package/src/entities/caseFile/caseFile.entity.ts +79 -0
  34. package/src/entities/document/document.entity.ts +45 -0
  35. package/src/entities/documentType/documentType.entity.ts +7 -0
  36. package/src/entities/index.ts +1 -0
  37. package/src/entities/issuingEntity/index.ts +1 -0
  38. package/src/entities/issuingEntity/issuingEntity.entity.ts +24 -0
  39. package/src/entities/partsOffice/partsOffice.entity.ts +4 -0
  40. package/src/entities/registerBook/registerBook.entity.ts +6 -0
@@ -136,6 +136,8 @@ export interface DocumentInboxItemEntity extends DocumentDeliveryResponseEntity
136
136
 
137
137
  export interface DocumentGetByIdResponseEntity {
138
138
  id: DocumentEntity['id'];
139
+ // Quién lo emite: la entidad emisora del tipo (Educación, Salud, Juzgado) o la municipalidad.
140
+ issuerName: string;
139
141
  subject: DocumentEntity['subject'];
140
142
  keywords: DocumentEntity['keywords'];
141
143
  accessLevel: DocumentEntity['accessLevel'];
@@ -197,6 +199,8 @@ export interface DocumentGetByIdResponseEntity {
197
199
  /** Instituciones de DocDigital a quienes va dirigido, y su despacho por Oficina de Partes. */
198
200
  externalRecipients: DocumentExternalRecipientResponseEntity[];
199
201
  dispatch: DocumentDispatchResponseEntity | null;
202
+ // Copias por correo a quienes están fuera del Estado, con su envío y apertura.
203
+ emailCopies: DocumentEmailCopyResponseEntity[];
200
204
  documentType: DocumentTypeSummaryEntity;
201
205
  participants: DocumentParticipantResponseEntity[];
202
206
  attachments: {
@@ -321,6 +325,8 @@ export interface DocumentVerifyResponseEntity {
321
325
  state: DocumentVerificationState;
322
326
  verificationCode: string;
323
327
  documentType: Pick<DocumentTypeSummaryEntity, 'name' | 'abbreviation'>;
328
+ // Quién lo emite: la entidad emisora del tipo (Educación, Salud, Juzgado) o la municipalidad.
329
+ issuerName: string;
324
330
  correlative: DocumentEntity['correlative'];
325
331
  correlativeYear: DocumentEntity['correlativeYear'];
326
332
  numberedAt: DocumentEntity['numberedAt'];
@@ -446,3 +452,42 @@ export interface DocumentComposeResponseEntity {
446
452
  fileId?: string;
447
453
  contentBase64?: string;
448
454
  }
455
+
456
+ /** Copia por correo de un documento, como la ve quien lo consulta en el gestor. */
457
+ export interface DocumentEmailCopyResponseEntity {
458
+ id: string;
459
+ name: string;
460
+ email: string;
461
+ /** Cuándo se envió (sin valor: aún no corresponde). */
462
+ issuedAt: string | null;
463
+ expiresAt: string | null;
464
+ openedAt: string | null;
465
+ downloadCount: number;
466
+ }
467
+
468
+ /** Copia recién emitida: el gateway le envía el enlace a su destinatario. El token viaja solo aquí. */
469
+ export interface DocumentEmailCopyIssuedEntity {
470
+ copyId: string;
471
+ documentId: string;
472
+ name: string;
473
+ email: string;
474
+ token: string;
475
+ expiresAt: string;
476
+ /** Cómo se cita: «D.E. N° 590/2026», o el tipo si no lleva número. */
477
+ folio: string;
478
+ subject: string;
479
+ issuerName: string;
480
+ }
481
+
482
+ /** El documento como lo ve quien abre su copia por correo. */
483
+ export interface DocumentEmailCopyViewEntity {
484
+ recipientName: string;
485
+ expiresAt: string;
486
+ documentTypeName: string;
487
+ folio: string;
488
+ subject: string;
489
+ issuerName: string;
490
+ finishedAt: string | null;
491
+ verificationCode: string | null;
492
+ signers: { fullName: string; position: string | null; signedAt: string | null }[];
493
+ }
@@ -27,6 +27,13 @@ export interface DocumentTypeGetAllResponseEntity {
27
27
  // Sin numeración, sus documentos solo llevan fecha, código de verificación y QR.
28
28
  numbered: DocumentTypeEntity['numbered'];
29
29
  directorateCodeReference: DocumentTypeEntity['directorateCodeReference'];
30
+ // Entidad que emite sus documentos (Educación, Salud, Juzgado). `null`: la municipalidad.
31
+ issuingEntity: { id: string; name: string; shortName: string | null } | null;
32
+ // Tipo cuyo correlativo comparte: sus números salen de esa serie (y `nextCorrelative`, `correlativeYear` y
33
+ // `resetsYearly` son los de ese tipo). `null`: lleva su propio correlativo.
34
+ sharesNumberingWith: { id: string; name: string } | null;
35
+ // Tipos que toman sus números del correlativo de este.
36
+ numberingMembers: { id: string; name: string }[];
30
37
  enabled: DocumentTypeEntity['enabled'];
31
38
  // Cuántos visadores y firmantes tiene su flujo sugerido.
32
39
  flow: { visa: number; signature: number };
@@ -1,6 +1,7 @@
1
1
  export * from './documentType';
2
2
  export * from './document';
3
3
  export * from './procedure';
4
+ export * from './issuingEntity';
4
5
  export * from './caseFile';
5
6
  export * from './partsOffice';
6
7
  export * from './registerBook';
@@ -0,0 +1 @@
1
+ export * from './issuingEntity.entity';
@@ -0,0 +1,24 @@
1
+ import { IssuingEntityEntity } from '../../base/entities';
2
+
3
+ export interface IssuingEntityGetAllResponseEntity {
4
+ id: IssuingEntityEntity['id'];
5
+ name: IssuingEntityEntity['name'];
6
+ shortName: IssuingEntityEntity['shortName'];
7
+ directorateCodeReferences: IssuingEntityEntity['directorateCodeReferences'];
8
+ docDigitalEntityId: IssuingEntityEntity['docDigitalEntityId'];
9
+ enabled: IssuingEntityEntity['enabled'];
10
+ /** Cuántos tipos documentales emite. */
11
+ documentTypes: number;
12
+ }
13
+
14
+ export type IssuingEntityGetByIdResponseEntity = IssuingEntityGetAllResponseEntity;
15
+
16
+ export interface IssuingEntityCreateResponseEntity {
17
+ id: IssuingEntityEntity['id'];
18
+ ok: boolean;
19
+ }
20
+
21
+ export interface IssuingEntityUpdateResponseEntity {
22
+ id: IssuingEntityEntity['id'];
23
+ ok: boolean;
24
+ }
@@ -40,6 +40,8 @@ export interface PartsOfficeSummaryEntity {
40
40
  export interface PartsOfficeDispatchEntity extends DocumentDispatchResponseEntity {
41
41
  document: DocumentLinkEntity & { accessLevel: string };
42
42
  externalRecipients: DocumentExternalRecipientResponseEntity[];
43
+ /** A nombre de quién sale: la entidad emisora del tipo documental o la municipalidad. */
44
+ issuerName: string;
43
45
  createdAt: string;
44
46
  }
45
47
 
@@ -54,6 +56,8 @@ export interface PartsOfficeInboundEntity {
54
56
  folioDate: string | null;
55
57
  typeName: string | null;
56
58
  reserved: boolean;
59
+ /** Entidad propia a la que llegó (la municipalidad o una entidad emisora). */
60
+ recipientEntityName: string | null;
57
61
  senderEntityName: string | null;
58
62
  senderName: string | null;
59
63
  senderPosition: string | null;
@@ -26,12 +26,18 @@ export interface RegisterBookRowEntity {
26
26
  dispatch: string | null;
27
27
  /** Motivo de la anulación (del documento o del número). */
28
28
  observation: string | null;
29
+ /** Numeración compartida: tipo documental del número (`null` en un salto o si el libro es de un solo tipo). */
30
+ documentTypeName: string | null;
29
31
  }
30
32
 
31
33
  export interface RegisterBookEntity {
32
34
  kind: RegisterBookKind;
33
35
  /** «Decreto alcaldicio exento» o «Ingresos de Oficina de Partes». */
34
36
  title: string;
37
+ /** Quién lleva el libro: la entidad emisora del tipo o la municipalidad. */
38
+ issuerName: string;
39
+ /** Numeración compartida: los tipos que numeran en la serie del libro (vacío si es de un solo tipo). */
40
+ series: string[];
35
41
  year: number;
36
42
  month: number | null;
37
43
  rows: RegisterBookRowEntity[];