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

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 (232) hide show
  1. package/dist/base/entities.d.ts +1024 -4
  2. package/dist/base/entities.js +248 -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 +124 -1
  10. package/dist/contracts/caseFile.contract.js +10 -0
  11. package/dist/contracts/dataProtection.contract.d.ts +256 -0
  12. package/dist/contracts/dataProtection.contract.js +23 -0
  13. package/dist/contracts/desk.contract.d.ts +88 -0
  14. package/dist/contracts/desk.contract.js +13 -0
  15. package/dist/contracts/document.contract.d.ts +219 -3
  16. package/dist/contracts/document.contract.js +15 -0
  17. package/dist/contracts/documentTemplate.contract.d.ts +58 -0
  18. package/dist/contracts/documentTemplate.contract.js +12 -0
  19. package/dist/contracts/documentType.contract.d.ts +13 -1
  20. package/dist/contracts/draftingRequest.contract.d.ts +94 -0
  21. package/dist/contracts/draftingRequest.contract.js +11 -0
  22. package/dist/contracts/holiday.contract.d.ts +30 -0
  23. package/dist/contracts/holiday.contract.js +9 -0
  24. package/dist/contracts/index.d.ts +265 -1
  25. package/dist/contracts/index.js +69 -0
  26. package/dist/contracts/indicators.contract.d.ts +103 -0
  27. package/dist/contracts/indicators.contract.js +15 -0
  28. package/dist/contracts/internalReview.contract.d.ts +86 -0
  29. package/dist/contracts/internalReview.contract.js +12 -0
  30. package/dist/contracts/issuingEntity.contract.d.ts +52 -0
  31. package/dist/contracts/issuingEntity.contract.js +11 -0
  32. package/dist/contracts/mailIntake.contract.d.ts +61 -0
  33. package/dist/contracts/mailIntake.contract.js +15 -0
  34. package/dist/contracts/partsOffice.contract.d.ts +263 -0
  35. package/dist/contracts/partsOffice.contract.js +27 -0
  36. package/dist/contracts/push.contract.d.ts +59 -0
  37. package/dist/contracts/push.contract.js +14 -0
  38. package/dist/contracts/registerBook.contract.d.ts +27 -0
  39. package/dist/contracts/registerBook.contract.js +8 -0
  40. package/dist/contracts/repositoryExport.contract.d.ts +57 -0
  41. package/dist/contracts/repositoryExport.contract.js +13 -0
  42. package/dist/contracts/retention.contract.d.ts +58 -0
  43. package/dist/contracts/retention.contract.js +11 -0
  44. package/dist/contracts/scan.contract.d.ts +63 -0
  45. package/dist/contracts/scan.contract.js +12 -0
  46. package/dist/contracts/signatureBatch.contract.d.ts +109 -0
  47. package/dist/contracts/signatureBatch.contract.js +12 -0
  48. package/dist/contracts/signatureCheck.contract.d.ts +14 -0
  49. package/dist/contracts/signatureCheck.contract.js +7 -0
  50. package/dist/contracts/textSnippet.contract.d.ts +51 -0
  51. package/dist/contracts/textSnippet.contract.js +11 -0
  52. package/dist/contracts/transparency.contract.d.ts +96 -0
  53. package/dist/contracts/transparency.contract.js +12 -0
  54. package/dist/contracts/workFolder.contract.d.ts +114 -0
  55. package/dist/contracts/workFolder.contract.js +16 -0
  56. package/dist/entities/accessRequest/accessRequest.entity.d.ts +73 -0
  57. package/dist/entities/accessRequest/accessRequest.entity.js +2 -0
  58. package/dist/entities/accessRequest/index.d.ts +1 -0
  59. package/dist/entities/accessRequest/index.js +17 -0
  60. package/dist/entities/archivalSeries/archivalSeries.entity.d.ts +32 -0
  61. package/dist/entities/archivalSeries/archivalSeries.entity.js +2 -0
  62. package/dist/entities/archivalSeries/index.d.ts +1 -0
  63. package/dist/entities/archivalSeries/index.js +17 -0
  64. package/dist/entities/audit/audit.entity.d.ts +30 -0
  65. package/dist/entities/audit/audit.entity.js +2 -0
  66. package/dist/entities/audit/index.d.ts +1 -0
  67. package/dist/entities/audit/index.js +17 -0
  68. package/dist/entities/caseFile/caseFile.entity.d.ts +135 -0
  69. package/dist/entities/dataProtection/dataProtection.entity.d.ts +180 -0
  70. package/dist/entities/dataProtection/dataProtection.entity.js +2 -0
  71. package/dist/entities/dataProtection/index.d.ts +1 -0
  72. package/dist/entities/dataProtection/index.js +17 -0
  73. package/dist/entities/desk/desk.entity.d.ts +25 -0
  74. package/dist/entities/desk/desk.entity.js +2 -0
  75. package/dist/entities/desk/index.d.ts +1 -0
  76. package/dist/entities/desk/index.js +17 -0
  77. package/dist/entities/document/document.entity.d.ts +436 -1
  78. package/dist/entities/documentTemplate/documentTemplate.entity.d.ts +51 -0
  79. package/dist/entities/documentTemplate/documentTemplate.entity.js +2 -0
  80. package/dist/entities/documentTemplate/index.d.ts +1 -0
  81. package/dist/entities/documentTemplate/index.js +17 -0
  82. package/dist/entities/documentType/documentType.entity.d.ts +25 -0
  83. package/dist/entities/draftingRequest/draftingRequest.entity.d.ts +76 -0
  84. package/dist/entities/draftingRequest/draftingRequest.entity.js +2 -0
  85. package/dist/entities/draftingRequest/index.d.ts +1 -0
  86. package/dist/entities/draftingRequest/index.js +17 -0
  87. package/dist/entities/holiday/holiday.entity.d.ts +10 -0
  88. package/dist/entities/holiday/holiday.entity.js +2 -0
  89. package/dist/entities/holiday/index.d.ts +1 -0
  90. package/dist/entities/holiday/index.js +17 -0
  91. package/dist/entities/index.d.ts +23 -0
  92. package/dist/entities/index.js +23 -0
  93. package/dist/entities/indicators/index.d.ts +1 -0
  94. package/dist/entities/indicators/index.js +17 -0
  95. package/dist/entities/indicators/indicators.entity.d.ts +152 -0
  96. package/dist/entities/indicators/indicators.entity.js +2 -0
  97. package/dist/entities/internalReview/index.d.ts +1 -0
  98. package/dist/entities/internalReview/index.js +17 -0
  99. package/dist/entities/internalReview/internalReview.entity.d.ts +59 -0
  100. package/dist/entities/internalReview/internalReview.entity.js +2 -0
  101. package/dist/entities/issuingEntity/index.d.ts +1 -0
  102. package/dist/entities/issuingEntity/index.js +17 -0
  103. package/dist/entities/issuingEntity/issuingEntity.entity.d.ts +20 -0
  104. package/dist/entities/issuingEntity/issuingEntity.entity.js +2 -0
  105. package/dist/entities/mailIntake/index.d.ts +1 -0
  106. package/dist/entities/mailIntake/index.js +17 -0
  107. package/dist/entities/mailIntake/mailIntake.entity.d.ts +51 -0
  108. package/dist/entities/mailIntake/mailIntake.entity.js +2 -0
  109. package/dist/entities/partsOffice/index.d.ts +1 -0
  110. package/dist/entities/partsOffice/index.js +17 -0
  111. package/dist/entities/partsOffice/partsOffice.entity.d.ts +137 -0
  112. package/dist/entities/partsOffice/partsOffice.entity.js +2 -0
  113. package/dist/entities/push/index.d.ts +1 -0
  114. package/dist/entities/push/index.js +17 -0
  115. package/dist/entities/push/push.entity.d.ts +28 -0
  116. package/dist/entities/push/push.entity.js +2 -0
  117. package/dist/entities/registerBook/index.d.ts +1 -0
  118. package/dist/entities/registerBook/index.js +17 -0
  119. package/dist/entities/registerBook/registerBook.entity.d.ts +48 -0
  120. package/dist/entities/registerBook/registerBook.entity.js +2 -0
  121. package/dist/entities/repositoryExport/index.d.ts +1 -0
  122. package/dist/entities/repositoryExport/index.js +17 -0
  123. package/dist/entities/repositoryExport/repositoryExport.entity.d.ts +124 -0
  124. package/dist/entities/repositoryExport/repositoryExport.entity.js +2 -0
  125. package/dist/entities/retention/index.d.ts +1 -0
  126. package/dist/entities/retention/index.js +17 -0
  127. package/dist/entities/retention/retention.entity.d.ts +49 -0
  128. package/dist/entities/retention/retention.entity.js +2 -0
  129. package/dist/entities/scan/index.d.ts +1 -0
  130. package/dist/entities/scan/index.js +17 -0
  131. package/dist/entities/scan/scan.entity.d.ts +29 -0
  132. package/dist/entities/scan/scan.entity.js +2 -0
  133. package/dist/entities/signatureBatch/index.d.ts +1 -0
  134. package/dist/entities/signatureBatch/index.js +17 -0
  135. package/dist/entities/signatureBatch/signatureBatch.entity.d.ts +107 -0
  136. package/dist/entities/signatureBatch/signatureBatch.entity.js +2 -0
  137. package/dist/entities/signatureCheck/index.d.ts +1 -0
  138. package/dist/entities/signatureCheck/index.js +17 -0
  139. package/dist/entities/signatureCheck/signatureCheck.entity.d.ts +60 -0
  140. package/dist/entities/signatureCheck/signatureCheck.entity.js +2 -0
  141. package/dist/entities/textSnippet/index.d.ts +1 -0
  142. package/dist/entities/textSnippet/index.js +17 -0
  143. package/dist/entities/textSnippet/textSnippet.entity.d.ts +20 -0
  144. package/dist/entities/textSnippet/textSnippet.entity.js +2 -0
  145. package/dist/entities/transparency/index.d.ts +1 -0
  146. package/dist/entities/transparency/index.js +17 -0
  147. package/dist/entities/transparency/transparency.entity.d.ts +77 -0
  148. package/dist/entities/transparency/transparency.entity.js +2 -0
  149. package/dist/entities/workFolder/index.d.ts +1 -0
  150. package/dist/entities/workFolder/index.js +17 -0
  151. package/dist/entities/workFolder/workFolder.entity.d.ts +83 -0
  152. package/dist/entities/workFolder/workFolder.entity.js +2 -0
  153. package/package.json +1 -1
  154. package/src/base/entities.ts +1197 -4
  155. package/src/contracts/accessRequest.contract.ts +81 -0
  156. package/src/contracts/archivalSeries.contract.ts +59 -0
  157. package/src/contracts/audit.contract.ts +30 -0
  158. package/src/contracts/caseFile.contract.ts +107 -2
  159. package/src/contracts/dataProtection.contract.ts +197 -0
  160. package/src/contracts/desk.contract.ts +72 -0
  161. package/src/contracts/document.contract.ts +202 -2
  162. package/src/contracts/documentTemplate.contract.ts +61 -0
  163. package/src/contracts/documentType.contract.ts +29 -3
  164. package/src/contracts/draftingRequest.contract.ts +73 -0
  165. package/src/contracts/holiday.contract.ts +16 -0
  166. package/src/contracts/index.ts +96 -1
  167. package/src/contracts/indicators.contract.ts +80 -0
  168. package/src/contracts/internalReview.contract.ts +66 -0
  169. package/src/contracts/issuingEntity.contract.ts +55 -0
  170. package/src/contracts/mailIntake.contract.ts +49 -0
  171. package/src/contracts/partsOffice.contract.ts +199 -0
  172. package/src/contracts/push.contract.ts +41 -0
  173. package/src/contracts/registerBook.contract.ts +24 -0
  174. package/src/contracts/repositoryExport.contract.ts +54 -0
  175. package/src/contracts/retention.contract.ts +44 -0
  176. package/src/contracts/scan.contract.ts +52 -0
  177. package/src/contracts/signatureBatch.contract.ts +96 -0
  178. package/src/contracts/signatureCheck.contract.ts +11 -0
  179. package/src/contracts/textSnippet.contract.ts +53 -0
  180. package/src/contracts/transparency.contract.ts +55 -0
  181. package/src/contracts/workFolder.contract.ts +75 -0
  182. package/src/entities/accessRequest/accessRequest.entity.ts +78 -0
  183. package/src/entities/accessRequest/index.ts +1 -0
  184. package/src/entities/archivalSeries/archivalSeries.entity.ts +37 -0
  185. package/src/entities/archivalSeries/index.ts +1 -0
  186. package/src/entities/audit/audit.entity.ts +41 -0
  187. package/src/entities/audit/index.ts +1 -0
  188. package/src/entities/caseFile/caseFile.entity.ts +132 -0
  189. package/src/entities/dataProtection/dataProtection.entity.ts +191 -0
  190. package/src/entities/dataProtection/index.ts +1 -0
  191. package/src/entities/desk/desk.entity.ts +28 -0
  192. package/src/entities/desk/index.ts +1 -0
  193. package/src/entities/document/document.entity.ts +412 -0
  194. package/src/entities/documentTemplate/documentTemplate.entity.ts +58 -0
  195. package/src/entities/documentTemplate/index.ts +1 -0
  196. package/src/entities/documentType/documentType.entity.ts +19 -0
  197. package/src/entities/draftingRequest/draftingRequest.entity.ts +78 -0
  198. package/src/entities/draftingRequest/index.ts +1 -0
  199. package/src/entities/holiday/holiday.entity.ts +11 -0
  200. package/src/entities/holiday/index.ts +1 -0
  201. package/src/entities/index.ts +23 -0
  202. package/src/entities/indicators/index.ts +1 -0
  203. package/src/entities/indicators/indicators.entity.ts +157 -0
  204. package/src/entities/internalReview/index.ts +1 -0
  205. package/src/entities/internalReview/internalReview.entity.ts +57 -0
  206. package/src/entities/issuingEntity/index.ts +1 -0
  207. package/src/entities/issuingEntity/issuingEntity.entity.ts +24 -0
  208. package/src/entities/mailIntake/index.ts +1 -0
  209. package/src/entities/mailIntake/mailIntake.entity.ts +55 -0
  210. package/src/entities/partsOffice/index.ts +1 -0
  211. package/src/entities/partsOffice/partsOffice.entity.ts +138 -0
  212. package/src/entities/push/index.ts +1 -0
  213. package/src/entities/push/push.entity.ts +31 -0
  214. package/src/entities/registerBook/index.ts +1 -0
  215. package/src/entities/registerBook/registerBook.entity.ts +52 -0
  216. package/src/entities/repositoryExport/index.ts +1 -0
  217. package/src/entities/repositoryExport/repositoryExport.entity.ts +86 -0
  218. package/src/entities/retention/index.ts +1 -0
  219. package/src/entities/retention/retention.entity.ts +53 -0
  220. package/src/entities/scan/index.ts +1 -0
  221. package/src/entities/scan/scan.entity.ts +32 -0
  222. package/src/entities/signatureBatch/index.ts +1 -0
  223. package/src/entities/signatureBatch/signatureBatch.entity.ts +110 -0
  224. package/src/entities/signatureCheck/index.ts +1 -0
  225. package/src/entities/signatureCheck/signatureCheck.entity.ts +63 -0
  226. package/src/entities/textSnippet/index.ts +1 -0
  227. package/src/entities/textSnippet/textSnippet.entity.ts +24 -0
  228. package/src/entities/transparency/index.ts +1 -0
  229. package/src/entities/transparency/transparency.entity.ts +78 -0
  230. package/src/entities/workFolder/index.ts +1 -0
  231. package/src/entities/workFolder/workFolder.entity.ts +84 -0
  232. package/tsconfig.json +1 -3
