@fiado/type-kit 3.529.0 → 3.531.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 +11 -1
- package/_test_/unit/rewardsEligibility/catalogDtos.test.ts +1 -7
- package/_test_/unit/rewardsEligibility/evaluationDtos.test.ts +7 -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/EvaluationTrigger.d.ts +0 -3
- 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 -2
- package/bin/rewardsEligibility/index.js +43 -2
- 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/EvaluationTrigger.ts +0 -3
- 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 -2
- package/bin/rewardsEligibility/dtos/PopulationRef.d.ts +0 -6
- package/bin/rewardsEligibility/dtos/PopulationRef.js +0 -7
- package/bin/rewardsEligibility/dtos/backoffice/PopulationSourceResponse.d.ts +0 -11
- package/bin/rewardsEligibility/dtos/backoffice/PopulationSourceResponse.js +0 -7
- package/src/rewardsEligibility/dtos/PopulationRef.ts +0 -7
- package/src/rewardsEligibility/dtos/backoffice/PopulationSourceResponse.ts +0 -12
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Expose, Type } from 'class-transformer';
|
|
2
|
-
import { IsEnum, IsOptional, Matches, Validate
|
|
2
|
+
import { IsEnum, IsObject, IsOptional, Matches, Validate } from 'class-validator';
|
|
3
3
|
import { DynamicFormValue } from '../../../dynamicForm/types/DynamicFormValue';
|
|
4
4
|
import { IsDynamicFormValues } from '../../../dynamicForm/validators/IsDynamicFormValues';
|
|
5
5
|
import { REQUEST_ID_PATTERN } from '../../constants/BackofficeLimits';
|
|
@@ -24,7 +24,8 @@ export class CreateRunRequest {
|
|
|
24
24
|
|
|
25
25
|
@Expose()
|
|
26
26
|
@IsOptional()
|
|
27
|
-
|
|
27
|
+
// `PopulationRunRequest` no tiene campos: class-validator rechaza validar anidado una clase sin metadatos, por eso `@IsObject()`.
|
|
28
|
+
@IsObject()
|
|
28
29
|
@Type(() => PopulationRunRequest)
|
|
29
30
|
population?: PopulationRunRequest;
|
|
30
31
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Expose } from 'class-transformer';
|
|
2
|
-
import { ArrayMaxSize, ArrayMinSize, IsArray, IsNotEmpty, IsObject, IsString, Matches, MaxLength } from 'class-validator';
|
|
2
|
+
import { ArrayMaxSize, ArrayMinSize, IsArray, IsNotEmpty, IsObject, IsOptional, IsString, Matches, MaxLength } from 'class-validator';
|
|
3
3
|
import { JsonValue } from '../../../common';
|
|
4
4
|
import { InputField } from '../../../dynamicForm/dtos/InputField';
|
|
5
|
-
import { ELIGIBILITY_ID_PATTERN } from '../../constants/BackofficeLimits';
|
|
5
|
+
import { ELIGIBILITY_ID_PATTERN, INPUT_KEY_PATTERN } from '../../constants/BackofficeLimits';
|
|
6
6
|
import { EvaluationReward } from '../EvaluationReward';
|
|
7
7
|
import { EvaluationTrigger } from '../EvaluationTrigger';
|
|
8
8
|
import { GrantPolicy } from '../GrantPolicy';
|
|
@@ -66,4 +66,18 @@ export class EvaluationRequest {
|
|
|
66
66
|
@ArrayMaxSize(10)
|
|
67
67
|
@IsObject({ each: true })
|
|
68
68
|
triggers: EvaluationTrigger[];
|
|
69
|
+
|
|
70
|
+
/** Segmento de poblacion (version ACTIVE) que usan las corridas masivas de esta evaluacion. */
|
|
71
|
+
@Expose()
|
|
72
|
+
@IsOptional()
|
|
73
|
+
@IsString()
|
|
74
|
+
@Matches(ELIGIBILITY_ID_PATTERN)
|
|
75
|
+
populationSegmentId?: string;
|
|
76
|
+
|
|
77
|
+
/** Llave del input `DIRECTORY` que recibe el `directoryid` de cada persona del segmento. */
|
|
78
|
+
@Expose()
|
|
79
|
+
@IsOptional()
|
|
80
|
+
@IsString()
|
|
81
|
+
@Matches(INPUT_KEY_PATTERN)
|
|
82
|
+
populationInputKey?: string;
|
|
69
83
|
}
|
|
@@ -1,11 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import { DynamicFormValue } from '../../../dynamicForm/types/DynamicFormValue';
|
|
4
|
-
import { IsDynamicFormValues } from '../../../dynamicForm/validators/IsDynamicFormValues';
|
|
5
|
-
|
|
6
|
-
/** Corrida por población (fase 4): los `params` de la fuente para esta corrida. El lambda de la fase 3 la rechaza con `POPULATION_RUN_NOT_SUPPORTED`. */
|
|
7
|
-
export class PopulationRunRequest {
|
|
8
|
-
@Expose()
|
|
9
|
-
@Validate(IsDynamicFormValues)
|
|
10
|
-
params: Record<string, DynamicFormValue>;
|
|
11
|
-
}
|
|
1
|
+
/** Sin override de params (A§7.3): cambiar la poblacion = version nueva del segmento. `population: {}` = "usa el segmento de la evaluacion". */
|
|
2
|
+
export class PopulationRunRequest {}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** Avance de la corrida masiva: paginas, lotes y sujetos publicados. */
|
|
2
|
+
export class RunPopulationProgress {
|
|
3
|
+
pagesPublished: number;
|
|
4
|
+
batchesPublished: number;
|
|
5
|
+
subjectsPublished: number;
|
|
6
|
+
exhausted: boolean;
|
|
7
|
+
stoppedReason?: string;
|
|
8
|
+
lastAdvanceAt: number;
|
|
9
|
+
}
|
|
@@ -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
|
|
|
8
9
|
/** Corrida para el backoffice (spec 10). */
|
|
9
10
|
export class RunResponse {
|
|
@@ -19,6 +20,17 @@ export class RunResponse {
|
|
|
19
20
|
counts: RunCounts;
|
|
20
21
|
/** Solo con `status: AWAITING_APPROVAL`: cuánto consumiría la corrida de cada cupo y cuánto queda. */
|
|
21
22
|
quotaImpact?: QuotaImpactResponse[];
|
|
23
|
+
/** Corrida masiva: instante fijo (epoch ms) contra el que se resuelven las ventanas relativas del segmento. */
|
|
24
|
+
referenceAt?: number;
|
|
25
|
+
/** Corrida masiva: version del segmento congelada. */
|
|
26
|
+
segment?: { segmentId: string; version: number };
|
|
27
|
+
population?: RunPopulationProgress;
|
|
28
|
+
/** Fallos de entrega (`GRANT_FAILED`) que llegaron tarde, con la corrida ya cerrada. */
|
|
29
|
+
requestFailedLate?: number;
|
|
30
|
+
/** Motivo de una corrida `FAILED` que nunca llego a tener `population`. */
|
|
31
|
+
failureReason?: string;
|
|
32
|
+
/** Avance del drenaje de una aprobacion masiva. */
|
|
33
|
+
approvalDrain?: { action: 'GRANT' | 'RELEASE' | 'CANCEL'; enqueued: number; done: boolean };
|
|
22
34
|
requestedBy: string;
|
|
23
35
|
createdAt: number;
|
|
24
36
|
updatedAt: number;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Expose, Type } from 'class-transformer';
|
|
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
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { PopulationSegmentDefinition } from './PopulationSegmentDefinition';
|
|
2
|
+
import { SegmentParam } from './SegmentParam';
|
|
3
|
+
|
|
4
|
+
/** Version de un segmento tal como la consumen otros servicios (con el SQL compilado). */
|
|
5
|
+
export class PrivateSegmentResponse {
|
|
6
|
+
segmentId: string;
|
|
7
|
+
version: number;
|
|
8
|
+
name: string;
|
|
9
|
+
definition: PopulationSegmentDefinition;
|
|
10
|
+
sql: string;
|
|
11
|
+
params: SegmentParam[];
|
|
12
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Expose, Type } from 'class-transformer';
|
|
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
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Expose } from 'class-transformer';
|
|
2
|
+
import { Equals, IsEnum, IsOptional, Matches } from 'class-validator';
|
|
3
|
+
import { JsonValue } from '../../../../common';
|
|
4
|
+
import { SEGMENT_IDENTIFIER_PATTERN } from '../../../constants/SegmentLimits';
|
|
5
|
+
import { SegmentConditionKindEnum } from '../../../enums/SegmentConditionKindEnum';
|
|
6
|
+
import { SegmentOperatorEnum } from '../../../enums/SegmentOperatorEnum';
|
|
7
|
+
|
|
8
|
+
/** (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. */
|
|
9
|
+
export class SegmentColumnCondition {
|
|
10
|
+
@Expose() @Equals(SegmentConditionKindEnum.COLUMN) kind: SegmentConditionKindEnum.COLUMN;
|
|
11
|
+
@Expose() @Matches(SEGMENT_IDENTIFIER_PATTERN) table: string;
|
|
12
|
+
@Expose() @Matches(SEGMENT_IDENTIFIER_PATTERN) column: string;
|
|
13
|
+
@Expose() @IsEnum(SegmentOperatorEnum) op: SegmentOperatorEnum;
|
|
14
|
+
@Expose() @IsOptional() value?: JsonValue;
|
|
15
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Expose } from 'class-transformer';
|
|
2
|
+
import { IsInt, IsISO8601, IsOptional, Min } from 'class-validator';
|
|
3
|
+
|
|
4
|
+
/** Ejecucion de un segmento desde otro servicio (endpoint privado). */
|
|
5
|
+
export class SegmentExecutionRequest {
|
|
6
|
+
@Expose()
|
|
7
|
+
@IsOptional()
|
|
8
|
+
@IsInt()
|
|
9
|
+
@Min(1)
|
|
10
|
+
version?: number;
|
|
11
|
+
|
|
12
|
+
/** ISO-8601 UTC; por defecto, ahora. Fija la ventana relativa del segmento. */
|
|
13
|
+
@Expose()
|
|
14
|
+
@IsOptional()
|
|
15
|
+
@IsISO8601({ strict: true })
|
|
16
|
+
referenceAt?: string;
|
|
17
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Expose, Type } from 'class-transformer';
|
|
2
|
+
import { ArrayMaxSize, ArrayMinSize, IsArray, IsEnum, ValidateNested } from 'class-validator';
|
|
3
|
+
import { SegmentConditionKindEnum } from '../../../enums/SegmentConditionKindEnum';
|
|
4
|
+
import { SegmentMatchEnum } from '../../../enums/SegmentMatchEnum';
|
|
5
|
+
import { SegmentAggregateCondition } from './SegmentAggregateCondition';
|
|
6
|
+
import { SegmentColumnCondition } from './SegmentColumnCondition';
|
|
7
|
+
|
|
8
|
+
export type SegmentCondition = SegmentColumnCondition | SegmentAggregateCondition;
|
|
9
|
+
|
|
10
|
+
export class SegmentGroup {
|
|
11
|
+
@Expose() @IsEnum(SegmentMatchEnum) match: SegmentMatchEnum;
|
|
12
|
+
|
|
13
|
+
/** `kind` decide la clase; un `kind` desconocido NO se instancia y la validacion lo rechaza (el objeto queda sin `@Equals` valido). */
|
|
14
|
+
@Expose()
|
|
15
|
+
@IsArray() @ArrayMinSize(1) @ArrayMaxSize(20) @ValidateNested({ each: true })
|
|
16
|
+
@Type(() => Object, {
|
|
17
|
+
keepDiscriminatorProperty: true,
|
|
18
|
+
discriminator: {
|
|
19
|
+
property: 'kind',
|
|
20
|
+
subTypes: [
|
|
21
|
+
{ value: SegmentColumnCondition, name: SegmentConditionKindEnum.COLUMN },
|
|
22
|
+
{ value: SegmentAggregateCondition, name: SegmentConditionKindEnum.AGGREGATE },
|
|
23
|
+
],
|
|
24
|
+
},
|
|
25
|
+
})
|
|
26
|
+
conditions: SegmentCondition[];
|
|
27
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { SegmentVersionResponse } from './SegmentVersionResponse';
|
|
2
|
+
|
|
3
|
+
export class SegmentListItemResponse extends SegmentVersionResponse {
|
|
4
|
+
/** Evaluaciones de rewards que lo usan (los consumidores externos del endpoint privado NO cuentan). */
|
|
5
|
+
usedByCount: number;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export class SegmentListResponse {
|
|
9
|
+
items: SegmentListItemResponse[];
|
|
10
|
+
nextCursor?: string;
|
|
11
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { SegmentParamSourceEnum } from '../../../enums/SegmentParamSourceEnum';
|
|
2
|
+
import { SegmentParamTypeEnum } from '../../../enums/SegmentParamTypeEnum';
|
|
3
|
+
|
|
4
|
+
/** Un `?` del SQL, en orden. LITERAL lleva `value` como texto canonico; REFERENCE_AT_MINUS_DAYS lleva `days`. */
|
|
5
|
+
export class SegmentParam {
|
|
6
|
+
name: string;
|
|
7
|
+
type: SegmentParamTypeEnum;
|
|
8
|
+
source: SegmentParamSourceEnum;
|
|
9
|
+
value?: string;
|
|
10
|
+
days?: number;
|
|
11
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Expose, Type } from 'class-transformer';
|
|
2
|
+
import { IsDefined, IsIn, IsNotEmpty, IsString, Matches, MaxLength, ValidateNested } from 'class-validator';
|
|
3
|
+
import { SegmentStatusEnum } from '../../../enums/SegmentStatusEnum';
|
|
4
|
+
import { PopulationSegmentDefinition } from './PopulationSegmentDefinition';
|
|
5
|
+
|
|
6
|
+
/** POST /population-segments y PUT /population-segments/{segmentId}. */
|
|
7
|
+
export class SegmentSaveRequest {
|
|
8
|
+
@Expose() @IsString() @IsNotEmpty() @MaxLength(160) name: string;
|
|
9
|
+
@Expose() @IsString() @MaxLength(500) description: string;
|
|
10
|
+
/** Responsable del segmento (usuario o equipo, texto). */
|
|
11
|
+
@Expose() @IsString() @IsNotEmpty() @MaxLength(120) owner: string;
|
|
12
|
+
@Expose() @IsDefined() @ValidateNested() @Type(() => PopulationSegmentDefinition) definition: PopulationSegmentDefinition;
|
|
13
|
+
/** `testId` de `POST /population-segments/test`: el servidor exige que sea PASSED, vigente y de ESTA definicion. */
|
|
14
|
+
@Expose() @IsString() @Matches(/^[A-Za-z0-9-]{1,64}$/) testId: string;
|
|
15
|
+
@Expose() @IsIn([SegmentStatusEnum.DRAFT, SegmentStatusEnum.ACTIVE]) status: SegmentStatusEnum.DRAFT | SegmentStatusEnum.ACTIVE;
|
|
16
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export class SegmentSchemaTableResponse {
|
|
2
|
+
table: string;
|
|
3
|
+
joinKey: string;
|
|
4
|
+
columnCount: number;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
/** `available: false` = ambiente sin datalake accesible: el constructor muestra "no disponible". */
|
|
8
|
+
export class SegmentSchemaResponse {
|
|
9
|
+
available: boolean;
|
|
10
|
+
tables: SegmentSchemaTableResponse[];
|
|
11
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Expose } from 'class-transformer';
|
|
2
|
+
import { IsEnum, IsInt, IsOptional, Min } from 'class-validator';
|
|
3
|
+
import { SegmentStatusEnum } from '../../../enums/SegmentStatusEnum';
|
|
4
|
+
|
|
5
|
+
/** POST /population-segments/{segmentId}/status: activar un DRAFT (con `version`) o archivar el segmento completo. */
|
|
6
|
+
export class SegmentStatusRequest {
|
|
7
|
+
@Expose() @IsOptional() @IsInt() @Min(1) version?: number;
|
|
8
|
+
@Expose() @IsEnum(SegmentStatusEnum) status: SegmentStatusEnum;
|
|
9
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { SegmentOperatorEnum } from '../../../enums/SegmentOperatorEnum';
|
|
2
|
+
|
|
3
|
+
export class SegmentColumnSchemaResponse {
|
|
4
|
+
name: string;
|
|
5
|
+
type: string;
|
|
6
|
+
isDate: boolean;
|
|
7
|
+
operators: SegmentOperatorEnum[];
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export class SegmentTableSchemaResponse {
|
|
11
|
+
table: string;
|
|
12
|
+
joinKey: string;
|
|
13
|
+
columns: SegmentColumnSchemaResponse[];
|
|
14
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Expose, Type } from 'class-transformer';
|
|
2
|
+
import { IsDefined, ValidateNested } from 'class-validator';
|
|
3
|
+
import { PopulationSegmentDefinition } from './PopulationSegmentDefinition';
|
|
4
|
+
|
|
5
|
+
export class SegmentTestRequest {
|
|
6
|
+
@Expose() @IsDefined() @ValidateNested() @Type(() => PopulationSegmentDefinition) definition: PopulationSegmentDefinition;
|
|
7
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { SegmentErrorCodeEnum } from '../../../enums/SegmentErrorCodeEnum';
|
|
2
|
+
import { SegmentTestStatusEnum } from '../../../enums/SegmentTestStatusEnum';
|
|
3
|
+
import { SegmentParam } from './SegmentParam';
|
|
4
|
+
|
|
5
|
+
export class SegmentTestResultResponse {
|
|
6
|
+
count: number;
|
|
7
|
+
/** Ids parciales (`a41f...09c2`), hasta 20. */
|
|
8
|
+
sampleIds: string[];
|
|
9
|
+
bytesScanned: number;
|
|
10
|
+
durationMs: number;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export class SegmentTestErrorResponse {
|
|
14
|
+
code: SegmentErrorCodeEnum;
|
|
15
|
+
message: string;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export class SegmentTestResponse {
|
|
19
|
+
testId: string;
|
|
20
|
+
status: SegmentTestStatusEnum;
|
|
21
|
+
referenceAt: string;
|
|
22
|
+
/** Resumen en lenguaje normal generado de forma determinista (sin IA). */
|
|
23
|
+
humanSummary: string;
|
|
24
|
+
/** SQL de solo lectura + params separados (la UI no deja editarlos). */
|
|
25
|
+
sql: string;
|
|
26
|
+
params: SegmentParam[];
|
|
27
|
+
result?: SegmentTestResultResponse;
|
|
28
|
+
errors?: SegmentTestErrorResponse[];
|
|
29
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { EvaluationStatusEnum } from '../../../enums/EvaluationStatusEnum';
|
|
2
|
+
import { RunStatusEnum } from '../../../enums/RunStatusEnum';
|
|
3
|
+
import { TriggerTypeEnum } from '../../../enums/TriggerTypeEnum';
|
|
4
|
+
|
|
5
|
+
export class SegmentUsedByEvaluation {
|
|
6
|
+
id: string;
|
|
7
|
+
name: string;
|
|
8
|
+
campaignId: string;
|
|
9
|
+
status: EvaluationStatusEnum;
|
|
10
|
+
triggers: TriggerTypeEnum[];
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export class SegmentUsedByRun {
|
|
14
|
+
runId: string;
|
|
15
|
+
evaluationId: string;
|
|
16
|
+
segmentVersion: number;
|
|
17
|
+
status: RunStatusEnum;
|
|
18
|
+
createdAt: number;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export class SegmentUsedByResponse {
|
|
22
|
+
evaluations: SegmentUsedByEvaluation[];
|
|
23
|
+
runs: SegmentUsedByRun[];
|
|
24
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
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
|
+
|
|
7
|
+
export class SegmentVersionResponse {
|
|
8
|
+
segmentId: string;
|
|
9
|
+
version: number;
|
|
10
|
+
name: string;
|
|
11
|
+
description: string;
|
|
12
|
+
owner: string;
|
|
13
|
+
status: SegmentStatusEnum;
|
|
14
|
+
definition: PopulationSegmentDefinition;
|
|
15
|
+
definitionHash: string;
|
|
16
|
+
sql: string;
|
|
17
|
+
params: SegmentParam[];
|
|
18
|
+
usedColumns: SegmentUsedColumn[];
|
|
19
|
+
humanSummary: string;
|
|
20
|
+
lastTest?: SegmentLastTest;
|
|
21
|
+
createdBy: string;
|
|
22
|
+
createdAt: string;
|
|
23
|
+
updatedBy: string;
|
|
24
|
+
updatedAt: string;
|
|
25
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { SegmentStatusEnum } from '../../../enums/SegmentStatusEnum';
|
|
2
|
+
import { SegmentLastTest } from './SegmentLastTest';
|
|
3
|
+
|
|
4
|
+
/** Igual que SegmentVersionResponse sin definition/sql/params/usedColumns/humanSummary. */
|
|
5
|
+
export class SegmentVersionSummaryResponse {
|
|
6
|
+
segmentId: string;
|
|
7
|
+
version: number;
|
|
8
|
+
status: SegmentStatusEnum;
|
|
9
|
+
lastTest?: SegmentLastTest;
|
|
10
|
+
createdBy: string;
|
|
11
|
+
createdAt: string;
|
|
12
|
+
updatedAt: string;
|
|
13
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Expose } from 'class-transformer';
|
|
2
|
+
import { IsInt, Matches, Max, Min } from 'class-validator';
|
|
3
|
+
import { SEGMENT_IDENTIFIER_PATTERN, SEGMENT_MAX_DAYS } from '../../../constants/SegmentLimits';
|
|
4
|
+
|
|
5
|
+
/** Ventana relativa [referenceAt - days, referenceAt) sobre una columna de fecha (A§4.1). */
|
|
6
|
+
export class SegmentWindow {
|
|
7
|
+
@Expose() @Matches(SEGMENT_IDENTIFIER_PATTERN) dateColumn: string;
|
|
8
|
+
@Expose() @IsInt() @Min(1) @Max(SEGMENT_MAX_DAYS) days: number;
|
|
9
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { Expose, Type } from 'class-transformer';
|
|
2
|
+
import { ArrayMaxSize, ArrayMinSize, Equals, IsArray, IsNotEmpty, IsString, Validate, ValidateNested } from 'class-validator';
|
|
3
|
+
import { DynamicFormValue } from '../../../dynamicForm/types/DynamicFormValue';
|
|
4
|
+
import { IsDynamicFormValues } from '../../../dynamicForm/validators/IsDynamicFormValues';
|
|
5
|
+
import { EligibilityMessageTypeEnum } from '../../enums/EligibilityMessageTypeEnum';
|
|
6
|
+
|
|
7
|
+
/** Un sujeto del lote. No lleva hechos precargados: la evaluacion siempre es en vivo. */
|
|
8
|
+
export class EvaluateBatchSubject {
|
|
9
|
+
@Expose()
|
|
10
|
+
@IsString()
|
|
11
|
+
@IsNotEmpty()
|
|
12
|
+
subjectKey: string;
|
|
13
|
+
|
|
14
|
+
@Expose()
|
|
15
|
+
@Validate(IsDynamicFormValues)
|
|
16
|
+
inputs: Record<string, DynamicFormValue>;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/** Lote de hasta 100 sujetos a evaluar en una corrida masiva. */
|
|
20
|
+
export class EvaluateBatchMessage {
|
|
21
|
+
@Expose()
|
|
22
|
+
@Equals(EligibilityMessageTypeEnum.EVALUATE_BATCH)
|
|
23
|
+
messageType: EligibilityMessageTypeEnum.EVALUATE_BATCH;
|
|
24
|
+
|
|
25
|
+
@Expose()
|
|
26
|
+
@IsString()
|
|
27
|
+
@IsNotEmpty()
|
|
28
|
+
runId: string;
|
|
29
|
+
|
|
30
|
+
@Expose()
|
|
31
|
+
@IsString()
|
|
32
|
+
@IsNotEmpty()
|
|
33
|
+
batchId: string;
|
|
34
|
+
|
|
35
|
+
@Expose()
|
|
36
|
+
@IsArray()
|
|
37
|
+
@ArrayMinSize(1)
|
|
38
|
+
@ArrayMaxSize(100)
|
|
39
|
+
@ValidateNested({ each: true })
|
|
40
|
+
@Type(() => EvaluateBatchSubject)
|
|
41
|
+
subjects: EvaluateBatchSubject[];
|
|
42
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Expose } from 'class-transformer';
|
|
2
|
+
import { Equals, IsInt, IsNotEmpty, IsString, Min } from 'class-validator';
|
|
3
|
+
import { EligibilityMessageTypeEnum } from '../../enums/EligibilityMessageTypeEnum';
|
|
4
|
+
|
|
5
|
+
/** Publica las entregas (grants) de una parte de un lote de la corrida masiva. */
|
|
6
|
+
export class GrantBatchMessage {
|
|
7
|
+
@Expose()
|
|
8
|
+
@Equals(EligibilityMessageTypeEnum.GRANT_BATCH)
|
|
9
|
+
messageType: EligibilityMessageTypeEnum.GRANT_BATCH;
|
|
10
|
+
|
|
11
|
+
@Expose()
|
|
12
|
+
@IsString()
|
|
13
|
+
@IsNotEmpty()
|
|
14
|
+
runId: string;
|
|
15
|
+
|
|
16
|
+
@Expose()
|
|
17
|
+
@IsString()
|
|
18
|
+
@IsNotEmpty()
|
|
19
|
+
batchId: string;
|
|
20
|
+
|
|
21
|
+
@Expose()
|
|
22
|
+
@IsInt()
|
|
23
|
+
@Min(0)
|
|
24
|
+
part: number;
|
|
25
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Expose } from 'class-transformer';
|
|
2
|
+
import { Equals, IsNotEmpty, IsString } from 'class-validator';
|
|
3
|
+
import { EligibilityMessageTypeEnum } from '../../enums/EligibilityMessageTypeEnum';
|
|
4
|
+
|
|
5
|
+
/** Pide la siguiente pagina de ids del segmento de una corrida masiva. */
|
|
6
|
+
export class PopulationPageMessage {
|
|
7
|
+
@Expose()
|
|
8
|
+
@Equals(EligibilityMessageTypeEnum.POPULATION_PAGE)
|
|
9
|
+
messageType: EligibilityMessageTypeEnum.POPULATION_PAGE;
|
|
10
|
+
|
|
11
|
+
@Expose()
|
|
12
|
+
@IsString()
|
|
13
|
+
@IsNotEmpty()
|
|
14
|
+
runId: string;
|
|
15
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Expose } from 'class-transformer';
|
|
2
|
+
import { Equals, IsInt, Min } from 'class-validator';
|
|
3
|
+
import { EligibilityMessageTypeEnum } from '../../enums/EligibilityMessageTypeEnum';
|
|
4
|
+
|
|
5
|
+
/** Libera el tramo `seq` de la publicacion por tramos (RELEASER). */
|
|
6
|
+
export class ReleaseTrancheMessage {
|
|
7
|
+
@Expose()
|
|
8
|
+
@Equals(EligibilityMessageTypeEnum.RELEASE_TRANCHE)
|
|
9
|
+
messageType: EligibilityMessageTypeEnum.RELEASE_TRANCHE;
|
|
10
|
+
|
|
11
|
+
@Expose()
|
|
12
|
+
@IsInt()
|
|
13
|
+
@Min(0)
|
|
14
|
+
seq: number;
|
|
15
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export enum SegmentErrorCodeEnum {
|
|
2
|
+
SEGMENT_NOT_FOUND = 'SEGMENT_NOT_FOUND',
|
|
3
|
+
SEGMENT_INVALID = 'SEGMENT_INVALID',
|
|
4
|
+
SEGMENT_TEST_REQUIRED = 'SEGMENT_TEST_REQUIRED',
|
|
5
|
+
SEGMENT_IN_USE = 'SEGMENT_IN_USE',
|
|
6
|
+
SEGMENT_NOT_ACTIVE = 'SEGMENT_NOT_ACTIVE',
|
|
7
|
+
SEGMENT_BLOCKED_COLUMN = 'SEGMENT_BLOCKED_COLUMN',
|
|
8
|
+
SEGMENT_SCHEMA_DRIFT = 'SEGMENT_SCHEMA_DRIFT',
|
|
9
|
+
SEGMENT_BYTES_EXCEEDED = 'SEGMENT_BYTES_EXCEEDED',
|
|
10
|
+
SEGMENT_QUERY_FAILED = 'SEGMENT_QUERY_FAILED',
|
|
11
|
+
SEGMENT_DATALAKE_UNAVAILABLE = 'SEGMENT_DATALAKE_UNAVAILABLE',
|
|
12
|
+
SEGMENT_DATALAKE_UNAVAILABLE_IN_ENV = 'SEGMENT_DATALAKE_UNAVAILABLE_IN_ENV',
|
|
13
|
+
SEGMENT_VERSION_CONFLICT = 'SEGMENT_VERSION_CONFLICT',
|
|
14
|
+
SEGMENT_STATUS_TRANSITION_INVALID = 'SEGMENT_STATUS_TRANSITION_INVALID',
|
|
15
|
+
SEGMENT_EXECUTION_NOT_FOUND = 'SEGMENT_EXECUTION_NOT_FOUND',
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export 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
|
+
}
|