@muni-sanfer/types-gestor-documental 0.0.1-beta.0 → 0.0.1-beta.10

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 (74) hide show
  1. package/dist/base/entities.d.ts +459 -2
  2. package/dist/base/entities.js +102 -1
  3. package/dist/contracts/caseFile.contract.d.ts +159 -0
  4. package/dist/contracts/caseFile.contract.js +18 -0
  5. package/dist/contracts/document.contract.d.ts +167 -3
  6. package/dist/contracts/document.contract.js +10 -0
  7. package/dist/contracts/documentType.contract.d.ts +18 -1
  8. package/dist/contracts/index.d.ts +86 -1
  9. package/dist/contracts/index.js +18 -0
  10. package/dist/contracts/partsOffice.contract.d.ts +171 -0
  11. package/dist/contracts/partsOffice.contract.js +22 -0
  12. package/dist/contracts/procedure.contract.d.ts +50 -0
  13. package/dist/contracts/procedure.contract.js +11 -0
  14. package/dist/contracts/registerBook.contract.d.ts +27 -0
  15. package/dist/contracts/registerBook.contract.js +8 -0
  16. package/dist/contracts/signatureBatch.contract.d.ts +109 -0
  17. package/dist/contracts/signatureBatch.contract.js +12 -0
  18. package/dist/contracts/workFolder.contract.d.ts +114 -0
  19. package/dist/contracts/workFolder.contract.js +16 -0
  20. package/dist/entities/caseFile/caseFile.entity.d.ts +176 -0
  21. package/dist/entities/caseFile/caseFile.entity.js +2 -0
  22. package/dist/entities/caseFile/index.d.ts +1 -0
  23. package/dist/entities/caseFile/index.js +17 -0
  24. package/dist/entities/document/document.entity.d.ts +250 -1
  25. package/dist/entities/documentType/documentType.entity.d.ts +18 -1
  26. package/dist/entities/index.d.ts +6 -0
  27. package/dist/entities/index.js +6 -0
  28. package/dist/entities/partsOffice/index.d.ts +1 -0
  29. package/dist/entities/partsOffice/index.js +17 -0
  30. package/dist/entities/partsOffice/partsOffice.entity.d.ts +98 -0
  31. package/dist/entities/partsOffice/partsOffice.entity.js +2 -0
  32. package/dist/entities/procedure/index.d.ts +1 -0
  33. package/dist/entities/procedure/index.js +17 -0
  34. package/dist/entities/procedure/procedure.entity.d.ts +20 -0
  35. package/dist/entities/procedure/procedure.entity.js +2 -0
  36. package/dist/entities/registerBook/index.d.ts +1 -0
  37. package/dist/entities/registerBook/index.js +17 -0
  38. package/dist/entities/registerBook/registerBook.entity.d.ts +42 -0
  39. package/dist/entities/registerBook/registerBook.entity.js +2 -0
  40. package/dist/entities/signatureBatch/index.d.ts +1 -0
  41. package/dist/entities/signatureBatch/index.js +17 -0
  42. package/dist/entities/signatureBatch/signatureBatch.entity.d.ts +107 -0
  43. package/dist/entities/signatureBatch/signatureBatch.entity.js +2 -0
  44. package/dist/entities/workFolder/index.d.ts +1 -0
  45. package/dist/entities/workFolder/index.js +17 -0
  46. package/dist/entities/workFolder/workFolder.entity.d.ts +83 -0
  47. package/dist/entities/workFolder/workFolder.entity.js +2 -0
  48. package/package.json +1 -1
  49. package/src/base/entities.ts +544 -2
  50. package/src/contracts/caseFile.contract.ts +141 -0
  51. package/src/contracts/document.contract.ts +153 -0
  52. package/src/contracts/documentType.contract.ts +14 -1
  53. package/src/contracts/index.ts +26 -1
  54. package/src/contracts/partsOffice.contract.ts +120 -0
  55. package/src/contracts/procedure.contract.ts +53 -0
  56. package/src/contracts/registerBook.contract.ts +24 -0
  57. package/src/contracts/signatureBatch.contract.ts +96 -0
  58. package/src/contracts/workFolder.contract.ts +75 -0
  59. package/src/entities/caseFile/caseFile.entity.ts +204 -0
  60. package/src/entities/caseFile/index.ts +1 -0
  61. package/src/entities/document/document.entity.ts +271 -0
  62. package/src/entities/documentType/documentType.entity.ts +20 -1
  63. package/src/entities/index.ts +6 -0
  64. package/src/entities/partsOffice/index.ts +1 -0
  65. package/src/entities/partsOffice/partsOffice.entity.ts +103 -0
  66. package/src/entities/procedure/index.ts +1 -0
  67. package/src/entities/procedure/procedure.entity.ts +24 -0
  68. package/src/entities/registerBook/index.ts +1 -0
  69. package/src/entities/registerBook/registerBook.entity.ts +46 -0
  70. package/src/entities/signatureBatch/index.ts +1 -0
  71. package/src/entities/signatureBatch/signatureBatch.entity.ts +110 -0
  72. package/src/entities/workFolder/index.ts +1 -0
  73. package/src/entities/workFolder/workFolder.entity.ts +84 -0
  74. package/tsconfig.json +1 -3
