@fiado/type-kit 3.415.0 → 3.416.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/loanCredit/dtos/loanDeviceContract.test.ts +2 -2
- package/_test_/unit/mdm/dtos/mdmDeviceContract.test.ts +2 -2
- package/bin/loanCredit/dtos/LoanDeviceNotifyItem.d.ts +8 -2
- package/bin/loanCredit/dtos/LoanDeviceNotifyItem.js +2 -2
- package/bin/mdm/dtos/DeviceNotifyRequest.d.ts +13 -3
- package/bin/mdm/dtos/DeviceNotifyRequest.js +2 -2
- package/package.json +1 -1
- package/src/loanCredit/dtos/LoanDeviceNotifyItem.ts +10 -4
- package/src/mdm/dtos/DeviceNotifyRequest.ts +15 -5
|
@@ -334,8 +334,8 @@ describe('LoanDeviceNotifyRequest', () => {
|
|
|
334
334
|
/** Cota de cada campo de texto libre, para probar el borde exacto y el borde + 1. */
|
|
335
335
|
const NOTIFY_MAX_LENGTHS: ReadonlyArray<readonly [string, number]> = [
|
|
336
336
|
['notificationCode', 64],
|
|
337
|
-
['title',
|
|
338
|
-
['content',
|
|
337
|
+
['title', 50],
|
|
338
|
+
['content', 350],
|
|
339
339
|
];
|
|
340
340
|
|
|
341
341
|
it('valida happy path (0 errores)', async () => {
|
|
@@ -152,8 +152,8 @@ describe('DeviceNotifyRequest — topes de longitud de los tres textos', () => {
|
|
|
152
152
|
/** Mismos números que `LoanDeviceNotifyItem`: las dos puntas del contrato dicen lo mismo. */
|
|
153
153
|
const limits = [
|
|
154
154
|
['notificationCode', 64],
|
|
155
|
-
['title',
|
|
156
|
-
['content',
|
|
155
|
+
['title', 50],
|
|
156
|
+
['content', 350],
|
|
157
157
|
] as const;
|
|
158
158
|
|
|
159
159
|
it.each(limits)('acepta %s en el largo máximo', async (field, max) => {
|
|
@@ -14,8 +14,14 @@ export declare class LoanDeviceNotifyItem {
|
|
|
14
14
|
noticeType?: MdmNoticeTypeEnum;
|
|
15
15
|
/** Código del catálogo de Datacultr. Camino legacy: solo se lee si no viaja `noticeType`. */
|
|
16
16
|
notificationCode?: string;
|
|
17
|
-
/**
|
|
17
|
+
/**
|
|
18
|
+
* Título crudo para Trustonic. Camino legacy: solo se lee si no viaja `noticeType`.
|
|
19
|
+
* El tope es el de Trustonic, que exige de 1 a 50 y responde `INVALID_RANGE` fuera de rango.
|
|
20
|
+
*/
|
|
18
21
|
title?: string;
|
|
19
|
-
/**
|
|
22
|
+
/**
|
|
23
|
+
* Cuerpo crudo para Trustonic. Camino legacy: solo se lee si no viaja `noticeType`.
|
|
24
|
+
* El tope es el de Trustonic, que exige de 1 a 350 y responde `INVALID_RANGE` fuera de rango.
|
|
25
|
+
*/
|
|
20
26
|
content?: string;
|
|
21
27
|
}
|
|
@@ -51,7 +51,7 @@ __decorate([
|
|
|
51
51
|
(0, class_validator_1.IsOptional)(),
|
|
52
52
|
(0, class_validator_1.IsString)(),
|
|
53
53
|
(0, class_validator_1.IsNotEmpty)(),
|
|
54
|
-
(0, class_validator_1.MaxLength)(
|
|
54
|
+
(0, class_validator_1.MaxLength)(50),
|
|
55
55
|
__metadata("design:type", String)
|
|
56
56
|
], LoanDeviceNotifyItem.prototype, "title", void 0);
|
|
57
57
|
__decorate([
|
|
@@ -59,6 +59,6 @@ __decorate([
|
|
|
59
59
|
(0, class_validator_1.IsOptional)(),
|
|
60
60
|
(0, class_validator_1.IsString)(),
|
|
61
61
|
(0, class_validator_1.IsNotEmpty)(),
|
|
62
|
-
(0, class_validator_1.MaxLength)(
|
|
62
|
+
(0, class_validator_1.MaxLength)(350),
|
|
63
63
|
__metadata("design:type", String)
|
|
64
64
|
], LoanDeviceNotifyItem.prototype, "content", void 0);
|
|
@@ -8,11 +8,21 @@ export declare class DeviceNotifyRequest {
|
|
|
8
8
|
* Cuando viaja, manda: los connectors ignoran `notificationCode`, `title` y `content`.
|
|
9
9
|
*/
|
|
10
10
|
noticeType?: MdmNoticeTypeEnum;
|
|
11
|
-
/**
|
|
11
|
+
/**
|
|
12
|
+
* Código del catálogo de Datacultr. Camino legacy: solo se lee si no viaja `noticeType`.
|
|
13
|
+
* Es exclusivo de Datacultr: Trustonic no tiene catálogo de códigos y rechaza el ítem
|
|
14
|
+
* que solo trae este campo.
|
|
15
|
+
*/
|
|
12
16
|
notificationCode?: string;
|
|
13
|
-
/**
|
|
17
|
+
/**
|
|
18
|
+
* Título crudo para Trustonic. Camino legacy: solo se lee si no viaja `noticeType`.
|
|
19
|
+
* El tope es el de Trustonic, que exige de 1 a 50 y responde `INVALID_RANGE` fuera de rango.
|
|
20
|
+
*/
|
|
14
21
|
title?: string;
|
|
15
|
-
/**
|
|
22
|
+
/**
|
|
23
|
+
* Cuerpo crudo para Trustonic. Camino legacy: solo se lee si no viaja `noticeType`.
|
|
24
|
+
* El tope es el de Trustonic, que exige de 1 a 350 y responde `INVALID_RANGE` fuera de rango.
|
|
25
|
+
*/
|
|
16
26
|
content?: string;
|
|
17
27
|
operationReference: string;
|
|
18
28
|
}
|
|
@@ -47,7 +47,7 @@ __decorate([
|
|
|
47
47
|
(0, class_validator_1.IsOptional)(),
|
|
48
48
|
(0, class_validator_1.IsString)(),
|
|
49
49
|
(0, class_validator_1.IsNotEmpty)(),
|
|
50
|
-
(0, class_validator_1.MaxLength)(
|
|
50
|
+
(0, class_validator_1.MaxLength)(50),
|
|
51
51
|
__metadata("design:type", String)
|
|
52
52
|
], DeviceNotifyRequest.prototype, "title", void 0);
|
|
53
53
|
__decorate([
|
|
@@ -55,7 +55,7 @@ __decorate([
|
|
|
55
55
|
(0, class_validator_1.IsOptional)(),
|
|
56
56
|
(0, class_validator_1.IsString)(),
|
|
57
57
|
(0, class_validator_1.IsNotEmpty)(),
|
|
58
|
-
(0, class_validator_1.MaxLength)(
|
|
58
|
+
(0, class_validator_1.MaxLength)(350),
|
|
59
59
|
__metadata("design:type", String)
|
|
60
60
|
], DeviceNotifyRequest.prototype, "content", void 0);
|
|
61
61
|
__decorate([
|
package/package.json
CHANGED
|
@@ -34,19 +34,25 @@ export class LoanDeviceNotifyItem {
|
|
|
34
34
|
@MaxLength(64)
|
|
35
35
|
notificationCode?: string;
|
|
36
36
|
|
|
37
|
-
/**
|
|
37
|
+
/**
|
|
38
|
+
* Título crudo para Trustonic. Camino legacy: solo se lee si no viaja `noticeType`.
|
|
39
|
+
* El tope es el de Trustonic, que exige de 1 a 50 y responde `INVALID_RANGE` fuera de rango.
|
|
40
|
+
*/
|
|
38
41
|
@Expose()
|
|
39
42
|
@IsOptional()
|
|
40
43
|
@IsString()
|
|
41
44
|
@IsNotEmpty()
|
|
42
|
-
@MaxLength(
|
|
45
|
+
@MaxLength(50)
|
|
43
46
|
title?: string;
|
|
44
47
|
|
|
45
|
-
/**
|
|
48
|
+
/**
|
|
49
|
+
* Cuerpo crudo para Trustonic. Camino legacy: solo se lee si no viaja `noticeType`.
|
|
50
|
+
* El tope es el de Trustonic, que exige de 1 a 350 y responde `INVALID_RANGE` fuera de rango.
|
|
51
|
+
*/
|
|
46
52
|
@Expose()
|
|
47
53
|
@IsOptional()
|
|
48
54
|
@IsString()
|
|
49
55
|
@IsNotEmpty()
|
|
50
|
-
@MaxLength(
|
|
56
|
+
@MaxLength(350)
|
|
51
57
|
content?: string;
|
|
52
58
|
}
|
|
@@ -22,7 +22,11 @@ export class DeviceNotifyRequest {
|
|
|
22
22
|
@IsEnum(MdmNoticeTypeEnum)
|
|
23
23
|
noticeType?: MdmNoticeTypeEnum;
|
|
24
24
|
|
|
25
|
-
/**
|
|
25
|
+
/**
|
|
26
|
+
* Código del catálogo de Datacultr. Camino legacy: solo se lee si no viaja `noticeType`.
|
|
27
|
+
* Es exclusivo de Datacultr: Trustonic no tiene catálogo de códigos y rechaza el ítem
|
|
28
|
+
* que solo trae este campo.
|
|
29
|
+
*/
|
|
26
30
|
@Expose()
|
|
27
31
|
@IsOptional()
|
|
28
32
|
@IsString()
|
|
@@ -30,20 +34,26 @@ export class DeviceNotifyRequest {
|
|
|
30
34
|
@MaxLength(64)
|
|
31
35
|
notificationCode?: string;
|
|
32
36
|
|
|
33
|
-
/**
|
|
37
|
+
/**
|
|
38
|
+
* Título crudo para Trustonic. Camino legacy: solo se lee si no viaja `noticeType`.
|
|
39
|
+
* El tope es el de Trustonic, que exige de 1 a 50 y responde `INVALID_RANGE` fuera de rango.
|
|
40
|
+
*/
|
|
34
41
|
@Expose()
|
|
35
42
|
@IsOptional()
|
|
36
43
|
@IsString()
|
|
37
44
|
@IsNotEmpty()
|
|
38
|
-
@MaxLength(
|
|
45
|
+
@MaxLength(50)
|
|
39
46
|
title?: string;
|
|
40
47
|
|
|
41
|
-
/**
|
|
48
|
+
/**
|
|
49
|
+
* Cuerpo crudo para Trustonic. Camino legacy: solo se lee si no viaja `noticeType`.
|
|
50
|
+
* El tope es el de Trustonic, que exige de 1 a 350 y responde `INVALID_RANGE` fuera de rango.
|
|
51
|
+
*/
|
|
42
52
|
@Expose()
|
|
43
53
|
@IsOptional()
|
|
44
54
|
@IsString()
|
|
45
55
|
@IsNotEmpty()
|
|
46
|
-
@MaxLength(
|
|
56
|
+
@MaxLength(350)
|
|
47
57
|
content?: string;
|
|
48
58
|
|
|
49
59
|
@Expose()
|