@fiado/type-kit 3.540.0 → 3.541.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/rules/populationDtos.test.ts +58 -0
- package/_test_/unit/rules/populationMove.test.ts +31 -0
- package/bin/rewardsEligibility/constants/SegmentLimits.d.ts +1 -5
- package/bin/rewardsEligibility/constants/SegmentLimits.js +15 -6
- package/bin/rewardsEligibility/dtos/backoffice/segments/PopulationSegmentDefinition.d.ts +1 -8
- package/bin/rewardsEligibility/dtos/backoffice/segments/PopulationSegmentDefinition.js +14 -37
- package/bin/rewardsEligibility/dtos/backoffice/segments/SegmentAggregateCondition.d.ts +1 -18
- package/bin/rewardsEligibility/dtos/backoffice/segments/SegmentAggregateCondition.js +14 -68
- package/bin/rewardsEligibility/dtos/backoffice/segments/SegmentColumnCondition.d.ts +1 -11
- package/bin/rewardsEligibility/dtos/backoffice/segments/SegmentColumnCondition.js +14 -43
- package/bin/rewardsEligibility/dtos/backoffice/segments/SegmentGroup.d.ts +1 -9
- package/bin/rewardsEligibility/dtos/backoffice/segments/SegmentGroup.js +14 -41
- package/bin/rewardsEligibility/dtos/backoffice/segments/SegmentParam.d.ts +1 -10
- package/bin/rewardsEligibility/dtos/backoffice/segments/SegmentParam.js +15 -5
- package/bin/rewardsEligibility/dtos/backoffice/segments/SegmentSchemaResponse.d.ts +1 -10
- package/bin/rewardsEligibility/dtos/backoffice/segments/SegmentSchemaResponse.js +15 -8
- package/bin/rewardsEligibility/dtos/backoffice/segments/SegmentTableSchemaResponse.d.ts +1 -12
- package/bin/rewardsEligibility/dtos/backoffice/segments/SegmentTableSchemaResponse.js +15 -7
- package/bin/rewardsEligibility/dtos/backoffice/segments/SegmentUsedColumn.d.ts +1 -5
- package/bin/rewardsEligibility/dtos/backoffice/segments/SegmentUsedColumn.js +15 -4
- package/bin/rewardsEligibility/dtos/backoffice/segments/SegmentWindow.d.ts +1 -5
- package/bin/rewardsEligibility/dtos/backoffice/segments/SegmentWindow.js +14 -28
- package/bin/rewardsEligibility/enums/SegmentAggregateFnEnum.d.ts +1 -5
- package/bin/rewardsEligibility/enums/SegmentAggregateFnEnum.js +15 -7
- package/bin/rewardsEligibility/enums/SegmentConditionKindEnum.d.ts +1 -4
- package/bin/rewardsEligibility/enums/SegmentConditionKindEnum.js +15 -6
- package/bin/rewardsEligibility/enums/SegmentMatchEnum.d.ts +1 -4
- package/bin/rewardsEligibility/enums/SegmentMatchEnum.js +15 -6
- package/bin/rewardsEligibility/enums/SegmentOperatorEnum.d.ts +1 -16
- package/bin/rewardsEligibility/enums/SegmentOperatorEnum.js +15 -18
- package/bin/rewardsEligibility/enums/SegmentParamSourceEnum.d.ts +1 -5
- package/bin/rewardsEligibility/enums/SegmentParamSourceEnum.js +15 -7
- package/bin/rewardsEligibility/enums/SegmentParamTypeEnum.d.ts +1 -7
- package/bin/rewardsEligibility/enums/SegmentParamTypeEnum.js +15 -9
- package/bin/rules/constants/SegmentLimits.d.ts +5 -0
- package/bin/rules/constants/SegmentLimits.js +8 -0
- package/bin/rules/dtos/population/PopulationCompileRequest.d.ts +6 -0
- package/bin/rules/dtos/population/PopulationCompileRequest.js +32 -0
- package/bin/rules/dtos/population/PopulationCompileResponse.d.ts +9 -0
- package/bin/rules/dtos/population/PopulationCompileResponse.js +6 -0
- package/bin/rules/dtos/population/PopulationExecutionPageResponse.d.ts +10 -0
- package/bin/rules/dtos/population/PopulationExecutionPageResponse.js +7 -0
- package/bin/rules/dtos/population/PopulationExecutionRequest.d.ts +10 -0
- package/bin/rules/dtos/population/PopulationExecutionRequest.js +59 -0
- package/bin/rules/dtos/population/PopulationExecutionResponse.d.ts +5 -0
- package/bin/rules/dtos/population/PopulationExecutionResponse.js +6 -0
- package/bin/rules/dtos/population/PopulationSegmentDefinition.d.ts +8 -0
- package/bin/rules/dtos/population/PopulationSegmentDefinition.js +40 -0
- package/bin/rules/dtos/population/PopulationTestRequest.d.ts +7 -0
- package/bin/rules/dtos/population/PopulationTestRequest.js +38 -0
- package/bin/rules/dtos/population/PopulationTestResponse.d.ts +26 -0
- package/bin/rules/dtos/population/PopulationTestResponse.js +13 -0
- package/bin/rules/dtos/population/SegmentAggregateCondition.d.ts +18 -0
- package/bin/rules/dtos/population/SegmentAggregateCondition.js +71 -0
- package/bin/rules/dtos/population/SegmentColumnCondition.d.ts +11 -0
- package/bin/rules/dtos/population/SegmentColumnCondition.js +46 -0
- package/bin/rules/dtos/population/SegmentGroup.d.ts +9 -0
- package/bin/rules/dtos/population/SegmentGroup.js +44 -0
- package/bin/rules/dtos/population/SegmentParam.d.ts +10 -0
- package/bin/rules/dtos/population/SegmentParam.js +7 -0
- package/bin/rules/dtos/population/SegmentSchemaResponse.d.ts +10 -0
- package/bin/rules/dtos/population/SegmentSchemaResponse.js +10 -0
- package/bin/rules/dtos/population/SegmentTableSchemaResponse.d.ts +12 -0
- package/bin/rules/dtos/population/SegmentTableSchemaResponse.js +9 -0
- package/bin/rules/dtos/population/SegmentUsedColumn.d.ts +5 -0
- package/bin/rules/dtos/population/SegmentUsedColumn.js +6 -0
- package/bin/rules/dtos/population/SegmentWindow.d.ts +5 -0
- package/bin/rules/dtos/population/SegmentWindow.js +31 -0
- package/bin/rules/enums/PopulationErrorCodeEnum.d.ts +12 -0
- package/bin/rules/enums/PopulationErrorCodeEnum.js +16 -0
- package/bin/rules/enums/PopulationExecutionStatusEnum.d.ts +6 -0
- package/bin/rules/enums/PopulationExecutionStatusEnum.js +10 -0
- package/bin/rules/enums/PopulationTestStatusEnum.d.ts +5 -0
- package/bin/rules/enums/PopulationTestStatusEnum.js +9 -0
- package/bin/rules/enums/SegmentAggregateFnEnum.d.ts +5 -0
- package/bin/rules/enums/SegmentAggregateFnEnum.js +9 -0
- package/bin/rules/enums/SegmentConditionKindEnum.d.ts +4 -0
- package/bin/rules/enums/SegmentConditionKindEnum.js +8 -0
- package/bin/rules/enums/SegmentMatchEnum.d.ts +4 -0
- package/bin/rules/enums/SegmentMatchEnum.js +8 -0
- package/bin/rules/enums/SegmentOperatorEnum.d.ts +16 -0
- package/bin/rules/enums/SegmentOperatorEnum.js +20 -0
- package/bin/rules/enums/SegmentParamSourceEnum.d.ts +5 -0
- package/bin/rules/enums/SegmentParamSourceEnum.js +9 -0
- package/bin/rules/enums/SegmentParamTypeEnum.d.ts +7 -0
- package/bin/rules/enums/SegmentParamTypeEnum.js +11 -0
- package/bin/rules/index.d.ts +26 -0
- package/bin/rules/index.js +28 -0
- package/package.json +1 -1
- package/src/rewardsEligibility/constants/SegmentLimits.ts +1 -5
- package/src/rewardsEligibility/dtos/backoffice/segments/PopulationSegmentDefinition.ts +1 -12
- package/src/rewardsEligibility/dtos/backoffice/segments/SegmentAggregateCondition.ts +1 -22
- package/src/rewardsEligibility/dtos/backoffice/segments/SegmentColumnCondition.ts +1 -15
- package/src/rewardsEligibility/dtos/backoffice/segments/SegmentGroup.ts +1 -27
- package/src/rewardsEligibility/dtos/backoffice/segments/SegmentParam.ts +1 -11
- package/src/rewardsEligibility/dtos/backoffice/segments/SegmentSchemaResponse.ts +1 -11
- package/src/rewardsEligibility/dtos/backoffice/segments/SegmentTableSchemaResponse.ts +1 -14
- package/src/rewardsEligibility/dtos/backoffice/segments/SegmentUsedColumn.ts +1 -5
- package/src/rewardsEligibility/dtos/backoffice/segments/SegmentWindow.ts +1 -9
- package/src/rewardsEligibility/enums/SegmentAggregateFnEnum.ts +1 -5
- package/src/rewardsEligibility/enums/SegmentConditionKindEnum.ts +1 -4
- package/src/rewardsEligibility/enums/SegmentMatchEnum.ts +1 -4
- package/src/rewardsEligibility/enums/SegmentOperatorEnum.ts +1 -16
- package/src/rewardsEligibility/enums/SegmentParamSourceEnum.ts +1 -5
- package/src/rewardsEligibility/enums/SegmentParamTypeEnum.ts +1 -7
- package/src/rules/constants/SegmentLimits.ts +5 -0
- package/src/rules/dtos/population/PopulationCompileRequest.ts +9 -0
- package/src/rules/dtos/population/PopulationCompileResponse.ts +10 -0
- package/src/rules/dtos/population/PopulationExecutionPageResponse.ts +11 -0
- package/src/rules/dtos/population/PopulationExecutionRequest.ts +13 -0
- package/src/rules/dtos/population/PopulationExecutionResponse.ts +6 -0
- package/src/rules/dtos/population/PopulationSegmentDefinition.ts +12 -0
- package/src/rules/dtos/population/PopulationTestRequest.ts +10 -0
- package/src/rules/dtos/population/PopulationTestResponse.ts +29 -0
- package/src/rules/dtos/population/SegmentAggregateCondition.ts +22 -0
- package/src/rules/dtos/population/SegmentColumnCondition.ts +15 -0
- package/src/rules/dtos/population/SegmentGroup.ts +27 -0
- package/src/rules/dtos/population/SegmentParam.ts +11 -0
- package/src/rules/dtos/population/SegmentSchemaResponse.ts +11 -0
- package/src/rules/dtos/population/SegmentTableSchemaResponse.ts +14 -0
- package/src/rules/dtos/population/SegmentUsedColumn.ts +5 -0
- package/src/rules/dtos/population/SegmentWindow.ts +9 -0
- package/src/rules/enums/PopulationErrorCodeEnum.ts +12 -0
- package/src/rules/enums/PopulationExecutionStatusEnum.ts +6 -0
- package/src/rules/enums/PopulationTestStatusEnum.ts +5 -0
- package/src/rules/enums/SegmentAggregateFnEnum.ts +5 -0
- package/src/rules/enums/SegmentConditionKindEnum.ts +4 -0
- package/src/rules/enums/SegmentMatchEnum.ts +4 -0
- package/src/rules/enums/SegmentOperatorEnum.ts +16 -0
- package/src/rules/enums/SegmentParamSourceEnum.ts +5 -0
- package/src/rules/enums/SegmentParamTypeEnum.ts +7 -0
- package/src/rules/index.ts +30 -0
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.SegmentAggregateCondition = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
const SegmentLimits_1 = require("../../constants/SegmentLimits");
|
|
16
|
+
const SegmentAggregateFnEnum_1 = require("../../enums/SegmentAggregateFnEnum");
|
|
17
|
+
const SegmentConditionKindEnum_1 = require("../../enums/SegmentConditionKindEnum");
|
|
18
|
+
const SegmentOperatorEnum_1 = require("../../enums/SegmentOperatorEnum");
|
|
19
|
+
const SegmentColumnCondition_1 = require("./SegmentColumnCondition");
|
|
20
|
+
const SegmentWindow_1 = require("./SegmentWindow");
|
|
21
|
+
/** (b) Agregado con ventana relativa sobre una tabla relacionada (existe / cuenta / suma). `filters` elige QUE cuenta (estados, moneda...). */
|
|
22
|
+
class SegmentAggregateCondition {
|
|
23
|
+
}
|
|
24
|
+
exports.SegmentAggregateCondition = SegmentAggregateCondition;
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, class_transformer_1.Expose)(),
|
|
27
|
+
(0, class_validator_1.Equals)(SegmentConditionKindEnum_1.SegmentConditionKindEnum.AGGREGATE),
|
|
28
|
+
__metadata("design:type", String)
|
|
29
|
+
], SegmentAggregateCondition.prototype, "kind", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, class_transformer_1.Expose)(),
|
|
32
|
+
(0, class_validator_1.Matches)(SegmentLimits_1.SEGMENT_IDENTIFIER_PATTERN),
|
|
33
|
+
__metadata("design:type", String)
|
|
34
|
+
], SegmentAggregateCondition.prototype, "table", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, class_transformer_1.Expose)(),
|
|
37
|
+
(0, class_validator_1.IsEnum)(SegmentAggregateFnEnum_1.SegmentAggregateFnEnum),
|
|
38
|
+
__metadata("design:type", String)
|
|
39
|
+
], SegmentAggregateCondition.prototype, "fn", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, class_transformer_1.Expose)(),
|
|
42
|
+
(0, class_validator_1.IsOptional)(),
|
|
43
|
+
(0, class_validator_1.Matches)(SegmentLimits_1.SEGMENT_IDENTIFIER_PATTERN),
|
|
44
|
+
__metadata("design:type", String)
|
|
45
|
+
], SegmentAggregateCondition.prototype, "column", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, class_transformer_1.Expose)(),
|
|
48
|
+
(0, class_validator_1.IsOptional)(),
|
|
49
|
+
(0, class_validator_1.IsEnum)(SegmentOperatorEnum_1.SegmentOperatorEnum),
|
|
50
|
+
__metadata("design:type", String)
|
|
51
|
+
], SegmentAggregateCondition.prototype, "op", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, class_transformer_1.Expose)(),
|
|
54
|
+
(0, class_validator_1.IsOptional)(),
|
|
55
|
+
(0, class_validator_1.IsNumber)(),
|
|
56
|
+
__metadata("design:type", Number)
|
|
57
|
+
], SegmentAggregateCondition.prototype, "value", void 0);
|
|
58
|
+
__decorate([
|
|
59
|
+
(0, class_transformer_1.Expose)(),
|
|
60
|
+
(0, class_validator_1.ValidateNested)(),
|
|
61
|
+
(0, class_transformer_1.Type)(() => SegmentWindow_1.SegmentWindow),
|
|
62
|
+
__metadata("design:type", SegmentWindow_1.SegmentWindow)
|
|
63
|
+
], SegmentAggregateCondition.prototype, "window", void 0);
|
|
64
|
+
__decorate([
|
|
65
|
+
(0, class_transformer_1.Expose)(),
|
|
66
|
+
(0, class_validator_1.IsArray)(),
|
|
67
|
+
(0, class_validator_1.ArrayMaxSize)(10),
|
|
68
|
+
(0, class_validator_1.ValidateNested)({ each: true }),
|
|
69
|
+
(0, class_transformer_1.Type)(() => SegmentColumnCondition_1.SegmentColumnCondition),
|
|
70
|
+
__metadata("design:type", Array)
|
|
71
|
+
], SegmentAggregateCondition.prototype, "filters", void 0);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { JsonValue } from '../../../common';
|
|
2
|
+
import { SegmentConditionKindEnum } from '../../enums/SegmentConditionKindEnum';
|
|
3
|
+
import { SegmentOperatorEnum } from '../../enums/SegmentOperatorEnum';
|
|
4
|
+
/** (a) Columna de una tabla unida por `directoryid`. El tipo de `value` (escalar, lista o `{days}`) lo valida el compilador contra el tipo de Glue. */
|
|
5
|
+
export declare class SegmentColumnCondition {
|
|
6
|
+
kind: SegmentConditionKindEnum.COLUMN;
|
|
7
|
+
table: string;
|
|
8
|
+
column: string;
|
|
9
|
+
op: SegmentOperatorEnum;
|
|
10
|
+
value?: JsonValue;
|
|
11
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.SegmentColumnCondition = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
const SegmentLimits_1 = require("../../constants/SegmentLimits");
|
|
16
|
+
const SegmentConditionKindEnum_1 = require("../../enums/SegmentConditionKindEnum");
|
|
17
|
+
const SegmentOperatorEnum_1 = require("../../enums/SegmentOperatorEnum");
|
|
18
|
+
/** (a) Columna de una tabla unida por `directoryid`. El tipo de `value` (escalar, lista o `{days}`) lo valida el compilador contra el tipo de Glue. */
|
|
19
|
+
class SegmentColumnCondition {
|
|
20
|
+
}
|
|
21
|
+
exports.SegmentColumnCondition = SegmentColumnCondition;
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, class_transformer_1.Expose)(),
|
|
24
|
+
(0, class_validator_1.Equals)(SegmentConditionKindEnum_1.SegmentConditionKindEnum.COLUMN),
|
|
25
|
+
__metadata("design:type", String)
|
|
26
|
+
], SegmentColumnCondition.prototype, "kind", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, class_transformer_1.Expose)(),
|
|
29
|
+
(0, class_validator_1.Matches)(SegmentLimits_1.SEGMENT_IDENTIFIER_PATTERN),
|
|
30
|
+
__metadata("design:type", String)
|
|
31
|
+
], SegmentColumnCondition.prototype, "table", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, class_transformer_1.Expose)(),
|
|
34
|
+
(0, class_validator_1.Matches)(SegmentLimits_1.SEGMENT_IDENTIFIER_PATTERN),
|
|
35
|
+
__metadata("design:type", String)
|
|
36
|
+
], SegmentColumnCondition.prototype, "column", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, class_transformer_1.Expose)(),
|
|
39
|
+
(0, class_validator_1.IsEnum)(SegmentOperatorEnum_1.SegmentOperatorEnum),
|
|
40
|
+
__metadata("design:type", String)
|
|
41
|
+
], SegmentColumnCondition.prototype, "op", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, class_transformer_1.Expose)(),
|
|
44
|
+
(0, class_validator_1.IsOptional)(),
|
|
45
|
+
__metadata("design:type", Object)
|
|
46
|
+
], SegmentColumnCondition.prototype, "value", void 0);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { SegmentMatchEnum } from '../../enums/SegmentMatchEnum';
|
|
2
|
+
import { SegmentAggregateCondition } from './SegmentAggregateCondition';
|
|
3
|
+
import { SegmentColumnCondition } from './SegmentColumnCondition';
|
|
4
|
+
export type SegmentCondition = SegmentColumnCondition | SegmentAggregateCondition;
|
|
5
|
+
export declare class SegmentGroup {
|
|
6
|
+
match: SegmentMatchEnum;
|
|
7
|
+
/** `kind` decide la clase; un `kind` desconocido NO se instancia y la validacion lo rechaza (el objeto queda sin `@Equals` valido). */
|
|
8
|
+
conditions: SegmentCondition[];
|
|
9
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.SegmentGroup = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
const SegmentConditionKindEnum_1 = require("../../enums/SegmentConditionKindEnum");
|
|
16
|
+
const SegmentMatchEnum_1 = require("../../enums/SegmentMatchEnum");
|
|
17
|
+
const SegmentAggregateCondition_1 = require("./SegmentAggregateCondition");
|
|
18
|
+
const SegmentColumnCondition_1 = require("./SegmentColumnCondition");
|
|
19
|
+
class SegmentGroup {
|
|
20
|
+
}
|
|
21
|
+
exports.SegmentGroup = SegmentGroup;
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, class_transformer_1.Expose)(),
|
|
24
|
+
(0, class_validator_1.IsEnum)(SegmentMatchEnum_1.SegmentMatchEnum),
|
|
25
|
+
__metadata("design:type", String)
|
|
26
|
+
], SegmentGroup.prototype, "match", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, class_transformer_1.Expose)(),
|
|
29
|
+
(0, class_validator_1.IsArray)(),
|
|
30
|
+
(0, class_validator_1.ArrayMinSize)(1),
|
|
31
|
+
(0, class_validator_1.ArrayMaxSize)(20),
|
|
32
|
+
(0, class_validator_1.ValidateNested)({ each: true }),
|
|
33
|
+
(0, class_transformer_1.Type)(() => Object, {
|
|
34
|
+
keepDiscriminatorProperty: true,
|
|
35
|
+
discriminator: {
|
|
36
|
+
property: 'kind',
|
|
37
|
+
subTypes: [
|
|
38
|
+
{ value: SegmentColumnCondition_1.SegmentColumnCondition, name: SegmentConditionKindEnum_1.SegmentConditionKindEnum.COLUMN },
|
|
39
|
+
{ value: SegmentAggregateCondition_1.SegmentAggregateCondition, name: SegmentConditionKindEnum_1.SegmentConditionKindEnum.AGGREGATE },
|
|
40
|
+
],
|
|
41
|
+
},
|
|
42
|
+
}),
|
|
43
|
+
__metadata("design:type", Array)
|
|
44
|
+
], SegmentGroup.prototype, "conditions", void 0);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { SegmentParamSourceEnum } from '../../enums/SegmentParamSourceEnum';
|
|
2
|
+
import { SegmentParamTypeEnum } from '../../enums/SegmentParamTypeEnum';
|
|
3
|
+
/** Un `?` del SQL, en orden. LITERAL lleva `value` como texto canonico; REFERENCE_AT_MINUS_DAYS lleva `days`. */
|
|
4
|
+
export declare class SegmentParam {
|
|
5
|
+
name: string;
|
|
6
|
+
type: SegmentParamTypeEnum;
|
|
7
|
+
source: SegmentParamSourceEnum;
|
|
8
|
+
value?: string;
|
|
9
|
+
days?: number;
|
|
10
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SegmentParam = void 0;
|
|
4
|
+
/** Un `?` del SQL, en orden. LITERAL lleva `value` como texto canonico; REFERENCE_AT_MINUS_DAYS lleva `days`. */
|
|
5
|
+
class SegmentParam {
|
|
6
|
+
}
|
|
7
|
+
exports.SegmentParam = SegmentParam;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare class SegmentSchemaTableResponse {
|
|
2
|
+
table: string;
|
|
3
|
+
joinKey: string;
|
|
4
|
+
columnCount: number;
|
|
5
|
+
}
|
|
6
|
+
/** `available: false` = ambiente sin datalake accesible: el constructor muestra "no disponible". */
|
|
7
|
+
export declare class SegmentSchemaResponse {
|
|
8
|
+
available: boolean;
|
|
9
|
+
tables: SegmentSchemaTableResponse[];
|
|
10
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SegmentSchemaResponse = exports.SegmentSchemaTableResponse = void 0;
|
|
4
|
+
class SegmentSchemaTableResponse {
|
|
5
|
+
}
|
|
6
|
+
exports.SegmentSchemaTableResponse = SegmentSchemaTableResponse;
|
|
7
|
+
/** `available: false` = ambiente sin datalake accesible: el constructor muestra "no disponible". */
|
|
8
|
+
class SegmentSchemaResponse {
|
|
9
|
+
}
|
|
10
|
+
exports.SegmentSchemaResponse = SegmentSchemaResponse;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { SegmentOperatorEnum } from '../../enums/SegmentOperatorEnum';
|
|
2
|
+
export declare class SegmentColumnSchemaResponse {
|
|
3
|
+
name: string;
|
|
4
|
+
type: string;
|
|
5
|
+
isDate: boolean;
|
|
6
|
+
operators: SegmentOperatorEnum[];
|
|
7
|
+
}
|
|
8
|
+
export declare class SegmentTableSchemaResponse {
|
|
9
|
+
table: string;
|
|
10
|
+
joinKey: string;
|
|
11
|
+
columns: SegmentColumnSchemaResponse[];
|
|
12
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SegmentTableSchemaResponse = exports.SegmentColumnSchemaResponse = void 0;
|
|
4
|
+
class SegmentColumnSchemaResponse {
|
|
5
|
+
}
|
|
6
|
+
exports.SegmentColumnSchemaResponse = SegmentColumnSchemaResponse;
|
|
7
|
+
class SegmentTableSchemaResponse {
|
|
8
|
+
}
|
|
9
|
+
exports.SegmentTableSchemaResponse = SegmentTableSchemaResponse;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.SegmentWindow = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
const SegmentLimits_1 = require("../../constants/SegmentLimits");
|
|
16
|
+
/** Ventana relativa [referenceAt - days, referenceAt) sobre una columna de fecha (A§4.1). */
|
|
17
|
+
class SegmentWindow {
|
|
18
|
+
}
|
|
19
|
+
exports.SegmentWindow = SegmentWindow;
|
|
20
|
+
__decorate([
|
|
21
|
+
(0, class_transformer_1.Expose)(),
|
|
22
|
+
(0, class_validator_1.Matches)(SegmentLimits_1.SEGMENT_IDENTIFIER_PATTERN),
|
|
23
|
+
__metadata("design:type", String)
|
|
24
|
+
], SegmentWindow.prototype, "dateColumn", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, class_transformer_1.Expose)(),
|
|
27
|
+
(0, class_validator_1.IsInt)(),
|
|
28
|
+
(0, class_validator_1.Min)(1),
|
|
29
|
+
(0, class_validator_1.Max)(SegmentLimits_1.SEGMENT_MAX_DAYS),
|
|
30
|
+
__metadata("design:type", Number)
|
|
31
|
+
], SegmentWindow.prototype, "days", void 0);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** Codigos de error del canal de poblacion. Los 8 primeros coinciden con SegmentErrorCodeEnum. */
|
|
2
|
+
export declare enum PopulationErrorCodeEnum {
|
|
3
|
+
SEGMENT_INVALID = "SEGMENT_INVALID",
|
|
4
|
+
SEGMENT_BLOCKED_COLUMN = "SEGMENT_BLOCKED_COLUMN",
|
|
5
|
+
SEGMENT_SCHEMA_DRIFT = "SEGMENT_SCHEMA_DRIFT",
|
|
6
|
+
SEGMENT_BYTES_EXCEEDED = "SEGMENT_BYTES_EXCEEDED",
|
|
7
|
+
SEGMENT_QUERY_FAILED = "SEGMENT_QUERY_FAILED",
|
|
8
|
+
SEGMENT_DATALAKE_UNAVAILABLE = "SEGMENT_DATALAKE_UNAVAILABLE",
|
|
9
|
+
SEGMENT_DATALAKE_UNAVAILABLE_IN_ENV = "SEGMENT_DATALAKE_UNAVAILABLE_IN_ENV",
|
|
10
|
+
SEGMENT_EXECUTION_NOT_FOUND = "SEGMENT_EXECUTION_NOT_FOUND",
|
|
11
|
+
SEGMENT_NEXT_TOKEN_EXPIRED = "SEGMENT_NEXT_TOKEN_EXPIRED"
|
|
12
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PopulationErrorCodeEnum = void 0;
|
|
4
|
+
/** Codigos de error del canal de poblacion. Los 8 primeros coinciden con SegmentErrorCodeEnum. */
|
|
5
|
+
var PopulationErrorCodeEnum;
|
|
6
|
+
(function (PopulationErrorCodeEnum) {
|
|
7
|
+
PopulationErrorCodeEnum["SEGMENT_INVALID"] = "SEGMENT_INVALID";
|
|
8
|
+
PopulationErrorCodeEnum["SEGMENT_BLOCKED_COLUMN"] = "SEGMENT_BLOCKED_COLUMN";
|
|
9
|
+
PopulationErrorCodeEnum["SEGMENT_SCHEMA_DRIFT"] = "SEGMENT_SCHEMA_DRIFT";
|
|
10
|
+
PopulationErrorCodeEnum["SEGMENT_BYTES_EXCEEDED"] = "SEGMENT_BYTES_EXCEEDED";
|
|
11
|
+
PopulationErrorCodeEnum["SEGMENT_QUERY_FAILED"] = "SEGMENT_QUERY_FAILED";
|
|
12
|
+
PopulationErrorCodeEnum["SEGMENT_DATALAKE_UNAVAILABLE"] = "SEGMENT_DATALAKE_UNAVAILABLE";
|
|
13
|
+
PopulationErrorCodeEnum["SEGMENT_DATALAKE_UNAVAILABLE_IN_ENV"] = "SEGMENT_DATALAKE_UNAVAILABLE_IN_ENV";
|
|
14
|
+
PopulationErrorCodeEnum["SEGMENT_EXECUTION_NOT_FOUND"] = "SEGMENT_EXECUTION_NOT_FOUND";
|
|
15
|
+
PopulationErrorCodeEnum["SEGMENT_NEXT_TOKEN_EXPIRED"] = "SEGMENT_NEXT_TOKEN_EXPIRED";
|
|
16
|
+
})(PopulationErrorCodeEnum || (exports.PopulationErrorCodeEnum = PopulationErrorCodeEnum = {}));
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PopulationExecutionStatusEnum = void 0;
|
|
4
|
+
var PopulationExecutionStatusEnum;
|
|
5
|
+
(function (PopulationExecutionStatusEnum) {
|
|
6
|
+
PopulationExecutionStatusEnum["RUNNING"] = "RUNNING";
|
|
7
|
+
PopulationExecutionStatusEnum["SUCCEEDED"] = "SUCCEEDED";
|
|
8
|
+
PopulationExecutionStatusEnum["FAILED"] = "FAILED";
|
|
9
|
+
PopulationExecutionStatusEnum["CANCELLED"] = "CANCELLED";
|
|
10
|
+
})(PopulationExecutionStatusEnum || (exports.PopulationExecutionStatusEnum = PopulationExecutionStatusEnum = {}));
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PopulationTestStatusEnum = void 0;
|
|
4
|
+
var PopulationTestStatusEnum;
|
|
5
|
+
(function (PopulationTestStatusEnum) {
|
|
6
|
+
PopulationTestStatusEnum["RUNNING"] = "RUNNING";
|
|
7
|
+
PopulationTestStatusEnum["PASSED"] = "PASSED";
|
|
8
|
+
PopulationTestStatusEnum["FAILED"] = "FAILED";
|
|
9
|
+
})(PopulationTestStatusEnum || (exports.PopulationTestStatusEnum = PopulationTestStatusEnum = {}));
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SegmentAggregateFnEnum = void 0;
|
|
4
|
+
var SegmentAggregateFnEnum;
|
|
5
|
+
(function (SegmentAggregateFnEnum) {
|
|
6
|
+
SegmentAggregateFnEnum["EXISTS"] = "EXISTS";
|
|
7
|
+
SegmentAggregateFnEnum["COUNT"] = "COUNT";
|
|
8
|
+
SegmentAggregateFnEnum["SUM"] = "SUM";
|
|
9
|
+
})(SegmentAggregateFnEnum || (exports.SegmentAggregateFnEnum = SegmentAggregateFnEnum = {}));
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SegmentConditionKindEnum = void 0;
|
|
4
|
+
var SegmentConditionKindEnum;
|
|
5
|
+
(function (SegmentConditionKindEnum) {
|
|
6
|
+
SegmentConditionKindEnum["COLUMN"] = "COLUMN";
|
|
7
|
+
SegmentConditionKindEnum["AGGREGATE"] = "AGGREGATE";
|
|
8
|
+
})(SegmentConditionKindEnum || (exports.SegmentConditionKindEnum = SegmentConditionKindEnum = {}));
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SegmentMatchEnum = void 0;
|
|
4
|
+
var SegmentMatchEnum;
|
|
5
|
+
(function (SegmentMatchEnum) {
|
|
6
|
+
SegmentMatchEnum["ALL"] = "ALL";
|
|
7
|
+
SegmentMatchEnum["ANY"] = "ANY";
|
|
8
|
+
})(SegmentMatchEnum || (exports.SegmentMatchEnum = SegmentMatchEnum = {}));
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare enum SegmentOperatorEnum {
|
|
2
|
+
EQUALS = "EQUALS",
|
|
3
|
+
NOT_EQUALS = "NOT_EQUALS",
|
|
4
|
+
IN = "IN",
|
|
5
|
+
NOT_IN = "NOT_IN",
|
|
6
|
+
IS_NULL = "IS_NULL",
|
|
7
|
+
IS_NOT_NULL = "IS_NOT_NULL",
|
|
8
|
+
GT = "GT",
|
|
9
|
+
GTE = "GTE",
|
|
10
|
+
LT = "LT",
|
|
11
|
+
LTE = "LTE",
|
|
12
|
+
CONTAINS = "CONTAINS",
|
|
13
|
+
ANY_IN = "ANY_IN",
|
|
14
|
+
WITHIN_LAST_DAYS = "WITHIN_LAST_DAYS",
|
|
15
|
+
NOT_WITHIN_LAST_DAYS = "NOT_WITHIN_LAST_DAYS"
|
|
16
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SegmentOperatorEnum = void 0;
|
|
4
|
+
var SegmentOperatorEnum;
|
|
5
|
+
(function (SegmentOperatorEnum) {
|
|
6
|
+
SegmentOperatorEnum["EQUALS"] = "EQUALS";
|
|
7
|
+
SegmentOperatorEnum["NOT_EQUALS"] = "NOT_EQUALS";
|
|
8
|
+
SegmentOperatorEnum["IN"] = "IN";
|
|
9
|
+
SegmentOperatorEnum["NOT_IN"] = "NOT_IN";
|
|
10
|
+
SegmentOperatorEnum["IS_NULL"] = "IS_NULL";
|
|
11
|
+
SegmentOperatorEnum["IS_NOT_NULL"] = "IS_NOT_NULL";
|
|
12
|
+
SegmentOperatorEnum["GT"] = "GT";
|
|
13
|
+
SegmentOperatorEnum["GTE"] = "GTE";
|
|
14
|
+
SegmentOperatorEnum["LT"] = "LT";
|
|
15
|
+
SegmentOperatorEnum["LTE"] = "LTE";
|
|
16
|
+
SegmentOperatorEnum["CONTAINS"] = "CONTAINS";
|
|
17
|
+
SegmentOperatorEnum["ANY_IN"] = "ANY_IN";
|
|
18
|
+
SegmentOperatorEnum["WITHIN_LAST_DAYS"] = "WITHIN_LAST_DAYS";
|
|
19
|
+
SegmentOperatorEnum["NOT_WITHIN_LAST_DAYS"] = "NOT_WITHIN_LAST_DAYS";
|
|
20
|
+
})(SegmentOperatorEnum || (exports.SegmentOperatorEnum = SegmentOperatorEnum = {}));
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SegmentParamSourceEnum = void 0;
|
|
4
|
+
var SegmentParamSourceEnum;
|
|
5
|
+
(function (SegmentParamSourceEnum) {
|
|
6
|
+
SegmentParamSourceEnum["LITERAL"] = "LITERAL";
|
|
7
|
+
SegmentParamSourceEnum["REFERENCE_AT"] = "REFERENCE_AT";
|
|
8
|
+
SegmentParamSourceEnum["REFERENCE_AT_MINUS_DAYS"] = "REFERENCE_AT_MINUS_DAYS";
|
|
9
|
+
})(SegmentParamSourceEnum || (exports.SegmentParamSourceEnum = SegmentParamSourceEnum = {}));
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SegmentParamTypeEnum = void 0;
|
|
4
|
+
var SegmentParamTypeEnum;
|
|
5
|
+
(function (SegmentParamTypeEnum) {
|
|
6
|
+
SegmentParamTypeEnum["STRING"] = "STRING";
|
|
7
|
+
SegmentParamTypeEnum["INTEGER"] = "INTEGER";
|
|
8
|
+
SegmentParamTypeEnum["DECIMAL"] = "DECIMAL";
|
|
9
|
+
SegmentParamTypeEnum["BOOLEAN"] = "BOOLEAN";
|
|
10
|
+
SegmentParamTypeEnum["TIMESTAMP"] = "TIMESTAMP";
|
|
11
|
+
})(SegmentParamTypeEnum || (exports.SegmentParamTypeEnum = SegmentParamTypeEnum = {}));
|
package/bin/rules/index.d.ts
CHANGED
|
@@ -13,3 +13,29 @@ export * from './dtos/GenerateRulesResponse';
|
|
|
13
13
|
export * from './dtos/RulesTraceResponse';
|
|
14
14
|
export * from './dtos/EvaluateRulesRequest';
|
|
15
15
|
export * from './dtos/EvaluateRulesResponse';
|
|
16
|
+
export * from './enums/SegmentMatchEnum';
|
|
17
|
+
export * from './enums/SegmentConditionKindEnum';
|
|
18
|
+
export * from './enums/SegmentAggregateFnEnum';
|
|
19
|
+
export * from './enums/SegmentOperatorEnum';
|
|
20
|
+
export * from './enums/SegmentParamTypeEnum';
|
|
21
|
+
export * from './enums/SegmentParamSourceEnum';
|
|
22
|
+
export * from './constants/SegmentLimits';
|
|
23
|
+
export * from './dtos/population/SegmentWindow';
|
|
24
|
+
export * from './dtos/population/SegmentColumnCondition';
|
|
25
|
+
export * from './dtos/population/SegmentAggregateCondition';
|
|
26
|
+
export * from './dtos/population/SegmentGroup';
|
|
27
|
+
export * from './dtos/population/PopulationSegmentDefinition';
|
|
28
|
+
export * from './dtos/population/SegmentParam';
|
|
29
|
+
export * from './dtos/population/SegmentUsedColumn';
|
|
30
|
+
export * from './dtos/population/SegmentSchemaResponse';
|
|
31
|
+
export * from './dtos/population/SegmentTableSchemaResponse';
|
|
32
|
+
export * from './enums/PopulationErrorCodeEnum';
|
|
33
|
+
export * from './enums/PopulationTestStatusEnum';
|
|
34
|
+
export * from './enums/PopulationExecutionStatusEnum';
|
|
35
|
+
export * from './dtos/population/PopulationCompileRequest';
|
|
36
|
+
export * from './dtos/population/PopulationCompileResponse';
|
|
37
|
+
export * from './dtos/population/PopulationTestRequest';
|
|
38
|
+
export * from './dtos/population/PopulationTestResponse';
|
|
39
|
+
export * from './dtos/population/PopulationExecutionRequest';
|
|
40
|
+
export * from './dtos/population/PopulationExecutionResponse';
|
|
41
|
+
export * from './dtos/population/PopulationExecutionPageResponse';
|
package/bin/rules/index.js
CHANGED
|
@@ -32,3 +32,31 @@ __exportStar(require("./dtos/GenerateRulesResponse"), exports);
|
|
|
32
32
|
__exportStar(require("./dtos/RulesTraceResponse"), exports);
|
|
33
33
|
__exportStar(require("./dtos/EvaluateRulesRequest"), exports);
|
|
34
34
|
__exportStar(require("./dtos/EvaluateRulesResponse"), exports);
|
|
35
|
+
//Poblacion (movido desde rewardsEligibility; alli queda re-export)
|
|
36
|
+
__exportStar(require("./enums/SegmentMatchEnum"), exports);
|
|
37
|
+
__exportStar(require("./enums/SegmentConditionKindEnum"), exports);
|
|
38
|
+
__exportStar(require("./enums/SegmentAggregateFnEnum"), exports);
|
|
39
|
+
__exportStar(require("./enums/SegmentOperatorEnum"), exports);
|
|
40
|
+
__exportStar(require("./enums/SegmentParamTypeEnum"), exports);
|
|
41
|
+
__exportStar(require("./enums/SegmentParamSourceEnum"), exports);
|
|
42
|
+
__exportStar(require("./constants/SegmentLimits"), exports);
|
|
43
|
+
__exportStar(require("./dtos/population/SegmentWindow"), exports);
|
|
44
|
+
__exportStar(require("./dtos/population/SegmentColumnCondition"), exports);
|
|
45
|
+
__exportStar(require("./dtos/population/SegmentAggregateCondition"), exports);
|
|
46
|
+
__exportStar(require("./dtos/population/SegmentGroup"), exports);
|
|
47
|
+
__exportStar(require("./dtos/population/PopulationSegmentDefinition"), exports);
|
|
48
|
+
__exportStar(require("./dtos/population/SegmentParam"), exports);
|
|
49
|
+
__exportStar(require("./dtos/population/SegmentUsedColumn"), exports);
|
|
50
|
+
__exportStar(require("./dtos/population/SegmentSchemaResponse"), exports);
|
|
51
|
+
__exportStar(require("./dtos/population/SegmentTableSchemaResponse"), exports);
|
|
52
|
+
//Poblacion: endpoints del canal /population/*
|
|
53
|
+
__exportStar(require("./enums/PopulationErrorCodeEnum"), exports);
|
|
54
|
+
__exportStar(require("./enums/PopulationTestStatusEnum"), exports);
|
|
55
|
+
__exportStar(require("./enums/PopulationExecutionStatusEnum"), exports);
|
|
56
|
+
__exportStar(require("./dtos/population/PopulationCompileRequest"), exports);
|
|
57
|
+
__exportStar(require("./dtos/population/PopulationCompileResponse"), exports);
|
|
58
|
+
__exportStar(require("./dtos/population/PopulationTestRequest"), exports);
|
|
59
|
+
__exportStar(require("./dtos/population/PopulationTestResponse"), exports);
|
|
60
|
+
__exportStar(require("./dtos/population/PopulationExecutionRequest"), exports);
|
|
61
|
+
__exportStar(require("./dtos/population/PopulationExecutionResponse"), exports);
|
|
62
|
+
__exportStar(require("./dtos/population/PopulationExecutionPageResponse"), exports);
|
package/package.json
CHANGED
|
@@ -1,5 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export const SEGMENT_IDENTIFIER_PATTERN = /^[a-z_][a-z0-9_]*$/;
|
|
3
|
-
export const SEGMENT_MAX_DAYS = 365;
|
|
4
|
-
export const SEGMENT_MAX_PARAMS = 40;
|
|
5
|
-
export const SEGMENT_MAX_AGGREGATES = 8;
|
|
1
|
+
export * from '../../rules/constants/SegmentLimits';
|
|
@@ -1,12 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { ArrayMaxSize, ArrayMinSize, IsArray, IsEnum, Matches, ValidateNested } from 'class-validator';
|
|
3
|
-
import { SEGMENT_IDENTIFIER_PATTERN } from '../../../constants/SegmentLimits';
|
|
4
|
-
import { SegmentMatchEnum } from '../../../enums/SegmentMatchEnum';
|
|
5
|
-
import { SegmentGroup } from './SegmentGroup';
|
|
6
|
-
|
|
7
|
-
/** El constructor tal cual (A§4.1): tabla ancla (una fila -> un directoryid), TODAS/ALGUNA global y grupos con su propio TODAS/ALGUNA. */
|
|
8
|
-
export class PopulationSegmentDefinition {
|
|
9
|
-
@Expose() @Matches(SEGMENT_IDENTIFIER_PATTERN) baseTable: string;
|
|
10
|
-
@Expose() @IsEnum(SegmentMatchEnum) match: SegmentMatchEnum;
|
|
11
|
-
@Expose() @IsArray() @ArrayMinSize(1) @ArrayMaxSize(10) @ValidateNested({ each: true }) @Type(() => SegmentGroup) groups: SegmentGroup[];
|
|
12
|
-
}
|
|
1
|
+
export * from '../../../../rules/dtos/population/PopulationSegmentDefinition';
|
|
@@ -1,22 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { ArrayMaxSize, Equals, IsArray, IsEnum, IsNumber, IsOptional, Matches, ValidateNested } from 'class-validator';
|
|
3
|
-
import { SEGMENT_IDENTIFIER_PATTERN } from '../../../constants/SegmentLimits';
|
|
4
|
-
import { SegmentAggregateFnEnum } from '../../../enums/SegmentAggregateFnEnum';
|
|
5
|
-
import { SegmentConditionKindEnum } from '../../../enums/SegmentConditionKindEnum';
|
|
6
|
-
import { SegmentOperatorEnum } from '../../../enums/SegmentOperatorEnum';
|
|
7
|
-
import { SegmentColumnCondition } from './SegmentColumnCondition';
|
|
8
|
-
import { SegmentWindow } from './SegmentWindow';
|
|
9
|
-
|
|
10
|
-
/** (b) Agregado con ventana relativa sobre una tabla relacionada (existe / cuenta / suma). `filters` elige QUE cuenta (estados, moneda...). */
|
|
11
|
-
export class SegmentAggregateCondition {
|
|
12
|
-
@Expose() @Equals(SegmentConditionKindEnum.AGGREGATE) kind: SegmentConditionKindEnum.AGGREGATE;
|
|
13
|
-
@Expose() @Matches(SEGMENT_IDENTIFIER_PATTERN) table: string;
|
|
14
|
-
@Expose() @IsEnum(SegmentAggregateFnEnum) fn: SegmentAggregateFnEnum;
|
|
15
|
-
/** Solo SUM. */
|
|
16
|
-
@Expose() @IsOptional() @Matches(SEGMENT_IDENTIFIER_PATTERN) column?: string;
|
|
17
|
-
/** COUNT y SUM; EXISTS no lleva. */
|
|
18
|
-
@Expose() @IsOptional() @IsEnum(SegmentOperatorEnum) op?: SegmentOperatorEnum;
|
|
19
|
-
@Expose() @IsOptional() @IsNumber() value?: number;
|
|
20
|
-
@Expose() @ValidateNested() @Type(() => SegmentWindow) window: SegmentWindow;
|
|
21
|
-
@Expose() @IsArray() @ArrayMaxSize(10) @ValidateNested({ each: true }) @Type(() => SegmentColumnCondition) filters: SegmentColumnCondition[];
|
|
22
|
-
}
|
|
1
|
+
export * from '../../../../rules/dtos/population/SegmentAggregateCondition';
|