@@ -0,0 +1,171 @@
1
+ import { type DocumentAccessLevel, type DocumentInstruction } from '../base/entities';
2
+ import { type DocDigitalDocumentTypeEntity, type DocDigitalEntityEntity, type PartsOfficeInboundEntity, type DocDigitalUserEntity, 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 getUsers: "gestorDocumental.partsOffice.getUsers";
11
+ readonly getDocumentTypes: "gestorDocumental.partsOffice.getDocumentTypes";
12
+ readonly getDispatches: "gestorDocumental.partsOffice.getDispatches";
13
+ readonly dispatch: "gestorDocumental.partsOffice.dispatch";
14
+ readonly returnDispatch: "gestorDocumental.partsOffice.returnDispatch";
15
+ readonly resendDispatch: "gestorDocumental.partsOffice.resendDispatch";
16
+ readonly getDispatchFile: "gestorDocumental.partsOffice.getDispatchFile";
17
+ readonly getInbound: "gestorDocumental.partsOffice.getInbound";
18
+ readonly syncInbound: "gestorDocumental.partsOffice.syncInbound";
19
+ readonly registerInbound: "gestorDocumental.partsOffice.registerInbound";
20
+ readonly acknowledgeInbound: "gestorDocumental.partsOffice.acknowledgeInbound";
21
+ readonly returnInbound: "gestorDocumental.partsOffice.returnInbound";
22
+ readonly getInboundFile: "gestorDocumental.partsOffice.getInboundFile";
23
+ };
24
+ /** Destinatario interno de un ingreso, ya resuelto por el gateway (las áreas con sus integrantes). */
25
+ export type PartsOfficeRecipientInput = {
26
+ type: 'Employee';
27
+ employeeId: string;
28
+ } | {
29
+ type: 'Directorate';
30
+ directorateCodeReference: number;
31
+ name: string;
32
+ memberEmployeeIds: string[];
33
+ } | {
34
+ type: 'Department';
35
+ departmentId: string;
36
+ name: string;
37
+ memberEmployeeIds: string[];
38
+ };
39
+ interface IListPayload<S> {
40
+ pagination?: {
41
+ page?: number;
42
+ limit?: number;
43
+ };
44
+ filters?: {
45
+ search?: string;
46
+ status?: S;
47
+ };
48
+ }
49
+ export interface PartsOfficeContract {
50
+ [PartsOfficePatterns.getStatus]: {
51
+ payload: Record<string, never>;
52
+ response: PartsOfficeStatusEntity;
53
+ };
54
+ [PartsOfficePatterns.getSummary]: {
55
+ payload: Record<string, never>;
56
+ response: PartsOfficeSummaryEntity;
57
+ };
58
+ /** Directorio de DocDigital: instituciones por nombre. */
59
+ [PartsOfficePatterns.getEntities]: {
60
+ payload: {
61
+ search?: string;
62
+ };
63
+ response: DocDigitalEntityEntity[];
64
+ };
65
+ [PartsOfficePatterns.getUsers]: {
66
+ payload: {
67
+ entityId: number;
68
+ search?: string;
69
+ };
70
+ response: DocDigitalUserEntity[];
71
+ };
72
+ [PartsOfficePatterns.getDocumentTypes]: {
73
+ payload: Record<string, never>;
74
+ response: DocDigitalDocumentTypeEntity[];
75
+ };
76
+ [PartsOfficePatterns.getDispatches]: {
77
+ payload: IListPayload<'Pending' | 'Dispatched' | 'Returned'>;
78
+ response: RpcPage<PartsOfficeDispatchEntity[]>;
79
+ };
80
+ /** Despacha por DocDigital, con el número del documento como folio. `operatorRun`: RUN de quien despacha. */
81
+ [PartsOfficePatterns.dispatch]: {
82
+ payload: {
83
+ id: string;
84
+ docDigitalTypeId: number;
85
+ operatorRun?: string | null;
86
+ actor: DocumentActor;
87
+ };
88
+ response: PartsOfficeOkResponseEntity & {
89
+ docDigitalDocumentId: string;
90
+ };
91
+ };
92
+ /** Devuelve el despacho al redactor, con el motivo (por ejemplo, un destinatario equivocado). */
93
+ [PartsOfficePatterns.returnDispatch]: {
94
+ payload: {
95
+ id: string;
96
+ reason: string;
97
+ actor: DocumentActor;
98
+ };
99
+ response: PartsOfficeOkResponseEntity;
100
+ };
101
+ /** El redactor corrige las instituciones de destino de un despacho devuelto y lo envía de nuevo a Partes. */
102
+ [PartsOfficePatterns.resendDispatch]: {
103
+ payload: {
104
+ id: string;
105
+ externalRecipients: DocumentExternalRecipientInput[];
106
+ actor: DocumentActor;
107
+ };
108
+ response: PartsOfficeOkResponseEntity;
109
+ };
110
+ /** PDF firmado de un documento por despachar, para que Oficina de Partes lo revise. */
111
+ [PartsOfficePatterns.getDispatchFile]: {
112
+ payload: {
113
+ id: string;
114
+ };
115
+ response: PartsOfficeFileEntity;
116
+ };
117
+ [PartsOfficePatterns.getInbound]: {
118
+ payload: IListPayload<'Pending' | 'Registered' | 'Returned'>;
119
+ response: RpcPage<PartsOfficeInboundEntity[]>;
120
+ };
121
+ /** Trae de DocDigital lo recibido que aún no tiene acuse de recibo. */
122
+ [PartsOfficePatterns.syncInbound]: {
123
+ payload: Record<string, never>;
124
+ response: PartsOfficeSyncResponseEntity;
125
+ };
126
+ /**
127
+ * Ingresa un recibido al gestor: le da folio de ingreso, lo deriva a quienes corresponda y da el acuse de recibo
128
+ * en DocDigital.
129
+ */
130
+ [PartsOfficePatterns.registerInbound]: {
131
+ payload: {
132
+ id: string;
133
+ documentTypeId: string;
134
+ keywords: string[];
135
+ accessLevel: DocumentAccessLevel;
136
+ hasSensitiveData: boolean;
137
+ recipients: PartsOfficeRecipientInput[];
138
+ instruction: DocumentInstruction;
139
+ note?: string | null;
140
+ dueAt?: string | null;
141
+ actor: DocumentActor;
142
+ };
143
+ response: PartsOfficeRegisterResponseEntity;
144
+ };
145
+ /** Reintenta el acuse de recibo de un recibido ya ingresado. */
146
+ [PartsOfficePatterns.acknowledgeInbound]: {
147
+ payload: {
148
+ id: string;
149
+ actor: DocumentActor;
150
+ };
151
+ response: PartsOfficeOkResponseEntity;
152
+ };
153
+ /** Devuelve el recibido a la institución que lo envió, con el motivo (entre 3 y 255 caracteres). */
154
+ [PartsOfficePatterns.returnInbound]: {
155
+ payload: {
156
+ id: string;
157
+ reason: string;
158
+ actor: DocumentActor;
159
+ };
160
+ response: PartsOfficeOkResponseEntity;
161
+ };
162
+ /** Archivo de un recibido: el principal o, con `attachment`, uno de sus anexos (por su posición). */
163
+ [PartsOfficePatterns.getInboundFile]: {
164
+ payload: {
165
+ id: string;
166
+ attachment?: number;
167
+ };
168
+ response: PartsOfficeFileEntity;
169
+ };
170
+ }
171
+ export {};
@@ -0,0 +1,22 @@
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
+ getUsers: 'gestorDocumental.partsOffice.getUsers',
10
+ getDocumentTypes: 'gestorDocumental.partsOffice.getDocumentTypes',
11
+ getDispatches: 'gestorDocumental.partsOffice.getDispatches',
12
+ dispatch: 'gestorDocumental.partsOffice.dispatch',
13
+ returnDispatch: 'gestorDocumental.partsOffice.returnDispatch',
14
+ resendDispatch: 'gestorDocumental.partsOffice.resendDispatch',
15
+ getDispatchFile: 'gestorDocumental.partsOffice.getDispatchFile',
16
+ getInbound: 'gestorDocumental.partsOffice.getInbound',
17
+ syncInbound: 'gestorDocumental.partsOffice.syncInbound',
18
+ registerInbound: 'gestorDocumental.partsOffice.registerInbound',
19
+ acknowledgeInbound: 'gestorDocumental.partsOffice.acknowledgeInbound',
20
+ returnInbound: 'gestorDocumental.partsOffice.returnInbound',
21
+ getInboundFile: 'gestorDocumental.partsOffice.getInboundFile',
22
+ };
@@ -0,0 +1,50 @@
1
+ import { type ProcedureEntity } from '../base/entities';
2
+ import { type ProcedureCreateResponseEntity, type ProcedureGetAllResponseEntity, type ProcedureGetByIdResponseEntity, type ProcedureUpdateResponseEntity } from '../entities';
3
+ import { type RpcPage } from './contract';
4
+ /** Patrones NATS de `procedure`: `<servicio>.<recurso>.<acción>`. */
5
+ export declare const ProcedurePatterns: {
6
+ readonly getAll: "gestorDocumental.procedure.getAll";
7
+ readonly getById: "gestorDocumental.procedure.getById";
8
+ readonly create: "gestorDocumental.procedure.create";
9
+ readonly update: "gestorDocumental.procedure.update";
10
+ readonly setEnabled: "gestorDocumental.procedure.setEnabled";
11
+ };
12
+ /** Datos de un procedimiento administrativo al crearlo o editarlo. */
13
+ export interface ProcedureWritePayload {
14
+ name: string;
15
+ cpatId?: string | null;
16
+ cpatCode?: string | null;
17
+ description?: string | null;
18
+ enabled?: boolean;
19
+ }
20
+ export interface ProcedureContract {
21
+ [ProcedurePatterns.getAll]: {
22
+ payload: {
23
+ pagination?: {
24
+ page?: number;
25
+ limit?: number;
26
+ };
27
+ filters?: {
28
+ search?: string;
29
+ enabled?: boolean;
30
+ };
31
+ };
32
+ response: RpcPage<ProcedureGetAllResponseEntity[]>;
33
+ };
34
+ [ProcedurePatterns.getById]: {
35
+ payload: Pick<ProcedureEntity, 'id'>;
36
+ response: ProcedureGetByIdResponseEntity;
37
+ };
38
+ [ProcedurePatterns.create]: {
39
+ payload: ProcedureWritePayload;
40
+ response: ProcedureCreateResponseEntity;
41
+ };
42
+ [ProcedurePatterns.update]: {
43
+ payload: ProcedureWritePayload & Pick<ProcedureEntity, 'id'>;
44
+ response: ProcedureUpdateResponseEntity;
45
+ };
46
+ [ProcedurePatterns.setEnabled]: {
47
+ payload: Pick<ProcedureEntity, 'id' | 'enabled'>;
48
+ response: ProcedureUpdateResponseEntity;
49
+ };
50
+ }
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ProcedurePatterns = void 0;
4
+ /** Patrones NATS de `procedure`: `<servicio>.<recurso>.<acción>`. */
5
+ exports.ProcedurePatterns = {
6
+ getAll: 'gestorDocumental.procedure.getAll',
7
+ getById: 'gestorDocumental.procedure.getById',
8
+ create: 'gestorDocumental.procedure.create',
9
+ update: 'gestorDocumental.procedure.update',
10
+ setEnabled: 'gestorDocumental.procedure.setEnabled',
11
+ };
@@ -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,109 @@
1
+ import { type DocumentAccessLevel } from '../base/entities';
2
+ import { type SignatureBatchCreateResponseEntity, type SignatureBatchGetAllResponseEntity, type SignatureBatchGetByIdResponseEntity, type SignatureBatchRejectResponseEntity, type SignatureBatchSignResponseEntity, type SignatureBatchTab, type SignatureBatchVisaResponseEntity } from '../entities';
3
+ import { type RpcPage } from './contract';
4
+ import { type DocumentActor } from './document.contract';
5
+ /** Patrones NATS de `signatureBatch` (lotes de firma): `<servicio>.<recurso>.<acción>`. */
6
+ export declare const SignatureBatchPatterns: {
7
+ readonly getAll: "gestorDocumental.signatureBatch.getAll";
8
+ readonly getById: "gestorDocumental.signatureBatch.getById";
9
+ readonly create: "gestorDocumental.signatureBatch.create";
10
+ readonly visa: "gestorDocumental.signatureBatch.visa";
11
+ readonly sign: "gestorDocumental.signatureBatch.sign";
12
+ readonly reject: "gestorDocumental.signatureBatch.reject";
13
+ };
14
+ /** Datos de quien firma, para el sello de la firma (los resuelve el gateway desde la sesión). */
15
+ export interface SignatureBatchSigner {
16
+ rut: string;
17
+ fullName: string;
18
+ role: string;
19
+ areaName: string;
20
+ }
21
+ export interface SignatureBatchContract {
22
+ [SignatureBatchPatterns.getAll]: {
23
+ payload: {
24
+ pagination?: {
25
+ page?: number;
26
+ limit?: number;
27
+ };
28
+ filters?: {
29
+ search?: string;
30
+ tab?: SignatureBatchTab;
31
+ };
32
+ actor: DocumentActor;
33
+ };
34
+ response: RpcPage<SignatureBatchGetAllResponseEntity[]>;
35
+ };
36
+ /** Lo ven su redactor y quienes visan o firman sus documentos; con `viewAll`, quien lleva el registro. */
37
+ [SignatureBatchPatterns.getById]: {
38
+ payload: {
39
+ id: string;
40
+ actor: DocumentActor;
41
+ viewAll?: boolean;
42
+ };
43
+ response: SignatureBatchGetByIdResponseEntity;
44
+ };
45
+ /**
46
+ * Crea el lote y lo envía a tramitación: un documento por cada PDF, todos del mismo tipo y con el mismo flujo.
47
+ * Cada documento recibe su código de verificación y, con su primera firma, su número (si el tipo lo lleva).
48
+ */
49
+ [SignatureBatchPatterns.create]: {
50
+ payload: {
51
+ name: string;
52
+ documentTypeId: string;
53
+ keywords: string[];
54
+ accessLevel?: DocumentAccessLevel;
55
+ hasSensitiveData?: boolean;
56
+ directorateCodeReference?: number | null;
57
+ departmentId?: string | null;
58
+ visaEmployeeIds?: string[];
59
+ visaStages?: number[] | null;
60
+ signatureEmployeeIds: string[];
61
+ signatureSheet?: boolean;
62
+ documents: {
63
+ subject: string;
64
+ file: {
65
+ fileId: string;
66
+ name: string;
67
+ };
68
+ }[];
69
+ actor: DocumentActor;
70
+ };
71
+ response: SignatureBatchCreateResponseEntity;
72
+ };
73
+ /** Visa de una vez los documentos del lote que el funcionario tiene en su turno de visación. */
74
+ [SignatureBatchPatterns.visa]: {
75
+ payload: {
76
+ id: string;
77
+ observation?: string | null;
78
+ actor: DocumentActor;
79
+ };
80
+ response: SignatureBatchVisaResponseEntity;
81
+ };
82
+ /**
83
+ * Firma con un solo OTP los documentos del lote que el funcionario tiene en su turno de firma. FirmaGob admite 5 MB
84
+ * por solicitud: los que no caben quedan en `remaining`, para firmarlos con un OTP nuevo.
85
+ */
86
+ [SignatureBatchPatterns.sign]: {
87
+ payload: {
88
+ id: string;
89
+ observation?: string | null;
90
+ signer: SignatureBatchSigner;
91
+ otp?: string;
92
+ actor: DocumentActor;
93
+ };
94
+ response: SignatureBatchSignResponseEntity;
95
+ };
96
+ /**
97
+ * Devuelve a su redactor los documentos del lote que el funcionario tiene en su turno: todos, o los indicados en
98
+ * `documentIds`. Los demás siguen su curso.
99
+ */
100
+ [SignatureBatchPatterns.reject]: {
101
+ payload: {
102
+ id: string;
103
+ observation: string;
104
+ documentIds?: string[];
105
+ actor: DocumentActor;
106
+ };
107
+ response: SignatureBatchRejectResponseEntity;
108
+ };
109
+ }
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SignatureBatchPatterns = void 0;
4
+ /** Patrones NATS de `signatureBatch` (lotes de firma): `<servicio>.<recurso>.<acción>`. */
5
+ exports.SignatureBatchPatterns = {
6
+ getAll: 'gestorDocumental.signatureBatch.getAll',
7
+ getById: 'gestorDocumental.signatureBatch.getById',
8
+ create: 'gestorDocumental.signatureBatch.create',
9
+ visa: 'gestorDocumental.signatureBatch.visa',
10
+ sign: 'gestorDocumental.signatureBatch.sign',
11
+ reject: 'gestorDocumental.signatureBatch.reject',
12
+ };
@@ -0,0 +1,114 @@
1
+ import { type WorkFolderConvertInput, type WorkFolderConvertResponseEntity, type WorkFolderGetAllResponseEntity, type WorkFolderGetByIdResponseEntity, type WorkFolderWriteResponseEntity } from '../entities';
2
+ import { type RpcPage } from './contract';
3
+ import { type DocumentActor } from './document.contract';
4
+ /** Patrones NATS de `workFolder` (carpetas de trabajo): `<servicio>.<recurso>.<acción>`. */
5
+ export declare const WorkFolderPatterns: {
6
+ readonly getAll: "gestorDocumental.workFolder.getAll";
7
+ readonly getById: "gestorDocumental.workFolder.getById";
8
+ readonly create: "gestorDocumental.workFolder.create";
9
+ readonly update: "gestorDocumental.workFolder.update";
10
+ readonly share: "gestorDocumental.workFolder.share";
11
+ readonly unshare: "gestorDocumental.workFolder.unshare";
12
+ readonly addItem: "gestorDocumental.workFolder.addItem";
13
+ readonly removeItem: "gestorDocumental.workFolder.removeItem";
14
+ readonly remove: "gestorDocumental.workFolder.remove";
15
+ readonly convert: "gestorDocumental.workFolder.convert";
16
+ };
17
+ /** Lo que se agrega a una carpeta: un documento finalizado del gestor o un archivo ya subido. */
18
+ export type WorkFolderItemInput = {
19
+ kind: 'Document';
20
+ documentId: string;
21
+ } | {
22
+ kind: 'File';
23
+ fileId: string;
24
+ fileName: string;
25
+ title: string;
26
+ };
27
+ type TActor = {
28
+ actor: DocumentActor;
29
+ };
30
+ /**
31
+ * Carpetas de trabajo: agrupan y comparten documentos y archivos sin procedimiento asociado. Las ven su responsable y
32
+ * aquellos con quienes la compartió.
33
+ */
34
+ export interface WorkFolderContract {
35
+ [WorkFolderPatterns.getAll]: {
36
+ payload: {
37
+ pagination?: {
38
+ page?: number;
39
+ limit?: number;
40
+ };
41
+ filters?: {
42
+ search?: string;
43
+ };
44
+ } & TActor;
45
+ response: RpcPage<WorkFolderGetAllResponseEntity[]>;
46
+ };
47
+ [WorkFolderPatterns.getById]: {
48
+ payload: {
49
+ id: string;
50
+ } & TActor;
51
+ response: WorkFolderGetByIdResponseEntity;
52
+ };
53
+ [WorkFolderPatterns.create]: {
54
+ payload: {
55
+ name: string;
56
+ description?: string | null;
57
+ } & TActor;
58
+ response: WorkFolderWriteResponseEntity;
59
+ };
60
+ [WorkFolderPatterns.update]: {
61
+ payload: {
62
+ id: string;
63
+ name: string;
64
+ description?: string | null;
65
+ } & TActor;
66
+ response: WorkFolderWriteResponseEntity;
67
+ };
68
+ [WorkFolderPatterns.share]: {
69
+ payload: {
70
+ id: string;
71
+ employeeIds: string[];
72
+ } & TActor;
73
+ response: WorkFolderWriteResponseEntity;
74
+ };
75
+ [WorkFolderPatterns.unshare]: {
76
+ payload: {
77
+ id: string;
78
+ participantId: string;
79
+ } & TActor;
80
+ response: WorkFolderWriteResponseEntity;
81
+ };
82
+ [WorkFolderPatterns.addItem]: {
83
+ payload: {
84
+ id: string;
85
+ item: WorkFolderItemInput;
86
+ } & TActor;
87
+ response: WorkFolderWriteResponseEntity;
88
+ };
89
+ [WorkFolderPatterns.removeItem]: {
90
+ payload: {
91
+ id: string;
92
+ itemId: string;
93
+ } & TActor;
94
+ response: WorkFolderWriteResponseEntity;
95
+ };
96
+ /** La carpeta deja de verse. Lo que contiene no se toca: los documentos siguen en el gestor. */
97
+ [WorkFolderPatterns.remove]: {
98
+ payload: {
99
+ id: string;
100
+ } & TActor;
101
+ response: WorkFolderWriteResponseEntity;
102
+ };
103
+ /**
104
+ * La convierte en expediente: lo crea con estos metadatos, lo comparte con los mismos funcionarios e incorpora sus
105
+ * ítems al índice en el orden en que se agregaron. Desde ahí la carpeta queda solo de consulta.
106
+ */
107
+ [WorkFolderPatterns.convert]: {
108
+ payload: {
109
+ id: string;
110
+ } & WorkFolderConvertInput & TActor;
111
+ response: WorkFolderConvertResponseEntity;
112
+ };
113
+ }
114
+ export {};
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.WorkFolderPatterns = void 0;
4
+ /** Patrones NATS de `workFolder` (carpetas de trabajo): `<servicio>.<recurso>.<acción>`. */
5
+ exports.WorkFolderPatterns = {
6
+ getAll: 'gestorDocumental.workFolder.getAll',
7
+ getById: 'gestorDocumental.workFolder.getById',
8
+ create: 'gestorDocumental.workFolder.create',
9
+ update: 'gestorDocumental.workFolder.update',
10
+ share: 'gestorDocumental.workFolder.share',
11
+ unshare: 'gestorDocumental.workFolder.unshare',
12
+ addItem: 'gestorDocumental.workFolder.addItem',
13
+ removeItem: 'gestorDocumental.workFolder.removeItem',
14
+ remove: 'gestorDocumental.workFolder.remove',
15
+ convert: 'gestorDocumental.workFolder.convert',
16
+ };