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

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.
@@ -78,6 +78,68 @@ export declare const DocumentInstruction: {
78
78
  Respond: "Respond";
79
79
  Archive: "Archive";
80
80
  };
81
+ export type CaseFileStatus = 'Open' | 'Closed';
82
+ export declare const CaseFileStatus: {
83
+ Open: "Open";
84
+ Closed: "Closed";
85
+ };
86
+ export type CaseFileIncorporationMechanism = 'Manual' | 'WebService' | 'Mixed' | 'CitizenRepository' | 'Interoperability';
87
+ export declare const CaseFileIncorporationMechanism: {
88
+ Manual: "Manual";
89
+ WebService: "WebService";
90
+ Mixed: "Mixed";
91
+ CitizenRepository: "CitizenRepository";
92
+ Interoperability: "Interoperability";
93
+ };
94
+ export type CaseFileActuationType = 'AdministrativeAct' | 'Notification' | 'OfficialCommunication' | 'Interoperability' | 'RequestReception' | 'Subfolder' | 'PowerRegistration';
95
+ export declare const CaseFileActuationType: {
96
+ AdministrativeAct: "AdministrativeAct";
97
+ Notification: "Notification";
98
+ OfficialCommunication: "OfficialCommunication";
99
+ Interoperability: "Interoperability";
100
+ RequestReception: "RequestReception";
101
+ Subfolder: "Subfolder";
102
+ PowerRegistration: "PowerRegistration";
103
+ };
104
+ export type CaseFileEntryKind = 'Document' | 'File' | 'CaseFile';
105
+ export declare const CaseFileEntryKind: {
106
+ Document: "Document";
107
+ File: "File";
108
+ CaseFile: "CaseFile";
109
+ };
110
+ export type CaseFileActorRelation = 'Responsible' | 'Interested' | 'Author' | 'Referred' | 'Recipient' | 'MinisterOfFaith';
111
+ export declare const CaseFileActorRelation: {
112
+ Responsible: "Responsible";
113
+ Interested: "Interested";
114
+ Author: "Author";
115
+ Referred: "Referred";
116
+ Recipient: "Recipient";
117
+ MinisterOfFaith: "MinisterOfFaith";
118
+ };
119
+ export type CaseFileActorType = 'Citizen' | 'Foreigner' | 'PrivateInstitution' | 'Official';
120
+ export declare const CaseFileActorType: {
121
+ Citizen: "Citizen";
122
+ Foreigner: "Foreigner";
123
+ PrivateInstitution: "PrivateInstitution";
124
+ Official: "Official";
125
+ };
126
+ export type CaseFileTrackingAction = 'Created' | 'Updated' | 'EntryAdded' | 'EntryVoided' | 'ParticipantAdded' | 'ParticipantRemoved' | 'Closed' | 'Exported';
127
+ export declare const CaseFileTrackingAction: {
128
+ Created: "Created";
129
+ Updated: "Updated";
130
+ EntryAdded: "EntryAdded";
131
+ EntryVoided: "EntryVoided";
132
+ ParticipantAdded: "ParticipantAdded";
133
+ ParticipantRemoved: "ParticipantRemoved";
134
+ Closed: "Closed";
135
+ Exported: "Exported";
136
+ };
137
+ export type CaseFileAccessAction = 'Viewed' | 'FileDownloaded' | 'Exported';
138
+ export declare const CaseFileAccessAction: {
139
+ Viewed: "Viewed";
140
+ FileDownloaded: "FileDownloaded";
141
+ Exported: "Exported";
142
+ };
81
143
  export interface DocumentTypeEntity {
82
144
  id: string;
83
145
  name: string;
@@ -132,6 +194,7 @@ export interface DocumentEntity {
132
194
  annulledNumbers?: DocumentAnnulledNumberEntity[];
133
195
  recipients?: DocumentRecipientEntity[];
134
196
  deliveries?: DocumentDeliveryEntity[];
197
+ caseFileEntries?: CaseFileEntryEntity[];
135
198
  deleted: boolean;
136
199
  createdAt: string;
137
200
  updatedAt: string;
@@ -231,3 +294,134 @@ export interface DocumentTypeFlowStepEntity {
231
294
  documentTypeId: string;
232
295
  createdAt: string;
233
296
  }
297
+ export interface ProcedureEntity {
298
+ id: string;
299
+ name: string;
300
+ cpatId?: string | null;
301
+ cpatCode?: string | null;
302
+ description?: string | null;
303
+ enabled: boolean;
304
+ caseFiles?: CaseFileEntity[];
305
+ deleted: boolean;
306
+ createdAt: string;
307
+ updatedAt: string;
308
+ }
309
+ export interface CaseFileSequenceEntity {
310
+ year: number;
311
+ next: number;
312
+ }
313
+ export interface CaseFileEntity {
314
+ id: string;
315
+ code: string;
316
+ year: number;
317
+ number: number;
318
+ title: string;
319
+ subject: string;
320
+ summary?: string | null;
321
+ status: CaseFileStatus;
322
+ accessLevel: DocumentAccessLevel;
323
+ hasSensitiveData: boolean;
324
+ incorporationMechanism: CaseFileIncorporationMechanism;
325
+ schemaVersion: string;
326
+ procedure?: ProcedureEntity;
327
+ procedureId: string;
328
+ responsibleEmployeeId: string;
329
+ responsibleFullName: string;
330
+ responsiblePosition?: string | null;
331
+ closedAt?: string | null;
332
+ closedByEmployeeId?: string | null;
333
+ closedByFullName?: string | null;
334
+ closingNote?: string | null;
335
+ participants?: CaseFileParticipantEntity[];
336
+ actors?: CaseFileActorEntity[];
337
+ entries?: CaseFileEntryEntity[];
338
+ linkedFrom?: CaseFileEntryEntity[];
339
+ trackings?: CaseFileTrackingEntity[];
340
+ metadataChanges?: CaseFileMetadataChangeEntity[];
341
+ accesses?: CaseFileAccessEntity[];
342
+ createdAt: string;
343
+ updatedAt: string;
344
+ }
345
+ export interface CaseFileParticipantEntity {
346
+ id: string;
347
+ employeeId: string;
348
+ fullName: string;
349
+ position?: string | null;
350
+ addedByEmployeeId: string;
351
+ addedByFullName: string;
352
+ caseFile?: CaseFileEntity;
353
+ caseFileId: string;
354
+ createdAt: string;
355
+ }
356
+ export interface CaseFileActorEntity {
357
+ id: string;
358
+ relation: CaseFileActorRelation;
359
+ actorType: CaseFileActorType;
360
+ identifier?: string | null;
361
+ name: string;
362
+ caseFile?: CaseFileEntity;
363
+ caseFileId: string;
364
+ createdAt: string;
365
+ }
366
+ export interface CaseFileEntryEntity {
367
+ id: string;
368
+ sequence: number;
369
+ kind: CaseFileEntryKind;
370
+ actuationType: CaseFileActuationType;
371
+ title: string;
372
+ document?: DocumentEntity | null;
373
+ documentId?: string | null;
374
+ fileId?: string | null;
375
+ fileName?: string | null;
376
+ documentTypeName?: string | null;
377
+ originDate?: string | null;
378
+ author?: string | null;
379
+ keywords: string[];
380
+ accessLevel?: DocumentAccessLevel | null;
381
+ hasSensitiveData?: boolean | null;
382
+ linkedCaseFile?: CaseFileEntity | null;
383
+ linkedCaseFileId?: string | null;
384
+ sha256?: string | null;
385
+ size?: number | null;
386
+ hasAdvancedSignature: boolean;
387
+ incorporatedByEmployeeId: string;
388
+ incorporatedByFullName: string;
389
+ voidedAt?: string | null;
390
+ voidedByEmployeeId?: string | null;
391
+ voidedByFullName?: string | null;
392
+ voidReason?: string | null;
393
+ caseFile?: CaseFileEntity;
394
+ caseFileId: string;
395
+ createdAt: string;
396
+ }
397
+ export interface CaseFileTrackingEntity {
398
+ id: string;
399
+ action: CaseFileTrackingAction;
400
+ observation?: string | null;
401
+ employeeId?: string | null;
402
+ employeeFullName?: string | null;
403
+ caseFile?: CaseFileEntity;
404
+ caseFileId: string;
405
+ createdAt: string;
406
+ }
407
+ export interface CaseFileMetadataChangeEntity {
408
+ id: string;
409
+ field: string;
410
+ previousValue?: string | null;
411
+ newValue?: string | null;
412
+ employeeId: string;
413
+ employeeFullName: string;
414
+ caseFile?: CaseFileEntity;
415
+ caseFileId: string;
416
+ createdAt: string;
417
+ }
418
+ export interface CaseFileAccessEntity {
419
+ id: string;
420
+ action: CaseFileAccessAction;
421
+ entryId?: string | null;
422
+ employeeId: string;
423
+ employeeFullName: string;
424
+ caseFile?: CaseFileEntity;
425
+ caseFileId: string;
426
+ createdAt: string;
427
+ }
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  // This file was auto-generated by prisma-generator-typescript-interfaces
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.DocumentInstruction = exports.DocumentDeliveryOrigin = exports.DocumentRecipientType = exports.DocumentAttachmentType = exports.DocumentFlowStepType = exports.DocumentTrackingAction = exports.DocumentParticipantStatus = exports.DocumentParticipantRole = exports.DocumentAccessLevel = exports.DocumentStatus = exports.DocumentCategory = void 0;
4
+ exports.CaseFileAccessAction = exports.CaseFileTrackingAction = exports.CaseFileActorType = exports.CaseFileActorRelation = exports.CaseFileEntryKind = exports.CaseFileActuationType = exports.CaseFileIncorporationMechanism = exports.CaseFileStatus = exports.DocumentInstruction = exports.DocumentDeliveryOrigin = exports.DocumentRecipientType = exports.DocumentAttachmentType = exports.DocumentFlowStepType = exports.DocumentTrackingAction = exports.DocumentParticipantStatus = exports.DocumentParticipantRole = exports.DocumentAccessLevel = exports.DocumentStatus = exports.DocumentCategory = void 0;
5
5
  exports.DocumentCategory = {
6
6
  Decree: 'Decree',
7
7
  Communication: 'Communication',
@@ -71,3 +71,57 @@ exports.DocumentInstruction = {
71
71
  Respond: 'Respond',
72
72
  Archive: 'Archive',
73
73
  };
74
+ exports.CaseFileStatus = {
75
+ Open: 'Open',
76
+ Closed: 'Closed',
77
+ };
78
+ exports.CaseFileIncorporationMechanism = {
79
+ Manual: 'Manual',
80
+ WebService: 'WebService',
81
+ Mixed: 'Mixed',
82
+ CitizenRepository: 'CitizenRepository',
83
+ Interoperability: 'Interoperability',
84
+ };
85
+ exports.CaseFileActuationType = {
86
+ AdministrativeAct: 'AdministrativeAct',
87
+ Notification: 'Notification',
88
+ OfficialCommunication: 'OfficialCommunication',
89
+ Interoperability: 'Interoperability',
90
+ RequestReception: 'RequestReception',
91
+ Subfolder: 'Subfolder',
92
+ PowerRegistration: 'PowerRegistration',
93
+ };
94
+ exports.CaseFileEntryKind = {
95
+ Document: 'Document',
96
+ File: 'File',
97
+ CaseFile: 'CaseFile',
98
+ };
99
+ exports.CaseFileActorRelation = {
100
+ Responsible: 'Responsible',
101
+ Interested: 'Interested',
102
+ Author: 'Author',
103
+ Referred: 'Referred',
104
+ Recipient: 'Recipient',
105
+ MinisterOfFaith: 'MinisterOfFaith',
106
+ };
107
+ exports.CaseFileActorType = {
108
+ Citizen: 'Citizen',
109
+ Foreigner: 'Foreigner',
110
+ PrivateInstitution: 'PrivateInstitution',
111
+ Official: 'Official',
112
+ };
113
+ exports.CaseFileTrackingAction = {
114
+ Created: 'Created',
115
+ Updated: 'Updated',
116
+ EntryAdded: 'EntryAdded',
117
+ EntryVoided: 'EntryVoided',
118
+ ParticipantAdded: 'ParticipantAdded',
119
+ ParticipantRemoved: 'ParticipantRemoved',
120
+ Closed: 'Closed',
121
+ Exported: 'Exported',
122
+ };
123
+ exports.CaseFileAccessAction = {
124
+ Viewed: 'Viewed',
125
+ FileDownloaded: 'FileDownloaded',
126
+ Exported: 'Exported',
127
+ };
@@ -0,0 +1,149 @@
1
+ import { type CaseFileActorRelation, type CaseFileActorType, type CaseFileActuationType, type CaseFileEntity, type CaseFileStatus, type DocumentAccessLevel } from '../base/entities';
2
+ import { type CaseFileAddEntryResponseEntity, type CaseFileCreateResponseEntity, type CaseFileEntryFileResponseEntity, type CaseFileExportResponseEntity, type CaseFileGetAllResponseEntity, type CaseFileGetByIdResponseEntity, type CaseFileUpdateResponseEntity } from '../entities';
3
+ import { type RpcPage } from './contract';
4
+ import { type DocumentActor } from './document.contract';
5
+ /** Patrones NATS de `caseFile`: `<servicio>.<recurso>.<acción>`. */
6
+ export declare const CaseFilePatterns: {
7
+ readonly getAll: "gestorDocumental.caseFile.getAll";
8
+ readonly getById: "gestorDocumental.caseFile.getById";
9
+ readonly create: "gestorDocumental.caseFile.create";
10
+ readonly update: "gestorDocumental.caseFile.update";
11
+ readonly addEntry: "gestorDocumental.caseFile.addEntry";
12
+ readonly voidEntry: "gestorDocumental.caseFile.voidEntry";
13
+ readonly share: "gestorDocumental.caseFile.share";
14
+ readonly unshare: "gestorDocumental.caseFile.unshare";
15
+ readonly close: "gestorDocumental.caseFile.close";
16
+ readonly getEntryFile: "gestorDocumental.caseFile.getEntryFile";
17
+ readonly getExport: "gestorDocumental.caseFile.getExport";
18
+ };
19
+ /** Persona u organización relacionada con el expediente (MGDEE54). */
20
+ export interface CaseFileActorInput {
21
+ relation: CaseFileActorRelation;
22
+ actorType: CaseFileActorType;
23
+ identifier?: string | null;
24
+ name: string;
25
+ }
26
+ /** Metadatos del expediente que se ingresan a mano. */
27
+ export interface CaseFileWritePayload {
28
+ title: string;
29
+ subject: string;
30
+ summary?: string | null;
31
+ procedureId: string;
32
+ accessLevel: DocumentAccessLevel;
33
+ hasSensitiveData: boolean;
34
+ actors?: CaseFileActorInput[];
35
+ }
36
+ /** Actuación que se incorpora al índice: un documento del gestor, un archivo subido u otro expediente. */
37
+ export type CaseFileEntryInput = {
38
+ kind: 'Document';
39
+ actuationType: CaseFileActuationType;
40
+ documentId: string;
41
+ } | {
42
+ kind: 'File';
43
+ actuationType: CaseFileActuationType;
44
+ fileId: string;
45
+ fileName: string;
46
+ title: string;
47
+ documentTypeName?: string | null;
48
+ originDate?: string | null;
49
+ author?: string | null;
50
+ keywords: string[];
51
+ accessLevel: DocumentAccessLevel;
52
+ hasSensitiveData: boolean;
53
+ } | {
54
+ kind: 'CaseFile';
55
+ actuationType: CaseFileActuationType;
56
+ linkedCaseFileId: string;
57
+ };
58
+ /** Quién hace la operación (de la sesión) y si puede ver todos los expedientes. */
59
+ interface CaseFileActorPayload {
60
+ actor: DocumentActor;
61
+ viewAll?: boolean;
62
+ }
63
+ /** Ámbito del listado: los expedientes del funcionario (responsable o compartidos con él) o todos. */
64
+ export type CaseFileScope = 'mine' | 'all';
65
+ export interface CaseFileContract {
66
+ [CaseFilePatterns.getAll]: {
67
+ payload: {
68
+ pagination?: {
69
+ page?: number;
70
+ limit?: number;
71
+ };
72
+ filters?: {
73
+ search?: string;
74
+ status?: CaseFileStatus;
75
+ procedureId?: string;
76
+ scope?: CaseFileScope;
77
+ };
78
+ } & CaseFileActorPayload;
79
+ response: RpcPage<CaseFileGetAllResponseEntity[]>;
80
+ };
81
+ /** Por id o por su identificador (`EXP-2026-00001`), que es el del enlace persistente. Queda en el registro de accesos. */
82
+ [CaseFilePatterns.getById]: {
83
+ payload: {
84
+ id: string;
85
+ } & CaseFileActorPayload;
86
+ response: CaseFileGetByIdResponseEntity;
87
+ };
88
+ [CaseFilePatterns.create]: {
89
+ payload: CaseFileWritePayload & {
90
+ actor: DocumentActor;
91
+ };
92
+ response: CaseFileCreateResponseEntity;
93
+ };
94
+ [CaseFilePatterns.update]: {
95
+ payload: CaseFileWritePayload & Pick<CaseFileEntity, 'id'> & {
96
+ actor: DocumentActor;
97
+ };
98
+ response: CaseFileUpdateResponseEntity;
99
+ };
100
+ [CaseFilePatterns.addEntry]: {
101
+ payload: Pick<CaseFileEntity, 'id'> & {
102
+ entry: CaseFileEntryInput;
103
+ } & CaseFileActorPayload;
104
+ response: CaseFileAddEntryResponseEntity;
105
+ };
106
+ /** Deja una actuación sin efecto, con su motivo. No se elimina del índice. */
107
+ [CaseFilePatterns.voidEntry]: {
108
+ payload: Pick<CaseFileEntity, 'id'> & {
109
+ entryId: string;
110
+ reason: string;
111
+ actor: DocumentActor;
112
+ };
113
+ response: CaseFileUpdateResponseEntity;
114
+ };
115
+ [CaseFilePatterns.share]: {
116
+ payload: Pick<CaseFileEntity, 'id'> & {
117
+ employeeIds: string[];
118
+ actor: DocumentActor;
119
+ };
120
+ response: CaseFileUpdateResponseEntity;
121
+ };
122
+ [CaseFilePatterns.unshare]: {
123
+ payload: Pick<CaseFileEntity, 'id'> & {
124
+ participantId: string;
125
+ actor: DocumentActor;
126
+ };
127
+ response: CaseFileUpdateResponseEntity;
128
+ };
129
+ [CaseFilePatterns.close]: {
130
+ payload: Pick<CaseFileEntity, 'id'> & {
131
+ note?: string | null;
132
+ actor: DocumentActor;
133
+ };
134
+ response: CaseFileUpdateResponseEntity;
135
+ };
136
+ /** Archivo de una actuación del índice. Queda en el registro de accesos. */
137
+ [CaseFilePatterns.getEntryFile]: {
138
+ payload: Pick<CaseFileEntity, 'id'> & {
139
+ entryId: string;
140
+ } & CaseFileActorPayload;
141
+ response: CaseFileEntryFileResponseEntity;
142
+ };
143
+ /** Metadatos y archivos para exportar el expediente completo. Queda en la trazabilidad y en el registro de accesos. */
144
+ [CaseFilePatterns.getExport]: {
145
+ payload: Pick<CaseFileEntity, 'id'> & CaseFileActorPayload;
146
+ response: CaseFileExportResponseEntity;
147
+ };
148
+ }
149
+ export {};
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CaseFilePatterns = void 0;
4
+ /** Patrones NATS de `caseFile`: `<servicio>.<recurso>.<acción>`. */
5
+ exports.CaseFilePatterns = {
6
+ getAll: 'gestorDocumental.caseFile.getAll',
7
+ getById: 'gestorDocumental.caseFile.getById',
8
+ create: 'gestorDocumental.caseFile.create',
9
+ update: 'gestorDocumental.caseFile.update',
10
+ addEntry: 'gestorDocumental.caseFile.addEntry',
11
+ voidEntry: 'gestorDocumental.caseFile.voidEntry',
12
+ share: 'gestorDocumental.caseFile.share',
13
+ unshare: 'gestorDocumental.caseFile.unshare',
14
+ close: 'gestorDocumental.caseFile.close',
15
+ getEntryFile: 'gestorDocumental.caseFile.getEntryFile',
16
+ getExport: 'gestorDocumental.caseFile.getExport',
17
+ };
@@ -1,8 +1,12 @@
1
+ import { type CaseFileContract } from './caseFile.contract';
1
2
  import { type DocumentContract } from './document.contract';
2
3
  import { type DocumentTypeContract } from './documentType.contract';
4
+ import { type ProcedureContract } from './procedure.contract';
3
5
  export * from './contract';
4
6
  export * from './document.contract';
5
7
  export * from './documentType.contract';
8
+ export * from './procedure.contract';
9
+ export * from './caseFile.contract';
6
10
  /** Patrones NATS de gestor-documental-ms, por recurso: `gestorDocumental.<recurso>.<acción>`. */
7
11
  export declare const GestorDocumentalPatterns: {
8
12
  readonly documentType: {
@@ -29,6 +33,26 @@ export declare const GestorDocumentalPatterns: {
29
33
  readonly getPublicFile: "gestorDocumental.document.getPublicFile";
30
34
  readonly getFilesFolder: "gestorDocumental.document.getFilesFolder";
31
35
  };
36
+ readonly procedure: {
37
+ readonly getAll: "gestorDocumental.procedure.getAll";
38
+ readonly getById: "gestorDocumental.procedure.getById";
39
+ readonly create: "gestorDocumental.procedure.create";
40
+ readonly update: "gestorDocumental.procedure.update";
41
+ readonly setEnabled: "gestorDocumental.procedure.setEnabled";
42
+ };
43
+ readonly caseFile: {
44
+ readonly getAll: "gestorDocumental.caseFile.getAll";
45
+ readonly getById: "gestorDocumental.caseFile.getById";
46
+ readonly create: "gestorDocumental.caseFile.create";
47
+ readonly update: "gestorDocumental.caseFile.update";
48
+ readonly addEntry: "gestorDocumental.caseFile.addEntry";
49
+ readonly voidEntry: "gestorDocumental.caseFile.voidEntry";
50
+ readonly share: "gestorDocumental.caseFile.share";
51
+ readonly unshare: "gestorDocumental.caseFile.unshare";
52
+ readonly close: "gestorDocumental.caseFile.close";
53
+ readonly getEntryFile: "gestorDocumental.caseFile.getEntryFile";
54
+ readonly getExport: "gestorDocumental.caseFile.getExport";
55
+ };
32
56
  };
33
57
  /** Contrato completo de gestor-documental-ms: la unión de los contratos de sus recursos. */
34
- export type GestorDocumentalContract = DocumentTypeContract & DocumentContract;
58
+ export type GestorDocumentalContract = DocumentTypeContract & DocumentContract & ProcedureContract & CaseFileContract;
@@ -15,13 +15,19 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  exports.GestorDocumentalPatterns = void 0;
18
+ const caseFile_contract_1 = require("./caseFile.contract");
18
19
  const document_contract_1 = require("./document.contract");
19
20
  const documentType_contract_1 = require("./documentType.contract");
21
+ const procedure_contract_1 = require("./procedure.contract");
20
22
  __exportStar(require("./contract"), exports);
21
23
  __exportStar(require("./document.contract"), exports);
22
24
  __exportStar(require("./documentType.contract"), exports);
25
+ __exportStar(require("./procedure.contract"), exports);
26
+ __exportStar(require("./caseFile.contract"), exports);
23
27
  /** Patrones NATS de gestor-documental-ms, por recurso: `gestorDocumental.<recurso>.<acción>`. */
24
28
  exports.GestorDocumentalPatterns = {
25
29
  documentType: documentType_contract_1.DocumentTypePatterns,
26
30
  document: document_contract_1.DocumentPatterns,
31
+ procedure: procedure_contract_1.ProcedurePatterns,
32
+ caseFile: caseFile_contract_1.CaseFilePatterns,
27
33
  };
@@ -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
+ };