@muni-sanfer/types-gestor-documental 0.0.1-beta.3 → 0.0.1-beta.5
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.
- package/dist/base/entities.d.ts +295 -1
- package/dist/base/entities.js +72 -1
- package/dist/contracts/caseFile.contract.d.ts +149 -0
- package/dist/contracts/caseFile.contract.js +17 -0
- package/dist/contracts/document.contract.d.ts +6 -0
- package/dist/contracts/index.d.ts +45 -1
- package/dist/contracts/index.js +9 -0
- package/dist/contracts/partsOffice.contract.d.ts +171 -0
- package/dist/contracts/partsOffice.contract.js +22 -0
- package/dist/contracts/procedure.contract.d.ts +50 -0
- package/dist/contracts/procedure.contract.js +11 -0
- package/dist/entities/caseFile/caseFile.entity.d.ts +169 -0
- package/dist/entities/caseFile/caseFile.entity.js +2 -0
- package/dist/entities/caseFile/index.d.ts +1 -0
- package/dist/entities/caseFile/index.js +17 -0
- package/dist/entities/document/document.entity.d.ts +47 -0
- package/dist/entities/index.d.ts +3 -0
- package/dist/entities/index.js +3 -0
- package/dist/entities/partsOffice/index.d.ts +1 -0
- package/dist/entities/partsOffice/index.js +17 -0
- package/dist/entities/partsOffice/partsOffice.entity.d.ts +98 -0
- package/dist/entities/partsOffice/partsOffice.entity.js +2 -0
- package/dist/entities/procedure/index.d.ts +1 -0
- package/dist/entities/procedure/index.js +17 -0
- package/dist/entities/procedure/procedure.entity.d.ts +20 -0
- package/dist/entities/procedure/procedure.entity.js +2 -0
- package/package.json +1 -1
- package/src/base/entities.ts +348 -1
- package/src/contracts/caseFile.contract.ts +134 -0
- package/src/contracts/document.contract.ts +8 -0
- package/src/contracts/index.ts +14 -1
- package/src/contracts/partsOffice.contract.ts +120 -0
- package/src/contracts/procedure.contract.ts +53 -0
- package/src/entities/caseFile/caseFile.entity.ts +196 -0
- package/src/entities/caseFile/index.ts +1 -0
- package/src/entities/document/document.entity.ts +44 -0
- package/src/entities/index.ts +3 -0
- package/src/entities/partsOffice/index.ts +1 -0
- package/src/entities/partsOffice/partsOffice.entity.ts +103 -0
- package/src/entities/procedure/index.ts +1 -0
- package/src/entities/procedure/procedure.entity.ts +24 -0
package/dist/base/entities.d.ts
CHANGED
|
@@ -33,7 +33,7 @@ export declare const DocumentParticipantStatus: {
|
|
|
33
33
|
Resolved: "Resolved";
|
|
34
34
|
Rejected: "Rejected";
|
|
35
35
|
};
|
|
36
|
-
export type DocumentTrackingAction = 'Created' | 'Updated' | 'Submitted' | 'Visaed' | 'Signed' | 'Rejected' | 'Finished' | 'Discarded' | 'Numbered' | 'NumberAnnulled' | 'Annulled' | 'Delivered' | 'Derived' | 'Reassigned';
|
|
36
|
+
export type DocumentTrackingAction = 'Created' | 'Updated' | 'Submitted' | 'Visaed' | 'Signed' | 'Rejected' | 'Finished' | 'Discarded' | 'Numbered' | 'NumberAnnulled' | 'Annulled' | 'Delivered' | 'Derived' | 'Reassigned' | 'Dispatched' | 'DispatchReturned' | 'Received';
|
|
37
37
|
export declare const DocumentTrackingAction: {
|
|
38
38
|
Created: "Created";
|
|
39
39
|
Updated: "Updated";
|
|
@@ -49,6 +49,26 @@ export declare const DocumentTrackingAction: {
|
|
|
49
49
|
Delivered: "Delivered";
|
|
50
50
|
Derived: "Derived";
|
|
51
51
|
Reassigned: "Reassigned";
|
|
52
|
+
Dispatched: "Dispatched";
|
|
53
|
+
DispatchReturned: "DispatchReturned";
|
|
54
|
+
Received: "Received";
|
|
55
|
+
};
|
|
56
|
+
export type DocumentOrigin = 'Internal' | 'DocDigital';
|
|
57
|
+
export declare const DocumentOrigin: {
|
|
58
|
+
Internal: "Internal";
|
|
59
|
+
DocDigital: "DocDigital";
|
|
60
|
+
};
|
|
61
|
+
export type DocumentDispatchStatus = 'Pending' | 'Dispatched' | 'Returned';
|
|
62
|
+
export declare const DocumentDispatchStatus: {
|
|
63
|
+
Pending: "Pending";
|
|
64
|
+
Dispatched: "Dispatched";
|
|
65
|
+
Returned: "Returned";
|
|
66
|
+
};
|
|
67
|
+
export type DocDigitalInboundStatus = 'Pending' | 'Registered' | 'Returned';
|
|
68
|
+
export declare const DocDigitalInboundStatus: {
|
|
69
|
+
Pending: "Pending";
|
|
70
|
+
Registered: "Registered";
|
|
71
|
+
Returned: "Returned";
|
|
52
72
|
};
|
|
53
73
|
export type DocumentFlowStepType = 'Employee' | 'DirectorateHead';
|
|
54
74
|
export declare const DocumentFlowStepType: {
|
|
@@ -78,6 +98,68 @@ export declare const DocumentInstruction: {
|
|
|
78
98
|
Respond: "Respond";
|
|
79
99
|
Archive: "Archive";
|
|
80
100
|
};
|
|
101
|
+
export type CaseFileStatus = 'Open' | 'Closed';
|
|
102
|
+
export declare const CaseFileStatus: {
|
|
103
|
+
Open: "Open";
|
|
104
|
+
Closed: "Closed";
|
|
105
|
+
};
|
|
106
|
+
export type CaseFileIncorporationMechanism = 'Manual' | 'WebService' | 'Mixed' | 'CitizenRepository' | 'Interoperability';
|
|
107
|
+
export declare const CaseFileIncorporationMechanism: {
|
|
108
|
+
Manual: "Manual";
|
|
109
|
+
WebService: "WebService";
|
|
110
|
+
Mixed: "Mixed";
|
|
111
|
+
CitizenRepository: "CitizenRepository";
|
|
112
|
+
Interoperability: "Interoperability";
|
|
113
|
+
};
|
|
114
|
+
export type CaseFileActuationType = 'AdministrativeAct' | 'Notification' | 'OfficialCommunication' | 'Interoperability' | 'RequestReception' | 'Subfolder' | 'PowerRegistration';
|
|
115
|
+
export declare const CaseFileActuationType: {
|
|
116
|
+
AdministrativeAct: "AdministrativeAct";
|
|
117
|
+
Notification: "Notification";
|
|
118
|
+
OfficialCommunication: "OfficialCommunication";
|
|
119
|
+
Interoperability: "Interoperability";
|
|
120
|
+
RequestReception: "RequestReception";
|
|
121
|
+
Subfolder: "Subfolder";
|
|
122
|
+
PowerRegistration: "PowerRegistration";
|
|
123
|
+
};
|
|
124
|
+
export type CaseFileEntryKind = 'Document' | 'File' | 'CaseFile';
|
|
125
|
+
export declare const CaseFileEntryKind: {
|
|
126
|
+
Document: "Document";
|
|
127
|
+
File: "File";
|
|
128
|
+
CaseFile: "CaseFile";
|
|
129
|
+
};
|
|
130
|
+
export type CaseFileActorRelation = 'Responsible' | 'Interested' | 'Author' | 'Referred' | 'Recipient' | 'MinisterOfFaith';
|
|
131
|
+
export declare const CaseFileActorRelation: {
|
|
132
|
+
Responsible: "Responsible";
|
|
133
|
+
Interested: "Interested";
|
|
134
|
+
Author: "Author";
|
|
135
|
+
Referred: "Referred";
|
|
136
|
+
Recipient: "Recipient";
|
|
137
|
+
MinisterOfFaith: "MinisterOfFaith";
|
|
138
|
+
};
|
|
139
|
+
export type CaseFileActorType = 'Citizen' | 'Foreigner' | 'PrivateInstitution' | 'Official';
|
|
140
|
+
export declare const CaseFileActorType: {
|
|
141
|
+
Citizen: "Citizen";
|
|
142
|
+
Foreigner: "Foreigner";
|
|
143
|
+
PrivateInstitution: "PrivateInstitution";
|
|
144
|
+
Official: "Official";
|
|
145
|
+
};
|
|
146
|
+
export type CaseFileTrackingAction = 'Created' | 'Updated' | 'EntryAdded' | 'EntryVoided' | 'ParticipantAdded' | 'ParticipantRemoved' | 'Closed' | 'Exported';
|
|
147
|
+
export declare const CaseFileTrackingAction: {
|
|
148
|
+
Created: "Created";
|
|
149
|
+
Updated: "Updated";
|
|
150
|
+
EntryAdded: "EntryAdded";
|
|
151
|
+
EntryVoided: "EntryVoided";
|
|
152
|
+
ParticipantAdded: "ParticipantAdded";
|
|
153
|
+
ParticipantRemoved: "ParticipantRemoved";
|
|
154
|
+
Closed: "Closed";
|
|
155
|
+
Exported: "Exported";
|
|
156
|
+
};
|
|
157
|
+
export type CaseFileAccessAction = 'Viewed' | 'FileDownloaded' | 'Exported';
|
|
158
|
+
export declare const CaseFileAccessAction: {
|
|
159
|
+
Viewed: "Viewed";
|
|
160
|
+
FileDownloaded: "FileDownloaded";
|
|
161
|
+
Exported: "Exported";
|
|
162
|
+
};
|
|
81
163
|
export interface DocumentTypeEntity {
|
|
82
164
|
id: string;
|
|
83
165
|
name: string;
|
|
@@ -111,6 +193,12 @@ export interface DocumentEntity {
|
|
|
111
193
|
annulledAt?: string | null;
|
|
112
194
|
annulmentReason?: string | null;
|
|
113
195
|
responseDueAt?: string | null;
|
|
196
|
+
origin: DocumentOrigin;
|
|
197
|
+
intakeNumber?: number | null;
|
|
198
|
+
intakeYear?: number | null;
|
|
199
|
+
externalFolio?: string | null;
|
|
200
|
+
externalSender?: string | null;
|
|
201
|
+
externalDate?: string | null;
|
|
114
202
|
replyTo?: DocumentEntity | null;
|
|
115
203
|
replyToDocumentId?: string | null;
|
|
116
204
|
replies?: DocumentEntity[];
|
|
@@ -132,6 +220,10 @@ export interface DocumentEntity {
|
|
|
132
220
|
annulledNumbers?: DocumentAnnulledNumberEntity[];
|
|
133
221
|
recipients?: DocumentRecipientEntity[];
|
|
134
222
|
deliveries?: DocumentDeliveryEntity[];
|
|
223
|
+
caseFileEntries?: CaseFileEntryEntity[];
|
|
224
|
+
externalRecipients?: DocumentExternalRecipientEntity[];
|
|
225
|
+
dispatch?: DocumentDispatchEntity | null;
|
|
226
|
+
docDigitalInbound?: DocDigitalInboundEntity | null;
|
|
135
227
|
deleted: boolean;
|
|
136
228
|
createdAt: string;
|
|
137
229
|
updatedAt: string;
|
|
@@ -231,3 +323,205 @@ export interface DocumentTypeFlowStepEntity {
|
|
|
231
323
|
documentTypeId: string;
|
|
232
324
|
createdAt: string;
|
|
233
325
|
}
|
|
326
|
+
export interface ProcedureEntity {
|
|
327
|
+
id: string;
|
|
328
|
+
name: string;
|
|
329
|
+
cpatId?: string | null;
|
|
330
|
+
cpatCode?: string | null;
|
|
331
|
+
description?: string | null;
|
|
332
|
+
enabled: boolean;
|
|
333
|
+
caseFiles?: CaseFileEntity[];
|
|
334
|
+
deleted: boolean;
|
|
335
|
+
createdAt: string;
|
|
336
|
+
updatedAt: string;
|
|
337
|
+
}
|
|
338
|
+
export interface CaseFileSequenceEntity {
|
|
339
|
+
year: number;
|
|
340
|
+
next: number;
|
|
341
|
+
}
|
|
342
|
+
export interface CaseFileEntity {
|
|
343
|
+
id: string;
|
|
344
|
+
code: string;
|
|
345
|
+
year: number;
|
|
346
|
+
number: number;
|
|
347
|
+
title: string;
|
|
348
|
+
subject: string;
|
|
349
|
+
summary?: string | null;
|
|
350
|
+
status: CaseFileStatus;
|
|
351
|
+
accessLevel: DocumentAccessLevel;
|
|
352
|
+
hasSensitiveData: boolean;
|
|
353
|
+
incorporationMechanism: CaseFileIncorporationMechanism;
|
|
354
|
+
schemaVersion: string;
|
|
355
|
+
procedure?: ProcedureEntity;
|
|
356
|
+
procedureId: string;
|
|
357
|
+
responsibleEmployeeId: string;
|
|
358
|
+
responsibleFullName: string;
|
|
359
|
+
responsiblePosition?: string | null;
|
|
360
|
+
closedAt?: string | null;
|
|
361
|
+
closedByEmployeeId?: string | null;
|
|
362
|
+
closedByFullName?: string | null;
|
|
363
|
+
closingNote?: string | null;
|
|
364
|
+
participants?: CaseFileParticipantEntity[];
|
|
365
|
+
actors?: CaseFileActorEntity[];
|
|
366
|
+
entries?: CaseFileEntryEntity[];
|
|
367
|
+
linkedFrom?: CaseFileEntryEntity[];
|
|
368
|
+
trackings?: CaseFileTrackingEntity[];
|
|
369
|
+
metadataChanges?: CaseFileMetadataChangeEntity[];
|
|
370
|
+
accesses?: CaseFileAccessEntity[];
|
|
371
|
+
createdAt: string;
|
|
372
|
+
updatedAt: string;
|
|
373
|
+
}
|
|
374
|
+
export interface CaseFileParticipantEntity {
|
|
375
|
+
id: string;
|
|
376
|
+
employeeId: string;
|
|
377
|
+
fullName: string;
|
|
378
|
+
position?: string | null;
|
|
379
|
+
addedByEmployeeId: string;
|
|
380
|
+
addedByFullName: string;
|
|
381
|
+
caseFile?: CaseFileEntity;
|
|
382
|
+
caseFileId: string;
|
|
383
|
+
createdAt: string;
|
|
384
|
+
}
|
|
385
|
+
export interface CaseFileActorEntity {
|
|
386
|
+
id: string;
|
|
387
|
+
relation: CaseFileActorRelation;
|
|
388
|
+
actorType: CaseFileActorType;
|
|
389
|
+
identifier?: string | null;
|
|
390
|
+
name: string;
|
|
391
|
+
caseFile?: CaseFileEntity;
|
|
392
|
+
caseFileId: string;
|
|
393
|
+
createdAt: string;
|
|
394
|
+
}
|
|
395
|
+
export interface CaseFileEntryEntity {
|
|
396
|
+
id: string;
|
|
397
|
+
sequence: number;
|
|
398
|
+
kind: CaseFileEntryKind;
|
|
399
|
+
actuationType: CaseFileActuationType;
|
|
400
|
+
title: string;
|
|
401
|
+
document?: DocumentEntity | null;
|
|
402
|
+
documentId?: string | null;
|
|
403
|
+
fileId?: string | null;
|
|
404
|
+
fileName?: string | null;
|
|
405
|
+
documentTypeName?: string | null;
|
|
406
|
+
originDate?: string | null;
|
|
407
|
+
author?: string | null;
|
|
408
|
+
keywords: string[];
|
|
409
|
+
accessLevel?: DocumentAccessLevel | null;
|
|
410
|
+
hasSensitiveData?: boolean | null;
|
|
411
|
+
linkedCaseFile?: CaseFileEntity | null;
|
|
412
|
+
linkedCaseFileId?: string | null;
|
|
413
|
+
sha256?: string | null;
|
|
414
|
+
size?: number | null;
|
|
415
|
+
hasAdvancedSignature: boolean;
|
|
416
|
+
incorporatedByEmployeeId: string;
|
|
417
|
+
incorporatedByFullName: string;
|
|
418
|
+
voidedAt?: string | null;
|
|
419
|
+
voidedByEmployeeId?: string | null;
|
|
420
|
+
voidedByFullName?: string | null;
|
|
421
|
+
voidReason?: string | null;
|
|
422
|
+
caseFile?: CaseFileEntity;
|
|
423
|
+
caseFileId: string;
|
|
424
|
+
createdAt: string;
|
|
425
|
+
}
|
|
426
|
+
export interface CaseFileTrackingEntity {
|
|
427
|
+
id: string;
|
|
428
|
+
action: CaseFileTrackingAction;
|
|
429
|
+
observation?: string | null;
|
|
430
|
+
employeeId?: string | null;
|
|
431
|
+
employeeFullName?: string | null;
|
|
432
|
+
caseFile?: CaseFileEntity;
|
|
433
|
+
caseFileId: string;
|
|
434
|
+
createdAt: string;
|
|
435
|
+
}
|
|
436
|
+
export interface CaseFileMetadataChangeEntity {
|
|
437
|
+
id: string;
|
|
438
|
+
field: string;
|
|
439
|
+
previousValue?: string | null;
|
|
440
|
+
newValue?: string | null;
|
|
441
|
+
employeeId: string;
|
|
442
|
+
employeeFullName: string;
|
|
443
|
+
caseFile?: CaseFileEntity;
|
|
444
|
+
caseFileId: string;
|
|
445
|
+
createdAt: string;
|
|
446
|
+
}
|
|
447
|
+
export interface CaseFileAccessEntity {
|
|
448
|
+
id: string;
|
|
449
|
+
action: CaseFileAccessAction;
|
|
450
|
+
entryId?: string | null;
|
|
451
|
+
employeeId: string;
|
|
452
|
+
employeeFullName: string;
|
|
453
|
+
caseFile?: CaseFileEntity;
|
|
454
|
+
caseFileId: string;
|
|
455
|
+
createdAt: string;
|
|
456
|
+
}
|
|
457
|
+
export interface DocumentExternalRecipientEntity {
|
|
458
|
+
id: string;
|
|
459
|
+
entityId: number;
|
|
460
|
+
entityName: string;
|
|
461
|
+
userId?: number | null;
|
|
462
|
+
userName?: string | null;
|
|
463
|
+
userPosition?: string | null;
|
|
464
|
+
document?: DocumentEntity;
|
|
465
|
+
documentId: string;
|
|
466
|
+
createdAt: string;
|
|
467
|
+
}
|
|
468
|
+
export interface DocumentDispatchEntity {
|
|
469
|
+
id: string;
|
|
470
|
+
status: DocumentDispatchStatus;
|
|
471
|
+
folio?: string | null;
|
|
472
|
+
docDigitalTypeId?: number | null;
|
|
473
|
+
docDigitalTypeName?: string | null;
|
|
474
|
+
docDigitalDocumentId?: string | null;
|
|
475
|
+
docDigitalRequestId?: string | null;
|
|
476
|
+
dispatchedAt?: string | null;
|
|
477
|
+
dispatchedByEmployeeId?: string | null;
|
|
478
|
+
dispatchedByFullName?: string | null;
|
|
479
|
+
returnedAt?: string | null;
|
|
480
|
+
returnedByEmployeeId?: string | null;
|
|
481
|
+
returnedByFullName?: string | null;
|
|
482
|
+
returnReason?: string | null;
|
|
483
|
+
document?: DocumentEntity;
|
|
484
|
+
documentId: string;
|
|
485
|
+
createdAt: string;
|
|
486
|
+
updatedAt: string;
|
|
487
|
+
}
|
|
488
|
+
export interface DocDigitalInboundEntity {
|
|
489
|
+
id: string;
|
|
490
|
+
docDigitalDocumentId: string;
|
|
491
|
+
docDigitalRequestId?: string | null;
|
|
492
|
+
status: DocDigitalInboundStatus;
|
|
493
|
+
subject: string;
|
|
494
|
+
description?: string | null;
|
|
495
|
+
folio?: string | null;
|
|
496
|
+
folioDate?: string | null;
|
|
497
|
+
typeName?: string | null;
|
|
498
|
+
reserved: boolean;
|
|
499
|
+
senderEntityId?: number | null;
|
|
500
|
+
senderEntityName?: string | null;
|
|
501
|
+
senderName?: string | null;
|
|
502
|
+
senderPosition?: string | null;
|
|
503
|
+
fileId?: string | null;
|
|
504
|
+
fileName?: string | null;
|
|
505
|
+
attachments: JsonValue;
|
|
506
|
+
registeredAt?: string | null;
|
|
507
|
+
registeredByEmployeeId?: string | null;
|
|
508
|
+
registeredByFullName?: string | null;
|
|
509
|
+
acknowledgedAt?: string | null;
|
|
510
|
+
acknowledgeError?: string | null;
|
|
511
|
+
returnedAt?: string | null;
|
|
512
|
+
returnedByEmployeeId?: string | null;
|
|
513
|
+
returnedByFullName?: string | null;
|
|
514
|
+
returnReason?: string | null;
|
|
515
|
+
document?: DocumentEntity | null;
|
|
516
|
+
documentId?: string | null;
|
|
517
|
+
createdAt: string;
|
|
518
|
+
updatedAt: string;
|
|
519
|
+
}
|
|
520
|
+
export interface IntakeSequenceEntity {
|
|
521
|
+
year: number;
|
|
522
|
+
next: number;
|
|
523
|
+
}
|
|
524
|
+
type JsonValue = string | number | boolean | {
|
|
525
|
+
[key in string]?: JsonValue;
|
|
526
|
+
} | Array<JsonValue> | null;
|
|
527
|
+
export {};
|
package/dist/base/entities.js
CHANGED
|
@@ -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.DocDigitalInboundStatus = exports.DocumentDispatchStatus = exports.DocumentOrigin = 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',
|
|
@@ -47,6 +47,23 @@ exports.DocumentTrackingAction = {
|
|
|
47
47
|
Delivered: 'Delivered',
|
|
48
48
|
Derived: 'Derived',
|
|
49
49
|
Reassigned: 'Reassigned',
|
|
50
|
+
Dispatched: 'Dispatched',
|
|
51
|
+
DispatchReturned: 'DispatchReturned',
|
|
52
|
+
Received: 'Received',
|
|
53
|
+
};
|
|
54
|
+
exports.DocumentOrigin = {
|
|
55
|
+
Internal: 'Internal',
|
|
56
|
+
DocDigital: 'DocDigital',
|
|
57
|
+
};
|
|
58
|
+
exports.DocumentDispatchStatus = {
|
|
59
|
+
Pending: 'Pending',
|
|
60
|
+
Dispatched: 'Dispatched',
|
|
61
|
+
Returned: 'Returned',
|
|
62
|
+
};
|
|
63
|
+
exports.DocDigitalInboundStatus = {
|
|
64
|
+
Pending: 'Pending',
|
|
65
|
+
Registered: 'Registered',
|
|
66
|
+
Returned: 'Returned',
|
|
50
67
|
};
|
|
51
68
|
exports.DocumentFlowStepType = {
|
|
52
69
|
Employee: 'Employee',
|
|
@@ -71,3 +88,57 @@ exports.DocumentInstruction = {
|
|
|
71
88
|
Respond: 'Respond',
|
|
72
89
|
Archive: 'Archive',
|
|
73
90
|
};
|
|
91
|
+
exports.CaseFileStatus = {
|
|
92
|
+
Open: 'Open',
|
|
93
|
+
Closed: 'Closed',
|
|
94
|
+
};
|
|
95
|
+
exports.CaseFileIncorporationMechanism = {
|
|
96
|
+
Manual: 'Manual',
|
|
97
|
+
WebService: 'WebService',
|
|
98
|
+
Mixed: 'Mixed',
|
|
99
|
+
CitizenRepository: 'CitizenRepository',
|
|
100
|
+
Interoperability: 'Interoperability',
|
|
101
|
+
};
|
|
102
|
+
exports.CaseFileActuationType = {
|
|
103
|
+
AdministrativeAct: 'AdministrativeAct',
|
|
104
|
+
Notification: 'Notification',
|
|
105
|
+
OfficialCommunication: 'OfficialCommunication',
|
|
106
|
+
Interoperability: 'Interoperability',
|
|
107
|
+
RequestReception: 'RequestReception',
|
|
108
|
+
Subfolder: 'Subfolder',
|
|
109
|
+
PowerRegistration: 'PowerRegistration',
|
|
110
|
+
};
|
|
111
|
+
exports.CaseFileEntryKind = {
|
|
112
|
+
Document: 'Document',
|
|
113
|
+
File: 'File',
|
|
114
|
+
CaseFile: 'CaseFile',
|
|
115
|
+
};
|
|
116
|
+
exports.CaseFileActorRelation = {
|
|
117
|
+
Responsible: 'Responsible',
|
|
118
|
+
Interested: 'Interested',
|
|
119
|
+
Author: 'Author',
|
|
120
|
+
Referred: 'Referred',
|
|
121
|
+
Recipient: 'Recipient',
|
|
122
|
+
MinisterOfFaith: 'MinisterOfFaith',
|
|
123
|
+
};
|
|
124
|
+
exports.CaseFileActorType = {
|
|
125
|
+
Citizen: 'Citizen',
|
|
126
|
+
Foreigner: 'Foreigner',
|
|
127
|
+
PrivateInstitution: 'PrivateInstitution',
|
|
128
|
+
Official: 'Official',
|
|
129
|
+
};
|
|
130
|
+
exports.CaseFileTrackingAction = {
|
|
131
|
+
Created: 'Created',
|
|
132
|
+
Updated: 'Updated',
|
|
133
|
+
EntryAdded: 'EntryAdded',
|
|
134
|
+
EntryVoided: 'EntryVoided',
|
|
135
|
+
ParticipantAdded: 'ParticipantAdded',
|
|
136
|
+
ParticipantRemoved: 'ParticipantRemoved',
|
|
137
|
+
Closed: 'Closed',
|
|
138
|
+
Exported: 'Exported',
|
|
139
|
+
};
|
|
140
|
+
exports.CaseFileAccessAction = {
|
|
141
|
+
Viewed: 'Viewed',
|
|
142
|
+
FileDownloaded: 'FileDownloaded',
|
|
143
|
+
Exported: 'Exported',
|
|
144
|
+
};
|
|
@@ -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
|
+
};
|
|
@@ -73,9 +73,15 @@ export interface DocumentWritePayload extends Pick<DocumentEntity, 'subject' | '
|
|
|
73
73
|
recipients?: DocumentRecipientInput[];
|
|
74
74
|
responseDueAt?: string | null;
|
|
75
75
|
replyToDocumentId?: string | null;
|
|
76
|
+
externalRecipients?: DocumentExternalRecipientInput[];
|
|
76
77
|
action?: 'Submit';
|
|
77
78
|
actor: DocumentActor;
|
|
78
79
|
}
|
|
80
|
+
/** Destinatario externo: una institución de DocDigital y, si se indica, uno de sus usuarios. */
|
|
81
|
+
export interface DocumentExternalRecipientInput {
|
|
82
|
+
entityId: number;
|
|
83
|
+
userId?: number | null;
|
|
84
|
+
}
|
|
79
85
|
/**
|
|
80
86
|
* Qué se envía y qué se responde en cada patrón. Generado desde los handlers y los DTO del microservicio.
|
|
81
87
|
*/
|
|
@@ -1,8 +1,14 @@
|
|
|
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 PartsOfficeContract } from './partsOffice.contract';
|
|
5
|
+
import { type ProcedureContract } from './procedure.contract';
|
|
3
6
|
export * from './contract';
|
|
4
7
|
export * from './document.contract';
|
|
5
8
|
export * from './documentType.contract';
|
|
9
|
+
export * from './procedure.contract';
|
|
10
|
+
export * from './caseFile.contract';
|
|
11
|
+
export * from './partsOffice.contract';
|
|
6
12
|
/** Patrones NATS de gestor-documental-ms, por recurso: `gestorDocumental.<recurso>.<acción>`. */
|
|
7
13
|
export declare const GestorDocumentalPatterns: {
|
|
8
14
|
readonly documentType: {
|
|
@@ -29,6 +35,44 @@ export declare const GestorDocumentalPatterns: {
|
|
|
29
35
|
readonly getPublicFile: "gestorDocumental.document.getPublicFile";
|
|
30
36
|
readonly getFilesFolder: "gestorDocumental.document.getFilesFolder";
|
|
31
37
|
};
|
|
38
|
+
readonly procedure: {
|
|
39
|
+
readonly getAll: "gestorDocumental.procedure.getAll";
|
|
40
|
+
readonly getById: "gestorDocumental.procedure.getById";
|
|
41
|
+
readonly create: "gestorDocumental.procedure.create";
|
|
42
|
+
readonly update: "gestorDocumental.procedure.update";
|
|
43
|
+
readonly setEnabled: "gestorDocumental.procedure.setEnabled";
|
|
44
|
+
};
|
|
45
|
+
readonly caseFile: {
|
|
46
|
+
readonly getAll: "gestorDocumental.caseFile.getAll";
|
|
47
|
+
readonly getById: "gestorDocumental.caseFile.getById";
|
|
48
|
+
readonly create: "gestorDocumental.caseFile.create";
|
|
49
|
+
readonly update: "gestorDocumental.caseFile.update";
|
|
50
|
+
readonly addEntry: "gestorDocumental.caseFile.addEntry";
|
|
51
|
+
readonly voidEntry: "gestorDocumental.caseFile.voidEntry";
|
|
52
|
+
readonly share: "gestorDocumental.caseFile.share";
|
|
53
|
+
readonly unshare: "gestorDocumental.caseFile.unshare";
|
|
54
|
+
readonly close: "gestorDocumental.caseFile.close";
|
|
55
|
+
readonly getEntryFile: "gestorDocumental.caseFile.getEntryFile";
|
|
56
|
+
readonly getExport: "gestorDocumental.caseFile.getExport";
|
|
57
|
+
};
|
|
58
|
+
readonly partsOffice: {
|
|
59
|
+
readonly getStatus: "gestorDocumental.partsOffice.getStatus";
|
|
60
|
+
readonly getSummary: "gestorDocumental.partsOffice.getSummary";
|
|
61
|
+
readonly getEntities: "gestorDocumental.partsOffice.getEntities";
|
|
62
|
+
readonly getUsers: "gestorDocumental.partsOffice.getUsers";
|
|
63
|
+
readonly getDocumentTypes: "gestorDocumental.partsOffice.getDocumentTypes";
|
|
64
|
+
readonly getDispatches: "gestorDocumental.partsOffice.getDispatches";
|
|
65
|
+
readonly dispatch: "gestorDocumental.partsOffice.dispatch";
|
|
66
|
+
readonly returnDispatch: "gestorDocumental.partsOffice.returnDispatch";
|
|
67
|
+
readonly resendDispatch: "gestorDocumental.partsOffice.resendDispatch";
|
|
68
|
+
readonly getDispatchFile: "gestorDocumental.partsOffice.getDispatchFile";
|
|
69
|
+
readonly getInbound: "gestorDocumental.partsOffice.getInbound";
|
|
70
|
+
readonly syncInbound: "gestorDocumental.partsOffice.syncInbound";
|
|
71
|
+
readonly registerInbound: "gestorDocumental.partsOffice.registerInbound";
|
|
72
|
+
readonly acknowledgeInbound: "gestorDocumental.partsOffice.acknowledgeInbound";
|
|
73
|
+
readonly returnInbound: "gestorDocumental.partsOffice.returnInbound";
|
|
74
|
+
readonly getInboundFile: "gestorDocumental.partsOffice.getInboundFile";
|
|
75
|
+
};
|
|
32
76
|
};
|
|
33
77
|
/** Contrato completo de gestor-documental-ms: la unión de los contratos de sus recursos. */
|
|
34
|
-
export type GestorDocumentalContract = DocumentTypeContract & DocumentContract;
|
|
78
|
+
export type GestorDocumentalContract = DocumentTypeContract & DocumentContract & ProcedureContract & CaseFileContract & PartsOfficeContract;
|
package/dist/contracts/index.js
CHANGED
|
@@ -15,13 +15,22 @@ 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 partsOffice_contract_1 = require("./partsOffice.contract");
|
|
22
|
+
const procedure_contract_1 = require("./procedure.contract");
|
|
20
23
|
__exportStar(require("./contract"), exports);
|
|
21
24
|
__exportStar(require("./document.contract"), exports);
|
|
22
25
|
__exportStar(require("./documentType.contract"), exports);
|
|
26
|
+
__exportStar(require("./procedure.contract"), exports);
|
|
27
|
+
__exportStar(require("./caseFile.contract"), exports);
|
|
28
|
+
__exportStar(require("./partsOffice.contract"), exports);
|
|
23
29
|
/** Patrones NATS de gestor-documental-ms, por recurso: `gestorDocumental.<recurso>.<acción>`. */
|
|
24
30
|
exports.GestorDocumentalPatterns = {
|
|
25
31
|
documentType: documentType_contract_1.DocumentTypePatterns,
|
|
26
32
|
document: document_contract_1.DocumentPatterns,
|
|
33
|
+
procedure: procedure_contract_1.ProcedurePatterns,
|
|
34
|
+
caseFile: caseFile_contract_1.CaseFilePatterns,
|
|
35
|
+
partsOffice: partsOffice_contract_1.PartsOfficePatterns,
|
|
27
36
|
};
|