@fiado/type-kit 3.557.0 → 3.558.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/bin/rules/dtos/population/PopulationSegmentDefinition.d.ts +3 -0
- package/bin/rules/dtos/population/PopulationSegmentDefinition.js +7 -0
- package/bin/rules/enums/SegmentOutputEnum.d.ts +5 -0
- package/bin/rules/enums/SegmentOutputEnum.js +9 -0
- package/bin/rules/index.d.ts +1 -0
- package/bin/rules/index.js +1 -0
- package/package.json +1 -1
- package/src/rules/dtos/population/PopulationSegmentDefinition.ts +4 -1
- package/src/rules/enums/SegmentOutputEnum.ts +5 -0
- package/src/rules/index.ts +1 -0
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { SegmentMatchEnum } from '../../enums/SegmentMatchEnum';
|
|
2
|
+
import { SegmentOutputEnum } from '../../enums/SegmentOutputEnum';
|
|
2
3
|
import { SegmentGroup } from './SegmentGroup';
|
|
3
4
|
/** El constructor tal cual (A§4.1): tabla ancla (una fila -> un directoryid), TODAS/ALGUNA global y grupos con su propio TODAS/ALGUNA. */
|
|
4
5
|
export declare class PopulationSegmentDefinition {
|
|
5
6
|
baseTable: string;
|
|
7
|
+
/** Que se devuelve por fila. Ausente = DIRECTORY_ID. PHONE devuelve el telefono (sirve para personas sin cuenta); en ese caso `ids`/`afterDirectoryId` llevan telefonos. */
|
|
8
|
+
output?: SegmentOutputEnum;
|
|
6
9
|
match: SegmentMatchEnum;
|
|
7
10
|
groups: SegmentGroup[];
|
|
8
11
|
}
|
|
@@ -14,6 +14,7 @@ const class_transformer_1 = require("class-transformer");
|
|
|
14
14
|
const class_validator_1 = require("class-validator");
|
|
15
15
|
const SegmentLimits_1 = require("../../constants/SegmentLimits");
|
|
16
16
|
const SegmentMatchEnum_1 = require("../../enums/SegmentMatchEnum");
|
|
17
|
+
const SegmentOutputEnum_1 = require("../../enums/SegmentOutputEnum");
|
|
17
18
|
const SegmentGroup_1 = require("./SegmentGroup");
|
|
18
19
|
/** El constructor tal cual (A§4.1): tabla ancla (una fila -> un directoryid), TODAS/ALGUNA global y grupos con su propio TODAS/ALGUNA. */
|
|
19
20
|
class PopulationSegmentDefinition {
|
|
@@ -24,6 +25,12 @@ __decorate([
|
|
|
24
25
|
(0, class_validator_1.Matches)(SegmentLimits_1.SEGMENT_IDENTIFIER_PATTERN),
|
|
25
26
|
__metadata("design:type", String)
|
|
26
27
|
], PopulationSegmentDefinition.prototype, "baseTable", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, class_transformer_1.Expose)(),
|
|
30
|
+
(0, class_validator_1.IsOptional)(),
|
|
31
|
+
(0, class_validator_1.IsEnum)(SegmentOutputEnum_1.SegmentOutputEnum),
|
|
32
|
+
__metadata("design:type", String)
|
|
33
|
+
], PopulationSegmentDefinition.prototype, "output", void 0);
|
|
27
34
|
__decorate([
|
|
28
35
|
(0, class_transformer_1.Expose)(),
|
|
29
36
|
(0, class_validator_1.IsEnum)(SegmentMatchEnum_1.SegmentMatchEnum),
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SegmentOutputEnum = void 0;
|
|
4
|
+
/** Que devuelve la poblacion: el directoryId (por defecto) o el telefono (personas sin cuenta, que no tienen directoryId). */
|
|
5
|
+
var SegmentOutputEnum;
|
|
6
|
+
(function (SegmentOutputEnum) {
|
|
7
|
+
SegmentOutputEnum["DIRECTORY_ID"] = "DIRECTORY_ID";
|
|
8
|
+
SegmentOutputEnum["PHONE"] = "PHONE";
|
|
9
|
+
})(SegmentOutputEnum || (exports.SegmentOutputEnum = SegmentOutputEnum = {}));
|
package/bin/rules/index.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ export * from './dtos/RulesTraceResponse';
|
|
|
14
14
|
export * from './dtos/EvaluateRulesRequest';
|
|
15
15
|
export * from './dtos/EvaluateRulesResponse';
|
|
16
16
|
export * from './enums/SegmentMatchEnum';
|
|
17
|
+
export * from './enums/SegmentOutputEnum';
|
|
17
18
|
export * from './enums/SegmentConditionKindEnum';
|
|
18
19
|
export * from './enums/SegmentAggregateFnEnum';
|
|
19
20
|
export * from './enums/SegmentOperatorEnum';
|
package/bin/rules/index.js
CHANGED
|
@@ -34,6 +34,7 @@ __exportStar(require("./dtos/EvaluateRulesRequest"), exports);
|
|
|
34
34
|
__exportStar(require("./dtos/EvaluateRulesResponse"), exports);
|
|
35
35
|
//Poblacion (movido desde rewardsEligibility; alli queda re-export)
|
|
36
36
|
__exportStar(require("./enums/SegmentMatchEnum"), exports);
|
|
37
|
+
__exportStar(require("./enums/SegmentOutputEnum"), exports);
|
|
37
38
|
__exportStar(require("./enums/SegmentConditionKindEnum"), exports);
|
|
38
39
|
__exportStar(require("./enums/SegmentAggregateFnEnum"), exports);
|
|
39
40
|
__exportStar(require("./enums/SegmentOperatorEnum"), exports);
|
package/package.json
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import { Expose, Type } from 'class-transformer';
|
|
2
|
-
import { ArrayMaxSize, ArrayMinSize, IsArray, IsEnum, Matches, ValidateNested } from 'class-validator';
|
|
2
|
+
import { ArrayMaxSize, ArrayMinSize, IsArray, IsEnum, IsOptional, Matches, ValidateNested } from 'class-validator';
|
|
3
3
|
import { SEGMENT_IDENTIFIER_PATTERN } from '../../constants/SegmentLimits';
|
|
4
4
|
import { SegmentMatchEnum } from '../../enums/SegmentMatchEnum';
|
|
5
|
+
import { SegmentOutputEnum } from '../../enums/SegmentOutputEnum';
|
|
5
6
|
import { SegmentGroup } from './SegmentGroup';
|
|
6
7
|
|
|
7
8
|
/** El constructor tal cual (A§4.1): tabla ancla (una fila -> un directoryid), TODAS/ALGUNA global y grupos con su propio TODAS/ALGUNA. */
|
|
8
9
|
export class PopulationSegmentDefinition {
|
|
9
10
|
@Expose() @Matches(SEGMENT_IDENTIFIER_PATTERN) baseTable: string;
|
|
11
|
+
/** Que se devuelve por fila. Ausente = DIRECTORY_ID. PHONE devuelve el telefono (sirve para personas sin cuenta); en ese caso `ids`/`afterDirectoryId` llevan telefonos. */
|
|
12
|
+
@Expose() @IsOptional() @IsEnum(SegmentOutputEnum) output?: SegmentOutputEnum;
|
|
10
13
|
@Expose() @IsEnum(SegmentMatchEnum) match: SegmentMatchEnum;
|
|
11
14
|
@Expose() @IsArray() @ArrayMinSize(1) @ArrayMaxSize(10) @ValidateNested({ each: true }) @Type(() => SegmentGroup) groups: SegmentGroup[];
|
|
12
15
|
}
|
package/src/rules/index.ts
CHANGED
|
@@ -21,6 +21,7 @@ export * from './dtos/EvaluateRulesResponse';
|
|
|
21
21
|
|
|
22
22
|
//Poblacion (movido desde rewardsEligibility; alli queda re-export)
|
|
23
23
|
export * from './enums/SegmentMatchEnum';
|
|
24
|
+
export * from './enums/SegmentOutputEnum';
|
|
24
25
|
export * from './enums/SegmentConditionKindEnum';
|
|
25
26
|
export * from './enums/SegmentAggregateFnEnum';
|
|
26
27
|
export * from './enums/SegmentOperatorEnum';
|