@fiado/type-kit 3.529.0 → 3.530.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/rewardsEligibility/backofficeBarrel.test.ts +6 -0
- package/_test_/unit/rewardsEligibility/runDtos.test.ts +2 -2
- package/_test_/unit/rewardsEligibility/segmentBackofficeDtos.test.ts +29 -0
- package/_test_/unit/rewardsEligibility/segmentDefinitionDto.test.ts +46 -0
- package/_test_/unit/rewardsEligibility/segmentEnums.test.ts +43 -0
- package/_test_/unit/rewardsEligibility/segmentMessagesAndRunDtos.test.ts +52 -0
- package/bin/rewardsEligibility/constants/BackofficeLimits.d.ts +2 -0
- package/bin/rewardsEligibility/constants/BackofficeLimits.js +3 -1
- package/bin/rewardsEligibility/constants/SegmentLimits.d.ts +5 -0
- package/bin/rewardsEligibility/constants/SegmentLimits.js +8 -0
- package/bin/rewardsEligibility/dtos/backoffice/CreateRunRequest.js +4 -2
- package/bin/rewardsEligibility/dtos/backoffice/EvaluationRequest.d.ts +4 -0
- package/bin/rewardsEligibility/dtos/backoffice/EvaluationRequest.js +14 -0
- package/bin/rewardsEligibility/dtos/backoffice/EvaluationResponse.d.ts +2 -0
- package/bin/rewardsEligibility/dtos/backoffice/PopulationRunRequest.d.ts +1 -3
- package/bin/rewardsEligibility/dtos/backoffice/PopulationRunRequest.js +1 -18
- package/bin/rewardsEligibility/dtos/backoffice/RunPopulationProgress.d.ts +9 -0
- package/bin/rewardsEligibility/dtos/backoffice/RunPopulationProgress.js +7 -0
- package/bin/rewardsEligibility/dtos/backoffice/RunResponse.d.ts +19 -0
- package/bin/rewardsEligibility/dtos/backoffice/segments/PopulationSegmentDefinition.d.ts +8 -0
- package/bin/rewardsEligibility/dtos/backoffice/segments/PopulationSegmentDefinition.js +40 -0
- package/bin/rewardsEligibility/dtos/backoffice/segments/PrivateSegmentResponse.d.ts +11 -0
- package/bin/rewardsEligibility/dtos/backoffice/segments/PrivateSegmentResponse.js +7 -0
- package/bin/rewardsEligibility/dtos/backoffice/segments/SegmentAggregateCondition.d.ts +18 -0
- package/bin/rewardsEligibility/dtos/backoffice/segments/SegmentAggregateCondition.js +71 -0
- package/bin/rewardsEligibility/dtos/backoffice/segments/SegmentColumnCondition.d.ts +11 -0
- package/bin/rewardsEligibility/dtos/backoffice/segments/SegmentColumnCondition.js +46 -0
- package/bin/rewardsEligibility/dtos/backoffice/segments/SegmentExecutionPageResponse.d.ts +8 -0
- package/bin/rewardsEligibility/dtos/backoffice/segments/SegmentExecutionPageResponse.js +6 -0
- package/bin/rewardsEligibility/dtos/backoffice/segments/SegmentExecutionRequest.d.ts +6 -0
- package/bin/rewardsEligibility/dtos/backoffice/segments/SegmentExecutionRequest.js +31 -0
- package/bin/rewardsEligibility/dtos/backoffice/segments/SegmentExecutionResponse.d.ts +7 -0
- package/bin/rewardsEligibility/dtos/backoffice/segments/SegmentExecutionResponse.js +6 -0
- package/bin/rewardsEligibility/dtos/backoffice/segments/SegmentGroup.d.ts +9 -0
- package/bin/rewardsEligibility/dtos/backoffice/segments/SegmentGroup.js +44 -0
- package/bin/rewardsEligibility/dtos/backoffice/segments/SegmentLastTest.d.ts +8 -0
- package/bin/rewardsEligibility/dtos/backoffice/segments/SegmentLastTest.js +6 -0
- package/bin/rewardsEligibility/dtos/backoffice/segments/SegmentListResponse.d.ts +9 -0
- package/bin/rewardsEligibility/dtos/backoffice/segments/SegmentListResponse.js +10 -0
- package/bin/rewardsEligibility/dtos/backoffice/segments/SegmentParam.d.ts +10 -0
- package/bin/rewardsEligibility/dtos/backoffice/segments/SegmentParam.js +7 -0
- package/bin/rewardsEligibility/dtos/backoffice/segments/SegmentSaveRequest.d.ts +13 -0
- package/bin/rewardsEligibility/dtos/backoffice/segments/SegmentSaveRequest.js +58 -0
- package/bin/rewardsEligibility/dtos/backoffice/segments/SegmentSchemaResponse.d.ts +10 -0
- package/bin/rewardsEligibility/dtos/backoffice/segments/SegmentSchemaResponse.js +10 -0
- package/bin/rewardsEligibility/dtos/backoffice/segments/SegmentStatusRequest.d.ts +6 -0
- package/bin/rewardsEligibility/dtos/backoffice/segments/SegmentStatusRequest.js +31 -0
- package/bin/rewardsEligibility/dtos/backoffice/segments/SegmentTableSchemaResponse.d.ts +12 -0
- package/bin/rewardsEligibility/dtos/backoffice/segments/SegmentTableSchemaResponse.js +9 -0
- package/bin/rewardsEligibility/dtos/backoffice/segments/SegmentTestRequest.d.ts +4 -0
- package/bin/rewardsEligibility/dtos/backoffice/segments/SegmentTestRequest.js +25 -0
- package/bin/rewardsEligibility/dtos/backoffice/segments/SegmentTestResponse.d.ts +26 -0
- package/bin/rewardsEligibility/dtos/backoffice/segments/SegmentTestResponse.js +12 -0
- package/bin/rewardsEligibility/dtos/backoffice/segments/SegmentUsedByResponse.d.ts +21 -0
- package/bin/rewardsEligibility/dtos/backoffice/segments/SegmentUsedByResponse.js +12 -0
- package/bin/rewardsEligibility/dtos/backoffice/segments/SegmentUsedColumn.d.ts +5 -0
- package/bin/rewardsEligibility/dtos/backoffice/segments/SegmentUsedColumn.js +6 -0
- package/bin/rewardsEligibility/dtos/backoffice/segments/SegmentVersionListResponse.d.ts +4 -0
- package/bin/rewardsEligibility/dtos/backoffice/segments/SegmentVersionListResponse.js +6 -0
- package/bin/rewardsEligibility/dtos/backoffice/segments/SegmentVersionResponse.d.ts +24 -0
- package/bin/rewardsEligibility/dtos/backoffice/segments/SegmentVersionResponse.js +6 -0
- package/bin/rewardsEligibility/dtos/backoffice/segments/SegmentVersionSummaryResponse.d.ts +12 -0
- package/bin/rewardsEligibility/dtos/backoffice/segments/SegmentVersionSummaryResponse.js +7 -0
- package/bin/rewardsEligibility/dtos/backoffice/segments/SegmentWindow.d.ts +5 -0
- package/bin/rewardsEligibility/dtos/backoffice/segments/SegmentWindow.js +31 -0
- package/bin/rewardsEligibility/dtos/messages/EvaluateBatchMessage.d.ts +14 -0
- package/bin/rewardsEligibility/dtos/messages/EvaluateBatchMessage.js +61 -0
- package/bin/rewardsEligibility/dtos/messages/GrantBatchMessage.d.ts +8 -0
- package/bin/rewardsEligibility/dtos/messages/GrantBatchMessage.js +42 -0
- package/bin/rewardsEligibility/dtos/messages/PopulationPageMessage.d.ts +6 -0
- package/bin/rewardsEligibility/dtos/messages/PopulationPageMessage.js +30 -0
- package/bin/rewardsEligibility/dtos/messages/ReleaseTrancheMessage.d.ts +6 -0
- package/bin/rewardsEligibility/dtos/messages/ReleaseTrancheMessage.js +30 -0
- package/bin/rewardsEligibility/enums/EligibilityMessageTypeEnum.d.ts +6 -0
- package/bin/rewardsEligibility/enums/EligibilityMessageTypeEnum.js +11 -0
- package/bin/rewardsEligibility/enums/SegmentAggregateFnEnum.d.ts +5 -0
- package/bin/rewardsEligibility/enums/SegmentAggregateFnEnum.js +9 -0
- package/bin/rewardsEligibility/enums/SegmentConditionKindEnum.d.ts +4 -0
- package/bin/rewardsEligibility/enums/SegmentConditionKindEnum.js +8 -0
- package/bin/rewardsEligibility/enums/SegmentErrorCodeEnum.d.ts +16 -0
- package/bin/rewardsEligibility/enums/SegmentErrorCodeEnum.js +20 -0
- package/bin/rewardsEligibility/enums/SegmentMatchEnum.d.ts +4 -0
- package/bin/rewardsEligibility/enums/SegmentMatchEnum.js +8 -0
- package/bin/rewardsEligibility/enums/SegmentOperatorEnum.d.ts +16 -0
- package/bin/rewardsEligibility/enums/SegmentOperatorEnum.js +20 -0
- package/bin/rewardsEligibility/enums/SegmentParamSourceEnum.d.ts +5 -0
- package/bin/rewardsEligibility/enums/SegmentParamSourceEnum.js +9 -0
- package/bin/rewardsEligibility/enums/SegmentParamTypeEnum.d.ts +7 -0
- package/bin/rewardsEligibility/enums/SegmentParamTypeEnum.js +11 -0
- package/bin/rewardsEligibility/enums/SegmentStatusEnum.d.ts +5 -0
- package/bin/rewardsEligibility/enums/SegmentStatusEnum.js +9 -0
- package/bin/rewardsEligibility/enums/SegmentTestStatusEnum.d.ts +5 -0
- package/bin/rewardsEligibility/enums/SegmentTestStatusEnum.js +9 -0
- package/bin/rewardsEligibility/index.d.ts +39 -0
- package/bin/rewardsEligibility/index.js +43 -0
- package/package.json +1 -1
- package/src/rewardsEligibility/constants/BackofficeLimits.ts +2 -0
- package/src/rewardsEligibility/constants/SegmentLimits.ts +5 -0
- package/src/rewardsEligibility/dtos/backoffice/CreateRunRequest.ts +3 -2
- package/src/rewardsEligibility/dtos/backoffice/EvaluationRequest.ts +16 -2
- package/src/rewardsEligibility/dtos/backoffice/EvaluationResponse.ts +2 -0
- package/src/rewardsEligibility/dtos/backoffice/PopulationRunRequest.ts +2 -11
- package/src/rewardsEligibility/dtos/backoffice/RunPopulationProgress.ts +9 -0
- package/src/rewardsEligibility/dtos/backoffice/RunResponse.ts +12 -0
- package/src/rewardsEligibility/dtos/backoffice/segments/PopulationSegmentDefinition.ts +12 -0
- package/src/rewardsEligibility/dtos/backoffice/segments/PrivateSegmentResponse.ts +12 -0
- package/src/rewardsEligibility/dtos/backoffice/segments/SegmentAggregateCondition.ts +22 -0
- package/src/rewardsEligibility/dtos/backoffice/segments/SegmentColumnCondition.ts +15 -0
- package/src/rewardsEligibility/dtos/backoffice/segments/SegmentExecutionPageResponse.ts +8 -0
- package/src/rewardsEligibility/dtos/backoffice/segments/SegmentExecutionRequest.ts +17 -0
- package/src/rewardsEligibility/dtos/backoffice/segments/SegmentExecutionResponse.ts +7 -0
- package/src/rewardsEligibility/dtos/backoffice/segments/SegmentGroup.ts +27 -0
- package/src/rewardsEligibility/dtos/backoffice/segments/SegmentLastTest.ts +8 -0
- package/src/rewardsEligibility/dtos/backoffice/segments/SegmentListResponse.ts +11 -0
- package/src/rewardsEligibility/dtos/backoffice/segments/SegmentParam.ts +11 -0
- package/src/rewardsEligibility/dtos/backoffice/segments/SegmentSaveRequest.ts +16 -0
- package/src/rewardsEligibility/dtos/backoffice/segments/SegmentSchemaResponse.ts +11 -0
- package/src/rewardsEligibility/dtos/backoffice/segments/SegmentStatusRequest.ts +9 -0
- package/src/rewardsEligibility/dtos/backoffice/segments/SegmentTableSchemaResponse.ts +14 -0
- package/src/rewardsEligibility/dtos/backoffice/segments/SegmentTestRequest.ts +7 -0
- package/src/rewardsEligibility/dtos/backoffice/segments/SegmentTestResponse.ts +29 -0
- package/src/rewardsEligibility/dtos/backoffice/segments/SegmentUsedByResponse.ts +24 -0
- package/src/rewardsEligibility/dtos/backoffice/segments/SegmentUsedColumn.ts +5 -0
- package/src/rewardsEligibility/dtos/backoffice/segments/SegmentVersionListResponse.ts +5 -0
- package/src/rewardsEligibility/dtos/backoffice/segments/SegmentVersionResponse.ts +25 -0
- package/src/rewardsEligibility/dtos/backoffice/segments/SegmentVersionSummaryResponse.ts +13 -0
- package/src/rewardsEligibility/dtos/backoffice/segments/SegmentWindow.ts +9 -0
- package/src/rewardsEligibility/dtos/messages/EvaluateBatchMessage.ts +42 -0
- package/src/rewardsEligibility/dtos/messages/GrantBatchMessage.ts +25 -0
- package/src/rewardsEligibility/dtos/messages/PopulationPageMessage.ts +15 -0
- package/src/rewardsEligibility/dtos/messages/ReleaseTrancheMessage.ts +15 -0
- package/src/rewardsEligibility/enums/EligibilityMessageTypeEnum.ts +7 -0
- package/src/rewardsEligibility/enums/SegmentAggregateFnEnum.ts +5 -0
- package/src/rewardsEligibility/enums/SegmentConditionKindEnum.ts +4 -0
- package/src/rewardsEligibility/enums/SegmentErrorCodeEnum.ts +16 -0
- package/src/rewardsEligibility/enums/SegmentMatchEnum.ts +4 -0
- package/src/rewardsEligibility/enums/SegmentOperatorEnum.ts +16 -0
- package/src/rewardsEligibility/enums/SegmentParamSourceEnum.ts +5 -0
- package/src/rewardsEligibility/enums/SegmentParamTypeEnum.ts +7 -0
- package/src/rewardsEligibility/enums/SegmentStatusEnum.ts +5 -0
- package/src/rewardsEligibility/enums/SegmentTestStatusEnum.ts +5 -0
- package/src/rewardsEligibility/index.ts +47 -0
|
@@ -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.SegmentExecutionRequest = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
/** Ejecucion de un segmento desde otro servicio (endpoint privado). */
|
|
16
|
+
class SegmentExecutionRequest {
|
|
17
|
+
}
|
|
18
|
+
exports.SegmentExecutionRequest = SegmentExecutionRequest;
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, class_transformer_1.Expose)(),
|
|
21
|
+
(0, class_validator_1.IsOptional)(),
|
|
22
|
+
(0, class_validator_1.IsInt)(),
|
|
23
|
+
(0, class_validator_1.Min)(1),
|
|
24
|
+
__metadata("design:type", Number)
|
|
25
|
+
], SegmentExecutionRequest.prototype, "version", void 0);
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, class_transformer_1.Expose)(),
|
|
28
|
+
(0, class_validator_1.IsOptional)(),
|
|
29
|
+
(0, class_validator_1.IsISO8601)({ strict: true }),
|
|
30
|
+
__metadata("design:type", String)
|
|
31
|
+
], SegmentExecutionRequest.prototype, "referenceAt", 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,9 @@
|
|
|
1
|
+
import { SegmentVersionResponse } from './SegmentVersionResponse';
|
|
2
|
+
export declare class SegmentListItemResponse extends SegmentVersionResponse {
|
|
3
|
+
/** Evaluaciones de rewards que lo usan (los consumidores externos del endpoint privado NO cuentan). */
|
|
4
|
+
usedByCount: number;
|
|
5
|
+
}
|
|
6
|
+
export declare class SegmentListResponse {
|
|
7
|
+
items: SegmentListItemResponse[];
|
|
8
|
+
nextCursor?: string;
|
|
9
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SegmentListResponse = exports.SegmentListItemResponse = void 0;
|
|
4
|
+
const SegmentVersionResponse_1 = require("./SegmentVersionResponse");
|
|
5
|
+
class SegmentListItemResponse extends SegmentVersionResponse_1.SegmentVersionResponse {
|
|
6
|
+
}
|
|
7
|
+
exports.SegmentListItemResponse = SegmentListItemResponse;
|
|
8
|
+
class SegmentListResponse {
|
|
9
|
+
}
|
|
10
|
+
exports.SegmentListResponse = SegmentListResponse;
|
|
@@ -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,13 @@
|
|
|
1
|
+
import { SegmentStatusEnum } from '../../../enums/SegmentStatusEnum';
|
|
2
|
+
import { PopulationSegmentDefinition } from './PopulationSegmentDefinition';
|
|
3
|
+
/** POST /population-segments y PUT /population-segments/{segmentId}. */
|
|
4
|
+
export declare class SegmentSaveRequest {
|
|
5
|
+
name: string;
|
|
6
|
+
description: string;
|
|
7
|
+
/** Responsable del segmento (usuario o equipo, texto). */
|
|
8
|
+
owner: string;
|
|
9
|
+
definition: PopulationSegmentDefinition;
|
|
10
|
+
/** `testId` de `POST /population-segments/test`: el servidor exige que sea PASSED, vigente y de ESTA definicion. */
|
|
11
|
+
testId: string;
|
|
12
|
+
status: SegmentStatusEnum.DRAFT | SegmentStatusEnum.ACTIVE;
|
|
13
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
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.SegmentSaveRequest = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
const SegmentStatusEnum_1 = require("../../../enums/SegmentStatusEnum");
|
|
16
|
+
const PopulationSegmentDefinition_1 = require("./PopulationSegmentDefinition");
|
|
17
|
+
/** POST /population-segments y PUT /population-segments/{segmentId}. */
|
|
18
|
+
class SegmentSaveRequest {
|
|
19
|
+
}
|
|
20
|
+
exports.SegmentSaveRequest = SegmentSaveRequest;
|
|
21
|
+
__decorate([
|
|
22
|
+
(0, class_transformer_1.Expose)(),
|
|
23
|
+
(0, class_validator_1.IsString)(),
|
|
24
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
25
|
+
(0, class_validator_1.MaxLength)(160),
|
|
26
|
+
__metadata("design:type", String)
|
|
27
|
+
], SegmentSaveRequest.prototype, "name", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, class_transformer_1.Expose)(),
|
|
30
|
+
(0, class_validator_1.IsString)(),
|
|
31
|
+
(0, class_validator_1.MaxLength)(500),
|
|
32
|
+
__metadata("design:type", String)
|
|
33
|
+
], SegmentSaveRequest.prototype, "description", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, class_transformer_1.Expose)(),
|
|
36
|
+
(0, class_validator_1.IsString)(),
|
|
37
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
38
|
+
(0, class_validator_1.MaxLength)(120),
|
|
39
|
+
__metadata("design:type", String)
|
|
40
|
+
], SegmentSaveRequest.prototype, "owner", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, class_transformer_1.Expose)(),
|
|
43
|
+
(0, class_validator_1.IsDefined)(),
|
|
44
|
+
(0, class_validator_1.ValidateNested)(),
|
|
45
|
+
(0, class_transformer_1.Type)(() => PopulationSegmentDefinition_1.PopulationSegmentDefinition),
|
|
46
|
+
__metadata("design:type", PopulationSegmentDefinition_1.PopulationSegmentDefinition)
|
|
47
|
+
], SegmentSaveRequest.prototype, "definition", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, class_transformer_1.Expose)(),
|
|
50
|
+
(0, class_validator_1.IsString)(),
|
|
51
|
+
(0, class_validator_1.Matches)(/^[A-Za-z0-9-]{1,64}$/),
|
|
52
|
+
__metadata("design:type", String)
|
|
53
|
+
], SegmentSaveRequest.prototype, "testId", void 0);
|
|
54
|
+
__decorate([
|
|
55
|
+
(0, class_transformer_1.Expose)(),
|
|
56
|
+
(0, class_validator_1.IsIn)([SegmentStatusEnum_1.SegmentStatusEnum.DRAFT, SegmentStatusEnum_1.SegmentStatusEnum.ACTIVE]),
|
|
57
|
+
__metadata("design:type", String)
|
|
58
|
+
], SegmentSaveRequest.prototype, "status", void 0);
|
|
@@ -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,6 @@
|
|
|
1
|
+
import { SegmentStatusEnum } from '../../../enums/SegmentStatusEnum';
|
|
2
|
+
/** POST /population-segments/{segmentId}/status: activar un DRAFT (con `version`) o archivar el segmento completo. */
|
|
3
|
+
export declare class SegmentStatusRequest {
|
|
4
|
+
version?: number;
|
|
5
|
+
status: SegmentStatusEnum;
|
|
6
|
+
}
|
|
@@ -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.SegmentStatusRequest = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
const SegmentStatusEnum_1 = require("../../../enums/SegmentStatusEnum");
|
|
16
|
+
/** POST /population-segments/{segmentId}/status: activar un DRAFT (con `version`) o archivar el segmento completo. */
|
|
17
|
+
class SegmentStatusRequest {
|
|
18
|
+
}
|
|
19
|
+
exports.SegmentStatusRequest = SegmentStatusRequest;
|
|
20
|
+
__decorate([
|
|
21
|
+
(0, class_transformer_1.Expose)(),
|
|
22
|
+
(0, class_validator_1.IsOptional)(),
|
|
23
|
+
(0, class_validator_1.IsInt)(),
|
|
24
|
+
(0, class_validator_1.Min)(1),
|
|
25
|
+
__metadata("design:type", Number)
|
|
26
|
+
], SegmentStatusRequest.prototype, "version", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, class_transformer_1.Expose)(),
|
|
29
|
+
(0, class_validator_1.IsEnum)(SegmentStatusEnum_1.SegmentStatusEnum),
|
|
30
|
+
__metadata("design:type", String)
|
|
31
|
+
], SegmentStatusRequest.prototype, "status", void 0);
|
|
@@ -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,25 @@
|
|
|
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.SegmentTestRequest = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
const PopulationSegmentDefinition_1 = require("./PopulationSegmentDefinition");
|
|
16
|
+
class SegmentTestRequest {
|
|
17
|
+
}
|
|
18
|
+
exports.SegmentTestRequest = SegmentTestRequest;
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, class_transformer_1.Expose)(),
|
|
21
|
+
(0, class_validator_1.IsDefined)(),
|
|
22
|
+
(0, class_validator_1.ValidateNested)(),
|
|
23
|
+
(0, class_transformer_1.Type)(() => PopulationSegmentDefinition_1.PopulationSegmentDefinition),
|
|
24
|
+
__metadata("design:type", PopulationSegmentDefinition_1.PopulationSegmentDefinition)
|
|
25
|
+
], SegmentTestRequest.prototype, "definition", void 0);
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { SegmentErrorCodeEnum } from '../../../enums/SegmentErrorCodeEnum';
|
|
2
|
+
import { SegmentTestStatusEnum } from '../../../enums/SegmentTestStatusEnum';
|
|
3
|
+
import { SegmentParam } from './SegmentParam';
|
|
4
|
+
export declare class SegmentTestResultResponse {
|
|
5
|
+
count: number;
|
|
6
|
+
/** Ids parciales (`a41f...09c2`), hasta 20. */
|
|
7
|
+
sampleIds: string[];
|
|
8
|
+
bytesScanned: number;
|
|
9
|
+
durationMs: number;
|
|
10
|
+
}
|
|
11
|
+
export declare class SegmentTestErrorResponse {
|
|
12
|
+
code: SegmentErrorCodeEnum;
|
|
13
|
+
message: string;
|
|
14
|
+
}
|
|
15
|
+
export declare class SegmentTestResponse {
|
|
16
|
+
testId: string;
|
|
17
|
+
status: SegmentTestStatusEnum;
|
|
18
|
+
referenceAt: string;
|
|
19
|
+
/** Resumen en lenguaje normal generado de forma determinista (sin IA). */
|
|
20
|
+
humanSummary: string;
|
|
21
|
+
/** SQL de solo lectura + params separados (la UI no deja editarlos). */
|
|
22
|
+
sql: string;
|
|
23
|
+
params: SegmentParam[];
|
|
24
|
+
result?: SegmentTestResultResponse;
|
|
25
|
+
errors?: SegmentTestErrorResponse[];
|
|
26
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SegmentTestResponse = exports.SegmentTestErrorResponse = exports.SegmentTestResultResponse = void 0;
|
|
4
|
+
class SegmentTestResultResponse {
|
|
5
|
+
}
|
|
6
|
+
exports.SegmentTestResultResponse = SegmentTestResultResponse;
|
|
7
|
+
class SegmentTestErrorResponse {
|
|
8
|
+
}
|
|
9
|
+
exports.SegmentTestErrorResponse = SegmentTestErrorResponse;
|
|
10
|
+
class SegmentTestResponse {
|
|
11
|
+
}
|
|
12
|
+
exports.SegmentTestResponse = SegmentTestResponse;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { EvaluationStatusEnum } from '../../../enums/EvaluationStatusEnum';
|
|
2
|
+
import { RunStatusEnum } from '../../../enums/RunStatusEnum';
|
|
3
|
+
import { TriggerTypeEnum } from '../../../enums/TriggerTypeEnum';
|
|
4
|
+
export declare class SegmentUsedByEvaluation {
|
|
5
|
+
id: string;
|
|
6
|
+
name: string;
|
|
7
|
+
campaignId: string;
|
|
8
|
+
status: EvaluationStatusEnum;
|
|
9
|
+
triggers: TriggerTypeEnum[];
|
|
10
|
+
}
|
|
11
|
+
export declare class SegmentUsedByRun {
|
|
12
|
+
runId: string;
|
|
13
|
+
evaluationId: string;
|
|
14
|
+
segmentVersion: number;
|
|
15
|
+
status: RunStatusEnum;
|
|
16
|
+
createdAt: number;
|
|
17
|
+
}
|
|
18
|
+
export declare class SegmentUsedByResponse {
|
|
19
|
+
evaluations: SegmentUsedByEvaluation[];
|
|
20
|
+
runs: SegmentUsedByRun[];
|
|
21
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SegmentUsedByResponse = exports.SegmentUsedByRun = exports.SegmentUsedByEvaluation = void 0;
|
|
4
|
+
class SegmentUsedByEvaluation {
|
|
5
|
+
}
|
|
6
|
+
exports.SegmentUsedByEvaluation = SegmentUsedByEvaluation;
|
|
7
|
+
class SegmentUsedByRun {
|
|
8
|
+
}
|
|
9
|
+
exports.SegmentUsedByRun = SegmentUsedByRun;
|
|
10
|
+
class SegmentUsedByResponse {
|
|
11
|
+
}
|
|
12
|
+
exports.SegmentUsedByResponse = SegmentUsedByResponse;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { SegmentStatusEnum } from '../../../enums/SegmentStatusEnum';
|
|
2
|
+
import { PopulationSegmentDefinition } from './PopulationSegmentDefinition';
|
|
3
|
+
import { SegmentLastTest } from './SegmentLastTest';
|
|
4
|
+
import { SegmentParam } from './SegmentParam';
|
|
5
|
+
import { SegmentUsedColumn } from './SegmentUsedColumn';
|
|
6
|
+
export declare class SegmentVersionResponse {
|
|
7
|
+
segmentId: string;
|
|
8
|
+
version: number;
|
|
9
|
+
name: string;
|
|
10
|
+
description: string;
|
|
11
|
+
owner: string;
|
|
12
|
+
status: SegmentStatusEnum;
|
|
13
|
+
definition: PopulationSegmentDefinition;
|
|
14
|
+
definitionHash: string;
|
|
15
|
+
sql: string;
|
|
16
|
+
params: SegmentParam[];
|
|
17
|
+
usedColumns: SegmentUsedColumn[];
|
|
18
|
+
humanSummary: string;
|
|
19
|
+
lastTest?: SegmentLastTest;
|
|
20
|
+
createdBy: string;
|
|
21
|
+
createdAt: string;
|
|
22
|
+
updatedBy: string;
|
|
23
|
+
updatedAt: string;
|
|
24
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { SegmentStatusEnum } from '../../../enums/SegmentStatusEnum';
|
|
2
|
+
import { SegmentLastTest } from './SegmentLastTest';
|
|
3
|
+
/** Igual que SegmentVersionResponse sin definition/sql/params/usedColumns/humanSummary. */
|
|
4
|
+
export declare class SegmentVersionSummaryResponse {
|
|
5
|
+
segmentId: string;
|
|
6
|
+
version: number;
|
|
7
|
+
status: SegmentStatusEnum;
|
|
8
|
+
lastTest?: SegmentLastTest;
|
|
9
|
+
createdBy: string;
|
|
10
|
+
createdAt: string;
|
|
11
|
+
updatedAt: string;
|
|
12
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SegmentVersionSummaryResponse = void 0;
|
|
4
|
+
/** Igual que SegmentVersionResponse sin definition/sql/params/usedColumns/humanSummary. */
|
|
5
|
+
class SegmentVersionSummaryResponse {
|
|
6
|
+
}
|
|
7
|
+
exports.SegmentVersionSummaryResponse = SegmentVersionSummaryResponse;
|
|
@@ -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,14 @@
|
|
|
1
|
+
import { DynamicFormValue } from '../../../dynamicForm/types/DynamicFormValue';
|
|
2
|
+
import { EligibilityMessageTypeEnum } from '../../enums/EligibilityMessageTypeEnum';
|
|
3
|
+
/** Un sujeto del lote. No lleva hechos precargados: la evaluacion siempre es en vivo. */
|
|
4
|
+
export declare class EvaluateBatchSubject {
|
|
5
|
+
subjectKey: string;
|
|
6
|
+
inputs: Record<string, DynamicFormValue>;
|
|
7
|
+
}
|
|
8
|
+
/** Lote de hasta 100 sujetos a evaluar en una corrida masiva. */
|
|
9
|
+
export declare class EvaluateBatchMessage {
|
|
10
|
+
messageType: EligibilityMessageTypeEnum.EVALUATE_BATCH;
|
|
11
|
+
runId: string;
|
|
12
|
+
batchId: string;
|
|
13
|
+
subjects: EvaluateBatchSubject[];
|
|
14
|
+
}
|