@muni-sanfer/types-pre-obligado 0.0.11 → 0.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/base/entities.d.ts +28 -2
- package/dist/base/entities.js +13 -1
- package/dist/contracts/budgetAvailability.contract.d.ts +178 -0
- package/dist/contracts/budgetAvailability.contract.js +25 -0
- package/dist/contracts/budgetAvailabilityGenerator.contract.d.ts +26 -0
- package/dist/contracts/budgetAvailabilityGenerator.contract.js +9 -0
- package/dist/contracts/budgetAvailabilityPurchaseRequest.contract.d.ts +199 -0
- package/dist/contracts/budgetAvailabilityPurchaseRequest.contract.js +11 -0
- package/dist/contracts/budgetAvailabilitySignature.contract.d.ts +129 -0
- package/dist/contracts/budgetAvailabilitySignature.contract.js +9 -0
- package/dist/contracts/budgetAvailabilityTemplate.contract.d.ts +51 -0
- package/dist/contracts/budgetAvailabilityTemplate.contract.js +13 -0
- package/dist/contracts/contract.d.ts +37 -0
- package/dist/contracts/contract.js +2 -0
- package/dist/contracts/index.d.ts +63 -0
- package/dist/contracts/index.js +36 -0
- package/dist/entities/budgetAvailability/budgetAvailability.entity.d.ts +10 -1
- package/dist/entities/budgetAvailability/budgetAvailability.entity.js +15 -2
- package/dist/entities/budgetAvailabilityTemplate/budgetAvailabilityTemplate.entity.d.ts +16 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/package.json +3 -3
- package/src/base/entities.ts +32 -2
- package/src/contracts/budgetAvailability.contract.ts +147 -0
- package/src/contracts/budgetAvailabilityGenerator.contract.ts +32 -0
- package/src/contracts/budgetAvailabilityPurchaseRequest.contract.ts +154 -0
- package/src/contracts/budgetAvailabilitySignature.contract.ts +126 -0
- package/src/contracts/budgetAvailabilityTemplate.contract.ts +67 -0
- package/src/contracts/contract.ts +35 -0
- package/src/contracts/index.ts +40 -0
- package/src/entities/budgetAvailability/budgetAvailability.entity.ts +12 -0
- package/src/entities/budgetAvailabilityTemplate/budgetAvailabilityTemplate.entity.ts +9 -0
- package/src/index.ts +1 -0
- package/tsconfig.json +1 -1
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import { type RpcListFilter, type RpcPage } from './contract';
|
|
2
|
+
|
|
3
|
+
/** Patrones NATS de `budgetAvailabilityPurchaseRequest`: `<servicio>.<recurso>.<acción>`. */
|
|
4
|
+
export const BudgetAvailabilityPurchaseRequestPatterns = {
|
|
5
|
+
getAll: 'preObligado.budgetAvailabilityPurchaseRequest.getAll',
|
|
6
|
+
getById: 'preObligado.budgetAvailabilityPurchaseRequest.getById',
|
|
7
|
+
generate: 'preObligado.budgetAvailabilityPurchaseRequest.generate',
|
|
8
|
+
discardByPurchaseRequest: 'preObligado.budgetAvailabilityPurchaseRequest.discardByPurchaseRequest',
|
|
9
|
+
reject: 'preObligado.budgetAvailabilityPurchaseRequest.reject',
|
|
10
|
+
} as const;
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Qué se envía y qué se responde en cada patrón. Generado desde los handlers y los DTO del microservicio.
|
|
14
|
+
*/
|
|
15
|
+
export interface BudgetAvailabilityPurchaseRequestContract {
|
|
16
|
+
[BudgetAvailabilityPurchaseRequestPatterns.getAll]: {
|
|
17
|
+
payload: RpcListFilter;
|
|
18
|
+
response: RpcPage<
|
|
19
|
+
({
|
|
20
|
+
id: string;
|
|
21
|
+
correlative: number;
|
|
22
|
+
date: string;
|
|
23
|
+
concept: string;
|
|
24
|
+
totalAmount: number;
|
|
25
|
+
priority?: { id: string; level: string; days?: number | null } | null;
|
|
26
|
+
directorate?: { Codigo_Direccion?: number | null; DESCRIPCION?: string | null } | null;
|
|
27
|
+
department?: { id?: string | null; name?: string | null } | null;
|
|
28
|
+
currentPurchaseRequestTracking?: {
|
|
29
|
+
id: string;
|
|
30
|
+
status: string;
|
|
31
|
+
observation?: string | null;
|
|
32
|
+
createdAt?: string | null;
|
|
33
|
+
} | null;
|
|
34
|
+
accountCodes: string[];
|
|
35
|
+
} & {
|
|
36
|
+
budgetAvailabilities: {
|
|
37
|
+
id: string;
|
|
38
|
+
correlative: number;
|
|
39
|
+
year: number;
|
|
40
|
+
date: string;
|
|
41
|
+
accountCodeReference: string | null;
|
|
42
|
+
signatureCompletedAt: string | null;
|
|
43
|
+
}[];
|
|
44
|
+
requiredBudgetAvailabilities: number;
|
|
45
|
+
issuedBudgetAvailabilities: number;
|
|
46
|
+
})[]
|
|
47
|
+
> & {
|
|
48
|
+
extraData: {
|
|
49
|
+
purchaseRequests: number;
|
|
50
|
+
pendingIssuance: number;
|
|
51
|
+
fullyIssued: number;
|
|
52
|
+
requiredBudgetAvailabilities: number;
|
|
53
|
+
issuedBudgetAvailabilities: number;
|
|
54
|
+
pendingBudgetAvailabilities: number;
|
|
55
|
+
budgetAvailabilitiesInSignature: number;
|
|
56
|
+
totalAmount: number;
|
|
57
|
+
pendingAmount: number;
|
|
58
|
+
returned: number;
|
|
59
|
+
averageWaitingDays: number;
|
|
60
|
+
maxWaitingDays: number;
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
[BudgetAvailabilityPurchaseRequestPatterns.getById]: {
|
|
65
|
+
payload: { id: string };
|
|
66
|
+
response: {
|
|
67
|
+
purchaseRequest: {
|
|
68
|
+
id: string;
|
|
69
|
+
correlative: number;
|
|
70
|
+
date: string;
|
|
71
|
+
concept: string;
|
|
72
|
+
justification?: string | null;
|
|
73
|
+
directorateCodeReference?: number | null;
|
|
74
|
+
departmentId?: string | null;
|
|
75
|
+
directorate?: { Codigo_Direccion?: number | null; DESCRIPCION?: string | null } | null;
|
|
76
|
+
department?: { id?: string | null; name?: string | null } | null;
|
|
77
|
+
purchaseRequestDetails: {
|
|
78
|
+
id: string;
|
|
79
|
+
quantity: number;
|
|
80
|
+
detail: string;
|
|
81
|
+
unitAmount: number;
|
|
82
|
+
totalAmount: number;
|
|
83
|
+
costCenter?: { Codigo_Centro_Costo: number; Descripcion?: string | null } | null;
|
|
84
|
+
account?: { CodigoCuenta: string; Descripcion?: string | null } | null;
|
|
85
|
+
measureUnit?: { id: string; name?: string | null } | null;
|
|
86
|
+
}[];
|
|
87
|
+
currentPurchaseRequestTracking?:
|
|
88
|
+
| ({ id: string; status: string; observation?: string | null; createdAt?: string | null } & {
|
|
89
|
+
step?: { id: string; order: number } | null;
|
|
90
|
+
})
|
|
91
|
+
| null;
|
|
92
|
+
signedPurchaseRequest?: { id: string; fileId?: string | null; fileUrl?: string | null } | null;
|
|
93
|
+
};
|
|
94
|
+
prefill: {
|
|
95
|
+
year: number;
|
|
96
|
+
concept: string;
|
|
97
|
+
originDocumentId: string;
|
|
98
|
+
originDocumentFolio: string;
|
|
99
|
+
originDocumentDate: string;
|
|
100
|
+
directorateCode: number | null;
|
|
101
|
+
departmentId: string | null;
|
|
102
|
+
};
|
|
103
|
+
accounts: {
|
|
104
|
+
accountCodeReference: string;
|
|
105
|
+
accountName: string | null;
|
|
106
|
+
totalAmount: number;
|
|
107
|
+
budgetAvailabilityDetail: {
|
|
108
|
+
costCenterCodeReference: number;
|
|
109
|
+
accountCodeReference: string;
|
|
110
|
+
requestedAmount: number;
|
|
111
|
+
}[];
|
|
112
|
+
budgetAvailability: {
|
|
113
|
+
id: string;
|
|
114
|
+
correlative: number;
|
|
115
|
+
year: number;
|
|
116
|
+
date: string;
|
|
117
|
+
accountCodeReference: string | null;
|
|
118
|
+
signatureCompletedAt: string | null;
|
|
119
|
+
} | null;
|
|
120
|
+
}[];
|
|
121
|
+
requiredBudgetAvailabilities: number;
|
|
122
|
+
issuedBudgetAvailabilities: number;
|
|
123
|
+
};
|
|
124
|
+
};
|
|
125
|
+
[BudgetAvailabilityPurchaseRequestPatterns.generate]: {
|
|
126
|
+
payload: {
|
|
127
|
+
purchaseRequestId: string;
|
|
128
|
+
date: string | Date;
|
|
129
|
+
year: number;
|
|
130
|
+
originDocumentFolio: string;
|
|
131
|
+
originDocumentDate?: string | Date | null;
|
|
132
|
+
concept: string;
|
|
133
|
+
observations?: string | null;
|
|
134
|
+
directorateCode?: number | null;
|
|
135
|
+
departmentId?: string | null;
|
|
136
|
+
employeeId?: string | null;
|
|
137
|
+
};
|
|
138
|
+
response: { ids: string[]; ok: boolean; generated: number };
|
|
139
|
+
};
|
|
140
|
+
[BudgetAvailabilityPurchaseRequestPatterns.discardByPurchaseRequest]: {
|
|
141
|
+
payload: { purchaseRequestId: string };
|
|
142
|
+
response: { discarded: number; ok: boolean };
|
|
143
|
+
};
|
|
144
|
+
[BudgetAvailabilityPurchaseRequestPatterns.reject]: {
|
|
145
|
+
payload: {
|
|
146
|
+
purchaseRequestId: string;
|
|
147
|
+
observation: string;
|
|
148
|
+
directorateCode?: number | null;
|
|
149
|
+
departmentId?: string | null;
|
|
150
|
+
employeeId?: string | null;
|
|
151
|
+
};
|
|
152
|
+
response: { id: string; ok: boolean };
|
|
153
|
+
};
|
|
154
|
+
}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import {
|
|
2
|
+
type BudgetAvailabilitySignatureStatus,
|
|
3
|
+
type BudgetAvailabilitySignatureType,
|
|
4
|
+
type BudgetAvailabilityStatus,
|
|
5
|
+
type BudgetAvailabilityStepAccess,
|
|
6
|
+
type BudgetAvailabilityStepAction,
|
|
7
|
+
} from '../base/entities';
|
|
8
|
+
import { type RpcPage } from './contract';
|
|
9
|
+
|
|
10
|
+
/** Patrones NATS de `budgetAvailabilitySignature`: `<servicio>.<recurso>.<acción>`. */
|
|
11
|
+
export const BudgetAvailabilitySignaturePatterns = {
|
|
12
|
+
getAllPending: 'preObligado.budgetAvailabilitySignature.getAllPending',
|
|
13
|
+
getFlow: 'preObligado.budgetAvailabilitySignature.getFlow',
|
|
14
|
+
resolve: 'preObligado.budgetAvailabilitySignature.resolve',
|
|
15
|
+
} as const;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Qué se envía y qué se responde en cada patrón. Generado desde los handlers y los DTO del microservicio.
|
|
19
|
+
*/
|
|
20
|
+
export interface BudgetAvailabilitySignatureContract {
|
|
21
|
+
[BudgetAvailabilitySignaturePatterns.getAllPending]: {
|
|
22
|
+
payload: Partial<{
|
|
23
|
+
page: number;
|
|
24
|
+
limit: number;
|
|
25
|
+
search?: string;
|
|
26
|
+
year?: number | null;
|
|
27
|
+
directorateCodes: number[];
|
|
28
|
+
departmentIds: string[];
|
|
29
|
+
employeeId?: string | null;
|
|
30
|
+
bucket?: 'pending' | 'onHold' | 'rejected' | 'signed' | 'completed' | 'all';
|
|
31
|
+
}>;
|
|
32
|
+
response: RpcPage<
|
|
33
|
+
{
|
|
34
|
+
id: string;
|
|
35
|
+
correlative: number;
|
|
36
|
+
year: number;
|
|
37
|
+
date: string;
|
|
38
|
+
concept: string;
|
|
39
|
+
totalAmount: number;
|
|
40
|
+
signedFileUrl?: string | null;
|
|
41
|
+
currentStep: {
|
|
42
|
+
id: string;
|
|
43
|
+
order: number;
|
|
44
|
+
status: BudgetAvailabilitySignatureStatus;
|
|
45
|
+
type: BudgetAvailabilitySignatureType;
|
|
46
|
+
title: string;
|
|
47
|
+
actions: BudgetAvailabilityStepAction[];
|
|
48
|
+
areaName?: string | null;
|
|
49
|
+
assignedToMe: boolean;
|
|
50
|
+
resolvedByMe: boolean;
|
|
51
|
+
} | null;
|
|
52
|
+
totalSteps: number;
|
|
53
|
+
resolvedSteps: number;
|
|
54
|
+
signedFileId?: string | null;
|
|
55
|
+
status?: BudgetAvailabilityStatus;
|
|
56
|
+
signatureCompletedAt?: string | null;
|
|
57
|
+
resolvedStep?: {
|
|
58
|
+
id: string;
|
|
59
|
+
order: number;
|
|
60
|
+
status: BudgetAvailabilitySignatureStatus;
|
|
61
|
+
type: BudgetAvailabilitySignatureType;
|
|
62
|
+
title: string;
|
|
63
|
+
observation?: string | null;
|
|
64
|
+
resolvedAt?: string | null;
|
|
65
|
+
} | null;
|
|
66
|
+
}[]
|
|
67
|
+
> & {
|
|
68
|
+
extraData: {
|
|
69
|
+
budgetAvailabilities: number;
|
|
70
|
+
pending: number;
|
|
71
|
+
onHold: number;
|
|
72
|
+
rejected: number;
|
|
73
|
+
pendingSignatures: number;
|
|
74
|
+
pendingVisas: number;
|
|
75
|
+
pendingApprovals: number;
|
|
76
|
+
resolvedByEmployee: number;
|
|
77
|
+
completed: number;
|
|
78
|
+
averageWaitingDays: number;
|
|
79
|
+
maxWaitingDays: number;
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
[BudgetAvailabilitySignaturePatterns.getFlow]: {
|
|
84
|
+
payload: { id: string; directorateCodes?: number[]; departmentIds?: string[] };
|
|
85
|
+
response: {
|
|
86
|
+
budgetAvailabilityId: string;
|
|
87
|
+
signedFileId?: string | null;
|
|
88
|
+
signedFileUrl?: string | null;
|
|
89
|
+
signatureCompletedAt?: string | null;
|
|
90
|
+
steps: {
|
|
91
|
+
id: string;
|
|
92
|
+
order: number;
|
|
93
|
+
status: BudgetAvailabilitySignatureStatus;
|
|
94
|
+
observation?: string | null;
|
|
95
|
+
resolvedAt?: string | null;
|
|
96
|
+
employeeId?: string | null;
|
|
97
|
+
employeeFullName?: string | null;
|
|
98
|
+
type: BudgetAvailabilitySignatureType;
|
|
99
|
+
title: string;
|
|
100
|
+
subTitle?: string | null;
|
|
101
|
+
description?: string | null;
|
|
102
|
+
access: BudgetAvailabilityStepAccess;
|
|
103
|
+
actions: BudgetAvailabilityStepAction[];
|
|
104
|
+
directorateCode?: number | null;
|
|
105
|
+
departmentId?: string | null;
|
|
106
|
+
areaName?: string | null;
|
|
107
|
+
isCurrent: boolean;
|
|
108
|
+
assignedToMe: boolean;
|
|
109
|
+
}[];
|
|
110
|
+
};
|
|
111
|
+
};
|
|
112
|
+
[BudgetAvailabilitySignaturePatterns.resolve]: {
|
|
113
|
+
payload: {
|
|
114
|
+
id: string;
|
|
115
|
+
action: BudgetAvailabilityStepAction;
|
|
116
|
+
observation?: string | null;
|
|
117
|
+
employeeId?: string | null;
|
|
118
|
+
directorateCode?: number | null;
|
|
119
|
+
departmentId?: string | null;
|
|
120
|
+
directorateCodes?: number[];
|
|
121
|
+
departmentIds?: string[];
|
|
122
|
+
signer: { rut: string; fullName: string; role: string; areaName: string };
|
|
123
|
+
};
|
|
124
|
+
response: { id: string; ok: boolean; completed: boolean };
|
|
125
|
+
};
|
|
126
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import {
|
|
2
|
+
type BudgetAvailabilityTemplateEntity,
|
|
3
|
+
type BudgetAvailabilityTemplateSignatureEntity,
|
|
4
|
+
} from '../base/entities';
|
|
5
|
+
import {
|
|
6
|
+
type BudgetAvailabilityTemplateCreateResponseEntity,
|
|
7
|
+
type BudgetAvailabilityTemplateDeleteResponseEntity,
|
|
8
|
+
type BudgetAvailabilityTemplateGetAllResponseEntity,
|
|
9
|
+
type BudgetAvailabilityTemplateGetByIdResponseEntity,
|
|
10
|
+
type BudgetAvailabilityTemplateGetByYearResponseEntity,
|
|
11
|
+
type BudgetAvailabilityTemplateUpdateResponseEntity,
|
|
12
|
+
} from '../entities';
|
|
13
|
+
import { type RpcListFilter, type RpcPage } from './contract';
|
|
14
|
+
|
|
15
|
+
/** Patrones NATS de `budgetAvailabilityTemplate`: `<servicio>.<recurso>.<acción>`. */
|
|
16
|
+
export const BudgetAvailabilityTemplatePatterns = {
|
|
17
|
+
getAll: 'preObligado.budgetAvailabilityTemplate.getAll',
|
|
18
|
+
getById: 'preObligado.budgetAvailabilityTemplate.getById',
|
|
19
|
+
getByYear: 'preObligado.budgetAvailabilityTemplate.getByYear',
|
|
20
|
+
getActive: 'preObligado.budgetAvailabilityTemplate.getActive',
|
|
21
|
+
create: 'preObligado.budgetAvailabilityTemplate.create',
|
|
22
|
+
update: 'preObligado.budgetAvailabilityTemplate.update',
|
|
23
|
+
delete: 'preObligado.budgetAvailabilityTemplate.delete',
|
|
24
|
+
} as const;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Qué se envía y qué se responde en cada patrón. Generado desde los handlers y los DTO del microservicio.
|
|
28
|
+
*/
|
|
29
|
+
export interface BudgetAvailabilityTemplateContract {
|
|
30
|
+
[BudgetAvailabilityTemplatePatterns.getAll]: {
|
|
31
|
+
payload: RpcListFilter;
|
|
32
|
+
response: RpcPage<BudgetAvailabilityTemplateGetAllResponseEntity[]>;
|
|
33
|
+
};
|
|
34
|
+
[BudgetAvailabilityTemplatePatterns.getById]: {
|
|
35
|
+
payload: Pick<BudgetAvailabilityTemplateEntity, 'id'>;
|
|
36
|
+
response: BudgetAvailabilityTemplateGetByIdResponseEntity;
|
|
37
|
+
};
|
|
38
|
+
[BudgetAvailabilityTemplatePatterns.getByYear]: {
|
|
39
|
+
payload: Pick<BudgetAvailabilityTemplateEntity, 'year'>;
|
|
40
|
+
response: BudgetAvailabilityTemplateGetByYearResponseEntity;
|
|
41
|
+
};
|
|
42
|
+
[BudgetAvailabilityTemplatePatterns.getActive]: {
|
|
43
|
+
// no recibe datos
|
|
44
|
+
payload: Record<string, never>;
|
|
45
|
+
response: BudgetAvailabilityTemplateGetByIdResponseEntity;
|
|
46
|
+
};
|
|
47
|
+
[BudgetAvailabilityTemplatePatterns.create]: {
|
|
48
|
+
payload: Omit<BudgetAvailabilityTemplateEntity, 'id'> & {
|
|
49
|
+
budgetAvailabilityTemplateSignature: Omit<
|
|
50
|
+
BudgetAvailabilityTemplateSignatureEntity,
|
|
51
|
+
'id' | 'deleted' | 'budgetAvailabilityTemplateId' | 'createdAt' | 'updatedAt'
|
|
52
|
+
>[];
|
|
53
|
+
};
|
|
54
|
+
response: BudgetAvailabilityTemplateCreateResponseEntity;
|
|
55
|
+
};
|
|
56
|
+
[BudgetAvailabilityTemplatePatterns.update]: {
|
|
57
|
+
payload: Omit<BudgetAvailabilityTemplateEntity, 'id'> & {
|
|
58
|
+
id: BudgetAvailabilityTemplateEntity['id'];
|
|
59
|
+
budgetAvailabilityTemplateSignature?: Array<BudgetAvailabilityTemplateSignatureEntity> | null;
|
|
60
|
+
};
|
|
61
|
+
response: BudgetAvailabilityTemplateUpdateResponseEntity;
|
|
62
|
+
};
|
|
63
|
+
[BudgetAvailabilityTemplatePatterns.delete]: {
|
|
64
|
+
payload: Pick<BudgetAvailabilityTemplateEntity, 'id'>;
|
|
65
|
+
response: BudgetAvailabilityTemplateDeleteResponseEntity;
|
|
66
|
+
};
|
|
67
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Contrato de mensajes NATS de un servicio: por cada patrón, qué se envía (`payload`) y qué se responde (`response`).
|
|
3
|
+
* Lo comparten quien atiende el mensaje (el microservicio) y quien lo envía (el gateway u otro microservicio), para
|
|
4
|
+
* que el patrón y sus datos se verifiquen al compilar en vez de escribirse como texto en cada lado.
|
|
5
|
+
*/
|
|
6
|
+
export type RpcContract = Record<string, { payload: unknown; response: unknown }>;
|
|
7
|
+
|
|
8
|
+
/** Datos que se envían con el patrón `K` del contrato `C`. */
|
|
9
|
+
export type RpcPayload<C, K extends keyof C> = C[K] extends { payload: infer P } ? P : never;
|
|
10
|
+
|
|
11
|
+
/** Respuesta del patrón `K` del contrato `C`. */
|
|
12
|
+
export type RpcResponse<C, K extends keyof C> = C[K] extends { response: infer R } ? R : never;
|
|
13
|
+
|
|
14
|
+
/** Página de resultados que entregan los listados paginados. */
|
|
15
|
+
export interface RpcPage<T> {
|
|
16
|
+
total: number;
|
|
17
|
+
totalPages: number;
|
|
18
|
+
currentPage: number;
|
|
19
|
+
nextPage: number | null;
|
|
20
|
+
prevPage: number | null;
|
|
21
|
+
results: T;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/** Filtros comunes de los listados; llegan desde la URL, por eso admiten texto. */
|
|
25
|
+
export interface RpcListFilter {
|
|
26
|
+
page?: number | string;
|
|
27
|
+
limit?: number | string;
|
|
28
|
+
search?: string;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Datos cuya forma aún no está descrita en el contrato (el tipo vive dentro del microservicio). El microservicio los
|
|
33
|
+
* valida igual con su esquema; aquí solo no se verifican al compilar.
|
|
34
|
+
*/
|
|
35
|
+
export type RpcData = Record<string, unknown>;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { BudgetAvailabilityPatterns, type BudgetAvailabilityContract } from './budgetAvailability.contract';
|
|
2
|
+
import {
|
|
3
|
+
BudgetAvailabilityGeneratorPatterns,
|
|
4
|
+
type BudgetAvailabilityGeneratorContract,
|
|
5
|
+
} from './budgetAvailabilityGenerator.contract';
|
|
6
|
+
import {
|
|
7
|
+
BudgetAvailabilityPurchaseRequestPatterns,
|
|
8
|
+
type BudgetAvailabilityPurchaseRequestContract,
|
|
9
|
+
} from './budgetAvailabilityPurchaseRequest.contract';
|
|
10
|
+
import {
|
|
11
|
+
BudgetAvailabilitySignaturePatterns,
|
|
12
|
+
type BudgetAvailabilitySignatureContract,
|
|
13
|
+
} from './budgetAvailabilitySignature.contract';
|
|
14
|
+
import {
|
|
15
|
+
BudgetAvailabilityTemplatePatterns,
|
|
16
|
+
type BudgetAvailabilityTemplateContract,
|
|
17
|
+
} from './budgetAvailabilityTemplate.contract';
|
|
18
|
+
|
|
19
|
+
export * from './contract';
|
|
20
|
+
export * from './budgetAvailability.contract';
|
|
21
|
+
export * from './budgetAvailabilityGenerator.contract';
|
|
22
|
+
export * from './budgetAvailabilityPurchaseRequest.contract';
|
|
23
|
+
export * from './budgetAvailabilitySignature.contract';
|
|
24
|
+
export * from './budgetAvailabilityTemplate.contract';
|
|
25
|
+
|
|
26
|
+
/** Patrones NATS de pre-obligado-ms, por recurso: `preObligado.<recurso>.<acción>`. */
|
|
27
|
+
export const PreObligadoPatterns = {
|
|
28
|
+
budgetAvailability: BudgetAvailabilityPatterns,
|
|
29
|
+
budgetAvailabilityGenerator: BudgetAvailabilityGeneratorPatterns,
|
|
30
|
+
budgetAvailabilityPurchaseRequest: BudgetAvailabilityPurchaseRequestPatterns,
|
|
31
|
+
budgetAvailabilitySignature: BudgetAvailabilitySignaturePatterns,
|
|
32
|
+
budgetAvailabilityTemplate: BudgetAvailabilityTemplatePatterns,
|
|
33
|
+
} as const;
|
|
34
|
+
|
|
35
|
+
/** Contrato completo de pre-obligado-ms: la unión de los contratos de sus recursos. */
|
|
36
|
+
export type PreObligadoContract = BudgetAvailabilityContract &
|
|
37
|
+
BudgetAvailabilityGeneratorContract &
|
|
38
|
+
BudgetAvailabilityPurchaseRequestContract &
|
|
39
|
+
BudgetAvailabilitySignatureContract &
|
|
40
|
+
BudgetAvailabilityTemplateContract;
|
|
@@ -71,6 +71,10 @@ export class BudgetAvailabilityGetAllResponseEntity {
|
|
|
71
71
|
id: DepartmentEntity['id'];
|
|
72
72
|
name: DepartmentEntity['name'];
|
|
73
73
|
} | null,
|
|
74
|
+
// Avance del procedimiento de firmas / visaciones del certificado.
|
|
75
|
+
public totalSignatureSteps?: number,
|
|
76
|
+
public resolvedSignatureSteps?: number,
|
|
77
|
+
public signatureCompletedAt?: string | null,
|
|
74
78
|
) {}
|
|
75
79
|
}
|
|
76
80
|
|
|
@@ -250,3 +254,11 @@ export class BudgetAvailabilityComptrollerSignResponseEntity {
|
|
|
250
254
|
public ok: boolean,
|
|
251
255
|
) {}
|
|
252
256
|
}
|
|
257
|
+
|
|
258
|
+
/** Resultado de generar en lote los CDP de un documento (uno por cuenta). */
|
|
259
|
+
export class BudgetAvailabilitiesBatchCreateResponseEntity {
|
|
260
|
+
constructor(
|
|
261
|
+
public ids: string[],
|
|
262
|
+
public ok: boolean,
|
|
263
|
+
) {}
|
|
264
|
+
}
|
|
@@ -24,6 +24,12 @@ export class BudgetAvailabilityTemplateGetByIdResponseEntity {
|
|
|
24
24
|
type: BudgetAvailabilityTemplateSignatureEntity['type'];
|
|
25
25
|
title: BudgetAvailabilityTemplateSignatureEntity['title'];
|
|
26
26
|
subTitle: BudgetAvailabilityTemplateSignatureEntity['subTitle'];
|
|
27
|
+
access: BudgetAvailabilityTemplateSignatureEntity['access'];
|
|
28
|
+
actions: BudgetAvailabilityTemplateSignatureEntity['actions'];
|
|
29
|
+
description: BudgetAvailabilityTemplateSignatureEntity['description'];
|
|
30
|
+
// área que resuelve el paso (dirección o departamento); el nombre viene resuelto más abajo
|
|
31
|
+
directorateCode?: BudgetAvailabilityTemplateSignatureEntity['directorateCode'];
|
|
32
|
+
departmentId?: BudgetAvailabilityTemplateSignatureEntity['departmentId'];
|
|
27
33
|
directorate?: {
|
|
28
34
|
Codigo_Direccion: DirectorateEntity['Codigo_Direccion'];
|
|
29
35
|
DESCRIPCION: DirectorateEntity['DESCRIPCION'];
|
|
@@ -49,6 +55,9 @@ export class BudgetAvailabilityTemplateGetByYearResponseEntity {
|
|
|
49
55
|
type: BudgetAvailabilityTemplateSignatureEntity['type'];
|
|
50
56
|
title: BudgetAvailabilityTemplateSignatureEntity['title'];
|
|
51
57
|
subTitle: BudgetAvailabilityTemplateSignatureEntity['subTitle'];
|
|
58
|
+
access: BudgetAvailabilityTemplateSignatureEntity['access'];
|
|
59
|
+
actions: BudgetAvailabilityTemplateSignatureEntity['actions'];
|
|
60
|
+
description: BudgetAvailabilityTemplateSignatureEntity['description'];
|
|
52
61
|
directorate?: {
|
|
53
62
|
Codigo_Direccion: DirectorateEntity['Codigo_Direccion'];
|
|
54
63
|
DESCRIPCION: DirectorateEntity['DESCRIPCION'];
|
package/src/index.ts
CHANGED