@muni-sanfer/types-gestor-documental 0.0.1-beta.90 → 0.0.1-beta.91
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/contracts/index.d.ts +2 -0
- package/dist/contracts/partsOffice.contract.d.ts +24 -2
- package/dist/contracts/partsOffice.contract.js +2 -0
- package/dist/entities/partsOffice/partsOffice.entity.d.ts +26 -1
- package/package.json +1 -1
- package/src/contracts/partsOffice.contract.ts +27 -2
- package/src/entities/partsOffice/partsOffice.entity.ts +29 -1
|
@@ -156,6 +156,8 @@ export declare const GestorDocumentalPatterns: {
|
|
|
156
156
|
readonly getDispatches: "gestorDocumental.partsOffice.getDispatches";
|
|
157
157
|
readonly dispatch: "gestorDocumental.partsOffice.dispatch";
|
|
158
158
|
readonly dispatchInGestor: "gestorDocumental.partsOffice.dispatchInGestor";
|
|
159
|
+
readonly matchInternalUsers: "gestorDocumental.partsOffice.matchInternalUsers";
|
|
160
|
+
readonly getInternalRecipients: "gestorDocumental.partsOffice.getInternalRecipients";
|
|
159
161
|
readonly returnDispatch: "gestorDocumental.partsOffice.returnDispatch";
|
|
160
162
|
readonly resendDispatch: "gestorDocumental.partsOffice.resendDispatch";
|
|
161
163
|
readonly getDispatchFile: "gestorDocumental.partsOffice.getDispatchFile";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type CommunicationMeans, type DocumentAccessLevel, type DocumentInstruction } from '../base/entities';
|
|
2
|
-
import { type CaseFileAddEntryResponseEntity, type DocDigitalDocumentTypeEntity, type DocDigitalEntityEntity, type PartsOfficeInboundEntity, type DocDigitalUserEntity, type EnablementPersonInput, type PartsOfficeEnablementEntity, type PartsOfficeDispatchEntity, type PartsOfficeFileEntity, type PartsOfficeOkResponseEntity, type PartsOfficeRegisterResponseEntity, type PartsOfficeStatusEntity, type PartsOfficeSummaryEntity, type PartsOfficeSyncResponseEntity } from '../entities';
|
|
2
|
+
import { type CaseFileAddEntryResponseEntity, type DocDigitalDocumentTypeEntity, type DocDigitalEntityEntity, type PartsOfficeInboundEntity, type DocDigitalUserEntity, type EnablementPersonInput, type PartsOfficeEnablementEntity, type PartsOfficeDispatchEntity, type DocDigitalInternalPersonInput, type PartsOfficeInternalRecipientEntity, type DocDigitalInternalMatchEntity, type PartsOfficeFileEntity, type PartsOfficeOkResponseEntity, type PartsOfficeRegisterResponseEntity, type PartsOfficeStatusEntity, type PartsOfficeSummaryEntity, type PartsOfficeSyncResponseEntity } from '../entities';
|
|
3
3
|
import { type RpcPage } from './contract';
|
|
4
4
|
import { type DocumentActor, type DocumentExternalRecipientInput } from './document.contract';
|
|
5
5
|
/** Patrones NATS de `partsOffice` (Oficina de Partes y DocDigital): `<servicio>.<recurso>.<acción>`. */
|
|
@@ -13,6 +13,8 @@ export declare const PartsOfficePatterns: {
|
|
|
13
13
|
readonly getDispatches: "gestorDocumental.partsOffice.getDispatches";
|
|
14
14
|
readonly dispatch: "gestorDocumental.partsOffice.dispatch";
|
|
15
15
|
readonly dispatchInGestor: "gestorDocumental.partsOffice.dispatchInGestor";
|
|
16
|
+
readonly matchInternalUsers: "gestorDocumental.partsOffice.matchInternalUsers";
|
|
17
|
+
readonly getInternalRecipients: "gestorDocumental.partsOffice.getInternalRecipients";
|
|
16
18
|
readonly returnDispatch: "gestorDocumental.partsOffice.returnDispatch";
|
|
17
19
|
readonly resendDispatch: "gestorDocumental.partsOffice.resendDispatch";
|
|
18
20
|
readonly getDispatchFile: "gestorDocumental.partsOffice.getDispatchFile";
|
|
@@ -121,18 +123,38 @@ export interface PartsOfficeContract {
|
|
|
121
123
|
};
|
|
122
124
|
response: RpcPage<PartsOfficeDispatchEntity[]>;
|
|
123
125
|
};
|
|
124
|
-
/**
|
|
126
|
+
/**
|
|
127
|
+
* Despacha por DocDigital, con el número del documento como folio. `operatorRun`: RUN de quien despacha.
|
|
128
|
+
* `internalPeople`: si también va a sus destinatarios del gestor por DocDigital, a quién (lo arma el gateway); si
|
|
129
|
+
* alguno no tiene usuario en DocDigital, no se despacha.
|
|
130
|
+
*/
|
|
125
131
|
[PartsOfficePatterns.dispatch]: {
|
|
126
132
|
payload: {
|
|
127
133
|
id: string;
|
|
128
134
|
docDigitalTypeId: number;
|
|
129
135
|
operatorRun?: string | null;
|
|
136
|
+
internalPeople?: DocDigitalInternalPersonInput[];
|
|
130
137
|
actor: DocumentActor;
|
|
131
138
|
};
|
|
132
139
|
response: PartsOfficeOkResponseEntity & {
|
|
133
140
|
docDigitalDocumentId: string;
|
|
134
141
|
};
|
|
135
142
|
};
|
|
143
|
+
/** Los destinatarios del gestor de un despacho (personas y áreas), para resolver a quién van en DocDigital. */
|
|
144
|
+
[PartsOfficePatterns.getInternalRecipients]: {
|
|
145
|
+
payload: {
|
|
146
|
+
id: string;
|
|
147
|
+
};
|
|
148
|
+
response: PartsOfficeInternalRecipientEntity[];
|
|
149
|
+
};
|
|
150
|
+
/** Cruza los destinatarios del gestor de un despacho con los usuarios de DocDigital de quien lo emite, por RUN. */
|
|
151
|
+
[PartsOfficePatterns.matchInternalUsers]: {
|
|
152
|
+
payload: {
|
|
153
|
+
id: string;
|
|
154
|
+
people: DocDigitalInternalPersonInput[];
|
|
155
|
+
};
|
|
156
|
+
response: DocDigitalInternalMatchEntity[];
|
|
157
|
+
};
|
|
136
158
|
/**
|
|
137
159
|
* Despacha en el gestor, sin DocDigital: el documento queda finalizado y llega a los buzones de sus destinatarios.
|
|
138
160
|
* No si tiene destinatarios de otras instituciones (van por DocDigital o por contingencia).
|
|
@@ -12,6 +12,8 @@ exports.PartsOfficePatterns = {
|
|
|
12
12
|
getDispatches: 'gestorDocumental.partsOffice.getDispatches',
|
|
13
13
|
dispatch: 'gestorDocumental.partsOffice.dispatch',
|
|
14
14
|
dispatchInGestor: 'gestorDocumental.partsOffice.dispatchInGestor',
|
|
15
|
+
matchInternalUsers: 'gestorDocumental.partsOffice.matchInternalUsers',
|
|
16
|
+
getInternalRecipients: 'gestorDocumental.partsOffice.getInternalRecipients',
|
|
15
17
|
returnDispatch: 'gestorDocumental.partsOffice.returnDispatch',
|
|
16
18
|
resendDispatch: 'gestorDocumental.partsOffice.resendDispatch',
|
|
17
19
|
getDispatchFile: 'gestorDocumental.partsOffice.getDispatchFile',
|
|
@@ -28,12 +28,37 @@ export interface PartsOfficeSummaryEntity {
|
|
|
28
28
|
toDispatch: number;
|
|
29
29
|
received: number;
|
|
30
30
|
}
|
|
31
|
-
/**
|
|
31
|
+
/** Destinatario del gestor (una persona o un área) de un documento por despachar. */
|
|
32
|
+
export interface PartsOfficeInternalRecipientEntity {
|
|
33
|
+
type: 'Employee' | 'Directorate' | 'Department';
|
|
34
|
+
employeeId: string | null;
|
|
35
|
+
directorateCodeReference: number | null;
|
|
36
|
+
departmentId: string | null;
|
|
37
|
+
name: string;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* A quién de DocDigital va un destinatario del gestor: la persona, o la jefatura del área (director o encargado). Lo
|
|
41
|
+
* arma el gateway con su RUN; `key` lo identifica y `label` dice de qué destinatario viene.
|
|
42
|
+
*/
|
|
43
|
+
export interface DocDigitalInternalPersonInput {
|
|
44
|
+
key: string;
|
|
45
|
+
label: string;
|
|
46
|
+
fullName: string;
|
|
47
|
+
run: string;
|
|
48
|
+
}
|
|
49
|
+
/** El cruce de un destinatario del gestor con su usuario de DocDigital (por RUN); sin usuario, `userId` es `null`. */
|
|
50
|
+
export interface DocDigitalInternalMatchEntity extends DocDigitalInternalPersonInput {
|
|
51
|
+
userId: number | null;
|
|
52
|
+
userName: string | null;
|
|
53
|
+
}
|
|
54
|
+
/** Documento que despacha Oficina de Partes: en el gestor y, si corresponde, por DocDigital. */
|
|
32
55
|
export interface PartsOfficeDispatchEntity extends DocumentDispatchResponseEntity {
|
|
33
56
|
document: DocumentLinkEntity & {
|
|
34
57
|
accessLevel: string;
|
|
35
58
|
};
|
|
36
59
|
externalRecipients: DocumentExternalRecipientResponseEntity[];
|
|
60
|
+
/** Sus destinatarios del gestor: se le despachan en el gestor y, si Partes lo elige, también por DocDigital. */
|
|
61
|
+
internalRecipients: PartsOfficeInternalRecipientEntity[];
|
|
37
62
|
/** A nombre de quién sale: la entidad emisora del tipo documental o la municipalidad. */
|
|
38
63
|
issuerName: string;
|
|
39
64
|
/** Si está por foliar: lo necesario para proponer la estampa del folio sobre su vista previa. */
|
package/package.json
CHANGED
|
@@ -8,6 +8,9 @@ import {
|
|
|
8
8
|
type EnablementPersonInput,
|
|
9
9
|
type PartsOfficeEnablementEntity,
|
|
10
10
|
type PartsOfficeDispatchEntity,
|
|
11
|
+
type DocDigitalInternalPersonInput,
|
|
12
|
+
type PartsOfficeInternalRecipientEntity,
|
|
13
|
+
type DocDigitalInternalMatchEntity,
|
|
11
14
|
type PartsOfficeFileEntity,
|
|
12
15
|
type PartsOfficeOkResponseEntity,
|
|
13
16
|
type PartsOfficeRegisterResponseEntity,
|
|
@@ -29,6 +32,8 @@ export const PartsOfficePatterns = {
|
|
|
29
32
|
getDispatches: 'gestorDocumental.partsOffice.getDispatches',
|
|
30
33
|
dispatch: 'gestorDocumental.partsOffice.dispatch',
|
|
31
34
|
dispatchInGestor: 'gestorDocumental.partsOffice.dispatchInGestor',
|
|
35
|
+
matchInternalUsers: 'gestorDocumental.partsOffice.matchInternalUsers',
|
|
36
|
+
getInternalRecipients: 'gestorDocumental.partsOffice.getInternalRecipients',
|
|
32
37
|
returnDispatch: 'gestorDocumental.partsOffice.returnDispatch',
|
|
33
38
|
resendDispatch: 'gestorDocumental.partsOffice.resendDispatch',
|
|
34
39
|
getDispatchFile: 'gestorDocumental.partsOffice.getDispatchFile',
|
|
@@ -98,11 +103,31 @@ export interface PartsOfficeContract {
|
|
|
98
103
|
};
|
|
99
104
|
response: RpcPage<PartsOfficeDispatchEntity[]>;
|
|
100
105
|
};
|
|
101
|
-
/**
|
|
106
|
+
/**
|
|
107
|
+
* Despacha por DocDigital, con el número del documento como folio. `operatorRun`: RUN de quien despacha.
|
|
108
|
+
* `internalPeople`: si también va a sus destinatarios del gestor por DocDigital, a quién (lo arma el gateway); si
|
|
109
|
+
* alguno no tiene usuario en DocDigital, no se despacha.
|
|
110
|
+
*/
|
|
102
111
|
[PartsOfficePatterns.dispatch]: {
|
|
103
|
-
payload: {
|
|
112
|
+
payload: {
|
|
113
|
+
id: string;
|
|
114
|
+
docDigitalTypeId: number;
|
|
115
|
+
operatorRun?: string | null;
|
|
116
|
+
internalPeople?: DocDigitalInternalPersonInput[];
|
|
117
|
+
actor: DocumentActor;
|
|
118
|
+
};
|
|
104
119
|
response: PartsOfficeOkResponseEntity & { docDigitalDocumentId: string };
|
|
105
120
|
};
|
|
121
|
+
/** Los destinatarios del gestor de un despacho (personas y áreas), para resolver a quién van en DocDigital. */
|
|
122
|
+
[PartsOfficePatterns.getInternalRecipients]: {
|
|
123
|
+
payload: { id: string };
|
|
124
|
+
response: PartsOfficeInternalRecipientEntity[];
|
|
125
|
+
};
|
|
126
|
+
/** Cruza los destinatarios del gestor de un despacho con los usuarios de DocDigital de quien lo emite, por RUN. */
|
|
127
|
+
[PartsOfficePatterns.matchInternalUsers]: {
|
|
128
|
+
payload: { id: string; people: DocDigitalInternalPersonInput[] };
|
|
129
|
+
response: DocDigitalInternalMatchEntity[];
|
|
130
|
+
};
|
|
106
131
|
/**
|
|
107
132
|
* Despacha en el gestor, sin DocDigital: el documento queda finalizado y llega a los buzones de sus destinatarios.
|
|
108
133
|
* No si tiene destinatarios de otras instituciones (van por DocDigital o por contingencia).
|
|
@@ -38,10 +38,38 @@ export interface PartsOfficeSummaryEntity {
|
|
|
38
38
|
received: number;
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
/**
|
|
41
|
+
/** Destinatario del gestor (una persona o un área) de un documento por despachar. */
|
|
42
|
+
export interface PartsOfficeInternalRecipientEntity {
|
|
43
|
+
type: 'Employee' | 'Directorate' | 'Department';
|
|
44
|
+
employeeId: string | null;
|
|
45
|
+
directorateCodeReference: number | null;
|
|
46
|
+
departmentId: string | null;
|
|
47
|
+
name: string;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* A quién de DocDigital va un destinatario del gestor: la persona, o la jefatura del área (director o encargado). Lo
|
|
52
|
+
* arma el gateway con su RUN; `key` lo identifica y `label` dice de qué destinatario viene.
|
|
53
|
+
*/
|
|
54
|
+
export interface DocDigitalInternalPersonInput {
|
|
55
|
+
key: string;
|
|
56
|
+
label: string;
|
|
57
|
+
fullName: string;
|
|
58
|
+
run: string;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/** El cruce de un destinatario del gestor con su usuario de DocDigital (por RUN); sin usuario, `userId` es `null`. */
|
|
62
|
+
export interface DocDigitalInternalMatchEntity extends DocDigitalInternalPersonInput {
|
|
63
|
+
userId: number | null;
|
|
64
|
+
userName: string | null;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/** Documento que despacha Oficina de Partes: en el gestor y, si corresponde, por DocDigital. */
|
|
42
68
|
export interface PartsOfficeDispatchEntity extends DocumentDispatchResponseEntity {
|
|
43
69
|
document: DocumentLinkEntity & { accessLevel: string };
|
|
44
70
|
externalRecipients: DocumentExternalRecipientResponseEntity[];
|
|
71
|
+
/** Sus destinatarios del gestor: se le despachan en el gestor y, si Partes lo elige, también por DocDigital. */
|
|
72
|
+
internalRecipients: PartsOfficeInternalRecipientEntity[];
|
|
45
73
|
/** A nombre de quién sale: la entidad emisora del tipo documental o la municipalidad. */
|
|
46
74
|
issuerName: string;
|
|
47
75
|
/** Si está por foliar: lo necesario para proponer la estampa del folio sobre su vista previa. */
|