@fiado/type-kit 3.516.0 → 3.517.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 +16 -0
- package/_test_/unit/rewardsEligibility/campaignAndEventTypeDtos.test.ts +52 -0
- package/_test_/unit/rewardsEligibility/campaignConfigDecorators.test.ts +49 -0
- package/_test_/unit/rewardsEligibility/catalogDtos.test.ts +27 -0
- package/_test_/unit/rewardsEligibility/evaluationDtos.test.ts +53 -0
- package/_test_/unit/rewardsEligibility/events.test.ts +3 -3
- package/_test_/unit/rewardsEligibility/metricsDtos.test.ts +17 -0
- package/_test_/unit/rewardsEligibility/runDtos.test.ts +36 -0
- package/bin/rewardsEligibility/constants/BackofficeLimits.d.ts +12 -0
- package/bin/rewardsEligibility/constants/BackofficeLimits.js +15 -0
- package/bin/rewardsEligibility/dtos/CampaignAlerts.js +20 -0
- package/bin/rewardsEligibility/dtos/CampaignQuota.d.ts +1 -1
- package/bin/rewardsEligibility/dtos/CampaignQuota.js +29 -0
- package/bin/rewardsEligibility/dtos/backoffice/ApproveRunRequest.d.ts +4 -0
- package/bin/rewardsEligibility/dtos/backoffice/ApproveRunRequest.js +27 -0
- package/bin/rewardsEligibility/dtos/backoffice/CampaignListResponse.d.ts +6 -0
- package/bin/rewardsEligibility/dtos/backoffice/CampaignListResponse.js +6 -0
- package/bin/rewardsEligibility/dtos/backoffice/CampaignRequest.d.ts +16 -0
- package/bin/rewardsEligibility/dtos/backoffice/CampaignRequest.js +72 -0
- package/bin/rewardsEligibility/dtos/backoffice/CampaignResponse.d.ts +23 -0
- package/bin/rewardsEligibility/dtos/backoffice/CampaignResponse.js +7 -0
- package/bin/rewardsEligibility/dtos/backoffice/CampaignStatusRequest.d.ts +5 -0
- package/bin/rewardsEligibility/dtos/backoffice/CampaignStatusRequest.js +24 -0
- package/bin/rewardsEligibility/dtos/backoffice/CampaignSummaryResponse.d.ts +28 -0
- package/bin/rewardsEligibility/dtos/backoffice/CampaignSummaryResponse.js +7 -0
- package/bin/rewardsEligibility/dtos/backoffice/CreateRunRequest.d.ts +11 -0
- package/bin/rewardsEligibility/dtos/backoffice/CreateRunRequest.js +45 -0
- package/bin/rewardsEligibility/dtos/backoffice/CreateRunResponse.d.ts +9 -0
- package/bin/rewardsEligibility/dtos/backoffice/CreateRunResponse.js +7 -0
- package/bin/rewardsEligibility/dtos/backoffice/EvaluationListResponse.d.ts +5 -0
- package/bin/rewardsEligibility/dtos/backoffice/EvaluationListResponse.js +6 -0
- package/bin/rewardsEligibility/dtos/backoffice/EvaluationRequest.d.ts +27 -0
- package/bin/rewardsEligibility/dtos/backoffice/EvaluationRequest.js +86 -0
- package/bin/rewardsEligibility/dtos/backoffice/EvaluationResponse.d.ts +26 -0
- package/bin/rewardsEligibility/dtos/backoffice/EvaluationResponse.js +6 -0
- package/bin/rewardsEligibility/dtos/backoffice/EvaluationStatusRequest.d.ts +5 -0
- package/bin/rewardsEligibility/dtos/backoffice/EvaluationStatusRequest.js +24 -0
- package/bin/rewardsEligibility/dtos/backoffice/EventTypeListResponse.d.ts +5 -0
- package/bin/rewardsEligibility/dtos/backoffice/EventTypeListResponse.js +6 -0
- package/bin/rewardsEligibility/dtos/backoffice/EventTypeRequest.d.ts +12 -0
- package/bin/rewardsEligibility/dtos/backoffice/EventTypeRequest.js +58 -0
- package/bin/rewardsEligibility/dtos/backoffice/EventTypeResponse.d.ts +12 -0
- package/bin/rewardsEligibility/dtos/backoffice/EventTypeResponse.js +6 -0
- package/bin/rewardsEligibility/dtos/backoffice/FailedConditionStatResponse.d.ts +8 -0
- package/bin/rewardsEligibility/dtos/backoffice/FailedConditionStatResponse.js +7 -0
- package/bin/rewardsEligibility/dtos/backoffice/InputTypeResponse.d.ts +6 -0
- package/bin/rewardsEligibility/dtos/backoffice/InputTypeResponse.js +7 -0
- package/bin/rewardsEligibility/dtos/backoffice/MetricsPointResponse.d.ts +14 -0
- package/bin/rewardsEligibility/dtos/backoffice/MetricsPointResponse.js +7 -0
- package/bin/rewardsEligibility/dtos/backoffice/MetricsQuery.d.ts +9 -0
- package/bin/rewardsEligibility/dtos/backoffice/MetricsQuery.js +7 -0
- package/bin/rewardsEligibility/dtos/backoffice/PopulationRunRequest.d.ts +5 -0
- package/bin/rewardsEligibility/dtos/backoffice/PopulationRunRequest.js +24 -0
- package/bin/rewardsEligibility/dtos/backoffice/PopulationSourceResponse.d.ts +11 -0
- package/bin/rewardsEligibility/dtos/backoffice/PopulationSourceResponse.js +7 -0
- package/bin/rewardsEligibility/dtos/backoffice/QuotaImpactResponse.d.ts +9 -0
- package/bin/rewardsEligibility/dtos/backoffice/QuotaImpactResponse.js +7 -0
- package/bin/rewardsEligibility/dtos/backoffice/QuotaUsageResponse.d.ts +10 -0
- package/bin/rewardsEligibility/dtos/backoffice/QuotaUsageResponse.js +7 -0
- package/bin/rewardsEligibility/dtos/backoffice/ResultTraceResponse.d.ts +34 -0
- package/bin/rewardsEligibility/dtos/backoffice/ResultTraceResponse.js +14 -0
- package/bin/rewardsEligibility/dtos/backoffice/RuleCatalogResponse.d.ts +28 -0
- package/bin/rewardsEligibility/dtos/backoffice/RuleCatalogResponse.js +13 -0
- package/bin/rewardsEligibility/dtos/backoffice/RunListResponse.d.ts +5 -0
- package/bin/rewardsEligibility/dtos/backoffice/RunListResponse.js +6 -0
- package/bin/rewardsEligibility/dtos/backoffice/RunResponse.d.ts +24 -0
- package/bin/rewardsEligibility/dtos/backoffice/RunResponse.js +7 -0
- package/bin/rewardsEligibility/dtos/backoffice/RunResultListResponse.d.ts +5 -0
- package/bin/rewardsEligibility/dtos/backoffice/RunResultListResponse.js +6 -0
- package/bin/rewardsEligibility/dtos/backoffice/RunResultResponse.d.ts +22 -0
- package/bin/rewardsEligibility/dtos/backoffice/RunResultResponse.js +7 -0
- package/bin/rewardsEligibility/dtos/backoffice/SimulateRequest.d.ts +8 -0
- package/bin/rewardsEligibility/dtos/backoffice/SimulateRequest.js +40 -0
- package/bin/rewardsEligibility/dtos/backoffice/SimulateResponse.d.ts +11 -0
- package/bin/rewardsEligibility/dtos/backoffice/SimulateResponse.js +6 -0
- package/bin/rewardsEligibility/enums/MetricsDimensionEnum.d.ts +8 -0
- package/bin/rewardsEligibility/enums/MetricsDimensionEnum.js +12 -0
- package/bin/rewardsEligibility/enums/RewardsEligibilityErrorCodeEnum.d.ts +46 -1
- package/bin/rewardsEligibility/enums/RewardsEligibilityErrorCodeEnum.js +46 -0
- package/bin/rewardsEligibility/enums/RuleValueTypeEnum.d.ts +9 -0
- package/bin/rewardsEligibility/enums/RuleValueTypeEnum.js +13 -0
- package/bin/rewardsEligibility/index.d.ts +34 -0
- package/bin/rewardsEligibility/index.js +35 -0
- package/package.json +1 -1
- package/src/rewardsEligibility/constants/BackofficeLimits.ts +12 -0
- package/src/rewardsEligibility/dtos/CampaignAlerts.ts +9 -0
- package/src/rewardsEligibility/dtos/CampaignQuota.ts +13 -1
- package/src/rewardsEligibility/dtos/backoffice/ApproveRunRequest.ts +13 -0
- package/src/rewardsEligibility/dtos/backoffice/CampaignListResponse.ts +7 -0
- package/src/rewardsEligibility/dtos/backoffice/CampaignRequest.ts +53 -0
- package/src/rewardsEligibility/dtos/backoffice/CampaignResponse.ts +24 -0
- package/src/rewardsEligibility/dtos/backoffice/CampaignStatusRequest.ts +10 -0
- package/src/rewardsEligibility/dtos/backoffice/CampaignSummaryResponse.ts +26 -0
- package/src/rewardsEligibility/dtos/backoffice/CreateRunRequest.ts +30 -0
- package/src/rewardsEligibility/dtos/backoffice/CreateRunResponse.ts +10 -0
- package/src/rewardsEligibility/dtos/backoffice/EvaluationListResponse.ts +6 -0
- package/src/rewardsEligibility/dtos/backoffice/EvaluationRequest.ts +69 -0
- package/src/rewardsEligibility/dtos/backoffice/EvaluationResponse.ts +25 -0
- package/src/rewardsEligibility/dtos/backoffice/EvaluationStatusRequest.ts +10 -0
- package/src/rewardsEligibility/dtos/backoffice/EventTypeListResponse.ts +6 -0
- package/src/rewardsEligibility/dtos/backoffice/EventTypeRequest.ts +41 -0
- package/src/rewardsEligibility/dtos/backoffice/EventTypeResponse.ts +13 -0
- package/src/rewardsEligibility/dtos/backoffice/FailedConditionStatResponse.ts +8 -0
- package/src/rewardsEligibility/dtos/backoffice/InputTypeResponse.ts +7 -0
- package/src/rewardsEligibility/dtos/backoffice/MetricsPointResponse.ts +14 -0
- package/src/rewardsEligibility/dtos/backoffice/MetricsQuery.ts +10 -0
- package/src/rewardsEligibility/dtos/backoffice/PopulationRunRequest.ts +11 -0
- package/src/rewardsEligibility/dtos/backoffice/PopulationSourceResponse.ts +12 -0
- package/src/rewardsEligibility/dtos/backoffice/QuotaImpactResponse.ts +9 -0
- package/src/rewardsEligibility/dtos/backoffice/QuotaUsageResponse.ts +11 -0
- package/src/rewardsEligibility/dtos/backoffice/ResultTraceResponse.ts +34 -0
- package/src/rewardsEligibility/dtos/backoffice/RuleCatalogResponse.ts +28 -0
- package/src/rewardsEligibility/dtos/backoffice/RunListResponse.ts +6 -0
- package/src/rewardsEligibility/dtos/backoffice/RunResponse.ts +25 -0
- package/src/rewardsEligibility/dtos/backoffice/RunResultListResponse.ts +6 -0
- package/src/rewardsEligibility/dtos/backoffice/RunResultResponse.ts +23 -0
- package/src/rewardsEligibility/dtos/backoffice/SimulateRequest.ts +25 -0
- package/src/rewardsEligibility/dtos/backoffice/SimulateResponse.ts +12 -0
- package/src/rewardsEligibility/enums/MetricsDimensionEnum.ts +8 -0
- package/src/rewardsEligibility/enums/RewardsEligibilityErrorCodeEnum.ts +47 -0
- package/src/rewardsEligibility/enums/RuleValueTypeEnum.ts +9 -0
- package/src/rewardsEligibility/index.ts +36 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { DynamicFormValue } from '../../../dynamicForm/types/DynamicFormValue';
|
|
2
|
+
import { RunModeEnum } from '../../enums/RunModeEnum';
|
|
3
|
+
import { PopulationRunRequest } from './PopulationRunRequest';
|
|
4
|
+
/** `POST /evaluations/{id}/runs` (spec 10): una corrida manual de UN sujeto (`inputs`) o de una población (`population`, fase 4). */
|
|
5
|
+
export declare class CreateRunRequest {
|
|
6
|
+
/** Id de solicitud que genera el backoffice al abrir el formulario: es la llave de idempotencia (doble clic = misma corrida). */
|
|
7
|
+
requestId: string;
|
|
8
|
+
mode: RunModeEnum;
|
|
9
|
+
inputs?: Record<string, DynamicFormValue>;
|
|
10
|
+
population?: PopulationRunRequest;
|
|
11
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
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.CreateRunRequest = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
const IsDynamicFormValues_1 = require("../../../dynamicForm/validators/IsDynamicFormValues");
|
|
16
|
+
const BackofficeLimits_1 = require("../../constants/BackofficeLimits");
|
|
17
|
+
const RunModeEnum_1 = require("../../enums/RunModeEnum");
|
|
18
|
+
const PopulationRunRequest_1 = require("./PopulationRunRequest");
|
|
19
|
+
/** `POST /evaluations/{id}/runs` (spec 10): una corrida manual de UN sujeto (`inputs`) o de una población (`population`, fase 4). */
|
|
20
|
+
class CreateRunRequest {
|
|
21
|
+
}
|
|
22
|
+
exports.CreateRunRequest = CreateRunRequest;
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, class_transformer_1.Expose)(),
|
|
25
|
+
(0, class_validator_1.Matches)(BackofficeLimits_1.REQUEST_ID_PATTERN),
|
|
26
|
+
__metadata("design:type", String)
|
|
27
|
+
], CreateRunRequest.prototype, "requestId", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, class_transformer_1.Expose)(),
|
|
30
|
+
(0, class_validator_1.IsEnum)(RunModeEnum_1.RunModeEnum),
|
|
31
|
+
__metadata("design:type", String)
|
|
32
|
+
], CreateRunRequest.prototype, "mode", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, class_transformer_1.Expose)(),
|
|
35
|
+
(0, class_validator_1.IsOptional)(),
|
|
36
|
+
(0, class_validator_1.Validate)(IsDynamicFormValues_1.IsDynamicFormValues),
|
|
37
|
+
__metadata("design:type", Object)
|
|
38
|
+
], CreateRunRequest.prototype, "inputs", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, class_transformer_1.Expose)(),
|
|
41
|
+
(0, class_validator_1.IsOptional)(),
|
|
42
|
+
(0, class_validator_1.ValidateNested)(),
|
|
43
|
+
(0, class_transformer_1.Type)(() => PopulationRunRequest_1.PopulationRunRequest),
|
|
44
|
+
__metadata("design:type", PopulationRunRequest_1.PopulationRunRequest)
|
|
45
|
+
], CreateRunRequest.prototype, "population", void 0);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { RunResponse } from './RunResponse';
|
|
2
|
+
import { RunResultResponse } from './RunResultResponse';
|
|
3
|
+
/** Respuesta de `POST /evaluations/{id}/runs`: la corrida y, si es de un sujeto, su resultado con traza (spec 7.3). */
|
|
4
|
+
export declare class CreateRunResponse {
|
|
5
|
+
run: RunResponse;
|
|
6
|
+
result?: RunResultResponse;
|
|
7
|
+
/** `true` si el `requestId` ya existía: es la MISMA corrida de antes. */
|
|
8
|
+
idempotentReplay: boolean;
|
|
9
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CreateRunResponse = void 0;
|
|
4
|
+
/** Respuesta de `POST /evaluations/{id}/runs`: la corrida y, si es de un sujeto, su resultado con traza (spec 7.3). */
|
|
5
|
+
class CreateRunResponse {
|
|
6
|
+
}
|
|
7
|
+
exports.CreateRunResponse = CreateRunResponse;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { JsonValue } from '../../../common';
|
|
2
|
+
import { InputField } from '../../../dynamicForm/dtos/InputField';
|
|
3
|
+
import { EvaluationReward } from '../EvaluationReward';
|
|
4
|
+
import { EvaluationTrigger } from '../EvaluationTrigger';
|
|
5
|
+
import { GrantPolicy } from '../GrantPolicy';
|
|
6
|
+
/**
|
|
7
|
+
* Crear (POST) o reemplazar (PUT) una evaluación (spec 5.1). `status`, `version` y auditoría los pone el servidor.
|
|
8
|
+
* Aquí solo se valida la FORMA gruesa; las reglas del spec 5.1 (llaves únicas, `validateRule`, paquete ACTIVO, disparadores…)
|
|
9
|
+
* las valida el lambda, que devuelve TODOS los problemas juntos.
|
|
10
|
+
*/
|
|
11
|
+
export declare class EvaluationRequest {
|
|
12
|
+
id: string;
|
|
13
|
+
campaignId: string;
|
|
14
|
+
name: string;
|
|
15
|
+
description: string;
|
|
16
|
+
/** Contrato de entrada (`InputField[]`, dominio `dynamicForm`). */
|
|
17
|
+
inputs: InputField[];
|
|
18
|
+
/** Reglas de `@fiado/rules-engine` (`{ match, groups[] }`). */
|
|
19
|
+
rules: {
|
|
20
|
+
[key: string]: JsonValue;
|
|
21
|
+
};
|
|
22
|
+
/** Llave del input `DIRECTORY` al que se le entrega el premio. */
|
|
23
|
+
beneficiaryInput: string;
|
|
24
|
+
reward: EvaluationReward;
|
|
25
|
+
grantPolicy: GrantPolicy;
|
|
26
|
+
triggers: EvaluationTrigger[];
|
|
27
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
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.EvaluationRequest = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
const BackofficeLimits_1 = require("../../constants/BackofficeLimits");
|
|
16
|
+
const EvaluationReward_1 = require("../EvaluationReward");
|
|
17
|
+
const GrantPolicy_1 = require("../GrantPolicy");
|
|
18
|
+
/**
|
|
19
|
+
* Crear (POST) o reemplazar (PUT) una evaluación (spec 5.1). `status`, `version` y auditoría los pone el servidor.
|
|
20
|
+
* Aquí solo se valida la FORMA gruesa; las reglas del spec 5.1 (llaves únicas, `validateRule`, paquete ACTIVO, disparadores…)
|
|
21
|
+
* las valida el lambda, que devuelve TODOS los problemas juntos.
|
|
22
|
+
*/
|
|
23
|
+
class EvaluationRequest {
|
|
24
|
+
}
|
|
25
|
+
exports.EvaluationRequest = EvaluationRequest;
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, class_transformer_1.Expose)(),
|
|
28
|
+
(0, class_validator_1.IsString)(),
|
|
29
|
+
(0, class_validator_1.Matches)(BackofficeLimits_1.ELIGIBILITY_ID_PATTERN),
|
|
30
|
+
__metadata("design:type", String)
|
|
31
|
+
], EvaluationRequest.prototype, "id", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, class_transformer_1.Expose)(),
|
|
34
|
+
(0, class_validator_1.IsString)(),
|
|
35
|
+
(0, class_validator_1.Matches)(BackofficeLimits_1.ELIGIBILITY_ID_PATTERN),
|
|
36
|
+
__metadata("design:type", String)
|
|
37
|
+
], EvaluationRequest.prototype, "campaignId", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, class_transformer_1.Expose)(),
|
|
40
|
+
(0, class_validator_1.IsString)(),
|
|
41
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
42
|
+
(0, class_validator_1.MaxLength)(160),
|
|
43
|
+
__metadata("design:type", String)
|
|
44
|
+
], EvaluationRequest.prototype, "name", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, class_transformer_1.Expose)(),
|
|
47
|
+
(0, class_validator_1.IsString)(),
|
|
48
|
+
(0, class_validator_1.MaxLength)(500),
|
|
49
|
+
__metadata("design:type", String)
|
|
50
|
+
], EvaluationRequest.prototype, "description", void 0);
|
|
51
|
+
__decorate([
|
|
52
|
+
(0, class_transformer_1.Expose)(),
|
|
53
|
+
(0, class_validator_1.IsArray)(),
|
|
54
|
+
(0, class_validator_1.ArrayMaxSize)(30),
|
|
55
|
+
(0, class_validator_1.IsObject)({ each: true }),
|
|
56
|
+
__metadata("design:type", Array)
|
|
57
|
+
], EvaluationRequest.prototype, "inputs", void 0);
|
|
58
|
+
__decorate([
|
|
59
|
+
(0, class_transformer_1.Expose)(),
|
|
60
|
+
(0, class_validator_1.IsObject)(),
|
|
61
|
+
__metadata("design:type", Object)
|
|
62
|
+
], EvaluationRequest.prototype, "rules", void 0);
|
|
63
|
+
__decorate([
|
|
64
|
+
(0, class_transformer_1.Expose)(),
|
|
65
|
+
(0, class_validator_1.IsString)(),
|
|
66
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
67
|
+
__metadata("design:type", String)
|
|
68
|
+
], EvaluationRequest.prototype, "beneficiaryInput", void 0);
|
|
69
|
+
__decorate([
|
|
70
|
+
(0, class_transformer_1.Expose)(),
|
|
71
|
+
(0, class_validator_1.IsObject)(),
|
|
72
|
+
__metadata("design:type", EvaluationReward_1.EvaluationReward)
|
|
73
|
+
], EvaluationRequest.prototype, "reward", void 0);
|
|
74
|
+
__decorate([
|
|
75
|
+
(0, class_transformer_1.Expose)(),
|
|
76
|
+
(0, class_validator_1.IsObject)(),
|
|
77
|
+
__metadata("design:type", GrantPolicy_1.GrantPolicy)
|
|
78
|
+
], EvaluationRequest.prototype, "grantPolicy", void 0);
|
|
79
|
+
__decorate([
|
|
80
|
+
(0, class_transformer_1.Expose)(),
|
|
81
|
+
(0, class_validator_1.IsArray)(),
|
|
82
|
+
(0, class_validator_1.ArrayMinSize)(1),
|
|
83
|
+
(0, class_validator_1.ArrayMaxSize)(10),
|
|
84
|
+
(0, class_validator_1.IsObject)({ each: true }),
|
|
85
|
+
__metadata("design:type", Array)
|
|
86
|
+
], EvaluationRequest.prototype, "triggers", void 0);
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { JsonValue } from '../../../common';
|
|
2
|
+
import { InputField } from '../../../dynamicForm/dtos/InputField';
|
|
3
|
+
import { EvaluationStatusEnum } from '../../enums/EvaluationStatusEnum';
|
|
4
|
+
import { EvaluationReward } from '../EvaluationReward';
|
|
5
|
+
import { EvaluationTrigger } from '../EvaluationTrigger';
|
|
6
|
+
import { GrantPolicy } from '../GrantPolicy';
|
|
7
|
+
export declare class EvaluationResponse {
|
|
8
|
+
id: string;
|
|
9
|
+
campaignId: string;
|
|
10
|
+
name: string;
|
|
11
|
+
description: string;
|
|
12
|
+
status: EvaluationStatusEnum;
|
|
13
|
+
/** Sube con cada edición de una evaluación `ACTIVE`. */
|
|
14
|
+
version: number;
|
|
15
|
+
inputs: InputField[];
|
|
16
|
+
rules: {
|
|
17
|
+
[key: string]: JsonValue;
|
|
18
|
+
};
|
|
19
|
+
beneficiaryInput: string;
|
|
20
|
+
reward: EvaluationReward;
|
|
21
|
+
grantPolicy: GrantPolicy;
|
|
22
|
+
triggers: EvaluationTrigger[];
|
|
23
|
+
createdAt: number;
|
|
24
|
+
updatedAt: number;
|
|
25
|
+
updatedBy: string;
|
|
26
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
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.EvaluationStatusRequest = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
const EvaluationStatusEnum_1 = require("../../enums/EvaluationStatusEnum");
|
|
16
|
+
/** Cuerpo de `POST /evaluations/{id}/status`: activar, pausar o archivar. */
|
|
17
|
+
class EvaluationStatusRequest {
|
|
18
|
+
}
|
|
19
|
+
exports.EvaluationStatusRequest = EvaluationStatusRequest;
|
|
20
|
+
__decorate([
|
|
21
|
+
(0, class_transformer_1.Expose)(),
|
|
22
|
+
(0, class_validator_1.IsEnum)(EvaluationStatusEnum_1.EvaluationStatusEnum),
|
|
23
|
+
__metadata("design:type", String)
|
|
24
|
+
], EvaluationStatusRequest.prototype, "status", void 0);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { InputField } from '../../../dynamicForm/dtos/InputField';
|
|
2
|
+
import { RewardStatusEnum } from '../../../rewards/enums/RewardStatusEnum';
|
|
3
|
+
/** Alta (POST) o reemplazo (PUT) de un tipo de evento (spec 5.2). Los `fields` se validan a fondo en el lambda (`InputFieldValidationService`). */
|
|
4
|
+
export declare class EventTypeRequest {
|
|
5
|
+
eventKey: string;
|
|
6
|
+
name: string;
|
|
7
|
+
description: string;
|
|
8
|
+
/** Servicio que lo emite (ej. `phone-sales`). */
|
|
9
|
+
emitter: string;
|
|
10
|
+
fields: InputField[];
|
|
11
|
+
status: RewardStatusEnum;
|
|
12
|
+
}
|
|
@@ -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.EventTypeRequest = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
const RewardStatusEnum_1 = require("../../../rewards/enums/RewardStatusEnum");
|
|
16
|
+
const BackofficeLimits_1 = require("../../constants/BackofficeLimits");
|
|
17
|
+
/** Alta (POST) o reemplazo (PUT) de un tipo de evento (spec 5.2). Los `fields` se validan a fondo en el lambda (`InputFieldValidationService`). */
|
|
18
|
+
class EventTypeRequest {
|
|
19
|
+
}
|
|
20
|
+
exports.EventTypeRequest = EventTypeRequest;
|
|
21
|
+
__decorate([
|
|
22
|
+
(0, class_transformer_1.Expose)(),
|
|
23
|
+
(0, class_validator_1.IsString)(),
|
|
24
|
+
(0, class_validator_1.Matches)(BackofficeLimits_1.EVENT_KEY_PATTERN),
|
|
25
|
+
__metadata("design:type", String)
|
|
26
|
+
], EventTypeRequest.prototype, "eventKey", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, class_transformer_1.Expose)(),
|
|
29
|
+
(0, class_validator_1.IsString)(),
|
|
30
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
31
|
+
(0, class_validator_1.MaxLength)(120),
|
|
32
|
+
__metadata("design:type", String)
|
|
33
|
+
], EventTypeRequest.prototype, "name", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, class_transformer_1.Expose)(),
|
|
36
|
+
(0, class_validator_1.IsString)(),
|
|
37
|
+
(0, class_validator_1.MaxLength)(500),
|
|
38
|
+
__metadata("design:type", String)
|
|
39
|
+
], EventTypeRequest.prototype, "description", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, class_transformer_1.Expose)(),
|
|
42
|
+
(0, class_validator_1.IsString)(),
|
|
43
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
44
|
+
(0, class_validator_1.MaxLength)(60),
|
|
45
|
+
__metadata("design:type", String)
|
|
46
|
+
], EventTypeRequest.prototype, "emitter", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, class_transformer_1.Expose)(),
|
|
49
|
+
(0, class_validator_1.IsArray)(),
|
|
50
|
+
(0, class_validator_1.ArrayMaxSize)(30),
|
|
51
|
+
(0, class_validator_1.IsObject)({ each: true }),
|
|
52
|
+
__metadata("design:type", Array)
|
|
53
|
+
], EventTypeRequest.prototype, "fields", void 0);
|
|
54
|
+
__decorate([
|
|
55
|
+
(0, class_transformer_1.Expose)(),
|
|
56
|
+
(0, class_validator_1.IsEnum)(RewardStatusEnum_1.RewardStatusEnum),
|
|
57
|
+
__metadata("design:type", String)
|
|
58
|
+
], EventTypeRequest.prototype, "status", void 0);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { InputField } from '../../../dynamicForm/dtos/InputField';
|
|
2
|
+
import { RewardStatusEnum } from '../../../rewards/enums/RewardStatusEnum';
|
|
3
|
+
export declare class EventTypeResponse {
|
|
4
|
+
eventKey: string;
|
|
5
|
+
name: string;
|
|
6
|
+
description: string;
|
|
7
|
+
emitter: string;
|
|
8
|
+
fields: InputField[];
|
|
9
|
+
status: RewardStatusEnum;
|
|
10
|
+
createdAt: number;
|
|
11
|
+
updatedAt: number;
|
|
12
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** Condición que más hace fallar la regla (`GET /metrics/failed-conditions`). */
|
|
2
|
+
export declare class FailedConditionStatResponse {
|
|
3
|
+
/** `{source}.{field}`. */
|
|
4
|
+
key: string;
|
|
5
|
+
/** Etiqueta legible (del catálogo de reglas; si no está, la propia `key`). */
|
|
6
|
+
label: string;
|
|
7
|
+
count: number;
|
|
8
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FailedConditionStatResponse = void 0;
|
|
4
|
+
/** Condición que más hace fallar la regla (`GET /metrics/failed-conditions`). */
|
|
5
|
+
class FailedConditionStatResponse {
|
|
6
|
+
}
|
|
7
|
+
exports.FailedConditionStatResponse = FailedConditionStatResponse;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.InputTypeResponse = void 0;
|
|
4
|
+
/** `GET /input-types`: tipos del formulario dinámico compartido. */
|
|
5
|
+
class InputTypeResponse {
|
|
6
|
+
}
|
|
7
|
+
exports.InputTypeResponse = InputTypeResponse;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/** Un día de métricas preagregadas (spec 5.7). Solo cuenta resultados que llegaron a un estado final. */
|
|
2
|
+
export declare class MetricsPointResponse {
|
|
3
|
+
/** `AAAA-MM-DD` (UTC). */
|
|
4
|
+
date: string;
|
|
5
|
+
evaluated: number;
|
|
6
|
+
match: number;
|
|
7
|
+
noMatch: number;
|
|
8
|
+
error: number;
|
|
9
|
+
alreadyGranted: number;
|
|
10
|
+
quotaExhausted: number;
|
|
11
|
+
excluded: number;
|
|
12
|
+
requested: number;
|
|
13
|
+
requestFailed: number;
|
|
14
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MetricsPointResponse = void 0;
|
|
4
|
+
/** Un día de métricas preagregadas (spec 5.7). Solo cuenta resultados que llegaron a un estado final. */
|
|
5
|
+
class MetricsPointResponse {
|
|
6
|
+
}
|
|
7
|
+
exports.MetricsPointResponse = MetricsPointResponse;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { MetricsDimensionEnum } from '../../enums/MetricsDimensionEnum';
|
|
2
|
+
/** Query params ya validados de `GET /metrics` (`from`/`to` = `AAAA-MM-DD`, UTC, inclusivos). */
|
|
3
|
+
export declare class MetricsQuery {
|
|
4
|
+
dimension: MetricsDimensionEnum;
|
|
5
|
+
/** Obligatorio salvo con `dimension: ALL`. */
|
|
6
|
+
value?: string;
|
|
7
|
+
from: string;
|
|
8
|
+
to: string;
|
|
9
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MetricsQuery = void 0;
|
|
4
|
+
/** Query params ya validados de `GET /metrics` (`from`/`to` = `AAAA-MM-DD`, UTC, inclusivos). */
|
|
5
|
+
class MetricsQuery {
|
|
6
|
+
}
|
|
7
|
+
exports.MetricsQuery = MetricsQuery;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { DynamicFormValue } from '../../../dynamicForm/types/DynamicFormValue';
|
|
2
|
+
/** 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`. */
|
|
3
|
+
export declare class PopulationRunRequest {
|
|
4
|
+
params: Record<string, DynamicFormValue>;
|
|
5
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
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.PopulationRunRequest = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
const IsDynamicFormValues_1 = require("../../../dynamicForm/validators/IsDynamicFormValues");
|
|
16
|
+
/** 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`. */
|
|
17
|
+
class PopulationRunRequest {
|
|
18
|
+
}
|
|
19
|
+
exports.PopulationRunRequest = PopulationRunRequest;
|
|
20
|
+
__decorate([
|
|
21
|
+
(0, class_transformer_1.Expose)(),
|
|
22
|
+
(0, class_validator_1.Validate)(IsDynamicFormValues_1.IsDynamicFormValues),
|
|
23
|
+
__metadata("design:type", Object)
|
|
24
|
+
], PopulationRunRequest.prototype, "params", void 0);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { InputField } from '../../../dynamicForm/dtos/InputField';
|
|
2
|
+
/** `GET /population-sources`: fuente de población para un disparador `CRON` (la ejecución llega en la fase 4). */
|
|
3
|
+
export declare class PopulationSourceResponse {
|
|
4
|
+
source: string;
|
|
5
|
+
label: string;
|
|
6
|
+
description: string;
|
|
7
|
+
/** Formulario de los params de la fuente. */
|
|
8
|
+
paramsSchema: InputField[];
|
|
9
|
+
/** Keys de input que la fuente provee por sujeto. */
|
|
10
|
+
provides: string[];
|
|
11
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PopulationSourceResponse = void 0;
|
|
4
|
+
/** `GET /population-sources`: fuente de población para un disparador `CRON` (la ejecución llega en la fase 4). */
|
|
5
|
+
class PopulationSourceResponse {
|
|
6
|
+
}
|
|
7
|
+
exports.PopulationSourceResponse = PopulationSourceResponse;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** Lo que una corrida en espera de aprobación consumiría de un cupo (spec 7.5). */
|
|
2
|
+
export declare class QuotaImpactResponse {
|
|
3
|
+
quotaId: string;
|
|
4
|
+
/** Ventana vigente al consultar (`TOTAL`, `2026-W41`…). */
|
|
5
|
+
window: string;
|
|
6
|
+
limit: number;
|
|
7
|
+
consumed: number;
|
|
8
|
+
wouldConsume: number;
|
|
9
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.QuotaImpactResponse = void 0;
|
|
4
|
+
/** Lo que una corrida en espera de aprobación consumiría de un cupo (spec 7.5). */
|
|
5
|
+
class QuotaImpactResponse {
|
|
6
|
+
}
|
|
7
|
+
exports.QuotaImpactResponse = QuotaImpactResponse;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { QuotaPeriodEnum } from '../../enums/QuotaPeriodEnum';
|
|
2
|
+
/** `GET /campaigns/{id}/quotas`: consumo actual de un cupo en su ventana vigente. */
|
|
3
|
+
export declare class QuotaUsageResponse {
|
|
4
|
+
quotaId: string;
|
|
5
|
+
period: QuotaPeriodEnum;
|
|
6
|
+
/** Ventana vigente: `TOTAL`, `2026-10-08` (DAY), `2026-W41` (WEEK) o `2026-10` (MONTH). */
|
|
7
|
+
window: string;
|
|
8
|
+
limit: number;
|
|
9
|
+
consumed: number;
|
|
10
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.QuotaUsageResponse = void 0;
|
|
4
|
+
/** `GET /campaigns/{id}/quotas`: consumo actual de un cupo en su ventana vigente. */
|
|
5
|
+
class QuotaUsageResponse {
|
|
6
|
+
}
|
|
7
|
+
exports.QuotaUsageResponse = QuotaUsageResponse;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { JsonValue } from '../../../common';
|
|
2
|
+
import { EvaluationOutcomeEnum } from '../../enums/EvaluationOutcomeEnum';
|
|
3
|
+
import { TraceOriginEnum } from '../../enums/TraceOriginEnum';
|
|
4
|
+
/** Una condición evaluada: qué se esperaba, qué se encontró y de dónde salió el dato (spec 5.4). */
|
|
5
|
+
export declare class TraceConditionResponse {
|
|
6
|
+
source: string;
|
|
7
|
+
subject?: string;
|
|
8
|
+
field: string;
|
|
9
|
+
params?: Record<string, string | number | boolean>;
|
|
10
|
+
op: string;
|
|
11
|
+
expected: JsonValue;
|
|
12
|
+
actual?: JsonValue;
|
|
13
|
+
/** `MATCH`, `NO_MATCH` o `ERROR`. */
|
|
14
|
+
outcome: EvaluationOutcomeEnum;
|
|
15
|
+
origin?: TraceOriginEnum;
|
|
16
|
+
/** Solo si `origin` es `PREFETCHED`. */
|
|
17
|
+
asOf?: string;
|
|
18
|
+
/** Solo si `outcome` es `ERROR`. */
|
|
19
|
+
error?: {
|
|
20
|
+
code: string;
|
|
21
|
+
message: string;
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
export declare class TraceGroupResponse {
|
|
25
|
+
match: 'ALL' | 'ANY';
|
|
26
|
+
outcome: EvaluationOutcomeEnum;
|
|
27
|
+
conditions: TraceConditionResponse[];
|
|
28
|
+
}
|
|
29
|
+
/** Traza completa de una evaluación: por qué cumplió o no (criterio de éxito 4). */
|
|
30
|
+
export declare class ResultTraceResponse {
|
|
31
|
+
match: 'ALL' | 'ANY';
|
|
32
|
+
outcome: EvaluationOutcomeEnum;
|
|
33
|
+
groups: TraceGroupResponse[];
|
|
34
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ResultTraceResponse = exports.TraceGroupResponse = exports.TraceConditionResponse = void 0;
|
|
4
|
+
/** Una condición evaluada: qué se esperaba, qué se encontró y de dónde salió el dato (spec 5.4). */
|
|
5
|
+
class TraceConditionResponse {
|
|
6
|
+
}
|
|
7
|
+
exports.TraceConditionResponse = TraceConditionResponse;
|
|
8
|
+
class TraceGroupResponse {
|
|
9
|
+
}
|
|
10
|
+
exports.TraceGroupResponse = TraceGroupResponse;
|
|
11
|
+
/** Traza completa de una evaluación: por qué cumplió o no (criterio de éxito 4). */
|
|
12
|
+
class ResultTraceResponse {
|
|
13
|
+
}
|
|
14
|
+
exports.ResultTraceResponse = ResultTraceResponse;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { InputField } from '../../../dynamicForm/dtos/InputField';
|
|
2
|
+
import { RuleValueTypeEnum } from '../../enums/RuleValueTypeEnum';
|
|
3
|
+
/** Un campo que una fuente resuelve para las reglas (`GET /rule-catalog`). */
|
|
4
|
+
export declare class RuleCatalogFieldResponse {
|
|
5
|
+
field: string;
|
|
6
|
+
label: string;
|
|
7
|
+
valueType: RuleValueTypeEnum;
|
|
8
|
+
/** Operadores válidos para este campo (`GT`, `LTE`, `IN`…). */
|
|
9
|
+
operators: string[];
|
|
10
|
+
/** Params del campo (ej. ventana y moneda de `sumAmount`), como formulario dinámico. */
|
|
11
|
+
params?: InputField[];
|
|
12
|
+
/** Valores posibles si es un enum. */
|
|
13
|
+
options?: {
|
|
14
|
+
value: string;
|
|
15
|
+
label: string;
|
|
16
|
+
}[];
|
|
17
|
+
}
|
|
18
|
+
export declare class RuleCatalogSourceResponse {
|
|
19
|
+
source: string;
|
|
20
|
+
label: string;
|
|
21
|
+
description: string;
|
|
22
|
+
fields: RuleCatalogFieldResponse[];
|
|
23
|
+
}
|
|
24
|
+
export declare class RuleCatalogResponse {
|
|
25
|
+
sources: RuleCatalogSourceResponse[];
|
|
26
|
+
/** Etiqueta legible de cada operador (`GTE` → «≥»). */
|
|
27
|
+
operators: Record<string, string>;
|
|
28
|
+
}
|