@muni-sanfer/types-gestor-documental 0.0.1-beta.11 → 0.0.1-beta.12

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.
@@ -143,12 +143,13 @@ export declare const CaseFileActorType: {
143
143
  PrivateInstitution: "PrivateInstitution";
144
144
  Official: "Official";
145
145
  };
146
- export type CaseFileTrackingAction = 'Created' | 'Updated' | 'EntryAdded' | 'EntryVoided' | 'ParticipantAdded' | 'ParticipantRemoved' | 'Closed' | 'Exported';
146
+ export type CaseFileTrackingAction = 'Created' | 'Updated' | 'EntryAdded' | 'EntryVoided' | 'EntryMoved' | 'ParticipantAdded' | 'ParticipantRemoved' | 'Closed' | 'Exported';
147
147
  export declare const CaseFileTrackingAction: {
148
148
  Created: "Created";
149
149
  Updated: "Updated";
150
150
  EntryAdded: "EntryAdded";
151
151
  EntryVoided: "EntryVoided";
152
+ EntryMoved: "EntryMoved";
152
153
  ParticipantAdded: "ParticipantAdded";
153
154
  ParticipantRemoved: "ParticipantRemoved";
154
155
  Closed: "Closed";
@@ -285,6 +286,7 @@ export interface DocumentTrackingEntity {
285
286
  id: string;
286
287
  action: DocumentTrackingAction;
287
288
  observation?: string | null;
289
+ sha256?: string | null;
288
290
  employeeId?: string | null;
289
291
  employeeFullName?: string | null;
290
292
  document?: DocumentEntity;
@@ -345,6 +347,7 @@ export interface DocumentTypeFlowStepEntity {
345
347
  directorateCodeReference?: number | null;
346
348
  name: string;
347
349
  position?: string | null;
350
+ withPrevious: boolean;
348
351
  documentType?: DocumentTypeEntity;
349
352
  documentTypeId: string;
350
353
  createdAt: string;
@@ -425,6 +428,7 @@ export interface CaseFileEntryEntity {
425
428
  kind: CaseFileEntryKind;
426
429
  actuationType: CaseFileActuationType;
427
430
  title: string;
431
+ folder?: string | null;
428
432
  document?: DocumentEntity | null;
429
433
  documentId?: string | null;
430
434
  fileId?: string | null;
@@ -132,6 +132,7 @@ exports.CaseFileTrackingAction = {
132
132
  Updated: 'Updated',
133
133
  EntryAdded: 'EntryAdded',
134
134
  EntryVoided: 'EntryVoided',
135
+ EntryMoved: 'EntryMoved',
135
136
  ParticipantAdded: 'ParticipantAdded',
136
137
  ParticipantRemoved: 'ParticipantRemoved',
137
138
  Closed: 'Closed',
@@ -11,6 +11,7 @@ export declare const CaseFilePatterns: {
11
11
  readonly addEntry: "gestorDocumental.caseFile.addEntry";
12
12
  readonly addBatch: "gestorDocumental.caseFile.addBatch";
13
13
  readonly voidEntry: "gestorDocumental.caseFile.voidEntry";
14
+ readonly moveEntry: "gestorDocumental.caseFile.moveEntry";
14
15
  readonly share: "gestorDocumental.caseFile.share";
15
16
  readonly unshare: "gestorDocumental.caseFile.unshare";
16
17
  readonly close: "gestorDocumental.caseFile.close";
@@ -110,10 +111,20 @@ export interface CaseFileContract {
110
111
  [CaseFilePatterns.addEntry]: {
111
112
  payload: Pick<CaseFileEntity, 'id'> & {
112
113
  entry: CaseFileEntryInput;
114
+ folder?: string | null;
113
115
  } & CaseFileActorPayload;
114
116
  response: CaseFileAddEntryResponseEntity;
115
117
  };
116
118
  /** Deja una actuación sin efecto, con su motivo. No se elimina del índice. */
119
+ /** Pasa una actuación a otra subcarpeta del índice (`null`: a la raíz). El orden de incorporación no cambia. */
120
+ [CaseFilePatterns.moveEntry]: {
121
+ payload: {
122
+ id: string;
123
+ entryId: string;
124
+ folder: string | null;
125
+ } & CaseFileActorPayload;
126
+ response: CaseFileUpdateResponseEntity;
127
+ };
117
128
  [CaseFilePatterns.voidEntry]: {
118
129
  payload: Pick<CaseFileEntity, 'id'> & {
119
130
  entryId: string;
@@ -10,6 +10,7 @@ exports.CaseFilePatterns = {
10
10
  addEntry: 'gestorDocumental.caseFile.addEntry',
11
11
  addBatch: 'gestorDocumental.caseFile.addBatch',
12
12
  voidEntry: 'gestorDocumental.caseFile.voidEntry',
13
+ moveEntry: 'gestorDocumental.caseFile.moveEntry',
13
14
  share: 'gestorDocumental.caseFile.share',
14
15
  unshare: 'gestorDocumental.caseFile.unshare',
15
16
  close: 'gestorDocumental.caseFile.close',
@@ -14,7 +14,7 @@ export declare const DocumentTypePatterns: {
14
14
  * momento de redactar (su jefatura o, con subrogancia activa, el subrogante). El nombre de la dirección lo resuelve
15
15
  * el gateway; el navegador solo indica cuál es.
16
16
  */
17
- export type DocumentFlowStepInput = {
17
+ export type DocumentFlowStepInput = ({
18
18
  role: DocumentParticipantRole;
19
19
  type: 'Employee';
20
20
  employeeId: string;
@@ -23,6 +23,8 @@ export type DocumentFlowStepInput = {
23
23
  type: 'DirectorateHead';
24
24
  directorateCodeReference: number;
25
25
  name: string;
26
+ }) & {
27
+ withPrevious?: boolean;
26
28
  };
27
29
  /** Datos de un tipo documental al crearlo o editarlo. */
28
30
  export interface DocumentTypeWritePayload {
@@ -51,6 +53,7 @@ export interface DocumentTypeContract {
51
53
  search?: string;
52
54
  enabled?: boolean;
53
55
  category?: DocumentCategory;
56
+ usableByDirectorates?: number[];
54
57
  };
55
58
  };
56
59
  response: RpcPage<DocumentTypeGetAllResponseEntity[]>;
@@ -60,6 +60,7 @@ export declare const GestorDocumentalPatterns: {
60
60
  readonly addEntry: "gestorDocumental.caseFile.addEntry";
61
61
  readonly addBatch: "gestorDocumental.caseFile.addBatch";
62
62
  readonly voidEntry: "gestorDocumental.caseFile.voidEntry";
63
+ readonly moveEntry: "gestorDocumental.caseFile.moveEntry";
63
64
  readonly share: "gestorDocumental.caseFile.share";
64
65
  readonly unshare: "gestorDocumental.caseFile.unshare";
65
66
  readonly close: "gestorDocumental.caseFile.close";
@@ -33,6 +33,8 @@ export interface CaseFileEntryDocumentEntity {
33
33
  export interface CaseFileEntryResponseEntity {
34
34
  id: CaseFileEntryEntity['id'];
35
35
  sequence: CaseFileEntryEntity['sequence'];
36
+ /** Subcarpeta del índice (sin valor: en la raíz). */
37
+ folder: CaseFileEntryEntity['folder'];
36
38
  kind: CaseFileEntryEntity['kind'];
37
39
  actuationType: CaseFileEntryEntity['actuationType'];
38
40
  title: CaseFileEntryEntity['title'];
@@ -186,6 +186,7 @@ export interface DocumentGetByIdResponseEntity {
186
186
  id: DocumentTrackingEntity['id'];
187
187
  action: DocumentTrackingEntity['action'];
188
188
  observation: DocumentTrackingEntity['observation'];
189
+ sha256: DocumentTrackingEntity['sha256'];
189
190
  employeeId: DocumentTrackingEntity['employeeId'];
190
191
  employeeFullName: DocumentTrackingEntity['employeeFullName'];
191
192
  createdAt: DocumentTrackingEntity['createdAt'];
@@ -9,6 +9,7 @@ export interface DocumentTypeFlowStepResponseEntity {
9
9
  directorateCodeReference: DocumentTypeFlowStepEntity['directorateCodeReference'];
10
10
  name: DocumentTypeFlowStepEntity['name'];
11
11
  position: DocumentTypeFlowStepEntity['position'];
12
+ withPrevious: DocumentTypeFlowStepEntity['withPrevious'];
12
13
  }
13
14
  export interface DocumentTypeGetAllResponseEntity {
14
15
  id: DocumentTypeEntity['id'];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@muni-sanfer/types-gestor-documental",
3
- "version": "0.0.1-beta.11",
3
+ "version": "0.0.1-beta.12",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "scripts": {
@@ -217,6 +217,7 @@ export type CaseFileTrackingAction =
217
217
  | 'Updated'
218
218
  | 'EntryAdded'
219
219
  | 'EntryVoided'
220
+ | 'EntryMoved'
220
221
  | 'ParticipantAdded'
221
222
  | 'ParticipantRemoved'
222
223
  | 'Closed'
@@ -227,6 +228,7 @@ export const CaseFileTrackingAction = {
227
228
  Updated: 'Updated',
228
229
  EntryAdded: 'EntryAdded',
229
230
  EntryVoided: 'EntryVoided',
231
+ EntryMoved: 'EntryMoved',
230
232
  ParticipantAdded: 'ParticipantAdded',
231
233
  ParticipantRemoved: 'ParticipantRemoved',
232
234
  Closed: 'Closed',
@@ -373,6 +375,7 @@ export interface DocumentTrackingEntity {
373
375
  id: string;
374
376
  action: DocumentTrackingAction;
375
377
  observation?: string | null;
378
+ sha256?: string | null;
376
379
  employeeId?: string | null;
377
380
  employeeFullName?: string | null;
378
381
  document?: DocumentEntity;
@@ -437,6 +440,7 @@ export interface DocumentTypeFlowStepEntity {
437
440
  directorateCodeReference?: number | null;
438
441
  name: string;
439
442
  position?: string | null;
443
+ withPrevious: boolean;
440
444
  documentType?: DocumentTypeEntity;
441
445
  documentTypeId: string;
442
446
  createdAt: string;
@@ -523,6 +527,7 @@ export interface CaseFileEntryEntity {
523
527
  kind: CaseFileEntryKind;
524
528
  actuationType: CaseFileActuationType;
525
529
  title: string;
530
+ folder?: string | null;
526
531
  document?: DocumentEntity | null;
527
532
  documentId?: string | null;
528
533
  fileId?: string | null;
@@ -28,6 +28,7 @@ export const CaseFilePatterns = {
28
28
  addEntry: 'gestorDocumental.caseFile.addEntry',
29
29
  addBatch: 'gestorDocumental.caseFile.addBatch',
30
30
  voidEntry: 'gestorDocumental.caseFile.voidEntry',
31
+ moveEntry: 'gestorDocumental.caseFile.moveEntry',
31
32
  share: 'gestorDocumental.caseFile.share',
32
33
  unshare: 'gestorDocumental.caseFile.unshare',
33
34
  close: 'gestorDocumental.caseFile.close',
@@ -108,10 +109,16 @@ export interface CaseFileContract {
108
109
  response: CaseFileAddBatchResponseEntity;
109
110
  };
110
111
  [CaseFilePatterns.addEntry]: {
111
- payload: Pick<CaseFileEntity, 'id'> & { entry: CaseFileEntryInput } & CaseFileActorPayload;
112
+ // `folder`: subcarpeta del índice en que queda (sin valor: en la raíz)
113
+ payload: Pick<CaseFileEntity, 'id'> & { entry: CaseFileEntryInput; folder?: string | null } & CaseFileActorPayload;
112
114
  response: CaseFileAddEntryResponseEntity;
113
115
  };
114
116
  /** Deja una actuación sin efecto, con su motivo. No se elimina del índice. */
117
+ /** Pasa una actuación a otra subcarpeta del índice (`null`: a la raíz). El orden de incorporación no cambia. */
118
+ [CaseFilePatterns.moveEntry]: {
119
+ payload: { id: string; entryId: string; folder: string | null } & CaseFileActorPayload;
120
+ response: CaseFileUpdateResponseEntity;
121
+ };
115
122
  [CaseFilePatterns.voidEntry]: {
116
123
  payload: Pick<CaseFileEntity, 'id'> & { entryId: string; reason: string; actor: DocumentActor };
117
124
  response: CaseFileUpdateResponseEntity;
@@ -21,9 +21,13 @@ export const DocumentTypePatterns = {
21
21
  * momento de redactar (su jefatura o, con subrogancia activa, el subrogante). El nombre de la dirección lo resuelve
22
22
  * el gateway; el navegador solo indica cuál es.
23
23
  */
24
- export type DocumentFlowStepInput =
24
+ export type DocumentFlowStepInput = (
25
25
  | { role: DocumentParticipantRole; type: 'Employee'; employeeId: string }
26
- | { role: DocumentParticipantRole; type: 'DirectorateHead'; directorateCodeReference: number; name: string };
26
+ | { role: DocumentParticipantRole; type: 'DirectorateHead'; directorateCodeReference: number; name: string }
27
+ ) & {
28
+ // Visa a la vez con el paso anterior (visación en paralelo). Solo en visaciones.
29
+ withPrevious?: boolean;
30
+ };
27
31
 
28
32
  /** Datos de un tipo documental al crearlo o editarlo. */
29
33
  export interface DocumentTypeWritePayload {
@@ -50,7 +54,13 @@ export interface DocumentTypeContract {
50
54
  // sin `page` y `limit` responde todos los tipos en una sola página
51
55
  payload: {
52
56
  pagination?: { page?: number; limit?: number };
53
- filters?: { search?: string; enabled?: boolean; category?: DocumentCategory };
57
+ filters?: {
58
+ search?: string;
59
+ enabled?: boolean;
60
+ category?: DocumentCategory;
61
+ // Solo los que puede usar quien redacta: los de toda la municipalidad y los de estas direcciones.
62
+ usableByDirectorates?: number[];
63
+ };
54
64
  };
55
65
  response: RpcPage<DocumentTypeGetAllResponseEntity[]>;
56
66
  };
@@ -47,6 +47,8 @@ export interface CaseFileEntryDocumentEntity {
47
47
  export interface CaseFileEntryResponseEntity {
48
48
  id: CaseFileEntryEntity['id'];
49
49
  sequence: CaseFileEntryEntity['sequence'];
50
+ /** Subcarpeta del índice (sin valor: en la raíz). */
51
+ folder: CaseFileEntryEntity['folder'];
50
52
  kind: CaseFileEntryEntity['kind'];
51
53
  actuationType: CaseFileEntryEntity['actuationType'];
52
54
  title: CaseFileEntryEntity['title'];
@@ -210,6 +210,8 @@ export interface DocumentGetByIdResponseEntity {
210
210
  id: DocumentTrackingEntity['id'];
211
211
  action: DocumentTrackingEntity['action'];
212
212
  observation: DocumentTrackingEntity['observation'];
213
+ // Huella SHA-256 del PDF en ese hecho (firma, despacho o ingreso por DocDigital).
214
+ sha256: DocumentTrackingEntity['sha256'];
213
215
  employeeId: DocumentTrackingEntity['employeeId'];
214
216
  employeeFullName: DocumentTrackingEntity['employeeFullName'];
215
217
  createdAt: DocumentTrackingEntity['createdAt'];
@@ -11,6 +11,8 @@ export interface DocumentTypeFlowStepResponseEntity {
11
11
  // Nombre del funcionario o de la dirección, como estaba al definir el flujo.
12
12
  name: DocumentTypeFlowStepEntity['name'];
13
13
  position: DocumentTypeFlowStepEntity['position'];
14
+ // Visa a la vez con el paso anterior (visación en paralelo).
15
+ withPrevious: DocumentTypeFlowStepEntity['withPrevious'];
14
16
  }
15
17
 
16
18
  export interface DocumentTypeGetAllResponseEntity {