@muni-sanfer/types-gestor-documental 0.0.1-beta.13 → 0.0.1-beta.14
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 +19 -0
- package/dist/contracts/documentType.contract.d.ts +2 -0
- package/dist/contracts/index.d.ts +11 -1
- package/dist/contracts/index.js +3 -0
- package/dist/contracts/issuingEntity.contract.d.ts +52 -0
- package/dist/contracts/issuingEntity.contract.js +11 -0
- package/dist/contracts/partsOffice.contract.d.ts +6 -0
- package/dist/contracts/partsOffice.contract.js +1 -0
- package/dist/entities/document/document.entity.d.ts +2 -0
- package/dist/entities/documentType/documentType.entity.d.ts +13 -0
- package/dist/entities/index.d.ts +1 -0
- package/dist/entities/index.js +1 -0
- package/dist/entities/issuingEntity/index.d.ts +1 -0
- package/dist/entities/issuingEntity/index.js +17 -0
- package/dist/entities/issuingEntity/issuingEntity.entity.d.ts +20 -0
- package/dist/entities/issuingEntity/issuingEntity.entity.js +2 -0
- package/dist/entities/partsOffice/partsOffice.entity.d.ts +4 -0
- package/dist/entities/registerBook/registerBook.entity.d.ts +6 -0
- package/package.json +1 -1
- package/src/base/entities.ts +20 -0
- package/src/contracts/documentType.contract.ts +6 -1
- package/src/contracts/index.ts +4 -0
- package/src/contracts/issuingEntity.contract.ts +55 -0
- package/src/contracts/partsOffice.contract.ts +3 -0
- package/src/entities/document/document.entity.ts +4 -0
- package/src/entities/documentType/documentType.entity.ts +7 -0
- package/src/entities/index.ts +1 -0
- package/src/entities/issuingEntity/index.ts +1 -0
- package/src/entities/issuingEntity/issuingEntity.entity.ts +24 -0
- package/src/entities/partsOffice/partsOffice.entity.ts +4 -0
- package/src/entities/registerBook/registerBook.entity.ts +6 -0
package/dist/base/entities.d.ts
CHANGED
|
@@ -178,6 +178,11 @@ export interface DocumentTypeEntity {
|
|
|
178
178
|
resetsYearly: boolean;
|
|
179
179
|
numbered: boolean;
|
|
180
180
|
directorateCodeReference?: number | null;
|
|
181
|
+
issuingEntity?: IssuingEntityEntity | null;
|
|
182
|
+
issuingEntityId?: string | null;
|
|
183
|
+
sharesNumberingWith?: DocumentTypeEntity | null;
|
|
184
|
+
sharesNumberingWithId?: string | null;
|
|
185
|
+
numberingMembers?: DocumentTypeEntity[];
|
|
181
186
|
enabled: boolean;
|
|
182
187
|
documents?: DocumentEntity[];
|
|
183
188
|
annulledNumbers?: DocumentAnnulledNumberEntity[];
|
|
@@ -535,6 +540,8 @@ export interface DocDigitalInboundEntity {
|
|
|
535
540
|
senderEntityName?: string | null;
|
|
536
541
|
senderName?: string | null;
|
|
537
542
|
senderPosition?: string | null;
|
|
543
|
+
recipientEntityId?: number | null;
|
|
544
|
+
recipientEntityName?: string | null;
|
|
538
545
|
fileId?: string | null;
|
|
539
546
|
fileName?: string | null;
|
|
540
547
|
attachments: JsonValue;
|
|
@@ -552,6 +559,18 @@ export interface DocDigitalInboundEntity {
|
|
|
552
559
|
createdAt: string;
|
|
553
560
|
updatedAt: string;
|
|
554
561
|
}
|
|
562
|
+
export interface IssuingEntityEntity {
|
|
563
|
+
id: string;
|
|
564
|
+
name: string;
|
|
565
|
+
shortName?: string | null;
|
|
566
|
+
directorateCodeReferences: number[];
|
|
567
|
+
docDigitalEntityId?: number | null;
|
|
568
|
+
enabled: boolean;
|
|
569
|
+
documentTypes?: DocumentTypeEntity[];
|
|
570
|
+
deleted: boolean;
|
|
571
|
+
createdAt: string;
|
|
572
|
+
updatedAt: string;
|
|
573
|
+
}
|
|
555
574
|
export interface IntakeSequenceEntity {
|
|
556
575
|
year: number;
|
|
557
576
|
next: number;
|
|
@@ -36,6 +36,8 @@ export interface DocumentTypeWritePayload {
|
|
|
36
36
|
resetsYearly?: boolean;
|
|
37
37
|
numbered?: boolean;
|
|
38
38
|
directorateCodeReference?: number | null;
|
|
39
|
+
issuingEntityId?: string | null;
|
|
40
|
+
sharesNumberingWithId?: string | null;
|
|
39
41
|
enabled?: boolean;
|
|
40
42
|
flowSteps?: DocumentFlowStepInput[];
|
|
41
43
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type CaseFileContract } from './caseFile.contract';
|
|
2
2
|
import { type DocumentContract } from './document.contract';
|
|
3
3
|
import { type DocumentTypeContract } from './documentType.contract';
|
|
4
|
+
import { type IssuingEntityContract } from './issuingEntity.contract';
|
|
4
5
|
import { type PartsOfficeContract } from './partsOffice.contract';
|
|
5
6
|
import { type ProcedureContract } from './procedure.contract';
|
|
6
7
|
import { type RegisterBookContract } from './registerBook.contract';
|
|
@@ -10,6 +11,7 @@ export * from './contract';
|
|
|
10
11
|
export * from './document.contract';
|
|
11
12
|
export * from './documentType.contract';
|
|
12
13
|
export * from './procedure.contract';
|
|
14
|
+
export * from './issuingEntity.contract';
|
|
13
15
|
export * from './caseFile.contract';
|
|
14
16
|
export * from './partsOffice.contract';
|
|
15
17
|
export * from './registerBook.contract';
|
|
@@ -52,6 +54,13 @@ export declare const GestorDocumentalPatterns: {
|
|
|
52
54
|
readonly update: "gestorDocumental.procedure.update";
|
|
53
55
|
readonly setEnabled: "gestorDocumental.procedure.setEnabled";
|
|
54
56
|
};
|
|
57
|
+
readonly issuingEntity: {
|
|
58
|
+
readonly getAll: "gestorDocumental.issuingEntity.getAll";
|
|
59
|
+
readonly getById: "gestorDocumental.issuingEntity.getById";
|
|
60
|
+
readonly create: "gestorDocumental.issuingEntity.create";
|
|
61
|
+
readonly update: "gestorDocumental.issuingEntity.update";
|
|
62
|
+
readonly setEnabled: "gestorDocumental.issuingEntity.setEnabled";
|
|
63
|
+
};
|
|
55
64
|
readonly caseFile: {
|
|
56
65
|
readonly getAll: "gestorDocumental.caseFile.getAll";
|
|
57
66
|
readonly getById: "gestorDocumental.caseFile.getById";
|
|
@@ -71,6 +80,7 @@ export declare const GestorDocumentalPatterns: {
|
|
|
71
80
|
readonly getStatus: "gestorDocumental.partsOffice.getStatus";
|
|
72
81
|
readonly getSummary: "gestorDocumental.partsOffice.getSummary";
|
|
73
82
|
readonly getEntities: "gestorDocumental.partsOffice.getEntities";
|
|
83
|
+
readonly getOwnEntities: "gestorDocumental.partsOffice.getOwnEntities";
|
|
74
84
|
readonly getUsers: "gestorDocumental.partsOffice.getUsers";
|
|
75
85
|
readonly getDocumentTypes: "gestorDocumental.partsOffice.getDocumentTypes";
|
|
76
86
|
readonly getDispatches: "gestorDocumental.partsOffice.getDispatches";
|
|
@@ -111,4 +121,4 @@ export declare const GestorDocumentalPatterns: {
|
|
|
111
121
|
};
|
|
112
122
|
};
|
|
113
123
|
/** Contrato completo de gestor-documental-ms: la unión de los contratos de sus recursos. */
|
|
114
|
-
export type GestorDocumentalContract = DocumentTypeContract & DocumentContract & ProcedureContract & CaseFileContract & PartsOfficeContract & RegisterBookContract & SignatureBatchContract & WorkFolderContract;
|
|
124
|
+
export type GestorDocumentalContract = DocumentTypeContract & DocumentContract & ProcedureContract & IssuingEntityContract & CaseFileContract & PartsOfficeContract & RegisterBookContract & SignatureBatchContract & WorkFolderContract;
|
package/dist/contracts/index.js
CHANGED
|
@@ -18,6 +18,7 @@ exports.GestorDocumentalPatterns = void 0;
|
|
|
18
18
|
const caseFile_contract_1 = require("./caseFile.contract");
|
|
19
19
|
const document_contract_1 = require("./document.contract");
|
|
20
20
|
const documentType_contract_1 = require("./documentType.contract");
|
|
21
|
+
const issuingEntity_contract_1 = require("./issuingEntity.contract");
|
|
21
22
|
const partsOffice_contract_1 = require("./partsOffice.contract");
|
|
22
23
|
const procedure_contract_1 = require("./procedure.contract");
|
|
23
24
|
const registerBook_contract_1 = require("./registerBook.contract");
|
|
@@ -27,6 +28,7 @@ __exportStar(require("./contract"), exports);
|
|
|
27
28
|
__exportStar(require("./document.contract"), exports);
|
|
28
29
|
__exportStar(require("./documentType.contract"), exports);
|
|
29
30
|
__exportStar(require("./procedure.contract"), exports);
|
|
31
|
+
__exportStar(require("./issuingEntity.contract"), exports);
|
|
30
32
|
__exportStar(require("./caseFile.contract"), exports);
|
|
31
33
|
__exportStar(require("./partsOffice.contract"), exports);
|
|
32
34
|
__exportStar(require("./registerBook.contract"), exports);
|
|
@@ -37,6 +39,7 @@ exports.GestorDocumentalPatterns = {
|
|
|
37
39
|
documentType: documentType_contract_1.DocumentTypePatterns,
|
|
38
40
|
document: document_contract_1.DocumentPatterns,
|
|
39
41
|
procedure: procedure_contract_1.ProcedurePatterns,
|
|
42
|
+
issuingEntity: issuingEntity_contract_1.IssuingEntityPatterns,
|
|
40
43
|
caseFile: caseFile_contract_1.CaseFilePatterns,
|
|
41
44
|
partsOffice: partsOffice_contract_1.PartsOfficePatterns,
|
|
42
45
|
registerBook: registerBook_contract_1.RegisterBookPatterns,
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { type IssuingEntityEntity } from '../base/entities';
|
|
2
|
+
import { type IssuingEntityCreateResponseEntity, type IssuingEntityGetAllResponseEntity, type IssuingEntityGetByIdResponseEntity, type IssuingEntityUpdateResponseEntity } from '../entities';
|
|
3
|
+
import { type RpcPage } from './contract';
|
|
4
|
+
/** Patrones NATS de `issuingEntity`: `<servicio>.<recurso>.<acción>`. */
|
|
5
|
+
export declare const IssuingEntityPatterns: {
|
|
6
|
+
readonly getAll: "gestorDocumental.issuingEntity.getAll";
|
|
7
|
+
readonly getById: "gestorDocumental.issuingEntity.getById";
|
|
8
|
+
readonly create: "gestorDocumental.issuingEntity.create";
|
|
9
|
+
readonly update: "gestorDocumental.issuingEntity.update";
|
|
10
|
+
readonly setEnabled: "gestorDocumental.issuingEntity.setEnabled";
|
|
11
|
+
};
|
|
12
|
+
/** Datos de una entidad emisora al crearla o editarla. */
|
|
13
|
+
export interface IssuingEntityWritePayload {
|
|
14
|
+
name: string;
|
|
15
|
+
shortName?: string | null;
|
|
16
|
+
/** Direcciones (código de caschile) cuyos funcionarios actúan por la entidad. */
|
|
17
|
+
directorateCodeReferences: number[];
|
|
18
|
+
/** Su entidad en DocDigital, entre las asociadas a las credenciales del gestor. */
|
|
19
|
+
docDigitalEntityId?: number | null;
|
|
20
|
+
enabled?: boolean;
|
|
21
|
+
}
|
|
22
|
+
export interface IssuingEntityContract {
|
|
23
|
+
[IssuingEntityPatterns.getAll]: {
|
|
24
|
+
payload: {
|
|
25
|
+
pagination?: {
|
|
26
|
+
page?: number;
|
|
27
|
+
limit?: number;
|
|
28
|
+
};
|
|
29
|
+
filters?: {
|
|
30
|
+
search?: string;
|
|
31
|
+
enabled?: boolean;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
response: RpcPage<IssuingEntityGetAllResponseEntity[]>;
|
|
35
|
+
};
|
|
36
|
+
[IssuingEntityPatterns.getById]: {
|
|
37
|
+
payload: Pick<IssuingEntityEntity, 'id'>;
|
|
38
|
+
response: IssuingEntityGetByIdResponseEntity;
|
|
39
|
+
};
|
|
40
|
+
[IssuingEntityPatterns.create]: {
|
|
41
|
+
payload: IssuingEntityWritePayload;
|
|
42
|
+
response: IssuingEntityCreateResponseEntity;
|
|
43
|
+
};
|
|
44
|
+
[IssuingEntityPatterns.update]: {
|
|
45
|
+
payload: IssuingEntityWritePayload & Pick<IssuingEntityEntity, 'id'>;
|
|
46
|
+
response: IssuingEntityUpdateResponseEntity;
|
|
47
|
+
};
|
|
48
|
+
[IssuingEntityPatterns.setEnabled]: {
|
|
49
|
+
payload: Pick<IssuingEntityEntity, 'id' | 'enabled'>;
|
|
50
|
+
response: IssuingEntityUpdateResponseEntity;
|
|
51
|
+
};
|
|
52
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.IssuingEntityPatterns = void 0;
|
|
4
|
+
/** Patrones NATS de `issuingEntity`: `<servicio>.<recurso>.<acción>`. */
|
|
5
|
+
exports.IssuingEntityPatterns = {
|
|
6
|
+
getAll: 'gestorDocumental.issuingEntity.getAll',
|
|
7
|
+
getById: 'gestorDocumental.issuingEntity.getById',
|
|
8
|
+
create: 'gestorDocumental.issuingEntity.create',
|
|
9
|
+
update: 'gestorDocumental.issuingEntity.update',
|
|
10
|
+
setEnabled: 'gestorDocumental.issuingEntity.setEnabled',
|
|
11
|
+
};
|
|
@@ -7,6 +7,7 @@ export declare const PartsOfficePatterns: {
|
|
|
7
7
|
readonly getStatus: "gestorDocumental.partsOffice.getStatus";
|
|
8
8
|
readonly getSummary: "gestorDocumental.partsOffice.getSummary";
|
|
9
9
|
readonly getEntities: "gestorDocumental.partsOffice.getEntities";
|
|
10
|
+
readonly getOwnEntities: "gestorDocumental.partsOffice.getOwnEntities";
|
|
10
11
|
readonly getUsers: "gestorDocumental.partsOffice.getUsers";
|
|
11
12
|
readonly getDocumentTypes: "gestorDocumental.partsOffice.getDocumentTypes";
|
|
12
13
|
readonly getDispatches: "gestorDocumental.partsOffice.getDispatches";
|
|
@@ -62,6 +63,11 @@ export interface PartsOfficeContract {
|
|
|
62
63
|
};
|
|
63
64
|
response: DocDigitalEntityEntity[];
|
|
64
65
|
};
|
|
66
|
+
/** Entidades asociadas a las credenciales del gestor: la del municipio y las de sus entidades emisoras. */
|
|
67
|
+
[PartsOfficePatterns.getOwnEntities]: {
|
|
68
|
+
payload: Record<string, never>;
|
|
69
|
+
response: DocDigitalEntityEntity[];
|
|
70
|
+
};
|
|
65
71
|
[PartsOfficePatterns.getUsers]: {
|
|
66
72
|
payload: {
|
|
67
73
|
entityId: number;
|
|
@@ -6,6 +6,7 @@ exports.PartsOfficePatterns = {
|
|
|
6
6
|
getStatus: 'gestorDocumental.partsOffice.getStatus',
|
|
7
7
|
getSummary: 'gestorDocumental.partsOffice.getSummary',
|
|
8
8
|
getEntities: 'gestorDocumental.partsOffice.getEntities',
|
|
9
|
+
getOwnEntities: 'gestorDocumental.partsOffice.getOwnEntities',
|
|
9
10
|
getUsers: 'gestorDocumental.partsOffice.getUsers',
|
|
10
11
|
getDocumentTypes: 'gestorDocumental.partsOffice.getDocumentTypes',
|
|
11
12
|
getDispatches: 'gestorDocumental.partsOffice.getDispatches',
|
|
@@ -114,6 +114,7 @@ export interface DocumentInboxItemEntity extends DocumentDeliveryResponseEntity
|
|
|
114
114
|
}
|
|
115
115
|
export interface DocumentGetByIdResponseEntity {
|
|
116
116
|
id: DocumentEntity['id'];
|
|
117
|
+
issuerName: string;
|
|
117
118
|
subject: DocumentEntity['subject'];
|
|
118
119
|
keywords: DocumentEntity['keywords'];
|
|
119
120
|
accessLevel: DocumentEntity['accessLevel'];
|
|
@@ -282,6 +283,7 @@ export interface DocumentVerifyResponseEntity {
|
|
|
282
283
|
state: DocumentVerificationState;
|
|
283
284
|
verificationCode: string;
|
|
284
285
|
documentType: Pick<DocumentTypeSummaryEntity, 'name' | 'abbreviation'>;
|
|
286
|
+
issuerName: string;
|
|
285
287
|
correlative: DocumentEntity['correlative'];
|
|
286
288
|
correlativeYear: DocumentEntity['correlativeYear'];
|
|
287
289
|
numberedAt: DocumentEntity['numberedAt'];
|
|
@@ -22,6 +22,19 @@ export interface DocumentTypeGetAllResponseEntity {
|
|
|
22
22
|
resetsYearly: DocumentTypeEntity['resetsYearly'];
|
|
23
23
|
numbered: DocumentTypeEntity['numbered'];
|
|
24
24
|
directorateCodeReference: DocumentTypeEntity['directorateCodeReference'];
|
|
25
|
+
issuingEntity: {
|
|
26
|
+
id: string;
|
|
27
|
+
name: string;
|
|
28
|
+
shortName: string | null;
|
|
29
|
+
} | null;
|
|
30
|
+
sharesNumberingWith: {
|
|
31
|
+
id: string;
|
|
32
|
+
name: string;
|
|
33
|
+
} | null;
|
|
34
|
+
numberingMembers: {
|
|
35
|
+
id: string;
|
|
36
|
+
name: string;
|
|
37
|
+
}[];
|
|
25
38
|
enabled: DocumentTypeEntity['enabled'];
|
|
26
39
|
flow: {
|
|
27
40
|
visa: number;
|
package/dist/entities/index.d.ts
CHANGED
package/dist/entities/index.js
CHANGED
|
@@ -17,6 +17,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./documentType"), exports);
|
|
18
18
|
__exportStar(require("./document"), exports);
|
|
19
19
|
__exportStar(require("./procedure"), exports);
|
|
20
|
+
__exportStar(require("./issuingEntity"), exports);
|
|
20
21
|
__exportStar(require("./caseFile"), exports);
|
|
21
22
|
__exportStar(require("./partsOffice"), exports);
|
|
22
23
|
__exportStar(require("./registerBook"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './issuingEntity.entity';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./issuingEntity.entity"), exports);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { IssuingEntityEntity } from '../../base/entities';
|
|
2
|
+
export interface IssuingEntityGetAllResponseEntity {
|
|
3
|
+
id: IssuingEntityEntity['id'];
|
|
4
|
+
name: IssuingEntityEntity['name'];
|
|
5
|
+
shortName: IssuingEntityEntity['shortName'];
|
|
6
|
+
directorateCodeReferences: IssuingEntityEntity['directorateCodeReferences'];
|
|
7
|
+
docDigitalEntityId: IssuingEntityEntity['docDigitalEntityId'];
|
|
8
|
+
enabled: IssuingEntityEntity['enabled'];
|
|
9
|
+
/** Cuántos tipos documentales emite. */
|
|
10
|
+
documentTypes: number;
|
|
11
|
+
}
|
|
12
|
+
export type IssuingEntityGetByIdResponseEntity = IssuingEntityGetAllResponseEntity;
|
|
13
|
+
export interface IssuingEntityCreateResponseEntity {
|
|
14
|
+
id: IssuingEntityEntity['id'];
|
|
15
|
+
ok: boolean;
|
|
16
|
+
}
|
|
17
|
+
export interface IssuingEntityUpdateResponseEntity {
|
|
18
|
+
id: IssuingEntityEntity['id'];
|
|
19
|
+
ok: boolean;
|
|
20
|
+
}
|
|
@@ -32,6 +32,8 @@ export interface PartsOfficeDispatchEntity extends DocumentDispatchResponseEntit
|
|
|
32
32
|
accessLevel: string;
|
|
33
33
|
};
|
|
34
34
|
externalRecipients: DocumentExternalRecipientResponseEntity[];
|
|
35
|
+
/** A nombre de quién sale: la entidad emisora del tipo documental o la municipalidad. */
|
|
36
|
+
issuerName: string;
|
|
35
37
|
createdAt: string;
|
|
36
38
|
}
|
|
37
39
|
/** Documento que llegó por DocDigital. */
|
|
@@ -45,6 +47,8 @@ export interface PartsOfficeInboundEntity {
|
|
|
45
47
|
folioDate: string | null;
|
|
46
48
|
typeName: string | null;
|
|
47
49
|
reserved: boolean;
|
|
50
|
+
/** Entidad propia a la que llegó (la municipalidad o una entidad emisora). */
|
|
51
|
+
recipientEntityName: string | null;
|
|
48
52
|
senderEntityName: string | null;
|
|
49
53
|
senderName: string | null;
|
|
50
54
|
senderPosition: string | null;
|
|
@@ -24,11 +24,17 @@ export interface RegisterBookRowEntity {
|
|
|
24
24
|
dispatch: string | null;
|
|
25
25
|
/** Motivo de la anulación (del documento o del número). */
|
|
26
26
|
observation: string | null;
|
|
27
|
+
/** Numeración compartida: tipo documental del número (`null` en un salto o si el libro es de un solo tipo). */
|
|
28
|
+
documentTypeName: string | null;
|
|
27
29
|
}
|
|
28
30
|
export interface RegisterBookEntity {
|
|
29
31
|
kind: RegisterBookKind;
|
|
30
32
|
/** «Decreto alcaldicio exento» o «Ingresos de Oficina de Partes». */
|
|
31
33
|
title: string;
|
|
34
|
+
/** Quién lleva el libro: la entidad emisora del tipo o la municipalidad. */
|
|
35
|
+
issuerName: string;
|
|
36
|
+
/** Numeración compartida: los tipos que numeran en la serie del libro (vacío si es de un solo tipo). */
|
|
37
|
+
series: string[];
|
|
32
38
|
year: number;
|
|
33
39
|
month: number | null;
|
|
34
40
|
rows: RegisterBookRowEntity[];
|
package/package.json
CHANGED
package/src/base/entities.ts
CHANGED
|
@@ -262,6 +262,11 @@ export interface DocumentTypeEntity {
|
|
|
262
262
|
resetsYearly: boolean;
|
|
263
263
|
numbered: boolean;
|
|
264
264
|
directorateCodeReference?: number | null;
|
|
265
|
+
issuingEntity?: IssuingEntityEntity | null;
|
|
266
|
+
issuingEntityId?: string | null;
|
|
267
|
+
sharesNumberingWith?: DocumentTypeEntity | null;
|
|
268
|
+
sharesNumberingWithId?: string | null;
|
|
269
|
+
numberingMembers?: DocumentTypeEntity[];
|
|
265
270
|
enabled: boolean;
|
|
266
271
|
documents?: DocumentEntity[];
|
|
267
272
|
annulledNumbers?: DocumentAnnulledNumberEntity[];
|
|
@@ -640,6 +645,8 @@ export interface DocDigitalInboundEntity {
|
|
|
640
645
|
senderEntityName?: string | null;
|
|
641
646
|
senderName?: string | null;
|
|
642
647
|
senderPosition?: string | null;
|
|
648
|
+
recipientEntityId?: number | null;
|
|
649
|
+
recipientEntityName?: string | null;
|
|
643
650
|
fileId?: string | null;
|
|
644
651
|
fileName?: string | null;
|
|
645
652
|
attachments: JsonValue;
|
|
@@ -658,6 +665,19 @@ export interface DocDigitalInboundEntity {
|
|
|
658
665
|
updatedAt: string;
|
|
659
666
|
}
|
|
660
667
|
|
|
668
|
+
export interface IssuingEntityEntity {
|
|
669
|
+
id: string;
|
|
670
|
+
name: string;
|
|
671
|
+
shortName?: string | null;
|
|
672
|
+
directorateCodeReferences: number[];
|
|
673
|
+
docDigitalEntityId?: number | null;
|
|
674
|
+
enabled: boolean;
|
|
675
|
+
documentTypes?: DocumentTypeEntity[];
|
|
676
|
+
deleted: boolean;
|
|
677
|
+
createdAt: string;
|
|
678
|
+
updatedAt: string;
|
|
679
|
+
}
|
|
680
|
+
|
|
661
681
|
export interface IntakeSequenceEntity {
|
|
662
682
|
year: number;
|
|
663
683
|
next: number;
|
|
@@ -41,6 +41,10 @@ export interface DocumentTypeWritePayload {
|
|
|
41
41
|
// Sus documentos llevan número (por omisión, sí).
|
|
42
42
|
numbered?: boolean;
|
|
43
43
|
directorateCodeReference?: number | null;
|
|
44
|
+
// Entidad emisora (sin valor: la municipalidad).
|
|
45
|
+
issuingEntityId?: string | null;
|
|
46
|
+
// Tipo cuyo correlativo comparte (sin valor: el suyo propio).
|
|
47
|
+
sharesNumberingWithId?: string | null;
|
|
44
48
|
enabled?: boolean;
|
|
45
49
|
// Flujo sugerido, en el orden en que les toca dentro de cada rol. Al editar, si no viene, el flujo no cambia.
|
|
46
50
|
flowSteps?: DocumentFlowStepInput[];
|
|
@@ -58,7 +62,8 @@ export interface DocumentTypeContract {
|
|
|
58
62
|
search?: string;
|
|
59
63
|
enabled?: boolean;
|
|
60
64
|
category?: DocumentCategory;
|
|
61
|
-
// Solo los que puede usar quien redacta: los de toda la municipalidad y los de estas direcciones
|
|
65
|
+
// Solo los que puede usar quien redacta: los de toda la municipalidad y los de estas direcciones (o de una
|
|
66
|
+
// entidad emisora por la que actúan).
|
|
62
67
|
usableByDirectorates?: number[];
|
|
63
68
|
};
|
|
64
69
|
};
|
package/src/contracts/index.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { CaseFilePatterns, type CaseFileContract } from './caseFile.contract';
|
|
2
2
|
import { DocumentPatterns, type DocumentContract } from './document.contract';
|
|
3
3
|
import { DocumentTypePatterns, type DocumentTypeContract } from './documentType.contract';
|
|
4
|
+
import { IssuingEntityPatterns, type IssuingEntityContract } from './issuingEntity.contract';
|
|
4
5
|
import { PartsOfficePatterns, type PartsOfficeContract } from './partsOffice.contract';
|
|
5
6
|
import { ProcedurePatterns, type ProcedureContract } from './procedure.contract';
|
|
6
7
|
import { RegisterBookPatterns, type RegisterBookContract } from './registerBook.contract';
|
|
@@ -11,6 +12,7 @@ export * from './contract';
|
|
|
11
12
|
export * from './document.contract';
|
|
12
13
|
export * from './documentType.contract';
|
|
13
14
|
export * from './procedure.contract';
|
|
15
|
+
export * from './issuingEntity.contract';
|
|
14
16
|
export * from './caseFile.contract';
|
|
15
17
|
export * from './partsOffice.contract';
|
|
16
18
|
export * from './registerBook.contract';
|
|
@@ -22,6 +24,7 @@ export const GestorDocumentalPatterns = {
|
|
|
22
24
|
documentType: DocumentTypePatterns,
|
|
23
25
|
document: DocumentPatterns,
|
|
24
26
|
procedure: ProcedurePatterns,
|
|
27
|
+
issuingEntity: IssuingEntityPatterns,
|
|
25
28
|
caseFile: CaseFilePatterns,
|
|
26
29
|
partsOffice: PartsOfficePatterns,
|
|
27
30
|
registerBook: RegisterBookPatterns,
|
|
@@ -33,6 +36,7 @@ export const GestorDocumentalPatterns = {
|
|
|
33
36
|
export type GestorDocumentalContract = DocumentTypeContract &
|
|
34
37
|
DocumentContract &
|
|
35
38
|
ProcedureContract &
|
|
39
|
+
IssuingEntityContract &
|
|
36
40
|
CaseFileContract &
|
|
37
41
|
PartsOfficeContract &
|
|
38
42
|
RegisterBookContract &
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { type IssuingEntityEntity } from '../base/entities';
|
|
2
|
+
import {
|
|
3
|
+
type IssuingEntityCreateResponseEntity,
|
|
4
|
+
type IssuingEntityGetAllResponseEntity,
|
|
5
|
+
type IssuingEntityGetByIdResponseEntity,
|
|
6
|
+
type IssuingEntityUpdateResponseEntity,
|
|
7
|
+
} from '../entities';
|
|
8
|
+
import { type RpcPage } from './contract';
|
|
9
|
+
|
|
10
|
+
/** Patrones NATS de `issuingEntity`: `<servicio>.<recurso>.<acción>`. */
|
|
11
|
+
export const IssuingEntityPatterns = {
|
|
12
|
+
getAll: 'gestorDocumental.issuingEntity.getAll',
|
|
13
|
+
getById: 'gestorDocumental.issuingEntity.getById',
|
|
14
|
+
create: 'gestorDocumental.issuingEntity.create',
|
|
15
|
+
update: 'gestorDocumental.issuingEntity.update',
|
|
16
|
+
setEnabled: 'gestorDocumental.issuingEntity.setEnabled',
|
|
17
|
+
} as const;
|
|
18
|
+
|
|
19
|
+
/** Datos de una entidad emisora al crearla o editarla. */
|
|
20
|
+
export interface IssuingEntityWritePayload {
|
|
21
|
+
name: string;
|
|
22
|
+
shortName?: string | null;
|
|
23
|
+
/** Direcciones (código de caschile) cuyos funcionarios actúan por la entidad. */
|
|
24
|
+
directorateCodeReferences: number[];
|
|
25
|
+
/** Su entidad en DocDigital, entre las asociadas a las credenciales del gestor. */
|
|
26
|
+
docDigitalEntityId?: number | null;
|
|
27
|
+
enabled?: boolean;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export interface IssuingEntityContract {
|
|
31
|
+
[IssuingEntityPatterns.getAll]: {
|
|
32
|
+
// sin `page` y `limit` responde todas en una sola página
|
|
33
|
+
payload: {
|
|
34
|
+
pagination?: { page?: number; limit?: number };
|
|
35
|
+
filters?: { search?: string; enabled?: boolean };
|
|
36
|
+
};
|
|
37
|
+
response: RpcPage<IssuingEntityGetAllResponseEntity[]>;
|
|
38
|
+
};
|
|
39
|
+
[IssuingEntityPatterns.getById]: {
|
|
40
|
+
payload: Pick<IssuingEntityEntity, 'id'>;
|
|
41
|
+
response: IssuingEntityGetByIdResponseEntity;
|
|
42
|
+
};
|
|
43
|
+
[IssuingEntityPatterns.create]: {
|
|
44
|
+
payload: IssuingEntityWritePayload;
|
|
45
|
+
response: IssuingEntityCreateResponseEntity;
|
|
46
|
+
};
|
|
47
|
+
[IssuingEntityPatterns.update]: {
|
|
48
|
+
payload: IssuingEntityWritePayload & Pick<IssuingEntityEntity, 'id'>;
|
|
49
|
+
response: IssuingEntityUpdateResponseEntity;
|
|
50
|
+
};
|
|
51
|
+
[IssuingEntityPatterns.setEnabled]: {
|
|
52
|
+
payload: Pick<IssuingEntityEntity, 'id' | 'enabled'>;
|
|
53
|
+
response: IssuingEntityUpdateResponseEntity;
|
|
54
|
+
};
|
|
55
|
+
}
|
|
@@ -20,6 +20,7 @@ export const PartsOfficePatterns = {
|
|
|
20
20
|
getStatus: 'gestorDocumental.partsOffice.getStatus',
|
|
21
21
|
getSummary: 'gestorDocumental.partsOffice.getSummary',
|
|
22
22
|
getEntities: 'gestorDocumental.partsOffice.getEntities',
|
|
23
|
+
getOwnEntities: 'gestorDocumental.partsOffice.getOwnEntities',
|
|
23
24
|
getUsers: 'gestorDocumental.partsOffice.getUsers',
|
|
24
25
|
getDocumentTypes: 'gestorDocumental.partsOffice.getDocumentTypes',
|
|
25
26
|
getDispatches: 'gestorDocumental.partsOffice.getDispatches',
|
|
@@ -51,6 +52,8 @@ export interface PartsOfficeContract {
|
|
|
51
52
|
[PartsOfficePatterns.getSummary]: { payload: Record<string, never>; response: PartsOfficeSummaryEntity };
|
|
52
53
|
/** Directorio de DocDigital: instituciones por nombre. */
|
|
53
54
|
[PartsOfficePatterns.getEntities]: { payload: { search?: string }; response: DocDigitalEntityEntity[] };
|
|
55
|
+
/** Entidades asociadas a las credenciales del gestor: la del municipio y las de sus entidades emisoras. */
|
|
56
|
+
[PartsOfficePatterns.getOwnEntities]: { payload: Record<string, never>; response: DocDigitalEntityEntity[] };
|
|
54
57
|
[PartsOfficePatterns.getUsers]: {
|
|
55
58
|
payload: { entityId: number; search?: string };
|
|
56
59
|
response: DocDigitalUserEntity[];
|
|
@@ -136,6 +136,8 @@ export interface DocumentInboxItemEntity extends DocumentDeliveryResponseEntity
|
|
|
136
136
|
|
|
137
137
|
export interface DocumentGetByIdResponseEntity {
|
|
138
138
|
id: DocumentEntity['id'];
|
|
139
|
+
// Quién lo emite: la entidad emisora del tipo (Educación, Salud, Juzgado) o la municipalidad.
|
|
140
|
+
issuerName: string;
|
|
139
141
|
subject: DocumentEntity['subject'];
|
|
140
142
|
keywords: DocumentEntity['keywords'];
|
|
141
143
|
accessLevel: DocumentEntity['accessLevel'];
|
|
@@ -321,6 +323,8 @@ export interface DocumentVerifyResponseEntity {
|
|
|
321
323
|
state: DocumentVerificationState;
|
|
322
324
|
verificationCode: string;
|
|
323
325
|
documentType: Pick<DocumentTypeSummaryEntity, 'name' | 'abbreviation'>;
|
|
326
|
+
// Quién lo emite: la entidad emisora del tipo (Educación, Salud, Juzgado) o la municipalidad.
|
|
327
|
+
issuerName: string;
|
|
324
328
|
correlative: DocumentEntity['correlative'];
|
|
325
329
|
correlativeYear: DocumentEntity['correlativeYear'];
|
|
326
330
|
numberedAt: DocumentEntity['numberedAt'];
|
|
@@ -27,6 +27,13 @@ export interface DocumentTypeGetAllResponseEntity {
|
|
|
27
27
|
// Sin numeración, sus documentos solo llevan fecha, código de verificación y QR.
|
|
28
28
|
numbered: DocumentTypeEntity['numbered'];
|
|
29
29
|
directorateCodeReference: DocumentTypeEntity['directorateCodeReference'];
|
|
30
|
+
// Entidad que emite sus documentos (Educación, Salud, Juzgado). `null`: la municipalidad.
|
|
31
|
+
issuingEntity: { id: string; name: string; shortName: string | null } | null;
|
|
32
|
+
// Tipo cuyo correlativo comparte: sus números salen de esa serie (y `nextCorrelative`, `correlativeYear` y
|
|
33
|
+
// `resetsYearly` son los de ese tipo). `null`: lleva su propio correlativo.
|
|
34
|
+
sharesNumberingWith: { id: string; name: string } | null;
|
|
35
|
+
// Tipos que toman sus números del correlativo de este.
|
|
36
|
+
numberingMembers: { id: string; name: string }[];
|
|
30
37
|
enabled: DocumentTypeEntity['enabled'];
|
|
31
38
|
// Cuántos visadores y firmantes tiene su flujo sugerido.
|
|
32
39
|
flow: { visa: number; signature: number };
|
package/src/entities/index.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './issuingEntity.entity';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { IssuingEntityEntity } from '../../base/entities';
|
|
2
|
+
|
|
3
|
+
export interface IssuingEntityGetAllResponseEntity {
|
|
4
|
+
id: IssuingEntityEntity['id'];
|
|
5
|
+
name: IssuingEntityEntity['name'];
|
|
6
|
+
shortName: IssuingEntityEntity['shortName'];
|
|
7
|
+
directorateCodeReferences: IssuingEntityEntity['directorateCodeReferences'];
|
|
8
|
+
docDigitalEntityId: IssuingEntityEntity['docDigitalEntityId'];
|
|
9
|
+
enabled: IssuingEntityEntity['enabled'];
|
|
10
|
+
/** Cuántos tipos documentales emite. */
|
|
11
|
+
documentTypes: number;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export type IssuingEntityGetByIdResponseEntity = IssuingEntityGetAllResponseEntity;
|
|
15
|
+
|
|
16
|
+
export interface IssuingEntityCreateResponseEntity {
|
|
17
|
+
id: IssuingEntityEntity['id'];
|
|
18
|
+
ok: boolean;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface IssuingEntityUpdateResponseEntity {
|
|
22
|
+
id: IssuingEntityEntity['id'];
|
|
23
|
+
ok: boolean;
|
|
24
|
+
}
|
|
@@ -40,6 +40,8 @@ export interface PartsOfficeSummaryEntity {
|
|
|
40
40
|
export interface PartsOfficeDispatchEntity extends DocumentDispatchResponseEntity {
|
|
41
41
|
document: DocumentLinkEntity & { accessLevel: string };
|
|
42
42
|
externalRecipients: DocumentExternalRecipientResponseEntity[];
|
|
43
|
+
/** A nombre de quién sale: la entidad emisora del tipo documental o la municipalidad. */
|
|
44
|
+
issuerName: string;
|
|
43
45
|
createdAt: string;
|
|
44
46
|
}
|
|
45
47
|
|
|
@@ -54,6 +56,8 @@ export interface PartsOfficeInboundEntity {
|
|
|
54
56
|
folioDate: string | null;
|
|
55
57
|
typeName: string | null;
|
|
56
58
|
reserved: boolean;
|
|
59
|
+
/** Entidad propia a la que llegó (la municipalidad o una entidad emisora). */
|
|
60
|
+
recipientEntityName: string | null;
|
|
57
61
|
senderEntityName: string | null;
|
|
58
62
|
senderName: string | null;
|
|
59
63
|
senderPosition: string | null;
|
|
@@ -26,12 +26,18 @@ export interface RegisterBookRowEntity {
|
|
|
26
26
|
dispatch: string | null;
|
|
27
27
|
/** Motivo de la anulación (del documento o del número). */
|
|
28
28
|
observation: string | null;
|
|
29
|
+
/** Numeración compartida: tipo documental del número (`null` en un salto o si el libro es de un solo tipo). */
|
|
30
|
+
documentTypeName: string | null;
|
|
29
31
|
}
|
|
30
32
|
|
|
31
33
|
export interface RegisterBookEntity {
|
|
32
34
|
kind: RegisterBookKind;
|
|
33
35
|
/** «Decreto alcaldicio exento» o «Ingresos de Oficina de Partes». */
|
|
34
36
|
title: string;
|
|
37
|
+
/** Quién lleva el libro: la entidad emisora del tipo o la municipalidad. */
|
|
38
|
+
issuerName: string;
|
|
39
|
+
/** Numeración compartida: los tipos que numeran en la serie del libro (vacío si es de un solo tipo). */
|
|
40
|
+
series: string[];
|
|
35
41
|
year: number;
|
|
36
42
|
month: number | null;
|
|
37
43
|
rows: RegisterBookRowEntity[];
|