@fiado/type-kit 3.619.0 → 3.620.0
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/_test_/unit/reconciliation/reconciliationRequests.test.ts +23 -4
- package/_test_/unit/transferNote/transferNoteConfigAndPrivate.test.ts +23 -8
- package/bin/reconciliation/dtos/requests/PrivateReconciliationRequests.d.ts +49 -13
- package/bin/reconciliation/dtos/requests/PrivateReconciliationRequests.js +61 -13
- package/bin/reconciliation/dtos/requests/reconciliationRequestDecorators.d.ts +1 -3
- package/bin/reconciliation/dtos/requests/reconciliationRequestDecorators.js +3 -10
- package/bin/transferNote/constants/transferNoteValidation.d.ts +2 -0
- package/bin/transferNote/constants/transferNoteValidation.js +3 -1
- package/bin/transferNote/dtos/requests/PrivateTransferNoteRequests.d.ts +41 -11
- package/bin/transferNote/dtos/requests/PrivateTransferNoteRequests.js +51 -11
- package/bin/transferNote/dtos/requests/transferNoteRequestDecorators.d.ts +4 -0
- package/bin/transferNote/dtos/requests/transferNoteRequestDecorators.js +26 -0
- package/package.json +1 -1
- package/src/reconciliation/dtos/requests/PrivateReconciliationRequests.ts +86 -26
- package/src/reconciliation/dtos/requests/reconciliationRequestDecorators.ts +2 -11
- package/src/transferNote/constants/transferNoteValidation.ts +3 -0
- package/src/transferNote/dtos/requests/PrivateTransferNoteRequests.ts +72 -22
- package/src/transferNote/dtos/requests/transferNoteRequestDecorators.ts +33 -2
|
@@ -35,7 +35,8 @@ function errorsOf<T extends object>(cls: new () => T, payload: Record<string, un
|
|
|
35
35
|
return validateSync(dto).map((e) => e.property);
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
const
|
|
38
|
+
const service = { tenantId: 'surekeep', author: 'conciliacion-dashboard' };
|
|
39
|
+
const operator = { ...service, actorId: 'aZ3x9Qk-azure-ad-sub_01' };
|
|
39
40
|
|
|
40
41
|
describe('definiciones', () => {
|
|
41
42
|
it('configurar pide un estado válido y listas de sandbox opcionales', () => {
|
|
@@ -138,7 +139,7 @@ describe('resolución, reactivación y notas', () => {
|
|
|
138
139
|
});
|
|
139
140
|
|
|
140
141
|
describe('espejo privado', () => {
|
|
141
|
-
it('agrega tenantId, author y
|
|
142
|
+
it('agrega tenantId, author y actorId a la versión pública', () => {
|
|
142
143
|
expect(
|
|
143
144
|
errorsOf(PrivateResolveReconciliationItemRequest, {
|
|
144
145
|
...operator,
|
|
@@ -150,7 +151,7 @@ describe('espejo privado', () => {
|
|
|
150
151
|
type: ReconciliationResolutionTypeEnum.EXCLUDE,
|
|
151
152
|
reason: 'prueba interna',
|
|
152
153
|
});
|
|
153
|
-
expect(missing).toEqual(expect.arrayContaining(['tenantId', 'author', '
|
|
154
|
+
expect(missing).toEqual(expect.arrayContaining(['tenantId', 'author', 'actorId']));
|
|
154
155
|
expect(errorsOf(PrivateAddReconciliationItemNoteRequest, { ...operator, actor: 'no-es-correo', text: 'revisar con tesorería' })).toContain(
|
|
155
156
|
'actor',
|
|
156
157
|
);
|
|
@@ -167,11 +168,29 @@ describe('espejo privado', () => {
|
|
|
167
168
|
expect(errorsOf(PrivateRunReconciliationRequest, { ...operator, definitionId: 'm8-gateway-bank', periodKey: '2026-10-29' })).toEqual(
|
|
168
169
|
[],
|
|
169
170
|
);
|
|
170
|
-
expect(errorsOf(PrivateGetReconciliationItemQuery, { tenantId: 'surekeep', author: 'x' })).toContain('
|
|
171
|
+
expect(errorsOf(PrivateGetReconciliationItemQuery, { tenantId: 'surekeep', author: 'x' })).toContain('actorId');
|
|
171
172
|
expect(errorsOf(PrivateListReconciliationItemsQuery, { ...operator, definitionId: 'm8-gateway-sofom' })).toEqual([]);
|
|
172
173
|
});
|
|
173
174
|
});
|
|
174
175
|
|
|
176
|
+
describe('operador del espejo', () => {
|
|
177
|
+
it('viaja por actorId, que no puede ser un email; actor (email) es opcional', () => {
|
|
178
|
+
const { PrivateReconciliationOperatorCaller } = Reconciliation;
|
|
179
|
+
expect(errorsOf(PrivateReconciliationOperatorCaller, operator)).toEqual([]);
|
|
180
|
+
expect(errorsOf(PrivateReconciliationOperatorCaller, { ...operator, actor: 'operador@fsa.mx' })).toEqual([]);
|
|
181
|
+
expect(errorsOf(PrivateReconciliationOperatorCaller, service)).toContain('actorId');
|
|
182
|
+
expect(errorsOf(PrivateReconciliationOperatorCaller, { ...service, actorId: 'operador@fsa.mx' })).toContain('actorId');
|
|
183
|
+
expect(
|
|
184
|
+
errorsOf(PrivateResolveReconciliationItemRequest, {
|
|
185
|
+
...service,
|
|
186
|
+
actorId: 'operador@fsa.mx',
|
|
187
|
+
type: ReconciliationResolutionTypeEnum.EXCLUDE,
|
|
188
|
+
reason: 'prueba interna',
|
|
189
|
+
}),
|
|
190
|
+
).toContain('actorId');
|
|
191
|
+
});
|
|
192
|
+
});
|
|
193
|
+
|
|
175
194
|
describe('feed genérico de los dueños', () => {
|
|
176
195
|
it('lista por tenant y ventana, con cursor opcional', () => {
|
|
177
196
|
expect(
|
|
@@ -30,7 +30,8 @@ function errorsOf<T extends object>(cls: new () => T, payload: Record<string, un
|
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
const service = { tenantId: 'surekeep', author: 'conciliacion-dashboard' };
|
|
33
|
-
const
|
|
33
|
+
const actorId = 'aZ3x9Qk-azure-ad-sub_01';
|
|
34
|
+
const caller = { ...service, actorId };
|
|
34
35
|
const longReason = 'emisión manual por corte fallido del lunes';
|
|
35
36
|
|
|
36
37
|
describe('UpdateTransferNoteConfigRequest', () => {
|
|
@@ -97,12 +98,15 @@ describe('UpdateTransferNoteConfigRequest', () => {
|
|
|
97
98
|
});
|
|
98
99
|
|
|
99
100
|
describe('espejo privado', () => {
|
|
100
|
-
it('agrega tenantId, author y
|
|
101
|
+
it('agrega tenantId, author y actorId a la versión pública', () => {
|
|
101
102
|
expect(errorsOf(PrivateIssueTransferNoteRequest, { ...caller, pairKey: 'p-1', isoWeek: '2026-W43', reason: longReason })).toEqual([]);
|
|
102
103
|
expect(errorsOf(PrivateIssueTransferNoteRequest, { pairKey: 'p-1', isoWeek: '2026-W43', reason: longReason })).toEqual(
|
|
103
|
-
expect.arrayContaining(['tenantId', 'author', '
|
|
104
|
+
expect.arrayContaining(['tenantId', 'author', 'actorId']),
|
|
104
105
|
);
|
|
105
106
|
expect(errorsOf(PrivateIssueTransferNoteRequest, { ...caller, actor: 'operador', pairKey: 'p-1', isoWeek: '2026-W43', reason: longReason })).toContain('actor');
|
|
107
|
+
expect(
|
|
108
|
+
errorsOf(PrivateIssueTransferNoteRequest, { ...caller, actorId: 'operador@fsa.mx', pairKey: 'p-1', isoWeek: '2026-W43', reason: longReason }),
|
|
109
|
+
).toContain('actorId');
|
|
106
110
|
expect(
|
|
107
111
|
errorsOf(PrivateCaptureTransferNoteSpeiRequest, {
|
|
108
112
|
...caller,
|
|
@@ -113,21 +117,32 @@ describe('espejo privado', () => {
|
|
|
113
117
|
).toEqual([]);
|
|
114
118
|
});
|
|
115
119
|
|
|
116
|
-
it('las lecturas privadas también exigen author y
|
|
120
|
+
it('las lecturas privadas también exigen author y actorId', () => {
|
|
117
121
|
expect(errorsOf(PrivateGetTransferNoteQuery, caller)).toEqual([]);
|
|
118
|
-
expect(errorsOf(PrivateGetTransferNoteQuery, { tenantId: 'surekeep' })).toEqual(expect.arrayContaining(['author', '
|
|
122
|
+
expect(errorsOf(PrivateGetTransferNoteQuery, { tenantId: 'surekeep' })).toEqual(expect.arrayContaining(['author', 'actorId']));
|
|
119
123
|
expect(errorsOf(PrivateListTransferNotesQuery, { ...caller, limit: '20' })).toEqual([]);
|
|
120
124
|
});
|
|
121
125
|
|
|
122
|
-
it('confirm-settlement pide el caller con el
|
|
126
|
+
it('confirm-settlement pide el caller con el id del operador', () => {
|
|
123
127
|
expect(errorsOf(PrivateConfirmTransferNoteSettlementRequest, caller)).toEqual([]);
|
|
124
|
-
expect(errorsOf(PrivateConfirmTransferNoteSettlementRequest, service)).toContain('
|
|
128
|
+
expect(errorsOf(PrivateConfirmTransferNoteSettlementRequest, service)).toContain('actorId');
|
|
129
|
+
});
|
|
130
|
+
|
|
131
|
+
it('el operador viaja por actorId; actor (email) es opcional', () => {
|
|
132
|
+
const { PrivateTransferNoteOperatorCaller } = TransferNote;
|
|
133
|
+
expect(errorsOf(PrivateTransferNoteOperatorCaller, caller)).toEqual([]);
|
|
134
|
+
expect(errorsOf(PrivateTransferNoteOperatorCaller, { ...caller, actor: 'operador@fsa.mx' })).toEqual([]);
|
|
135
|
+
expect(errorsOf(PrivateTransferNoteOperatorCaller, service)).toContain('actorId');
|
|
136
|
+
expect(errorsOf(PrivateTransferNoteOperatorCaller, { ...service, actorId: '' })).toContain('actorId');
|
|
137
|
+
expect(errorsOf(PrivateTransferNoteOperatorCaller, { ...service, actorId: 'operador@fsa.mx' })).toContain('actorId');
|
|
138
|
+
expect(errorsOf(PrivateTransferNoteOperatorCaller, { ...service, actorId: 'x'.repeat(129) })).toContain('actorId');
|
|
139
|
+
expect(errorsOf(PrivateTransferNoteOperatorCaller, { ...caller, actor: 'no-es-correo' })).toContain('actor');
|
|
125
140
|
});
|
|
126
141
|
|
|
127
142
|
it('el corte manual pide tenant, semana y author', () => {
|
|
128
143
|
expect(errorsOf(PrivateRunTransferNoteCutoffRequest, { ...service, isoWeek: '2026-W43' })).toEqual([]);
|
|
129
144
|
expect(errorsOf(PrivateRunTransferNoteCutoffRequest, { ...service, isoWeek: 'W43' })).toContain('isoWeek');
|
|
130
|
-
expect(Object.keys(plainToInstance(PrivateRunTransferNoteCutoffRequest, caller, { excludeExtraneousValues: true }))).not.toContain('
|
|
145
|
+
expect(Object.keys(plainToInstance(PrivateRunTransferNoteCutoffRequest, caller, { excludeExtraneousValues: true }))).not.toContain('actorId');
|
|
131
146
|
});
|
|
132
147
|
|
|
133
148
|
it('el ajuste es idempotente por adjustmentKey y lleva monto entero distinto de cero', () => {
|
|
@@ -5,9 +5,12 @@ export declare class PrivateReconciliationCaller {
|
|
|
5
5
|
tenantId: string;
|
|
6
6
|
author: string;
|
|
7
7
|
}
|
|
8
|
-
/** Caller del espejo que llama fiado-dashboard;
|
|
8
|
+
/** Caller del espejo que llama fiado-dashboard; el operador viaja por `actorId`. */
|
|
9
9
|
export declare class PrivateReconciliationOperatorCaller extends PrivateReconciliationCaller {
|
|
10
|
-
|
|
10
|
+
/** `sub` de Azure AD del operador del dashboard. */
|
|
11
|
+
actorId: string;
|
|
12
|
+
/** @deprecated Solo para la auditoría de loan-retail-audit. */
|
|
13
|
+
actor?: string;
|
|
11
14
|
}
|
|
12
15
|
/** Query de privateGetReconciliationItem. */
|
|
13
16
|
export declare class PrivateGetReconciliationItemQuery extends PrivateReconciliationOperatorCaller {
|
|
@@ -16,65 +19,98 @@ export declare class PrivateGetReconciliationItemQuery extends PrivateReconcilia
|
|
|
16
19
|
export declare class PrivateListReconciliationDefinitionsQuery extends ListReconciliationDefinitionsQuery {
|
|
17
20
|
tenantId: string;
|
|
18
21
|
author: string;
|
|
19
|
-
|
|
22
|
+
/** `sub` de Azure AD del operador del dashboard. */
|
|
23
|
+
actorId: string;
|
|
24
|
+
/** @deprecated Solo para la auditoría de loan-retail-audit. */
|
|
25
|
+
actor?: string;
|
|
20
26
|
}
|
|
21
27
|
/** Body de privateConfigureReconciliationDefinition. */
|
|
22
28
|
export declare class PrivateConfigureReconciliationDefinitionRequest extends ConfigureReconciliationDefinitionRequest {
|
|
23
29
|
tenantId: string;
|
|
24
30
|
author: string;
|
|
25
|
-
|
|
31
|
+
/** `sub` de Azure AD del operador del dashboard. */
|
|
32
|
+
actorId: string;
|
|
33
|
+
/** @deprecated Solo para la auditoría de loan-retail-audit. */
|
|
34
|
+
actor?: string;
|
|
26
35
|
}
|
|
27
36
|
/** Query de privateListReconciliationRuns. */
|
|
28
37
|
export declare class PrivateListReconciliationRunsQuery extends ListReconciliationRunsQuery {
|
|
29
38
|
tenantId: string;
|
|
30
39
|
author: string;
|
|
31
|
-
|
|
40
|
+
/** `sub` de Azure AD del operador del dashboard. */
|
|
41
|
+
actorId: string;
|
|
42
|
+
/** @deprecated Solo para la auditoría de loan-retail-audit. */
|
|
43
|
+
actor?: string;
|
|
32
44
|
}
|
|
33
45
|
/** Body de privateRunReconciliation: responde 202 con `runId`. */
|
|
34
46
|
export declare class PrivateRunReconciliationRequest extends RunReconciliationRequest {
|
|
35
47
|
tenantId: string;
|
|
36
48
|
author: string;
|
|
37
|
-
|
|
49
|
+
/** `sub` de Azure AD del operador del dashboard. */
|
|
50
|
+
actorId: string;
|
|
51
|
+
/** @deprecated Solo para la auditoría de loan-retail-audit. */
|
|
52
|
+
actor?: string;
|
|
38
53
|
}
|
|
39
54
|
/** Query de privateGetReconciliationMatrix. */
|
|
40
55
|
export declare class PrivateGetReconciliationMatrixQuery extends GetReconciliationMatrixQuery {
|
|
41
56
|
tenantId: string;
|
|
42
57
|
author: string;
|
|
43
|
-
|
|
58
|
+
/** `sub` de Azure AD del operador del dashboard. */
|
|
59
|
+
actorId: string;
|
|
60
|
+
/** @deprecated Solo para la auditoría de loan-retail-audit. */
|
|
61
|
+
actor?: string;
|
|
44
62
|
}
|
|
45
63
|
/** Query de privateGetReconciliationOverview. */
|
|
46
64
|
export declare class PrivateGetReconciliationOverviewQuery extends GetReconciliationOverviewQuery {
|
|
47
65
|
tenantId: string;
|
|
48
66
|
author: string;
|
|
49
|
-
|
|
67
|
+
/** `sub` de Azure AD del operador del dashboard. */
|
|
68
|
+
actorId: string;
|
|
69
|
+
/** @deprecated Solo para la auditoría de loan-retail-audit. */
|
|
70
|
+
actor?: string;
|
|
50
71
|
}
|
|
51
72
|
/** Query de privateGetReconciliationSummary. */
|
|
52
73
|
export declare class PrivateGetReconciliationSummaryQuery extends GetReconciliationSummaryQuery {
|
|
53
74
|
tenantId: string;
|
|
54
75
|
author: string;
|
|
55
|
-
|
|
76
|
+
/** `sub` de Azure AD del operador del dashboard. */
|
|
77
|
+
actorId: string;
|
|
78
|
+
/** @deprecated Solo para la auditoría de loan-retail-audit. */
|
|
79
|
+
actor?: string;
|
|
56
80
|
}
|
|
57
81
|
/** Query de privateListReconciliationItems. */
|
|
58
82
|
export declare class PrivateListReconciliationItemsQuery extends ListReconciliationItemsQuery {
|
|
59
83
|
tenantId: string;
|
|
60
84
|
author: string;
|
|
61
|
-
|
|
85
|
+
/** `sub` de Azure AD del operador del dashboard. */
|
|
86
|
+
actorId: string;
|
|
87
|
+
/** @deprecated Solo para la auditoría de loan-retail-audit. */
|
|
88
|
+
actor?: string;
|
|
62
89
|
}
|
|
63
90
|
/** Body de privateResolveReconciliationItem. */
|
|
64
91
|
export declare class PrivateResolveReconciliationItemRequest extends ResolveReconciliationItemRequest {
|
|
65
92
|
tenantId: string;
|
|
66
93
|
author: string;
|
|
67
|
-
|
|
94
|
+
/** `sub` de Azure AD del operador del dashboard. */
|
|
95
|
+
actorId: string;
|
|
96
|
+
/** @deprecated Solo para la auditoría de loan-retail-audit. */
|
|
97
|
+
actor?: string;
|
|
68
98
|
}
|
|
69
99
|
/** Body de privateReactivateReconciliationItem. */
|
|
70
100
|
export declare class PrivateReactivateReconciliationItemRequest extends ReactivateReconciliationItemRequest {
|
|
71
101
|
tenantId: string;
|
|
72
102
|
author: string;
|
|
73
|
-
|
|
103
|
+
/** `sub` de Azure AD del operador del dashboard. */
|
|
104
|
+
actorId: string;
|
|
105
|
+
/** @deprecated Solo para la auditoría de loan-retail-audit. */
|
|
106
|
+
actor?: string;
|
|
74
107
|
}
|
|
75
108
|
/** Body de privateAddReconciliationItemNote. */
|
|
76
109
|
export declare class PrivateAddReconciliationItemNoteRequest extends AddReconciliationItemNoteRequest {
|
|
77
110
|
tenantId: string;
|
|
78
111
|
author: string;
|
|
79
|
-
|
|
112
|
+
/** `sub` de Azure AD del operador del dashboard. */
|
|
113
|
+
actorId: string;
|
|
114
|
+
/** @deprecated Solo para la auditoría de loan-retail-audit. */
|
|
115
|
+
actor?: string;
|
|
80
116
|
}
|
|
@@ -25,12 +25,16 @@ __decorate([
|
|
|
25
25
|
(0, reconciliationRequestDecorators_1.RequiredId)(),
|
|
26
26
|
__metadata("design:type", String)
|
|
27
27
|
], PrivateReconciliationCaller.prototype, "author", void 0);
|
|
28
|
-
/** Caller del espejo que llama fiado-dashboard;
|
|
28
|
+
/** Caller del espejo que llama fiado-dashboard; el operador viaja por `actorId`. */
|
|
29
29
|
class PrivateReconciliationOperatorCaller extends PrivateReconciliationCaller {
|
|
30
30
|
}
|
|
31
31
|
exports.PrivateReconciliationOperatorCaller = PrivateReconciliationOperatorCaller;
|
|
32
32
|
__decorate([
|
|
33
|
-
(0, reconciliationRequestDecorators_1.
|
|
33
|
+
(0, reconciliationRequestDecorators_1.RequiredActorId)(),
|
|
34
|
+
__metadata("design:type", String)
|
|
35
|
+
], PrivateReconciliationOperatorCaller.prototype, "actorId", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, reconciliationRequestDecorators_1.OptionalEmail)(),
|
|
34
38
|
__metadata("design:type", String)
|
|
35
39
|
], PrivateReconciliationOperatorCaller.prototype, "actor", void 0);
|
|
36
40
|
/** Query de privateGetReconciliationItem. */
|
|
@@ -50,7 +54,11 @@ __decorate([
|
|
|
50
54
|
__metadata("design:type", String)
|
|
51
55
|
], PrivateListReconciliationDefinitionsQuery.prototype, "author", void 0);
|
|
52
56
|
__decorate([
|
|
53
|
-
(0, reconciliationRequestDecorators_1.
|
|
57
|
+
(0, reconciliationRequestDecorators_1.RequiredActorId)(),
|
|
58
|
+
__metadata("design:type", String)
|
|
59
|
+
], PrivateListReconciliationDefinitionsQuery.prototype, "actorId", void 0);
|
|
60
|
+
__decorate([
|
|
61
|
+
(0, reconciliationRequestDecorators_1.OptionalEmail)(),
|
|
54
62
|
__metadata("design:type", String)
|
|
55
63
|
], PrivateListReconciliationDefinitionsQuery.prototype, "actor", void 0);
|
|
56
64
|
/** Body de privateConfigureReconciliationDefinition. */
|
|
@@ -66,7 +74,11 @@ __decorate([
|
|
|
66
74
|
__metadata("design:type", String)
|
|
67
75
|
], PrivateConfigureReconciliationDefinitionRequest.prototype, "author", void 0);
|
|
68
76
|
__decorate([
|
|
69
|
-
(0, reconciliationRequestDecorators_1.
|
|
77
|
+
(0, reconciliationRequestDecorators_1.RequiredActorId)(),
|
|
78
|
+
__metadata("design:type", String)
|
|
79
|
+
], PrivateConfigureReconciliationDefinitionRequest.prototype, "actorId", void 0);
|
|
80
|
+
__decorate([
|
|
81
|
+
(0, reconciliationRequestDecorators_1.OptionalEmail)(),
|
|
70
82
|
__metadata("design:type", String)
|
|
71
83
|
], PrivateConfigureReconciliationDefinitionRequest.prototype, "actor", void 0);
|
|
72
84
|
/** Query de privateListReconciliationRuns. */
|
|
@@ -82,7 +94,11 @@ __decorate([
|
|
|
82
94
|
__metadata("design:type", String)
|
|
83
95
|
], PrivateListReconciliationRunsQuery.prototype, "author", void 0);
|
|
84
96
|
__decorate([
|
|
85
|
-
(0, reconciliationRequestDecorators_1.
|
|
97
|
+
(0, reconciliationRequestDecorators_1.RequiredActorId)(),
|
|
98
|
+
__metadata("design:type", String)
|
|
99
|
+
], PrivateListReconciliationRunsQuery.prototype, "actorId", void 0);
|
|
100
|
+
__decorate([
|
|
101
|
+
(0, reconciliationRequestDecorators_1.OptionalEmail)(),
|
|
86
102
|
__metadata("design:type", String)
|
|
87
103
|
], PrivateListReconciliationRunsQuery.prototype, "actor", void 0);
|
|
88
104
|
/** Body de privateRunReconciliation: responde 202 con `runId`. */
|
|
@@ -98,7 +114,11 @@ __decorate([
|
|
|
98
114
|
__metadata("design:type", String)
|
|
99
115
|
], PrivateRunReconciliationRequest.prototype, "author", void 0);
|
|
100
116
|
__decorate([
|
|
101
|
-
(0, reconciliationRequestDecorators_1.
|
|
117
|
+
(0, reconciliationRequestDecorators_1.RequiredActorId)(),
|
|
118
|
+
__metadata("design:type", String)
|
|
119
|
+
], PrivateRunReconciliationRequest.prototype, "actorId", void 0);
|
|
120
|
+
__decorate([
|
|
121
|
+
(0, reconciliationRequestDecorators_1.OptionalEmail)(),
|
|
102
122
|
__metadata("design:type", String)
|
|
103
123
|
], PrivateRunReconciliationRequest.prototype, "actor", void 0);
|
|
104
124
|
/** Query de privateGetReconciliationMatrix. */
|
|
@@ -114,7 +134,11 @@ __decorate([
|
|
|
114
134
|
__metadata("design:type", String)
|
|
115
135
|
], PrivateGetReconciliationMatrixQuery.prototype, "author", void 0);
|
|
116
136
|
__decorate([
|
|
117
|
-
(0, reconciliationRequestDecorators_1.
|
|
137
|
+
(0, reconciliationRequestDecorators_1.RequiredActorId)(),
|
|
138
|
+
__metadata("design:type", String)
|
|
139
|
+
], PrivateGetReconciliationMatrixQuery.prototype, "actorId", void 0);
|
|
140
|
+
__decorate([
|
|
141
|
+
(0, reconciliationRequestDecorators_1.OptionalEmail)(),
|
|
118
142
|
__metadata("design:type", String)
|
|
119
143
|
], PrivateGetReconciliationMatrixQuery.prototype, "actor", void 0);
|
|
120
144
|
/** Query de privateGetReconciliationOverview. */
|
|
@@ -130,7 +154,11 @@ __decorate([
|
|
|
130
154
|
__metadata("design:type", String)
|
|
131
155
|
], PrivateGetReconciliationOverviewQuery.prototype, "author", void 0);
|
|
132
156
|
__decorate([
|
|
133
|
-
(0, reconciliationRequestDecorators_1.
|
|
157
|
+
(0, reconciliationRequestDecorators_1.RequiredActorId)(),
|
|
158
|
+
__metadata("design:type", String)
|
|
159
|
+
], PrivateGetReconciliationOverviewQuery.prototype, "actorId", void 0);
|
|
160
|
+
__decorate([
|
|
161
|
+
(0, reconciliationRequestDecorators_1.OptionalEmail)(),
|
|
134
162
|
__metadata("design:type", String)
|
|
135
163
|
], PrivateGetReconciliationOverviewQuery.prototype, "actor", void 0);
|
|
136
164
|
/** Query de privateGetReconciliationSummary. */
|
|
@@ -146,7 +174,11 @@ __decorate([
|
|
|
146
174
|
__metadata("design:type", String)
|
|
147
175
|
], PrivateGetReconciliationSummaryQuery.prototype, "author", void 0);
|
|
148
176
|
__decorate([
|
|
149
|
-
(0, reconciliationRequestDecorators_1.
|
|
177
|
+
(0, reconciliationRequestDecorators_1.RequiredActorId)(),
|
|
178
|
+
__metadata("design:type", String)
|
|
179
|
+
], PrivateGetReconciliationSummaryQuery.prototype, "actorId", void 0);
|
|
180
|
+
__decorate([
|
|
181
|
+
(0, reconciliationRequestDecorators_1.OptionalEmail)(),
|
|
150
182
|
__metadata("design:type", String)
|
|
151
183
|
], PrivateGetReconciliationSummaryQuery.prototype, "actor", void 0);
|
|
152
184
|
/** Query de privateListReconciliationItems. */
|
|
@@ -162,7 +194,11 @@ __decorate([
|
|
|
162
194
|
__metadata("design:type", String)
|
|
163
195
|
], PrivateListReconciliationItemsQuery.prototype, "author", void 0);
|
|
164
196
|
__decorate([
|
|
165
|
-
(0, reconciliationRequestDecorators_1.
|
|
197
|
+
(0, reconciliationRequestDecorators_1.RequiredActorId)(),
|
|
198
|
+
__metadata("design:type", String)
|
|
199
|
+
], PrivateListReconciliationItemsQuery.prototype, "actorId", void 0);
|
|
200
|
+
__decorate([
|
|
201
|
+
(0, reconciliationRequestDecorators_1.OptionalEmail)(),
|
|
166
202
|
__metadata("design:type", String)
|
|
167
203
|
], PrivateListReconciliationItemsQuery.prototype, "actor", void 0);
|
|
168
204
|
/** Body de privateResolveReconciliationItem. */
|
|
@@ -178,7 +214,11 @@ __decorate([
|
|
|
178
214
|
__metadata("design:type", String)
|
|
179
215
|
], PrivateResolveReconciliationItemRequest.prototype, "author", void 0);
|
|
180
216
|
__decorate([
|
|
181
|
-
(0, reconciliationRequestDecorators_1.
|
|
217
|
+
(0, reconciliationRequestDecorators_1.RequiredActorId)(),
|
|
218
|
+
__metadata("design:type", String)
|
|
219
|
+
], PrivateResolveReconciliationItemRequest.prototype, "actorId", void 0);
|
|
220
|
+
__decorate([
|
|
221
|
+
(0, reconciliationRequestDecorators_1.OptionalEmail)(),
|
|
182
222
|
__metadata("design:type", String)
|
|
183
223
|
], PrivateResolveReconciliationItemRequest.prototype, "actor", void 0);
|
|
184
224
|
/** Body de privateReactivateReconciliationItem. */
|
|
@@ -194,7 +234,11 @@ __decorate([
|
|
|
194
234
|
__metadata("design:type", String)
|
|
195
235
|
], PrivateReactivateReconciliationItemRequest.prototype, "author", void 0);
|
|
196
236
|
__decorate([
|
|
197
|
-
(0, reconciliationRequestDecorators_1.
|
|
237
|
+
(0, reconciliationRequestDecorators_1.RequiredActorId)(),
|
|
238
|
+
__metadata("design:type", String)
|
|
239
|
+
], PrivateReactivateReconciliationItemRequest.prototype, "actorId", void 0);
|
|
240
|
+
__decorate([
|
|
241
|
+
(0, reconciliationRequestDecorators_1.OptionalEmail)(),
|
|
198
242
|
__metadata("design:type", String)
|
|
199
243
|
], PrivateReactivateReconciliationItemRequest.prototype, "actor", void 0);
|
|
200
244
|
/** Body de privateAddReconciliationItemNote. */
|
|
@@ -210,6 +254,10 @@ __decorate([
|
|
|
210
254
|
__metadata("design:type", String)
|
|
211
255
|
], PrivateAddReconciliationItemNoteRequest.prototype, "author", void 0);
|
|
212
256
|
__decorate([
|
|
213
|
-
(0, reconciliationRequestDecorators_1.
|
|
257
|
+
(0, reconciliationRequestDecorators_1.RequiredActorId)(),
|
|
258
|
+
__metadata("design:type", String)
|
|
259
|
+
], PrivateAddReconciliationItemNoteRequest.prototype, "actorId", void 0);
|
|
260
|
+
__decorate([
|
|
261
|
+
(0, reconciliationRequestDecorators_1.OptionalEmail)(),
|
|
214
262
|
__metadata("design:type", String)
|
|
215
263
|
], PrivateAddReconciliationItemNoteRequest.prototype, "actor", void 0);
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
export { PageLimit, PageToken, RequiredEmail, RequiredId, RequiredReason } from '../../../transferNote/dtos/requests/transferNoteRequestDecorators';
|
|
1
|
+
export { OptionalEmail, PageLimit, PageToken, RequiredActorId, RequiredEmail, RequiredId, RequiredReason } from '../../../transferNote/dtos/requests/transferNoteRequestDecorators';
|
|
2
2
|
/** Periodo obligatorio: día, semana ISO o mes. */
|
|
3
3
|
export declare function PeriodKey(): PropertyDecorator;
|
|
4
4
|
/** Texto de 10+ caracteres sin contar espacios de relleno. */
|
|
5
5
|
export declare function NoteText(): PropertyDecorator;
|
|
6
|
-
/** Email opcional. */
|
|
7
|
-
export declare function OptionalEmail(): PropertyDecorator;
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RequiredReason = exports.RequiredId = exports.RequiredEmail = exports.PageToken = exports.PageLimit = void 0;
|
|
3
|
+
exports.RequiredReason = exports.RequiredId = exports.RequiredEmail = exports.RequiredActorId = exports.PageToken = exports.PageLimit = exports.OptionalEmail = void 0;
|
|
4
4
|
exports.PeriodKey = PeriodKey;
|
|
5
5
|
exports.NoteText = NoteText;
|
|
6
|
-
exports.OptionalEmail = OptionalEmail;
|
|
7
6
|
const class_transformer_1 = require("class-transformer");
|
|
8
7
|
const class_validator_1 = require("class-validator");
|
|
9
8
|
const reconciliationValidation_1 = require("../../constants/reconciliationValidation");
|
|
10
9
|
var transferNoteRequestDecorators_1 = require("../../../transferNote/dtos/requests/transferNoteRequestDecorators");
|
|
10
|
+
Object.defineProperty(exports, "OptionalEmail", { enumerable: true, get: function () { return transferNoteRequestDecorators_1.OptionalEmail; } });
|
|
11
11
|
Object.defineProperty(exports, "PageLimit", { enumerable: true, get: function () { return transferNoteRequestDecorators_1.PageLimit; } });
|
|
12
12
|
Object.defineProperty(exports, "PageToken", { enumerable: true, get: function () { return transferNoteRequestDecorators_1.PageToken; } });
|
|
13
|
+
Object.defineProperty(exports, "RequiredActorId", { enumerable: true, get: function () { return transferNoteRequestDecorators_1.RequiredActorId; } });
|
|
13
14
|
Object.defineProperty(exports, "RequiredEmail", { enumerable: true, get: function () { return transferNoteRequestDecorators_1.RequiredEmail; } });
|
|
14
15
|
Object.defineProperty(exports, "RequiredId", { enumerable: true, get: function () { return transferNoteRequestDecorators_1.RequiredId; } });
|
|
15
16
|
Object.defineProperty(exports, "RequiredReason", { enumerable: true, get: function () { return transferNoteRequestDecorators_1.RequiredReason; } });
|
|
@@ -29,11 +30,3 @@ function NoteText() {
|
|
|
29
30
|
(0, class_validator_1.MinLength)(reconciliationValidation_1.RECONCILIATION_MIN_NOTE_LENGTH)(target, key);
|
|
30
31
|
};
|
|
31
32
|
}
|
|
32
|
-
/** Email opcional. */
|
|
33
|
-
function OptionalEmail() {
|
|
34
|
-
return (target, key) => {
|
|
35
|
-
(0, class_transformer_1.Expose)()(target, key);
|
|
36
|
-
(0, class_validator_1.IsOptional)()(target, key);
|
|
37
|
-
(0, class_validator_1.IsEmail)()(target, key);
|
|
38
|
-
};
|
|
39
|
-
}
|
|
@@ -5,3 +5,5 @@ export declare const TRANSFER_NOTE_ISO_WEEK_PATTERN: RegExp;
|
|
|
5
5
|
/** CLABE interbancaria de 18 dígitos. */
|
|
6
6
|
export declare const TRANSFER_NOTE_CLABE_PATTERN: RegExp;
|
|
7
7
|
export declare const TRANSFER_NOTE_MAX_PAGE_SIZE = 100;
|
|
8
|
+
/** Largo máximo del id del operador (`sub` de Azure AD). */
|
|
9
|
+
export declare const TRANSFER_NOTE_ACTOR_ID_MAX_LENGTH = 128;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TRANSFER_NOTE_MAX_PAGE_SIZE = exports.TRANSFER_NOTE_CLABE_PATTERN = exports.TRANSFER_NOTE_ISO_WEEK_PATTERN = exports.TRANSFER_NOTE_MIN_REASON_LENGTH = void 0;
|
|
3
|
+
exports.TRANSFER_NOTE_ACTOR_ID_MAX_LENGTH = exports.TRANSFER_NOTE_MAX_PAGE_SIZE = exports.TRANSFER_NOTE_CLABE_PATTERN = exports.TRANSFER_NOTE_ISO_WEEK_PATTERN = exports.TRANSFER_NOTE_MIN_REASON_LENGTH = void 0;
|
|
4
4
|
/** Largo mínimo de la razón de una emisión manual y de una objeción. */
|
|
5
5
|
exports.TRANSFER_NOTE_MIN_REASON_LENGTH = 20;
|
|
6
6
|
/** Semana ISO `YYYY-Www`, p. ej. `2026-W43`. */
|
|
@@ -8,3 +8,5 @@ exports.TRANSFER_NOTE_ISO_WEEK_PATTERN = /^\d{4}-W(0[1-9]|[1-4]\d|5[0-3])$/;
|
|
|
8
8
|
/** CLABE interbancaria de 18 dígitos. */
|
|
9
9
|
exports.TRANSFER_NOTE_CLABE_PATTERN = /^\d{18}$/;
|
|
10
10
|
exports.TRANSFER_NOTE_MAX_PAGE_SIZE = 100;
|
|
11
|
+
/** Largo máximo del id del operador (`sub` de Azure AD). */
|
|
12
|
+
exports.TRANSFER_NOTE_ACTOR_ID_MAX_LENGTH = 128;
|
|
@@ -6,45 +6,66 @@ export declare class PrivateTransferNoteCaller {
|
|
|
6
6
|
tenantId: string;
|
|
7
7
|
author: string;
|
|
8
8
|
}
|
|
9
|
-
/** Caller del espejo que llama fiado-dashboard;
|
|
9
|
+
/** Caller del espejo que llama fiado-dashboard; el operador viaja por `actorId`. */
|
|
10
10
|
export declare class PrivateTransferNoteOperatorCaller extends PrivateTransferNoteCaller {
|
|
11
|
-
|
|
11
|
+
/** `sub` de Azure AD del operador del dashboard. */
|
|
12
|
+
actorId: string;
|
|
13
|
+
/** @deprecated Solo para la auditoría de loan-retail-audit. */
|
|
14
|
+
actor?: string;
|
|
12
15
|
}
|
|
13
16
|
/** Body de privatePreviewTransferNote. */
|
|
14
17
|
export declare class PrivatePreviewTransferNoteRequest extends PreviewTransferNoteRequest {
|
|
15
18
|
tenantId: string;
|
|
16
19
|
author: string;
|
|
17
|
-
|
|
20
|
+
/** `sub` de Azure AD del operador del dashboard. */
|
|
21
|
+
actorId: string;
|
|
22
|
+
/** @deprecated Solo para la auditoría de loan-retail-audit. */
|
|
23
|
+
actor?: string;
|
|
18
24
|
}
|
|
19
25
|
/** Body de privateIssueTransferNote. */
|
|
20
26
|
export declare class PrivateIssueTransferNoteRequest extends IssueTransferNoteRequest {
|
|
21
27
|
tenantId: string;
|
|
22
28
|
author: string;
|
|
23
|
-
|
|
29
|
+
/** `sub` de Azure AD del operador del dashboard. */
|
|
30
|
+
actorId: string;
|
|
31
|
+
/** @deprecated Solo para la auditoría de loan-retail-audit. */
|
|
32
|
+
actor?: string;
|
|
24
33
|
}
|
|
25
34
|
/** Body de privateCaptureTransferNoteSpei. */
|
|
26
35
|
export declare class PrivateCaptureTransferNoteSpeiRequest extends CaptureTransferNoteSpeiRequest {
|
|
27
36
|
tenantId: string;
|
|
28
37
|
author: string;
|
|
29
|
-
|
|
38
|
+
/** `sub` de Azure AD del operador del dashboard. */
|
|
39
|
+
actorId: string;
|
|
40
|
+
/** @deprecated Solo para la auditoría de loan-retail-audit. */
|
|
41
|
+
actor?: string;
|
|
30
42
|
}
|
|
31
43
|
/** Body de privateRevertTransferNoteSpei. */
|
|
32
44
|
export declare class PrivateRevertTransferNoteSpeiRequest extends RevertTransferNoteSpeiRequest {
|
|
33
45
|
tenantId: string;
|
|
34
46
|
author: string;
|
|
35
|
-
|
|
47
|
+
/** `sub` de Azure AD del operador del dashboard. */
|
|
48
|
+
actorId: string;
|
|
49
|
+
/** @deprecated Solo para la auditoría de loan-retail-audit. */
|
|
50
|
+
actor?: string;
|
|
36
51
|
}
|
|
37
52
|
/** Body de privateCancelTransferNote. */
|
|
38
53
|
export declare class PrivateCancelTransferNoteRequest extends CancelTransferNoteRequest {
|
|
39
54
|
tenantId: string;
|
|
40
55
|
author: string;
|
|
41
|
-
|
|
56
|
+
/** `sub` de Azure AD del operador del dashboard. */
|
|
57
|
+
actorId: string;
|
|
58
|
+
/** @deprecated Solo para la auditoría de loan-retail-audit. */
|
|
59
|
+
actor?: string;
|
|
42
60
|
}
|
|
43
61
|
/** Body de privateResolveTransferNoteDispute. */
|
|
44
62
|
export declare class PrivateResolveTransferNoteDisputeRequest extends ResolveTransferNoteDisputeRequest {
|
|
45
63
|
tenantId: string;
|
|
46
64
|
author: string;
|
|
47
|
-
|
|
65
|
+
/** `sub` de Azure AD del operador del dashboard. */
|
|
66
|
+
actorId: string;
|
|
67
|
+
/** @deprecated Solo para la auditoría de loan-retail-audit. */
|
|
68
|
+
actor?: string;
|
|
48
69
|
}
|
|
49
70
|
/** Body de privateConfirmTransferNoteReception. */
|
|
50
71
|
export declare class PrivateConfirmTransferNoteReceptionRequest extends PrivateTransferNoteOperatorCaller {
|
|
@@ -71,19 +92,28 @@ export declare class PrivateGetTransferNotePdfQuery extends PrivateTransferNoteO
|
|
|
71
92
|
export declare class PrivateListTransferNotesQuery extends ListTransferNotesQuery {
|
|
72
93
|
tenantId: string;
|
|
73
94
|
author: string;
|
|
74
|
-
|
|
95
|
+
/** `sub` de Azure AD del operador del dashboard. */
|
|
96
|
+
actorId: string;
|
|
97
|
+
/** @deprecated Solo para la auditoría de loan-retail-audit. */
|
|
98
|
+
actor?: string;
|
|
75
99
|
}
|
|
76
100
|
/** Query de privateListTransferNotePool. */
|
|
77
101
|
export declare class PrivateListTransferNotePoolQuery extends ListTransferNotePoolQuery {
|
|
78
102
|
tenantId: string;
|
|
79
103
|
author: string;
|
|
80
|
-
|
|
104
|
+
/** `sub` de Azure AD del operador del dashboard. */
|
|
105
|
+
actorId: string;
|
|
106
|
+
/** @deprecated Solo para la auditoría de loan-retail-audit. */
|
|
107
|
+
actor?: string;
|
|
81
108
|
}
|
|
82
109
|
/** Query de privateListTransferNoteItems. */
|
|
83
110
|
export declare class PrivateListTransferNoteItemsQuery extends ListTransferNoteItemsQuery {
|
|
84
111
|
tenantId: string;
|
|
85
112
|
author: string;
|
|
86
|
-
|
|
113
|
+
/** `sub` de Azure AD del operador del dashboard. */
|
|
114
|
+
actorId: string;
|
|
115
|
+
/** @deprecated Solo para la auditoría de loan-retail-audit. */
|
|
116
|
+
actor?: string;
|
|
87
117
|
}
|
|
88
118
|
/** Body de privateRunTransferNoteCutoff: responde 202 con `runId` y corre asíncrono. */
|
|
89
119
|
export declare class PrivateRunTransferNoteCutoffRequest extends PrivateTransferNoteCaller {
|
|
@@ -29,12 +29,16 @@ __decorate([
|
|
|
29
29
|
(0, transferNoteRequestDecorators_1.RequiredId)(),
|
|
30
30
|
__metadata("design:type", String)
|
|
31
31
|
], PrivateTransferNoteCaller.prototype, "author", void 0);
|
|
32
|
-
/** Caller del espejo que llama fiado-dashboard;
|
|
32
|
+
/** Caller del espejo que llama fiado-dashboard; el operador viaja por `actorId`. */
|
|
33
33
|
class PrivateTransferNoteOperatorCaller extends PrivateTransferNoteCaller {
|
|
34
34
|
}
|
|
35
35
|
exports.PrivateTransferNoteOperatorCaller = PrivateTransferNoteOperatorCaller;
|
|
36
36
|
__decorate([
|
|
37
|
-
(0, transferNoteRequestDecorators_1.
|
|
37
|
+
(0, transferNoteRequestDecorators_1.RequiredActorId)(),
|
|
38
|
+
__metadata("design:type", String)
|
|
39
|
+
], PrivateTransferNoteOperatorCaller.prototype, "actorId", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, transferNoteRequestDecorators_1.OptionalEmail)(),
|
|
38
42
|
__metadata("design:type", String)
|
|
39
43
|
], PrivateTransferNoteOperatorCaller.prototype, "actor", void 0);
|
|
40
44
|
/** Body de privatePreviewTransferNote. */
|
|
@@ -50,7 +54,11 @@ __decorate([
|
|
|
50
54
|
__metadata("design:type", String)
|
|
51
55
|
], PrivatePreviewTransferNoteRequest.prototype, "author", void 0);
|
|
52
56
|
__decorate([
|
|
53
|
-
(0, transferNoteRequestDecorators_1.
|
|
57
|
+
(0, transferNoteRequestDecorators_1.RequiredActorId)(),
|
|
58
|
+
__metadata("design:type", String)
|
|
59
|
+
], PrivatePreviewTransferNoteRequest.prototype, "actorId", void 0);
|
|
60
|
+
__decorate([
|
|
61
|
+
(0, transferNoteRequestDecorators_1.OptionalEmail)(),
|
|
54
62
|
__metadata("design:type", String)
|
|
55
63
|
], PrivatePreviewTransferNoteRequest.prototype, "actor", void 0);
|
|
56
64
|
/** Body de privateIssueTransferNote. */
|
|
@@ -66,7 +74,11 @@ __decorate([
|
|
|
66
74
|
__metadata("design:type", String)
|
|
67
75
|
], PrivateIssueTransferNoteRequest.prototype, "author", void 0);
|
|
68
76
|
__decorate([
|
|
69
|
-
(0, transferNoteRequestDecorators_1.
|
|
77
|
+
(0, transferNoteRequestDecorators_1.RequiredActorId)(),
|
|
78
|
+
__metadata("design:type", String)
|
|
79
|
+
], PrivateIssueTransferNoteRequest.prototype, "actorId", void 0);
|
|
80
|
+
__decorate([
|
|
81
|
+
(0, transferNoteRequestDecorators_1.OptionalEmail)(),
|
|
70
82
|
__metadata("design:type", String)
|
|
71
83
|
], PrivateIssueTransferNoteRequest.prototype, "actor", void 0);
|
|
72
84
|
/** Body de privateCaptureTransferNoteSpei. */
|
|
@@ -82,7 +94,11 @@ __decorate([
|
|
|
82
94
|
__metadata("design:type", String)
|
|
83
95
|
], PrivateCaptureTransferNoteSpeiRequest.prototype, "author", void 0);
|
|
84
96
|
__decorate([
|
|
85
|
-
(0, transferNoteRequestDecorators_1.
|
|
97
|
+
(0, transferNoteRequestDecorators_1.RequiredActorId)(),
|
|
98
|
+
__metadata("design:type", String)
|
|
99
|
+
], PrivateCaptureTransferNoteSpeiRequest.prototype, "actorId", void 0);
|
|
100
|
+
__decorate([
|
|
101
|
+
(0, transferNoteRequestDecorators_1.OptionalEmail)(),
|
|
86
102
|
__metadata("design:type", String)
|
|
87
103
|
], PrivateCaptureTransferNoteSpeiRequest.prototype, "actor", void 0);
|
|
88
104
|
/** Body de privateRevertTransferNoteSpei. */
|
|
@@ -98,7 +114,11 @@ __decorate([
|
|
|
98
114
|
__metadata("design:type", String)
|
|
99
115
|
], PrivateRevertTransferNoteSpeiRequest.prototype, "author", void 0);
|
|
100
116
|
__decorate([
|
|
101
|
-
(0, transferNoteRequestDecorators_1.
|
|
117
|
+
(0, transferNoteRequestDecorators_1.RequiredActorId)(),
|
|
118
|
+
__metadata("design:type", String)
|
|
119
|
+
], PrivateRevertTransferNoteSpeiRequest.prototype, "actorId", void 0);
|
|
120
|
+
__decorate([
|
|
121
|
+
(0, transferNoteRequestDecorators_1.OptionalEmail)(),
|
|
102
122
|
__metadata("design:type", String)
|
|
103
123
|
], PrivateRevertTransferNoteSpeiRequest.prototype, "actor", void 0);
|
|
104
124
|
/** Body de privateCancelTransferNote. */
|
|
@@ -114,7 +134,11 @@ __decorate([
|
|
|
114
134
|
__metadata("design:type", String)
|
|
115
135
|
], PrivateCancelTransferNoteRequest.prototype, "author", void 0);
|
|
116
136
|
__decorate([
|
|
117
|
-
(0, transferNoteRequestDecorators_1.
|
|
137
|
+
(0, transferNoteRequestDecorators_1.RequiredActorId)(),
|
|
138
|
+
__metadata("design:type", String)
|
|
139
|
+
], PrivateCancelTransferNoteRequest.prototype, "actorId", void 0);
|
|
140
|
+
__decorate([
|
|
141
|
+
(0, transferNoteRequestDecorators_1.OptionalEmail)(),
|
|
118
142
|
__metadata("design:type", String)
|
|
119
143
|
], PrivateCancelTransferNoteRequest.prototype, "actor", void 0);
|
|
120
144
|
/** Body de privateResolveTransferNoteDispute. */
|
|
@@ -130,7 +154,11 @@ __decorate([
|
|
|
130
154
|
__metadata("design:type", String)
|
|
131
155
|
], PrivateResolveTransferNoteDisputeRequest.prototype, "author", void 0);
|
|
132
156
|
__decorate([
|
|
133
|
-
(0, transferNoteRequestDecorators_1.
|
|
157
|
+
(0, transferNoteRequestDecorators_1.RequiredActorId)(),
|
|
158
|
+
__metadata("design:type", String)
|
|
159
|
+
], PrivateResolveTransferNoteDisputeRequest.prototype, "actorId", void 0);
|
|
160
|
+
__decorate([
|
|
161
|
+
(0, transferNoteRequestDecorators_1.OptionalEmail)(),
|
|
134
162
|
__metadata("design:type", String)
|
|
135
163
|
], PrivateResolveTransferNoteDisputeRequest.prototype, "actor", void 0);
|
|
136
164
|
/** Body de privateConfirmTransferNoteReception. */
|
|
@@ -174,7 +202,11 @@ __decorate([
|
|
|
174
202
|
__metadata("design:type", String)
|
|
175
203
|
], PrivateListTransferNotesQuery.prototype, "author", void 0);
|
|
176
204
|
__decorate([
|
|
177
|
-
(0, transferNoteRequestDecorators_1.
|
|
205
|
+
(0, transferNoteRequestDecorators_1.RequiredActorId)(),
|
|
206
|
+
__metadata("design:type", String)
|
|
207
|
+
], PrivateListTransferNotesQuery.prototype, "actorId", void 0);
|
|
208
|
+
__decorate([
|
|
209
|
+
(0, transferNoteRequestDecorators_1.OptionalEmail)(),
|
|
178
210
|
__metadata("design:type", String)
|
|
179
211
|
], PrivateListTransferNotesQuery.prototype, "actor", void 0);
|
|
180
212
|
/** Query de privateListTransferNotePool. */
|
|
@@ -190,7 +222,11 @@ __decorate([
|
|
|
190
222
|
__metadata("design:type", String)
|
|
191
223
|
], PrivateListTransferNotePoolQuery.prototype, "author", void 0);
|
|
192
224
|
__decorate([
|
|
193
|
-
(0, transferNoteRequestDecorators_1.
|
|
225
|
+
(0, transferNoteRequestDecorators_1.RequiredActorId)(),
|
|
226
|
+
__metadata("design:type", String)
|
|
227
|
+
], PrivateListTransferNotePoolQuery.prototype, "actorId", void 0);
|
|
228
|
+
__decorate([
|
|
229
|
+
(0, transferNoteRequestDecorators_1.OptionalEmail)(),
|
|
194
230
|
__metadata("design:type", String)
|
|
195
231
|
], PrivateListTransferNotePoolQuery.prototype, "actor", void 0);
|
|
196
232
|
/** Query de privateListTransferNoteItems. */
|
|
@@ -206,7 +242,11 @@ __decorate([
|
|
|
206
242
|
__metadata("design:type", String)
|
|
207
243
|
], PrivateListTransferNoteItemsQuery.prototype, "author", void 0);
|
|
208
244
|
__decorate([
|
|
209
|
-
(0, transferNoteRequestDecorators_1.
|
|
245
|
+
(0, transferNoteRequestDecorators_1.RequiredActorId)(),
|
|
246
|
+
__metadata("design:type", String)
|
|
247
|
+
], PrivateListTransferNoteItemsQuery.prototype, "actorId", void 0);
|
|
248
|
+
__decorate([
|
|
249
|
+
(0, transferNoteRequestDecorators_1.OptionalEmail)(),
|
|
210
250
|
__metadata("design:type", String)
|
|
211
251
|
], PrivateListTransferNoteItemsQuery.prototype, "actor", void 0);
|
|
212
252
|
/** Body de privateRunTransferNoteCutoff: responde 202 con `runId` y corre asíncrono. */
|
|
@@ -6,6 +6,10 @@ export declare function RequiredReason(): PropertyDecorator;
|
|
|
6
6
|
export declare function RequiredId(): PropertyDecorator;
|
|
7
7
|
/** Email obligatorio. */
|
|
8
8
|
export declare function RequiredEmail(): PropertyDecorator;
|
|
9
|
+
/** Email opcional. */
|
|
10
|
+
export declare function OptionalEmail(): PropertyDecorator;
|
|
11
|
+
/** Id obligatorio del operador: no vacío, acotado y nunca con forma de email. */
|
|
12
|
+
export declare function RequiredActorId(): PropertyDecorator;
|
|
9
13
|
/** Semana ISO opcional `YYYY-Www`. */
|
|
10
14
|
export declare function OptionalIsoWeek(): PropertyDecorator;
|
|
11
15
|
/** Tamaño de página opcional, 1 a 100, llega como string en el query. */
|
|
@@ -4,6 +4,8 @@ exports.LongReason = LongReason;
|
|
|
4
4
|
exports.RequiredReason = RequiredReason;
|
|
5
5
|
exports.RequiredId = RequiredId;
|
|
6
6
|
exports.RequiredEmail = RequiredEmail;
|
|
7
|
+
exports.OptionalEmail = OptionalEmail;
|
|
8
|
+
exports.RequiredActorId = RequiredActorId;
|
|
7
9
|
exports.OptionalIsoWeek = OptionalIsoWeek;
|
|
8
10
|
exports.PageLimit = PageLimit;
|
|
9
11
|
exports.PageToken = PageToken;
|
|
@@ -44,6 +46,30 @@ function RequiredEmail() {
|
|
|
44
46
|
(0, class_validator_1.IsEmail)()(target, key);
|
|
45
47
|
};
|
|
46
48
|
}
|
|
49
|
+
/** Email opcional. */
|
|
50
|
+
function OptionalEmail() {
|
|
51
|
+
return (target, key) => {
|
|
52
|
+
(0, class_transformer_1.Expose)()(target, key);
|
|
53
|
+
(0, class_validator_1.IsOptional)()(target, key);
|
|
54
|
+
(0, class_validator_1.IsEmail)()(target, key);
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
/** Id obligatorio del operador: no vacío, acotado y nunca con forma de email. */
|
|
58
|
+
function RequiredActorId() {
|
|
59
|
+
return (target, key) => {
|
|
60
|
+
(0, class_transformer_1.Expose)()(target, key);
|
|
61
|
+
(0, class_validator_1.IsString)()(target, key);
|
|
62
|
+
(0, class_validator_1.IsNotEmpty)()(target, key);
|
|
63
|
+
(0, class_validator_1.MaxLength)(transferNoteValidation_1.TRANSFER_NOTE_ACTOR_ID_MAX_LENGTH)(target, key);
|
|
64
|
+
(0, class_validator_1.ValidateBy)({
|
|
65
|
+
name: 'isNotEmail',
|
|
66
|
+
validator: {
|
|
67
|
+
validate: (value) => typeof value === 'string' && !(0, class_validator_1.isEmail)(value),
|
|
68
|
+
defaultMessage: () => '$property no puede ser un email',
|
|
69
|
+
},
|
|
70
|
+
})(target, key);
|
|
71
|
+
};
|
|
72
|
+
}
|
|
47
73
|
/** Semana ISO opcional `YYYY-Www`. */
|
|
48
74
|
function OptionalIsoWeek() {
|
|
49
75
|
return (target, key) => {
|
package/package.json
CHANGED
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
ListReconciliationItemsQuery,
|
|
14
14
|
ListReconciliationRunsQuery,
|
|
15
15
|
} from './ReconciliationQueries';
|
|
16
|
-
import {
|
|
16
|
+
import { OptionalEmail, RequiredActorId, RequiredId } from './reconciliationRequestDecorators';
|
|
17
17
|
|
|
18
18
|
/** Tenant y servicio que llama; el lambda valida `author` contra su lista permitida. */
|
|
19
19
|
export class PrivateReconciliationCaller {
|
|
@@ -24,10 +24,15 @@ export class PrivateReconciliationCaller {
|
|
|
24
24
|
author!: string;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
/** Caller del espejo que llama fiado-dashboard;
|
|
27
|
+
/** Caller del espejo que llama fiado-dashboard; el operador viaja por `actorId`. */
|
|
28
28
|
export class PrivateReconciliationOperatorCaller extends PrivateReconciliationCaller {
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
/** `sub` de Azure AD del operador del dashboard. */
|
|
30
|
+
@RequiredActorId()
|
|
31
|
+
actorId!: string;
|
|
32
|
+
|
|
33
|
+
/** @deprecated Solo para la auditoría de loan-retail-audit. */
|
|
34
|
+
@OptionalEmail()
|
|
35
|
+
actor?: string;
|
|
31
36
|
}
|
|
32
37
|
|
|
33
38
|
/** Query de privateGetReconciliationItem. */
|
|
@@ -41,8 +46,13 @@ export class PrivateListReconciliationDefinitionsQuery extends ListReconciliatio
|
|
|
41
46
|
@RequiredId()
|
|
42
47
|
author!: string;
|
|
43
48
|
|
|
44
|
-
|
|
45
|
-
|
|
49
|
+
/** `sub` de Azure AD del operador del dashboard. */
|
|
50
|
+
@RequiredActorId()
|
|
51
|
+
actorId!: string;
|
|
52
|
+
|
|
53
|
+
/** @deprecated Solo para la auditoría de loan-retail-audit. */
|
|
54
|
+
@OptionalEmail()
|
|
55
|
+
actor?: string;
|
|
46
56
|
}
|
|
47
57
|
|
|
48
58
|
/** Body de privateConfigureReconciliationDefinition. */
|
|
@@ -53,8 +63,13 @@ export class PrivateConfigureReconciliationDefinitionRequest extends ConfigureRe
|
|
|
53
63
|
@RequiredId()
|
|
54
64
|
author!: string;
|
|
55
65
|
|
|
56
|
-
|
|
57
|
-
|
|
66
|
+
/** `sub` de Azure AD del operador del dashboard. */
|
|
67
|
+
@RequiredActorId()
|
|
68
|
+
actorId!: string;
|
|
69
|
+
|
|
70
|
+
/** @deprecated Solo para la auditoría de loan-retail-audit. */
|
|
71
|
+
@OptionalEmail()
|
|
72
|
+
actor?: string;
|
|
58
73
|
}
|
|
59
74
|
|
|
60
75
|
/** Query de privateListReconciliationRuns. */
|
|
@@ -65,8 +80,13 @@ export class PrivateListReconciliationRunsQuery extends ListReconciliationRunsQu
|
|
|
65
80
|
@RequiredId()
|
|
66
81
|
author!: string;
|
|
67
82
|
|
|
68
|
-
|
|
69
|
-
|
|
83
|
+
/** `sub` de Azure AD del operador del dashboard. */
|
|
84
|
+
@RequiredActorId()
|
|
85
|
+
actorId!: string;
|
|
86
|
+
|
|
87
|
+
/** @deprecated Solo para la auditoría de loan-retail-audit. */
|
|
88
|
+
@OptionalEmail()
|
|
89
|
+
actor?: string;
|
|
70
90
|
}
|
|
71
91
|
|
|
72
92
|
/** Body de privateRunReconciliation: responde 202 con `runId`. */
|
|
@@ -77,8 +97,13 @@ export class PrivateRunReconciliationRequest extends RunReconciliationRequest {
|
|
|
77
97
|
@RequiredId()
|
|
78
98
|
author!: string;
|
|
79
99
|
|
|
80
|
-
|
|
81
|
-
|
|
100
|
+
/** `sub` de Azure AD del operador del dashboard. */
|
|
101
|
+
@RequiredActorId()
|
|
102
|
+
actorId!: string;
|
|
103
|
+
|
|
104
|
+
/** @deprecated Solo para la auditoría de loan-retail-audit. */
|
|
105
|
+
@OptionalEmail()
|
|
106
|
+
actor?: string;
|
|
82
107
|
}
|
|
83
108
|
|
|
84
109
|
/** Query de privateGetReconciliationMatrix. */
|
|
@@ -89,8 +114,13 @@ export class PrivateGetReconciliationMatrixQuery extends GetReconciliationMatrix
|
|
|
89
114
|
@RequiredId()
|
|
90
115
|
author!: string;
|
|
91
116
|
|
|
92
|
-
|
|
93
|
-
|
|
117
|
+
/** `sub` de Azure AD del operador del dashboard. */
|
|
118
|
+
@RequiredActorId()
|
|
119
|
+
actorId!: string;
|
|
120
|
+
|
|
121
|
+
/** @deprecated Solo para la auditoría de loan-retail-audit. */
|
|
122
|
+
@OptionalEmail()
|
|
123
|
+
actor?: string;
|
|
94
124
|
}
|
|
95
125
|
|
|
96
126
|
/** Query de privateGetReconciliationOverview. */
|
|
@@ -101,8 +131,13 @@ export class PrivateGetReconciliationOverviewQuery extends GetReconciliationOver
|
|
|
101
131
|
@RequiredId()
|
|
102
132
|
author!: string;
|
|
103
133
|
|
|
104
|
-
|
|
105
|
-
|
|
134
|
+
/** `sub` de Azure AD del operador del dashboard. */
|
|
135
|
+
@RequiredActorId()
|
|
136
|
+
actorId!: string;
|
|
137
|
+
|
|
138
|
+
/** @deprecated Solo para la auditoría de loan-retail-audit. */
|
|
139
|
+
@OptionalEmail()
|
|
140
|
+
actor?: string;
|
|
106
141
|
}
|
|
107
142
|
|
|
108
143
|
/** Query de privateGetReconciliationSummary. */
|
|
@@ -113,8 +148,13 @@ export class PrivateGetReconciliationSummaryQuery extends GetReconciliationSumma
|
|
|
113
148
|
@RequiredId()
|
|
114
149
|
author!: string;
|
|
115
150
|
|
|
116
|
-
|
|
117
|
-
|
|
151
|
+
/** `sub` de Azure AD del operador del dashboard. */
|
|
152
|
+
@RequiredActorId()
|
|
153
|
+
actorId!: string;
|
|
154
|
+
|
|
155
|
+
/** @deprecated Solo para la auditoría de loan-retail-audit. */
|
|
156
|
+
@OptionalEmail()
|
|
157
|
+
actor?: string;
|
|
118
158
|
}
|
|
119
159
|
|
|
120
160
|
/** Query de privateListReconciliationItems. */
|
|
@@ -125,8 +165,13 @@ export class PrivateListReconciliationItemsQuery extends ListReconciliationItems
|
|
|
125
165
|
@RequiredId()
|
|
126
166
|
author!: string;
|
|
127
167
|
|
|
128
|
-
|
|
129
|
-
|
|
168
|
+
/** `sub` de Azure AD del operador del dashboard. */
|
|
169
|
+
@RequiredActorId()
|
|
170
|
+
actorId!: string;
|
|
171
|
+
|
|
172
|
+
/** @deprecated Solo para la auditoría de loan-retail-audit. */
|
|
173
|
+
@OptionalEmail()
|
|
174
|
+
actor?: string;
|
|
130
175
|
}
|
|
131
176
|
|
|
132
177
|
/** Body de privateResolveReconciliationItem. */
|
|
@@ -137,8 +182,13 @@ export class PrivateResolveReconciliationItemRequest extends ResolveReconciliati
|
|
|
137
182
|
@RequiredId()
|
|
138
183
|
author!: string;
|
|
139
184
|
|
|
140
|
-
|
|
141
|
-
|
|
185
|
+
/** `sub` de Azure AD del operador del dashboard. */
|
|
186
|
+
@RequiredActorId()
|
|
187
|
+
actorId!: string;
|
|
188
|
+
|
|
189
|
+
/** @deprecated Solo para la auditoría de loan-retail-audit. */
|
|
190
|
+
@OptionalEmail()
|
|
191
|
+
actor?: string;
|
|
142
192
|
}
|
|
143
193
|
|
|
144
194
|
/** Body de privateReactivateReconciliationItem. */
|
|
@@ -149,8 +199,13 @@ export class PrivateReactivateReconciliationItemRequest extends ReactivateReconc
|
|
|
149
199
|
@RequiredId()
|
|
150
200
|
author!: string;
|
|
151
201
|
|
|
152
|
-
|
|
153
|
-
|
|
202
|
+
/** `sub` de Azure AD del operador del dashboard. */
|
|
203
|
+
@RequiredActorId()
|
|
204
|
+
actorId!: string;
|
|
205
|
+
|
|
206
|
+
/** @deprecated Solo para la auditoría de loan-retail-audit. */
|
|
207
|
+
@OptionalEmail()
|
|
208
|
+
actor?: string;
|
|
154
209
|
}
|
|
155
210
|
|
|
156
211
|
/** Body de privateAddReconciliationItemNote. */
|
|
@@ -161,6 +216,11 @@ export class PrivateAddReconciliationItemNoteRequest extends AddReconciliationIt
|
|
|
161
216
|
@RequiredId()
|
|
162
217
|
author!: string;
|
|
163
218
|
|
|
164
|
-
|
|
165
|
-
|
|
219
|
+
/** `sub` de Azure AD del operador del dashboard. */
|
|
220
|
+
@RequiredActorId()
|
|
221
|
+
actorId!: string;
|
|
222
|
+
|
|
223
|
+
/** @deprecated Solo para la auditoría de loan-retail-audit. */
|
|
224
|
+
@OptionalEmail()
|
|
225
|
+
actor?: string;
|
|
166
226
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Expose, Transform } from 'class-transformer';
|
|
2
|
-
import {
|
|
2
|
+
import { IsString, Matches, MinLength } from 'class-validator';
|
|
3
3
|
import { RECONCILIATION_MIN_NOTE_LENGTH, RECONCILIATION_PERIOD_KEY_PATTERN } from '../../constants/reconciliationValidation';
|
|
4
4
|
|
|
5
|
-
export { PageLimit, PageToken, RequiredEmail, RequiredId, RequiredReason } from '../../../transferNote/dtos/requests/transferNoteRequestDecorators';
|
|
5
|
+
export { OptionalEmail, PageLimit, PageToken, RequiredActorId, RequiredEmail, RequiredId, RequiredReason } from '../../../transferNote/dtos/requests/transferNoteRequestDecorators';
|
|
6
6
|
|
|
7
7
|
/** Periodo obligatorio: día, semana ISO o mes. */
|
|
8
8
|
export function PeriodKey(): PropertyDecorator {
|
|
@@ -21,12 +21,3 @@ export function NoteText(): PropertyDecorator {
|
|
|
21
21
|
MinLength(RECONCILIATION_MIN_NOTE_LENGTH)(target, key);
|
|
22
22
|
};
|
|
23
23
|
}
|
|
24
|
-
|
|
25
|
-
/** Email opcional. */
|
|
26
|
-
export function OptionalEmail(): PropertyDecorator {
|
|
27
|
-
return (target, key) => {
|
|
28
|
-
Expose()(target, key);
|
|
29
|
-
IsOptional()(target, key);
|
|
30
|
-
IsEmail()(target, key);
|
|
31
|
-
};
|
|
32
|
-
}
|
|
@@ -8,3 +8,6 @@ export const TRANSFER_NOTE_ISO_WEEK_PATTERN = /^\d{4}-W(0[1-9]|[1-4]\d|5[0-3])$/
|
|
|
8
8
|
export const TRANSFER_NOTE_CLABE_PATTERN = /^\d{18}$/;
|
|
9
9
|
|
|
10
10
|
export const TRANSFER_NOTE_MAX_PAGE_SIZE = 100;
|
|
11
|
+
|
|
12
|
+
/** Largo máximo del id del operador (`sub` de Azure AD). */
|
|
13
|
+
export const TRANSFER_NOTE_ACTOR_ID_MAX_LENGTH = 128;
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
RevertTransferNoteSpeiRequest,
|
|
12
12
|
} from './TransferNoteActionRequests';
|
|
13
13
|
import { ListTransferNoteItemsQuery, ListTransferNotePoolQuery, ListTransferNotesQuery } from './TransferNoteQueries';
|
|
14
|
-
import {
|
|
14
|
+
import { OptionalEmail, RequiredActorId, RequiredId, RequiredReason } from './transferNoteRequestDecorators';
|
|
15
15
|
|
|
16
16
|
/** Tenant y servicio que llama; el lambda valida `author` contra su lista permitida. */
|
|
17
17
|
export class PrivateTransferNoteCaller {
|
|
@@ -22,10 +22,15 @@ export class PrivateTransferNoteCaller {
|
|
|
22
22
|
author!: string;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
/** Caller del espejo que llama fiado-dashboard;
|
|
25
|
+
/** Caller del espejo que llama fiado-dashboard; el operador viaja por `actorId`. */
|
|
26
26
|
export class PrivateTransferNoteOperatorCaller extends PrivateTransferNoteCaller {
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
/** `sub` de Azure AD del operador del dashboard. */
|
|
28
|
+
@RequiredActorId()
|
|
29
|
+
actorId!: string;
|
|
30
|
+
|
|
31
|
+
/** @deprecated Solo para la auditoría de loan-retail-audit. */
|
|
32
|
+
@OptionalEmail()
|
|
33
|
+
actor?: string;
|
|
29
34
|
}
|
|
30
35
|
|
|
31
36
|
/** Body de privatePreviewTransferNote. */
|
|
@@ -36,8 +41,13 @@ export class PrivatePreviewTransferNoteRequest extends PreviewTransferNoteReques
|
|
|
36
41
|
@RequiredId()
|
|
37
42
|
author!: string;
|
|
38
43
|
|
|
39
|
-
|
|
40
|
-
|
|
44
|
+
/** `sub` de Azure AD del operador del dashboard. */
|
|
45
|
+
@RequiredActorId()
|
|
46
|
+
actorId!: string;
|
|
47
|
+
|
|
48
|
+
/** @deprecated Solo para la auditoría de loan-retail-audit. */
|
|
49
|
+
@OptionalEmail()
|
|
50
|
+
actor?: string;
|
|
41
51
|
}
|
|
42
52
|
|
|
43
53
|
/** Body de privateIssueTransferNote. */
|
|
@@ -48,8 +58,13 @@ export class PrivateIssueTransferNoteRequest extends IssueTransferNoteRequest {
|
|
|
48
58
|
@RequiredId()
|
|
49
59
|
author!: string;
|
|
50
60
|
|
|
51
|
-
|
|
52
|
-
|
|
61
|
+
/** `sub` de Azure AD del operador del dashboard. */
|
|
62
|
+
@RequiredActorId()
|
|
63
|
+
actorId!: string;
|
|
64
|
+
|
|
65
|
+
/** @deprecated Solo para la auditoría de loan-retail-audit. */
|
|
66
|
+
@OptionalEmail()
|
|
67
|
+
actor?: string;
|
|
53
68
|
}
|
|
54
69
|
|
|
55
70
|
/** Body de privateCaptureTransferNoteSpei. */
|
|
@@ -60,8 +75,13 @@ export class PrivateCaptureTransferNoteSpeiRequest extends CaptureTransferNoteSp
|
|
|
60
75
|
@RequiredId()
|
|
61
76
|
author!: string;
|
|
62
77
|
|
|
63
|
-
|
|
64
|
-
|
|
78
|
+
/** `sub` de Azure AD del operador del dashboard. */
|
|
79
|
+
@RequiredActorId()
|
|
80
|
+
actorId!: string;
|
|
81
|
+
|
|
82
|
+
/** @deprecated Solo para la auditoría de loan-retail-audit. */
|
|
83
|
+
@OptionalEmail()
|
|
84
|
+
actor?: string;
|
|
65
85
|
}
|
|
66
86
|
|
|
67
87
|
/** Body de privateRevertTransferNoteSpei. */
|
|
@@ -72,8 +92,13 @@ export class PrivateRevertTransferNoteSpeiRequest extends RevertTransferNoteSpei
|
|
|
72
92
|
@RequiredId()
|
|
73
93
|
author!: string;
|
|
74
94
|
|
|
75
|
-
|
|
76
|
-
|
|
95
|
+
/** `sub` de Azure AD del operador del dashboard. */
|
|
96
|
+
@RequiredActorId()
|
|
97
|
+
actorId!: string;
|
|
98
|
+
|
|
99
|
+
/** @deprecated Solo para la auditoría de loan-retail-audit. */
|
|
100
|
+
@OptionalEmail()
|
|
101
|
+
actor?: string;
|
|
77
102
|
}
|
|
78
103
|
|
|
79
104
|
/** Body de privateCancelTransferNote. */
|
|
@@ -84,8 +109,13 @@ export class PrivateCancelTransferNoteRequest extends CancelTransferNoteRequest
|
|
|
84
109
|
@RequiredId()
|
|
85
110
|
author!: string;
|
|
86
111
|
|
|
87
|
-
|
|
88
|
-
|
|
112
|
+
/** `sub` de Azure AD del operador del dashboard. */
|
|
113
|
+
@RequiredActorId()
|
|
114
|
+
actorId!: string;
|
|
115
|
+
|
|
116
|
+
/** @deprecated Solo para la auditoría de loan-retail-audit. */
|
|
117
|
+
@OptionalEmail()
|
|
118
|
+
actor?: string;
|
|
89
119
|
}
|
|
90
120
|
|
|
91
121
|
/** Body de privateResolveTransferNoteDispute. */
|
|
@@ -96,8 +126,13 @@ export class PrivateResolveTransferNoteDisputeRequest extends ResolveTransferNot
|
|
|
96
126
|
@RequiredId()
|
|
97
127
|
author!: string;
|
|
98
128
|
|
|
99
|
-
|
|
100
|
-
|
|
129
|
+
/** `sub` de Azure AD del operador del dashboard. */
|
|
130
|
+
@RequiredActorId()
|
|
131
|
+
actorId!: string;
|
|
132
|
+
|
|
133
|
+
/** @deprecated Solo para la auditoría de loan-retail-audit. */
|
|
134
|
+
@OptionalEmail()
|
|
135
|
+
actor?: string;
|
|
101
136
|
}
|
|
102
137
|
|
|
103
138
|
/** Body de privateConfirmTransferNoteReception. */
|
|
@@ -129,8 +164,13 @@ export class PrivateListTransferNotesQuery extends ListTransferNotesQuery {
|
|
|
129
164
|
@RequiredId()
|
|
130
165
|
author!: string;
|
|
131
166
|
|
|
132
|
-
|
|
133
|
-
|
|
167
|
+
/** `sub` de Azure AD del operador del dashboard. */
|
|
168
|
+
@RequiredActorId()
|
|
169
|
+
actorId!: string;
|
|
170
|
+
|
|
171
|
+
/** @deprecated Solo para la auditoría de loan-retail-audit. */
|
|
172
|
+
@OptionalEmail()
|
|
173
|
+
actor?: string;
|
|
134
174
|
}
|
|
135
175
|
|
|
136
176
|
/** Query de privateListTransferNotePool. */
|
|
@@ -141,8 +181,13 @@ export class PrivateListTransferNotePoolQuery extends ListTransferNotePoolQuery
|
|
|
141
181
|
@RequiredId()
|
|
142
182
|
author!: string;
|
|
143
183
|
|
|
144
|
-
|
|
145
|
-
|
|
184
|
+
/** `sub` de Azure AD del operador del dashboard. */
|
|
185
|
+
@RequiredActorId()
|
|
186
|
+
actorId!: string;
|
|
187
|
+
|
|
188
|
+
/** @deprecated Solo para la auditoría de loan-retail-audit. */
|
|
189
|
+
@OptionalEmail()
|
|
190
|
+
actor?: string;
|
|
146
191
|
}
|
|
147
192
|
|
|
148
193
|
/** Query de privateListTransferNoteItems. */
|
|
@@ -153,8 +198,13 @@ export class PrivateListTransferNoteItemsQuery extends ListTransferNoteItemsQuer
|
|
|
153
198
|
@RequiredId()
|
|
154
199
|
author!: string;
|
|
155
200
|
|
|
156
|
-
|
|
157
|
-
|
|
201
|
+
/** `sub` de Azure AD del operador del dashboard. */
|
|
202
|
+
@RequiredActorId()
|
|
203
|
+
actorId!: string;
|
|
204
|
+
|
|
205
|
+
/** @deprecated Solo para la auditoría de loan-retail-audit. */
|
|
206
|
+
@OptionalEmail()
|
|
207
|
+
actor?: string;
|
|
158
208
|
}
|
|
159
209
|
|
|
160
210
|
/** Body de privateRunTransferNoteCutoff: responde 202 con `runId` y corre asíncrono. */
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { Expose, Transform, Type } from 'class-transformer';
|
|
2
|
-
import { IsEmail, IsInt, IsNotEmpty, IsOptional, IsString, Matches, Max, Min, MinLength } from 'class-validator';
|
|
3
|
-
import {
|
|
2
|
+
import { IsEmail, IsInt, IsNotEmpty, IsOptional, IsString, Matches, Max, MaxLength, Min, MinLength, ValidateBy, isEmail } from 'class-validator';
|
|
3
|
+
import {
|
|
4
|
+
TRANSFER_NOTE_ACTOR_ID_MAX_LENGTH,
|
|
5
|
+
TRANSFER_NOTE_ISO_WEEK_PATTERN,
|
|
6
|
+
TRANSFER_NOTE_MAX_PAGE_SIZE,
|
|
7
|
+
TRANSFER_NOTE_MIN_REASON_LENGTH,
|
|
8
|
+
} from '../../constants/transferNoteValidation';
|
|
4
9
|
|
|
5
10
|
const trim = Transform(({ value }) => (typeof value === 'string' ? value.trim() : value));
|
|
6
11
|
|
|
@@ -41,6 +46,32 @@ export function RequiredEmail(): PropertyDecorator {
|
|
|
41
46
|
};
|
|
42
47
|
}
|
|
43
48
|
|
|
49
|
+
/** Email opcional. */
|
|
50
|
+
export function OptionalEmail(): PropertyDecorator {
|
|
51
|
+
return (target, key) => {
|
|
52
|
+
Expose()(target, key);
|
|
53
|
+
IsOptional()(target, key);
|
|
54
|
+
IsEmail()(target, key);
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/** Id obligatorio del operador: no vacío, acotado y nunca con forma de email. */
|
|
59
|
+
export function RequiredActorId(): PropertyDecorator {
|
|
60
|
+
return (target, key) => {
|
|
61
|
+
Expose()(target, key);
|
|
62
|
+
IsString()(target, key);
|
|
63
|
+
IsNotEmpty()(target, key);
|
|
64
|
+
MaxLength(TRANSFER_NOTE_ACTOR_ID_MAX_LENGTH)(target, key);
|
|
65
|
+
ValidateBy({
|
|
66
|
+
name: 'isNotEmail',
|
|
67
|
+
validator: {
|
|
68
|
+
validate: (value) => typeof value === 'string' && !isEmail(value),
|
|
69
|
+
defaultMessage: () => '$property no puede ser un email',
|
|
70
|
+
},
|
|
71
|
+
})(target, key);
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
|
|
44
75
|
/** Semana ISO opcional `YYYY-Www`. */
|
|
45
76
|
export function OptionalIsoWeek(): PropertyDecorator {
|
|
46
77
|
return (target, key) => {
|