@fiado/type-kit 3.528.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/emailVerification/dtos/EmailSetTrustedRequest.test.ts +16 -0
- package/_test_/unit/retailWizard/emailOtpRequests.test.ts +53 -0
- package/_test_/unit/retailWizard/wizardSessionEmail.test.ts +22 -0
- 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/emailVerification/dtos/EmailSetTrustedRequest.d.ts +2 -0
- package/bin/emailVerification/dtos/EmailSetTrustedRequest.js +6 -0
- package/bin/retailWizard/dtos/WizardSession.d.ts +10 -0
- package/bin/retailWizard/dtos/requests/SendEmailOtpRequest.d.ts +6 -0
- package/bin/retailWizard/dtos/requests/SendEmailOtpRequest.js +29 -0
- package/bin/retailWizard/dtos/requests/VerifyEmailOtpRequest.d.ts +4 -0
- package/bin/retailWizard/dtos/requests/VerifyEmailOtpRequest.js +24 -0
- package/bin/retailWizard/enums/EmailStateEnum.d.ts +9 -0
- package/bin/retailWizard/enums/EmailStateEnum.js +13 -0
- package/bin/retailWizard/index.d.ts +3 -0
- package/bin/retailWizard/index.js +3 -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/emailVerification/dtos/EmailSetTrustedRequest.ts +7 -1
- package/src/retailWizard/dtos/WizardSession.ts +10 -0
- package/src/retailWizard/dtos/requests/SendEmailOtpRequest.ts +14 -0
- package/src/retailWizard/dtos/requests/VerifyEmailOtpRequest.ts +10 -0
- package/src/retailWizard/enums/EmailStateEnum.ts +9 -0
- package/src/retailWizard/index.ts +3 -0
- 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,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RunPopulationProgress = void 0;
|
|
4
|
+
/** Avance de la corrida masiva: paginas, lotes y sujetos publicados. */
|
|
5
|
+
class RunPopulationProgress {
|
|
6
|
+
}
|
|
7
|
+
exports.RunPopulationProgress = RunPopulationProgress;
|
|
@@ -4,6 +4,7 @@ import { RunStatusEnum } from '../../enums/RunStatusEnum';
|
|
|
4
4
|
import { TriggerTypeEnum } from '../../enums/TriggerTypeEnum';
|
|
5
5
|
import { RunCounts } from '../RunCounts';
|
|
6
6
|
import { QuotaImpactResponse } from './QuotaImpactResponse';
|
|
7
|
+
import { RunPopulationProgress } from './RunPopulationProgress';
|
|
7
8
|
/** Corrida para el backoffice (spec 10). */
|
|
8
9
|
export declare class RunResponse {
|
|
9
10
|
id: string;
|
|
@@ -18,6 +19,24 @@ export declare class RunResponse {
|
|
|
18
19
|
counts: RunCounts;
|
|
19
20
|
/** Solo con `status: AWAITING_APPROVAL`: cuánto consumiría la corrida de cada cupo y cuánto queda. */
|
|
20
21
|
quotaImpact?: QuotaImpactResponse[];
|
|
22
|
+
/** Corrida masiva: instante fijo (epoch ms) contra el que se resuelven las ventanas relativas del segmento. */
|
|
23
|
+
referenceAt?: number;
|
|
24
|
+
/** Corrida masiva: version del segmento congelada. */
|
|
25
|
+
segment?: {
|
|
26
|
+
segmentId: string;
|
|
27
|
+
version: number;
|
|
28
|
+
};
|
|
29
|
+
population?: RunPopulationProgress;
|
|
30
|
+
/** Fallos de entrega (`GRANT_FAILED`) que llegaron tarde, con la corrida ya cerrada. */
|
|
31
|
+
requestFailedLate?: number;
|
|
32
|
+
/** Motivo de una corrida `FAILED` que nunca llego a tener `population`. */
|
|
33
|
+
failureReason?: string;
|
|
34
|
+
/** Avance del drenaje de una aprobacion masiva. */
|
|
35
|
+
approvalDrain?: {
|
|
36
|
+
action: 'GRANT' | 'RELEASE' | 'CANCEL';
|
|
37
|
+
enqueued: number;
|
|
38
|
+
done: boolean;
|
|
39
|
+
};
|
|
21
40
|
requestedBy: string;
|
|
22
41
|
createdAt: number;
|
|
23
42
|
updatedAt: number;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { SegmentMatchEnum } from '../../../enums/SegmentMatchEnum';
|
|
2
|
+
import { SegmentGroup } from './SegmentGroup';
|
|
3
|
+
/** El constructor tal cual (A§4.1): tabla ancla (una fila -> un directoryid), TODAS/ALGUNA global y grupos con su propio TODAS/ALGUNA. */
|
|
4
|
+
export declare class PopulationSegmentDefinition {
|
|
5
|
+
baseTable: string;
|
|
6
|
+
match: SegmentMatchEnum;
|
|
7
|
+
groups: SegmentGroup[];
|
|
8
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
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.PopulationSegmentDefinition = 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 SegmentMatchEnum_1 = require("../../../enums/SegmentMatchEnum");
|
|
17
|
+
const SegmentGroup_1 = require("./SegmentGroup");
|
|
18
|
+
/** El constructor tal cual (A§4.1): tabla ancla (una fila -> un directoryid), TODAS/ALGUNA global y grupos con su propio TODAS/ALGUNA. */
|
|
19
|
+
class PopulationSegmentDefinition {
|
|
20
|
+
}
|
|
21
|
+
exports.PopulationSegmentDefinition = PopulationSegmentDefinition;
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, class_transformer_1.Expose)(),
|
|
24
|
+
(0, class_validator_1.Matches)(SegmentLimits_1.SEGMENT_IDENTIFIER_PATTERN),
|
|
25
|
+
__metadata("design:type", String)
|
|
26
|
+
], PopulationSegmentDefinition.prototype, "baseTable", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, class_transformer_1.Expose)(),
|
|
29
|
+
(0, class_validator_1.IsEnum)(SegmentMatchEnum_1.SegmentMatchEnum),
|
|
30
|
+
__metadata("design:type", String)
|
|
31
|
+
], PopulationSegmentDefinition.prototype, "match", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, class_transformer_1.Expose)(),
|
|
34
|
+
(0, class_validator_1.IsArray)(),
|
|
35
|
+
(0, class_validator_1.ArrayMinSize)(1),
|
|
36
|
+
(0, class_validator_1.ArrayMaxSize)(10),
|
|
37
|
+
(0, class_validator_1.ValidateNested)({ each: true }),
|
|
38
|
+
(0, class_transformer_1.Type)(() => SegmentGroup_1.SegmentGroup),
|
|
39
|
+
__metadata("design:type", Array)
|
|
40
|
+
], PopulationSegmentDefinition.prototype, "groups", void 0);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { PopulationSegmentDefinition } from './PopulationSegmentDefinition';
|
|
2
|
+
import { SegmentParam } from './SegmentParam';
|
|
3
|
+
/** Version de un segmento tal como la consumen otros servicios (con el SQL compilado). */
|
|
4
|
+
export declare class PrivateSegmentResponse {
|
|
5
|
+
segmentId: string;
|
|
6
|
+
version: number;
|
|
7
|
+
name: string;
|
|
8
|
+
definition: PopulationSegmentDefinition;
|
|
9
|
+
sql: string;
|
|
10
|
+
params: SegmentParam[];
|
|
11
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PrivateSegmentResponse = void 0;
|
|
4
|
+
/** Version de un segmento tal como la consumen otros servicios (con el SQL compilado). */
|
|
5
|
+
class PrivateSegmentResponse {
|
|
6
|
+
}
|
|
7
|
+
exports.PrivateSegmentResponse = PrivateSegmentResponse;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { SegmentAggregateFnEnum } from '../../../enums/SegmentAggregateFnEnum';
|
|
2
|
+
import { SegmentConditionKindEnum } from '../../../enums/SegmentConditionKindEnum';
|
|
3
|
+
import { SegmentOperatorEnum } from '../../../enums/SegmentOperatorEnum';
|
|
4
|
+
import { SegmentColumnCondition } from './SegmentColumnCondition';
|
|
5
|
+
import { SegmentWindow } from './SegmentWindow';
|
|
6
|
+
/** (b) Agregado con ventana relativa sobre una tabla relacionada (existe / cuenta / suma). `filters` elige QUE cuenta (estados, moneda...). */
|
|
7
|
+
export declare class SegmentAggregateCondition {
|
|
8
|
+
kind: SegmentConditionKindEnum.AGGREGATE;
|
|
9
|
+
table: string;
|
|
10
|
+
fn: SegmentAggregateFnEnum;
|
|
11
|
+
/** Solo SUM. */
|
|
12
|
+
column?: string;
|
|
13
|
+
/** COUNT y SUM; EXISTS no lleva. */
|
|
14
|
+
op?: SegmentOperatorEnum;
|
|
15
|
+
value?: number;
|
|
16
|
+
window: SegmentWindow;
|
|
17
|
+
filters: SegmentColumnCondition[];
|
|
18
|
+
}
|
|
@@ -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,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;
|