@fiado/type-kit 3.619.0 → 3.621.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/retailIntegration/reconciliationContracts.test.ts +18 -0
- 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/retailIntegration/dtos/GetReconciliationResponses.d.ts +13 -2
- 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/retailIntegration/dtos/GetReconciliationResponses.ts +14 -2
- 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
|
@@ -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
|
-
}
|
|
@@ -4,8 +4,20 @@ import type { ReconciliationTriggerEnum } from '../enums/ReconciliationTriggerEn
|
|
|
4
4
|
import type { ReconciliationPreview } from './ReconciliationPreview';
|
|
5
5
|
import type { ReconciliationRunCounts } from './ReconciliationRunCounts';
|
|
6
6
|
|
|
7
|
+
/** Fallos de una corrida: por qué se abortó y en qué intento de SQS va la página que falla. */
|
|
8
|
+
export interface ReconciliationRunAttempts {
|
|
9
|
+
/** Motivo del ABORTED (`MAX_ATTEMPTS`, `ROW_WITHOUT_ID`, el `code` del externo caído, etc.); null si no se abortó. */
|
|
10
|
+
abortReason?: string | null;
|
|
11
|
+
/** `code` del último error de la página en curso; null si la página no ha fallado. */
|
|
12
|
+
lastErrorCode?: string | null;
|
|
13
|
+
/** Intento de SQS (1-based) en que falló la página en curso; null si no ha fallado. */
|
|
14
|
+
attempt?: number | null;
|
|
15
|
+
/** Intentos de SQS que tiene una página antes de abortar la corrida. */
|
|
16
|
+
maxAttempts?: number;
|
|
17
|
+
}
|
|
18
|
+
|
|
7
19
|
/** Respuesta 200 de GET .../reconciliations/{runId} en org (backofficeGetOrgReconciliation). */
|
|
8
|
-
export interface GetOrgReconciliationResponse {
|
|
20
|
+
export interface GetOrgReconciliationResponse extends ReconciliationRunAttempts {
|
|
9
21
|
runId: string;
|
|
10
22
|
retailerId: string;
|
|
11
23
|
entity: ReconciliationEntityEnum.STORES | ReconciliationEntityEnum.USERS;
|
|
@@ -24,7 +36,7 @@ export interface GetOrgReconciliationResponse {
|
|
|
24
36
|
}
|
|
25
37
|
|
|
26
38
|
/** Respuesta 200 de GET .../reconciliations/{runId} en catalog (backofficeGetCatalogReconciliation). */
|
|
27
|
-
export interface GetCatalogReconciliationResponse {
|
|
39
|
+
export interface GetCatalogReconciliationResponse extends ReconciliationRunAttempts {
|
|
28
40
|
runId: string;
|
|
29
41
|
retailerId: string;
|
|
30
42
|
entity: ReconciliationEntityEnum.CATALOG | ReconciliationEntityEnum.INVENTORY | ReconciliationEntityEnum.MOVEMENTS;
|
|
@@ -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) => {
|