@@ -0,0 +1,52 @@
1
+ import { type IssuingEntityEntity } from '../base/entities';
2
+ import { type IssuingEntityCreateResponseEntity, type IssuingEntityGetAllResponseEntity, type IssuingEntityGetByIdResponseEntity, type IssuingEntityUpdateResponseEntity } from '../entities';
3
+ import { type RpcPage } from './contract';
4
+ /** Patrones NATS de `issuingEntity`: `<servicio>.<recurso>.<acción>`. */
5
+ export declare const IssuingEntityPatterns: {
6
+ readonly getAll: "gestorDocumental.issuingEntity.getAll";
7
+ readonly getById: "gestorDocumental.issuingEntity.getById";
8
+ readonly create: "gestorDocumental.issuingEntity.create";
9
+ readonly update: "gestorDocumental.issuingEntity.update";
10
+ readonly setEnabled: "gestorDocumental.issuingEntity.setEnabled";
11
+ };
12
+ /** Datos de una entidad emisora al crearla o editarla. */
13
+ export interface IssuingEntityWritePayload {
14
+ name: string;
15
+ shortName?: string | null;
16
+ /** Direcciones (código de caschile) cuyos funcionarios actúan por la entidad. */
17
+ directorateCodeReferences: number[];
18
+ /** Su entidad en DocDigital, entre las asociadas a las credenciales del gestor. */
19
+ docDigitalEntityId?: number | null;
20
+ enabled?: boolean;
21
+ }
22
+ export interface IssuingEntityContract {
23
+ [IssuingEntityPatterns.getAll]: {
24
+ payload: {
25
+ pagination?: {
26
+ page?: number;
27
+ limit?: number;
28
+ };
29
+ filters?: {
30
+ search?: string;
31
+ enabled?: boolean;
32
+ };
33
+ };
34
+ response: RpcPage<IssuingEntityGetAllResponseEntity[]>;
35
+ };
36
+ [IssuingEntityPatterns.getById]: {
37
+ payload: Pick<IssuingEntityEntity, 'id'>;
38
+ response: IssuingEntityGetByIdResponseEntity;
39
+ };
40
+ [IssuingEntityPatterns.create]: {
41
+ payload: IssuingEntityWritePayload;
42
+ response: IssuingEntityCreateResponseEntity;
43
+ };
44
+ [IssuingEntityPatterns.update]: {
45
+ payload: IssuingEntityWritePayload & Pick<IssuingEntityEntity, 'id'>;
46
+ response: IssuingEntityUpdateResponseEntity;
47
+ };
48
+ [IssuingEntityPatterns.setEnabled]: {
49
+ payload: Pick<IssuingEntityEntity, 'id' | 'enabled'>;
50
+ response: IssuingEntityUpdateResponseEntity;
51
+ };
52
+ }
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.IssuingEntityPatterns = void 0;
4
+ /** Patrones NATS de `issuingEntity`: `<servicio>.<recurso>.<acción>`. */
5
+ exports.IssuingEntityPatterns = {
6
+ getAll: 'gestorDocumental.issuingEntity.getAll',
7
+ getById: 'gestorDocumental.issuingEntity.getById',
8
+ create: 'gestorDocumental.issuingEntity.create',
9
+ update: 'gestorDocumental.issuingEntity.update',
10
+ setEnabled: 'gestorDocumental.issuingEntity.setEnabled',
11
+ };
@@ -0,0 +1,61 @@
1
+ import { type DeskFileResponseEntity, type DeskOkResponseEntity, type DocumentPublicFileResponseEntity, type MailIntakeInboxEntity, type MailIntakeSyncEntity } from '../entities';
2
+ import { type DocumentActor } from './document.contract';
3
+ /**
4
+ * Patrones NATS de `mailIntake`: el ingreso por correo. Un funcionario reenvía un correo a la casilla del gestor y
5
+ * después elige qué adjuntos entran a su escritorio. `email` es el correo institucional de la sesión, que agrega el
6
+ * gateway: solo con él se ven los correos que envió.
7
+ */
8
+ export declare const MailIntakePatterns: {
9
+ readonly getMine: "gestorDocumental.mailIntake.getMine";
10
+ readonly accept: "gestorDocumental.mailIntake.accept";
11
+ readonly discard: "gestorDocumental.mailIntake.discard";
12
+ readonly getEml: "gestorDocumental.mailIntake.getEml";
13
+ readonly sync: "gestorDocumental.mailIntake.sync";
14
+ };
15
+ export interface MailIntakeContract {
16
+ /** Los correos pendientes que envió quien tiene la sesión, del más reciente al más antiguo. */
17
+ [MailIntakePatterns.getMine]: {
18
+ payload: {
19
+ email: string | null;
20
+ actor: DocumentActor;
21
+ };
22
+ response: MailIntakeInboxEntity;
23
+ };
24
+ /**
25
+ * Lleva al escritorio los adjuntos elegidos (por su `index`) y, si se pide, el correo completo en EML. El correo
26
+ * queda aceptado: no se puede volver a procesar.
27
+ */
28
+ [MailIntakePatterns.accept]: {
29
+ payload: {
30
+ id: string;
31
+ email: string | null;
32
+ attachments: number[];
33
+ includeEml: boolean;
34
+ actor: DocumentActor;
35
+ };
36
+ response: DeskFileResponseEntity[];
37
+ };
38
+ /** Lo descarta sin traer nada. El EML se conserva. */
39
+ [MailIntakePatterns.discard]: {
40
+ payload: {
41
+ id: string;
42
+ email: string | null;
43
+ actor: DocumentActor;
44
+ };
45
+ response: DeskOkResponseEntity;
46
+ };
47
+ /** El correo completo (EML), para su remitente. */
48
+ [MailIntakePatterns.getEml]: {
49
+ payload: {
50
+ id: string;
51
+ email: string | null;
52
+ actor: DocumentActor;
53
+ };
54
+ response: DocumentPublicFileResponseEntity;
55
+ };
56
+ /** Revisa la casilla ahora, sin esperar a la revisión periódica. */
57
+ [MailIntakePatterns.sync]: {
58
+ payload: Record<string, never>;
59
+ response: MailIntakeSyncEntity;
60
+ };
61
+ }
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MailIntakePatterns = void 0;
4
+ /**
5
+ * Patrones NATS de `mailIntake`: el ingreso por correo. Un funcionario reenvía un correo a la casilla del gestor y
6
+ * después elige qué adjuntos entran a su escritorio. `email` es el correo institucional de la sesión, que agrega el
7
+ * gateway: solo con él se ven los correos que envió.
8
+ */
9
+ exports.MailIntakePatterns = {
10
+ getMine: 'gestorDocumental.mailIntake.getMine',
11
+ accept: 'gestorDocumental.mailIntake.accept',
12
+ discard: 'gestorDocumental.mailIntake.discard',
13
+ getEml: 'gestorDocumental.mailIntake.getEml',
14
+ sync: 'gestorDocumental.mailIntake.sync',
15
+ };
@@ -0,0 +1,263 @@
1
+ import { type CommunicationMeans, type DocumentAccessLevel, type DocumentInstruction } from '../base/entities';
2
+ import { type CaseFileAddEntryResponseEntity, type DocDigitalDocumentTypeEntity, type DocDigitalEntityEntity, type PartsOfficeInboundEntity, type DocDigitalUserEntity, type EnablementPersonInput, type PartsOfficeEnablementEntity, type PartsOfficeDispatchEntity, type PartsOfficeFileEntity, type PartsOfficeOkResponseEntity, type PartsOfficeRegisterResponseEntity, type PartsOfficeStatusEntity, type PartsOfficeSummaryEntity, type PartsOfficeSyncResponseEntity } from '../entities';
3
+ import { type RpcPage } from './contract';
4
+ import { type DocumentActor, type DocumentExternalRecipientInput } from './document.contract';
5
+ /** Patrones NATS de `partsOffice` (Oficina de Partes y DocDigital): `<servicio>.<recurso>.<acción>`. */
6
+ export declare const PartsOfficePatterns: {
7
+ readonly getStatus: "gestorDocumental.partsOffice.getStatus";
8
+ readonly getSummary: "gestorDocumental.partsOffice.getSummary";
9
+ readonly getEntities: "gestorDocumental.partsOffice.getEntities";
10
+ readonly getOwnEntities: "gestorDocumental.partsOffice.getOwnEntities";
11
+ readonly getUsers: "gestorDocumental.partsOffice.getUsers";
12
+ readonly getDocumentTypes: "gestorDocumental.partsOffice.getDocumentTypes";
13
+ readonly getDispatches: "gestorDocumental.partsOffice.getDispatches";
14
+ readonly dispatch: "gestorDocumental.partsOffice.dispatch";
15
+ readonly returnDispatch: "gestorDocumental.partsOffice.returnDispatch";
16
+ readonly resendDispatch: "gestorDocumental.partsOffice.resendDispatch";
17
+ readonly getDispatchFile: "gestorDocumental.partsOffice.getDispatchFile";
18
+ readonly getInbound: "gestorDocumental.partsOffice.getInbound";
19
+ readonly syncInbound: "gestorDocumental.partsOffice.syncInbound";
20
+ readonly registerInbound: "gestorDocumental.partsOffice.registerInbound";
21
+ readonly acknowledgeInbound: "gestorDocumental.partsOffice.acknowledgeInbound";
22
+ readonly returnInbound: "gestorDocumental.partsOffice.returnInbound";
23
+ readonly getInboundFile: "gestorDocumental.partsOffice.getInboundFile";
24
+ readonly checkEnablement: "gestorDocumental.partsOffice.checkEnablement";
25
+ readonly dispatchByContingency: "gestorDocumental.partsOffice.dispatchByContingency";
26
+ readonly registerManualIntake: "gestorDocumental.partsOffice.registerManualIntake";
27
+ readonly addCaseFileReceipt: "gestorDocumental.partsOffice.addCaseFileReceipt";
28
+ };
29
+ /** Destinatario interno de un ingreso, ya resuelto por el gateway (las áreas con sus integrantes). */
30
+ export type PartsOfficeRecipientInput = {
31
+ type: 'Employee';
32
+ employeeId: string;
33
+ } | {
34
+ type: 'Directorate';
35
+ directorateCodeReference: number;
36
+ name: string;
37
+ memberEmployeeIds: string[];
38
+ } | {
39
+ type: 'Department';
40
+ departmentId: string;
41
+ name: string;
42
+ memberEmployeeIds: string[];
43
+ };
44
+ interface IListPayload<S> {
45
+ pagination?: {
46
+ page?: number;
47
+ limit?: number;
48
+ };
49
+ filters?: {
50
+ search?: string;
51
+ status?: S;
52
+ };
53
+ }
54
+ /** Lo que llegó fuera de DocDigital y Oficina de Partes ingresa a mano. */
55
+ export interface ManualIntakePayload {
56
+ file: {
57
+ fileId: string;
58
+ name: string;
59
+ };
60
+ attachments?: {
61
+ fileId: string;
62
+ name: string;
63
+ }[];
64
+ means: CommunicationMeans;
65
+ /** Cuándo llegó (ISO); sin él, ahora. */
66
+ receivedAt?: string | null;
67
+ senderEntityName: string;
68
+ senderName?: string | null;
69
+ externalFolio?: string | null;
70
+ externalDate?: string | null;
71
+ subject: string;
72
+ documentTypeId: string;
73
+ keywords: string[];
74
+ accessLevel?: DocumentAccessLevel;
75
+ hasSensitiveData?: boolean;
76
+ recipients: unknown[];
77
+ instruction: DocumentInstruction;
78
+ note?: string | null;
79
+ dueAt?: string | null;
80
+ dueBusinessDays?: number | null;
81
+ actor: DocumentActor;
82
+ }
83
+ export interface PartsOfficeContract {
84
+ [PartsOfficePatterns.getStatus]: {
85
+ payload: Record<string, never>;
86
+ response: PartsOfficeStatusEntity;
87
+ };
88
+ [PartsOfficePatterns.getSummary]: {
89
+ payload: Record<string, never>;
90
+ response: PartsOfficeSummaryEntity;
91
+ };
92
+ /** Directorio de DocDigital: instituciones por nombre. */
93
+ [PartsOfficePatterns.getEntities]: {
94
+ payload: {
95
+ search?: string;
96
+ };
97
+ response: DocDigitalEntityEntity[];
98
+ };
99
+ /** Entidades asociadas a las credenciales del gestor: la del municipio y las de sus entidades emisoras. */
100
+ [PartsOfficePatterns.getOwnEntities]: {
101
+ payload: Record<string, never>;
102
+ response: DocDigitalEntityEntity[];
103
+ };
104
+ [PartsOfficePatterns.getUsers]: {
105
+ payload: {
106
+ entityId: number;
107
+ search?: string;
108
+ };
109
+ response: DocDigitalUserEntity[];
110
+ };
111
+ [PartsOfficePatterns.getDocumentTypes]: {
112
+ payload: Record<string, never>;
113
+ response: DocDigitalDocumentTypeEntity[];
114
+ };
115
+ [PartsOfficePatterns.getDispatches]: {
116
+ payload: IListPayload<'Pending' | 'Dispatched' | 'Returned'>;
117
+ response: RpcPage<PartsOfficeDispatchEntity[]>;
118
+ };
119
+ /** Despacha por DocDigital, con el número del documento como folio. `operatorRun`: RUN de quien despacha. */
120
+ [PartsOfficePatterns.dispatch]: {
121
+ payload: {
122
+ id: string;
123
+ docDigitalTypeId: number;
124
+ operatorRun?: string | null;
125
+ actor: DocumentActor;
126
+ };
127
+ response: PartsOfficeOkResponseEntity & {
128
+ docDigitalDocumentId: string;
129
+ };
130
+ };
131
+ /** Devuelve el despacho al redactor, con el motivo (por ejemplo, un destinatario equivocado). */
132
+ [PartsOfficePatterns.returnDispatch]: {
133
+ payload: {
134
+ id: string;
135
+ reason: string;
136
+ actor: DocumentActor;
137
+ };
138
+ response: PartsOfficeOkResponseEntity;
139
+ };
140
+ /** El redactor corrige las instituciones de destino de un despacho devuelto y lo envía de nuevo a Partes. */
141
+ [PartsOfficePatterns.resendDispatch]: {
142
+ payload: {
143
+ id: string;
144
+ externalRecipients: DocumentExternalRecipientInput[];
145
+ actor: DocumentActor;
146
+ };
147
+ response: PartsOfficeOkResponseEntity;
148
+ };
149
+ /** PDF firmado de un documento por despachar, para que Oficina de Partes lo revise. */
150
+ [PartsOfficePatterns.getDispatchFile]: {
151
+ payload: {
152
+ id: string;
153
+ receipt?: boolean;
154
+ };
155
+ response: PartsOfficeFileEntity;
156
+ };
157
+ [PartsOfficePatterns.getInbound]: {
158
+ payload: IListPayload<'Pending' | 'Registered' | 'Returned'>;
159
+ response: RpcPage<PartsOfficeInboundEntity[]>;
160
+ };
161
+ /** Trae de DocDigital lo recibido que aún no tiene acuse de recibo. */
162
+ [PartsOfficePatterns.syncInbound]: {
163
+ payload: Record<string, never>;
164
+ response: PartsOfficeSyncResponseEntity;
165
+ };
166
+ /**
167
+ * Ingresa un recibido al gestor: le da folio de ingreso, lo deriva a quienes corresponda y da el acuse de recibo
168
+ * en DocDigital.
169
+ */
170
+ [PartsOfficePatterns.registerInbound]: {
171
+ payload: {
172
+ id: string;
173
+ documentTypeId: string;
174
+ keywords: string[];
175
+ accessLevel: DocumentAccessLevel;
176
+ hasSensitiveData: boolean;
177
+ recipients: PartsOfficeRecipientInput[];
178
+ instruction: DocumentInstruction;
179
+ note?: string | null;
180
+ dueAt?: string | null;
181
+ actor: DocumentActor;
182
+ };
183
+ response: PartsOfficeRegisterResponseEntity;
184
+ };
185
+ /** Reintenta el acuse de recibo de un recibido ya ingresado. */
186
+ [PartsOfficePatterns.acknowledgeInbound]: {
187
+ payload: {
188
+ id: string;
189
+ actor: DocumentActor;
190
+ };
191
+ response: PartsOfficeOkResponseEntity;
192
+ };
193
+ /** Devuelve el recibido a la institución que lo envió, con el motivo (entre 3 y 255 caracteres). */
194
+ [PartsOfficePatterns.returnInbound]: {
195
+ payload: {
196
+ id: string;
197
+ reason: string;
198
+ actor: DocumentActor;
199
+ };
200
+ response: PartsOfficeOkResponseEntity;
201
+ };
202
+ /** Archivo de un recibido: el principal o, con `attachment`, uno de sus anexos (por su posición). */
203
+ [PartsOfficePatterns.getInboundFile]: {
204
+ payload: {
205
+ id: string;
206
+ attachment?: number;
207
+ };
208
+ response: PartsOfficeFileEntity;
209
+ };
210
+ /**
211
+ * Quiénes de `people` están habilitados como usuarios de DocDigital en la municipalidad o en sus entidades emisoras
212
+ * (por RUN). El directorio de cada entidad se guarda 10 minutos.
213
+ */
214
+ [PartsOfficePatterns.checkEnablement]: {
215
+ payload: {
216
+ people: EnablementPersonInput[];
217
+ };
218
+ response: PartsOfficeEnablementEntity;
219
+ };
220
+ /**
221
+ * Registro por contingencia: el documento no se pudo despachar por DocDigital y salió por otro medio. Queda
222
+ * despachado, con el medio, a quién, el motivo y el comprobante; si después se registra en DocDigital, su número.
223
+ */
224
+ [PartsOfficePatterns.dispatchByContingency]: {
225
+ payload: {
226
+ id: string;
227
+ means: CommunicationMeans;
228
+ sentAt: string;
229
+ sentTo: string;
230
+ reason: string;
231
+ receipt?: {
232
+ fileId: string;
233
+ name: string;
234
+ } | null;
235
+ docDigitalDocumentId?: string | null;
236
+ actor: DocumentActor;
237
+ };
238
+ response: PartsOfficeOkResponseEntity;
239
+ };
240
+ /**
241
+ * Ingreso manual: lo que llegó fuera de DocDigital (papel, correo) entra con folio de ingreso, como lo recibido
242
+ * por DocDigital, y se deriva.
243
+ */
244
+ [PartsOfficePatterns.registerManualIntake]: {
245
+ payload: ManualIntakePayload;
246
+ response: PartsOfficeRegisterResponseEntity;
247
+ };
248
+ /**
249
+ * Comprobante de trazabilidad de DocDigital de un documento del índice de un expediente (despachado o recibido por
250
+ * DocDigital): se arma con el estado y el historial que informa DocDigital y entra como comunicación oficial.
251
+ */
252
+ [PartsOfficePatterns.addCaseFileReceipt]: {
253
+ payload: {
254
+ caseFileId: string;
255
+ documentId: string;
256
+ actor: {
257
+ employeeId: string;
258
+ };
259
+ };
260
+ response: CaseFileAddEntryResponseEntity;
261
+ };
262
+ }
263
+ export {};
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PartsOfficePatterns = void 0;
4
+ /** Patrones NATS de `partsOffice` (Oficina de Partes y DocDigital): `<servicio>.<recurso>.<acción>`. */
5
+ exports.PartsOfficePatterns = {
6
+ getStatus: 'gestorDocumental.partsOffice.getStatus',
7
+ getSummary: 'gestorDocumental.partsOffice.getSummary',
8
+ getEntities: 'gestorDocumental.partsOffice.getEntities',
9
+ getOwnEntities: 'gestorDocumental.partsOffice.getOwnEntities',
10
+ getUsers: 'gestorDocumental.partsOffice.getUsers',
11
+ getDocumentTypes: 'gestorDocumental.partsOffice.getDocumentTypes',
12
+ getDispatches: 'gestorDocumental.partsOffice.getDispatches',
13
+ dispatch: 'gestorDocumental.partsOffice.dispatch',
14
+ returnDispatch: 'gestorDocumental.partsOffice.returnDispatch',
15
+ resendDispatch: 'gestorDocumental.partsOffice.resendDispatch',
16
+ getDispatchFile: 'gestorDocumental.partsOffice.getDispatchFile',
17
+ getInbound: 'gestorDocumental.partsOffice.getInbound',
18
+ syncInbound: 'gestorDocumental.partsOffice.syncInbound',
19
+ registerInbound: 'gestorDocumental.partsOffice.registerInbound',
20
+ acknowledgeInbound: 'gestorDocumental.partsOffice.acknowledgeInbound',
21
+ returnInbound: 'gestorDocumental.partsOffice.returnInbound',
22
+ getInboundFile: 'gestorDocumental.partsOffice.getInboundFile',
23
+ checkEnablement: 'gestorDocumental.partsOffice.checkEnablement',
24
+ dispatchByContingency: 'gestorDocumental.partsOffice.dispatchByContingency',
25
+ registerManualIntake: 'gestorDocumental.partsOffice.registerManualIntake',
26
+ addCaseFileReceipt: 'gestorDocumental.partsOffice.addCaseFileReceipt',
27
+ };
@@ -0,0 +1,59 @@
1
+ import { type PushConfigResponseEntity, type PushNotificationInput, type PushOkResponseEntity, type PushSendResultEntity } from '../entities';
2
+ import { type DocumentActor } from './document.contract';
3
+ /**
4
+ * Patrones NATS de `push`: avisos en el celular o el computador (Web Push), además del correo. Cada funcionario los
5
+ * activa en sus dispositivos; el gateway los envía junto con los correos de aviso.
6
+ */
7
+ export declare const PushPatterns: {
8
+ readonly getConfig: "gestorDocumental.push.getConfig";
9
+ readonly subscribe: "gestorDocumental.push.subscribe";
10
+ readonly unsubscribe: "gestorDocumental.push.unsubscribe";
11
+ readonly test: "gestorDocumental.push.test";
12
+ readonly send: "gestorDocumental.push.send";
13
+ };
14
+ export interface PushContract {
15
+ [PushPatterns.getConfig]: {
16
+ payload: {
17
+ actor: DocumentActor;
18
+ };
19
+ response: PushConfigResponseEntity;
20
+ };
21
+ /** Registra el dispositivo (o lo actualiza, si ya estaba) a nombre de quien tiene la sesión. */
22
+ [PushPatterns.subscribe]: {
23
+ payload: {
24
+ subscription: {
25
+ endpoint: string;
26
+ keys: {
27
+ p256dh: string;
28
+ auth: string;
29
+ };
30
+ };
31
+ userAgent?: string | null;
32
+ actor: DocumentActor;
33
+ };
34
+ response: PushOkResponseEntity;
35
+ };
36
+ /** Quita el dispositivo, solo si es de quien tiene la sesión. */
37
+ [PushPatterns.unsubscribe]: {
38
+ payload: {
39
+ endpoint: string;
40
+ actor: DocumentActor;
41
+ };
42
+ response: PushOkResponseEntity;
43
+ };
44
+ /** Un aviso de prueba a los dispositivos de quien tiene la sesión. */
45
+ [PushPatterns.test]: {
46
+ payload: {
47
+ actor: DocumentActor;
48
+ };
49
+ response: PushSendResultEntity;
50
+ };
51
+ /** Envía un aviso a los dispositivos de esos funcionarios. Lo usa el gateway, no el navegador. */
52
+ [PushPatterns.send]: {
53
+ payload: {
54
+ employeeIds: string[];
55
+ notification: PushNotificationInput;
56
+ };
57
+ response: PushSendResultEntity;
58
+ };
59
+ }
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PushPatterns = void 0;
4
+ /**
5
+ * Patrones NATS de `push`: avisos en el celular o el computador (Web Push), además del correo. Cada funcionario los
6
+ * activa en sus dispositivos; el gateway los envía junto con los correos de aviso.
7
+ */
8
+ exports.PushPatterns = {
9
+ getConfig: 'gestorDocumental.push.getConfig',
10
+ subscribe: 'gestorDocumental.push.subscribe',
11
+ unsubscribe: 'gestorDocumental.push.unsubscribe',
12
+ test: 'gestorDocumental.push.test',
13
+ send: 'gestorDocumental.push.send',
14
+ };
@@ -0,0 +1,27 @@
1
+ import { type RegisterBookEntity, type RegisterBookExportEntity, type RegisterBookKind } from '../entities';
2
+ /** Patrones NATS de `registerBook` (libros de registro): `<servicio>.<recurso>.<acción>`. */
3
+ export declare const RegisterBookPatterns: {
4
+ readonly get: "gestorDocumental.registerBook.get";
5
+ readonly export: "gestorDocumental.registerBook.export";
6
+ };
7
+ /** Qué libro y qué período: un año y, si se indica, un mes. El de un tipo documental exige el tipo. */
8
+ export interface RegisterBookQuery {
9
+ kind: RegisterBookKind;
10
+ documentTypeId?: string;
11
+ year: number;
12
+ month?: number | null;
13
+ }
14
+ export interface RegisterBookContract {
15
+ [RegisterBookPatterns.get]: {
16
+ payload: RegisterBookQuery;
17
+ response: RegisterBookEntity;
18
+ };
19
+ /** El libro en Excel o PDF. `generatedBy`: quién lo descarga (va en el encabezado). */
20
+ [RegisterBookPatterns.export]: {
21
+ payload: RegisterBookQuery & {
22
+ format: 'xlsx' | 'pdf';
23
+ generatedBy: string;
24
+ };
25
+ response: RegisterBookExportEntity;
26
+ };
27
+ }
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RegisterBookPatterns = void 0;
4
+ /** Patrones NATS de `registerBook` (libros de registro): `<servicio>.<recurso>.<acción>`. */
5
+ exports.RegisterBookPatterns = {
6
+ get: 'gestorDocumental.registerBook.get',
7
+ export: 'gestorDocumental.registerBook.export',
8
+ };
@@ -0,0 +1,57 @@
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
+ /** Solo lo incluido en un acta de transferencia: el paquete para el Archivo Nacional. */
18
+ dispositionId?: string | null;
19
+ }
20
+ export interface RepositoryExportContract {
21
+ [RepositoryExportPatterns.getSummary]: {
22
+ payload: RepositoryExportQuery;
23
+ response: RepositoryExportSummaryEntity;
24
+ };
25
+ /** Hasta 50 documentos por página, en orden de creación. */
26
+ [RepositoryExportPatterns.getDocuments]: {
27
+ payload: RepositoryExportQuery & {
28
+ cursor?: string | null;
29
+ limit?: number;
30
+ };
31
+ response: RepositoryExportDocumentsPageEntity;
32
+ };
33
+ /** Hasta 10 expedientes por página; cada uno queda con «Exportó» en su trazabilidad, a nombre de quien exporta. */
34
+ [RepositoryExportPatterns.getCaseFiles]: {
35
+ payload: Omit<RepositoryExportQuery, 'scope'> & {
36
+ cursor?: string | null;
37
+ limit?: number;
38
+ actor: {
39
+ employeeId: string | null;
40
+ fullName: string;
41
+ };
42
+ };
43
+ response: RepositoryExportCaseFilesPageEntity;
44
+ };
45
+ /** Deja la exportación en la bitácora: quién, qué período y si llevó archivos. */
46
+ [RepositoryExportPatterns.record]: {
47
+ payload: RepositoryExportQuery & {
48
+ includeFiles: boolean;
49
+ complete: boolean;
50
+ actor: {
51
+ employeeId: string | null;
52
+ fullName: string;
53
+ };
54
+ };
55
+ response: RepositoryExportRecordResponseEntity;
56
+ };
57
+ }
@@ -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
+ };
@@ -0,0 +1,58 @@
1
+ import { type DispositionKind } from '../base/entities';
2
+ import { type DispositionRecordResponseEntity, type IndicatorsFileEntity, type RetentionDueItemEntity, type RetentionSummaryEntity } from '../entities';
3
+ import { type RpcPage } from './contract';
4
+ /** Patrones NATS de `retention`: plazos de retención por serie y actas de transferencia o eliminación. */
5
+ export declare const RetentionPatterns: {
6
+ readonly getSummary: "gestorDocumental.retention.getSummary";
7
+ readonly getDueItems: "gestorDocumental.retention.getDueItems";
8
+ readonly createRecord: "gestorDocumental.retention.createRecord";
9
+ readonly getRecords: "gestorDocumental.retention.getRecords";
10
+ readonly getRecordPdf: "gestorDocumental.retention.getRecordPdf";
11
+ };
12
+ export interface RetentionContract {
13
+ [RetentionPatterns.getSummary]: {
14
+ payload: Record<string, never>;
15
+ response: RetentionSummaryEntity;
16
+ };
17
+ /** Lo vencido de una serie, de lo más antiguo a lo más reciente. */
18
+ [RetentionPatterns.getDueItems]: {
19
+ payload: {
20
+ seriesId: string;
21
+ page?: number;
22
+ limit?: number;
23
+ };
24
+ response: RpcPage<RetentionDueItemEntity[]>;
25
+ };
26
+ /**
27
+ * Emite el acta con lo elegido (todo debe estar vencido y sin acta). Según la serie: conservación permanente →
28
+ * transferencia; eliminación → eliminación; selección → cualquiera de las dos.
29
+ */
30
+ [RetentionPatterns.createRecord]: {
31
+ payload: {
32
+ kind: DispositionKind;
33
+ seriesId: string;
34
+ documentIds: string[];
35
+ caseFileIds: string[];
36
+ observation?: string | null;
37
+ actor: {
38
+ employeeId: string;
39
+ fullName: string;
40
+ };
41
+ };
42
+ response: DispositionRecordResponseEntity;
43
+ };
44
+ [RetentionPatterns.getRecords]: {
45
+ payload: {
46
+ year: number;
47
+ };
48
+ response: DispositionRecordResponseEntity[];
49
+ };
50
+ /** El acta en PDF, con lo que incluye, para firmarla y archivarla. */
51
+ [RetentionPatterns.getRecordPdf]: {
52
+ payload: {
53
+ id: string;
54
+ generatedBy: string;
55
+ };
56
+ response: IndicatorsFileEntity;
57
+ };
58
+ }