@fiado/type-kit 3.516.0 → 3.518.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 +17 -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/generateRulesRequest.test.ts +50 -0
- package/_test_/unit/rewardsEligibility/generateRulesResponse.test.ts +12 -0
- package/_test_/unit/rewardsEligibility/metricsDtos.test.ts +17 -0
- package/_test_/unit/rewardsEligibility/ruleCatalogRich.test.ts +18 -0
- package/_test_/unit/rewardsEligibility/rulesAiEnums.test.ts +15 -0
- package/_test_/unit/rewardsEligibility/runDtos.test.ts +36 -0
- package/bin/rewardsEligibility/constants/BackofficeLimits.d.ts +16 -0
- package/bin/rewardsEligibility/constants/BackofficeLimits.js +19 -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/GenerateRulesRequest.d.ts +17 -0
- package/bin/rewardsEligibility/dtos/backoffice/GenerateRulesRequest.js +44 -0
- package/bin/rewardsEligibility/dtos/backoffice/GenerateRulesResponse.d.ts +18 -0
- package/bin/rewardsEligibility/dtos/backoffice/GenerateRulesResponse.js +12 -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 +33 -0
- package/bin/rewardsEligibility/dtos/backoffice/RuleCatalogResponse.js +13 -0
- package/bin/rewardsEligibility/dtos/backoffice/RulesChatTurn.d.ts +6 -0
- package/bin/rewardsEligibility/dtos/backoffice/RulesChatTurn.js +32 -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 +56 -1
- package/bin/rewardsEligibility/enums/RewardsEligibilityErrorCodeEnum.js +56 -0
- package/bin/rewardsEligibility/enums/RuleValueTypeEnum.d.ts +9 -0
- package/bin/rewardsEligibility/enums/RuleValueTypeEnum.js +13 -0
- package/bin/rewardsEligibility/enums/RulesChatRoleEnum.d.ts +5 -0
- package/bin/rewardsEligibility/enums/RulesChatRoleEnum.js +9 -0
- package/bin/rewardsEligibility/index.d.ts +38 -0
- package/bin/rewardsEligibility/index.js +39 -0
- package/package.json +1 -1
- package/src/rewardsEligibility/constants/BackofficeLimits.ts +16 -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/GenerateRulesRequest.ts +33 -0
- package/src/rewardsEligibility/dtos/backoffice/GenerateRulesResponse.ts +17 -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 +32 -0
- package/src/rewardsEligibility/dtos/backoffice/RulesChatTurn.ts +17 -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 +57 -0
- package/src/rewardsEligibility/enums/RuleValueTypeEnum.ts +9 -0
- package/src/rewardsEligibility/enums/RulesChatRoleEnum.ts +5 -0
- package/src/rewardsEligibility/index.ts +40 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { JsonValue } from '../../../common';
|
|
2
|
+
/**
|
|
3
|
+
* Respuesta de `POST /rules/generate`. Tres casos:
|
|
4
|
+
* - Reglas listas: `valid: true` + `rules` (ya validadas contra el catálogo y los inputs: el editor puede cargarlas tal cual).
|
|
5
|
+
* - La IA pidió una aclaración (o no podía con lo pedido): `valid: true`, SIN `rules`; la pregunta va en `explanation`.
|
|
6
|
+
* - La IA generó reglas que no pasaron la validación ni tras el reintento: `valid: false`, SIN `rules`, con `problems`.
|
|
7
|
+
*/
|
|
8
|
+
export declare class GenerateRulesResponse {
|
|
9
|
+
/** Qué hizo (o qué preguntó) la IA, en español. Siempre viene. */
|
|
10
|
+
explanation: string;
|
|
11
|
+
/** `{ match, groups[] }` de `@fiado/rules-engine`. */
|
|
12
|
+
rules?: {
|
|
13
|
+
[key: string]: JsonValue;
|
|
14
|
+
};
|
|
15
|
+
valid: boolean;
|
|
16
|
+
/** Mensajes legibles de la última salida inválida. Solo con `valid: false`. */
|
|
17
|
+
problems?: string[];
|
|
18
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GenerateRulesResponse = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Respuesta de `POST /rules/generate`. Tres casos:
|
|
6
|
+
* - Reglas listas: `valid: true` + `rules` (ya validadas contra el catálogo y los inputs: el editor puede cargarlas tal cual).
|
|
7
|
+
* - La IA pidió una aclaración (o no podía con lo pedido): `valid: true`, SIN `rules`; la pregunta va en `explanation`.
|
|
8
|
+
* - La IA generó reglas que no pasaron la validación ni tras el reintento: `valid: false`, SIN `rules`, con `problems`.
|
|
9
|
+
*/
|
|
10
|
+
class GenerateRulesResponse {
|
|
11
|
+
}
|
|
12
|
+
exports.GenerateRulesResponse = GenerateRulesResponse;
|
|
@@ -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,33 @@
|
|
|
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 (con qué significa cada uno, si se sabe). */
|
|
13
|
+
options?: {
|
|
14
|
+
value: string;
|
|
15
|
+
label: string;
|
|
16
|
+
description?: string;
|
|
17
|
+
}[];
|
|
18
|
+
/** Qué es este campo, en una frase (tooltip del editor). */
|
|
19
|
+
description?: string;
|
|
20
|
+
/** Frases de ejemplo que típicamente piden este campo (ayuda del chat de IA). */
|
|
21
|
+
examplePhrases?: string[];
|
|
22
|
+
}
|
|
23
|
+
export declare class RuleCatalogSourceResponse {
|
|
24
|
+
source: string;
|
|
25
|
+
label: string;
|
|
26
|
+
description: string;
|
|
27
|
+
fields: RuleCatalogFieldResponse[];
|
|
28
|
+
}
|
|
29
|
+
export declare class RuleCatalogResponse {
|
|
30
|
+
sources: RuleCatalogSourceResponse[];
|
|
31
|
+
/** Etiqueta legible de cada operador (`GTE` → «≥»). */
|
|
32
|
+
operators: Record<string, string>;
|
|
33
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RuleCatalogResponse = exports.RuleCatalogSourceResponse = exports.RuleCatalogFieldResponse = void 0;
|
|
4
|
+
/** Un campo que una fuente resuelve para las reglas (`GET /rule-catalog`). */
|
|
5
|
+
class RuleCatalogFieldResponse {
|
|
6
|
+
}
|
|
7
|
+
exports.RuleCatalogFieldResponse = RuleCatalogFieldResponse;
|
|
8
|
+
class RuleCatalogSourceResponse {
|
|
9
|
+
}
|
|
10
|
+
exports.RuleCatalogSourceResponse = RuleCatalogSourceResponse;
|
|
11
|
+
class RuleCatalogResponse {
|
|
12
|
+
}
|
|
13
|
+
exports.RuleCatalogResponse = RuleCatalogResponse;
|
|
@@ -0,0 +1,32 @@
|
|
|
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.RulesChatTurn = 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 RulesChatRoleEnum_1 = require("../../enums/RulesChatRoleEnum");
|
|
17
|
+
/** Un turno del chat que genera reglas con IA. */
|
|
18
|
+
class RulesChatTurn {
|
|
19
|
+
}
|
|
20
|
+
exports.RulesChatTurn = RulesChatTurn;
|
|
21
|
+
__decorate([
|
|
22
|
+
(0, class_transformer_1.Expose)(),
|
|
23
|
+
(0, class_validator_1.IsEnum)(RulesChatRoleEnum_1.RulesChatRoleEnum),
|
|
24
|
+
__metadata("design:type", String)
|
|
25
|
+
], RulesChatTurn.prototype, "role", void 0);
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, class_transformer_1.Expose)(),
|
|
28
|
+
(0, class_validator_1.IsString)(),
|
|
29
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
30
|
+
(0, class_validator_1.MaxLength)(BackofficeLimits_1.RULES_CHAT_TURN_MAX_LENGTH),
|
|
31
|
+
__metadata("design:type", String)
|
|
32
|
+
], RulesChatTurn.prototype, "content", void 0);
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ApprovalModeEnum } from '../../enums/ApprovalModeEnum';
|
|
2
|
+
import { RunModeEnum } from '../../enums/RunModeEnum';
|
|
3
|
+
import { RunStatusEnum } from '../../enums/RunStatusEnum';
|
|
4
|
+
import { TriggerTypeEnum } from '../../enums/TriggerTypeEnum';
|
|
5
|
+
import { RunCounts } from '../RunCounts';
|
|
6
|
+
import { QuotaImpactResponse } from './QuotaImpactResponse';
|
|
7
|
+
/** Corrida para el backoffice (spec 10). */
|
|
8
|
+
export declare class RunResponse {
|
|
9
|
+
id: string;
|
|
10
|
+
evaluationId: string;
|
|
11
|
+
/** `version` de la evaluación CONGELADA en la corrida. */
|
|
12
|
+
evaluationVersion: number;
|
|
13
|
+
campaignId: string;
|
|
14
|
+
trigger: TriggerTypeEnum;
|
|
15
|
+
approval: ApprovalModeEnum;
|
|
16
|
+
mode: RunModeEnum;
|
|
17
|
+
status: RunStatusEnum;
|
|
18
|
+
counts: RunCounts;
|
|
19
|
+
/** Solo con `status: AWAITING_APPROVAL`: cuánto consumiría la corrida de cada cupo y cuánto queda. */
|
|
20
|
+
quotaImpact?: QuotaImpactResponse[];
|
|
21
|
+
requestedBy: string;
|
|
22
|
+
createdAt: number;
|
|
23
|
+
updatedAt: number;
|
|
24
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { DynamicFormValue } from '../../../dynamicForm/types/DynamicFormValue';
|
|
2
|
+
import { EvaluationOutcomeEnum } from '../../enums/EvaluationOutcomeEnum';
|
|
3
|
+
import { GrantRequestStatusEnum } from '../../enums/GrantRequestStatusEnum';
|
|
4
|
+
import { ResultTraceResponse } from './ResultTraceResponse';
|
|
5
|
+
/** Resultado por sujeto CON traza e inputs (spec 5.4). */
|
|
6
|
+
export declare class RunResultResponse {
|
|
7
|
+
runId: string;
|
|
8
|
+
subjectKey: string;
|
|
9
|
+
inputs: Record<string, DynamicFormValue>;
|
|
10
|
+
beneficiaryDirectoryId: string;
|
|
11
|
+
campaignId: string;
|
|
12
|
+
evaluationId: string;
|
|
13
|
+
packageId: string;
|
|
14
|
+
outcome: EvaluationOutcomeEnum;
|
|
15
|
+
trace?: ResultTraceResponse;
|
|
16
|
+
grantKey?: string;
|
|
17
|
+
grantStatus: GrantRequestStatusEnum;
|
|
18
|
+
/** Cruza con `GET /grants/{id}` de rewards. */
|
|
19
|
+
grantId?: string;
|
|
20
|
+
errorMessage?: string;
|
|
21
|
+
evaluatedAt: number;
|
|
22
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { DynamicFormValue } from '../../../dynamicForm/types/DynamicFormValue';
|
|
2
|
+
import { EvaluationRequest } from './EvaluationRequest';
|
|
3
|
+
/** `POST /evaluations/simulate`: una evaluación GUARDADA (`evaluationId`) o un BORRADOR sin guardar (`evaluation`), más los inputs del sujeto. No persiste nada. Exactamente uno de los dos lo valida el lambda. */
|
|
4
|
+
export declare class SimulateRequest {
|
|
5
|
+
evaluationId?: string;
|
|
6
|
+
evaluation?: EvaluationRequest;
|
|
7
|
+
inputs: Record<string, DynamicFormValue>;
|
|
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.SimulateRequest = 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 EvaluationRequest_1 = require("./EvaluationRequest");
|
|
18
|
+
/** `POST /evaluations/simulate`: una evaluación GUARDADA (`evaluationId`) o un BORRADOR sin guardar (`evaluation`), más los inputs del sujeto. No persiste nada. Exactamente uno de los dos lo valida el lambda. */
|
|
19
|
+
class SimulateRequest {
|
|
20
|
+
}
|
|
21
|
+
exports.SimulateRequest = SimulateRequest;
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, class_transformer_1.Expose)(),
|
|
24
|
+
(0, class_validator_1.IsOptional)(),
|
|
25
|
+
(0, class_validator_1.IsString)(),
|
|
26
|
+
(0, class_validator_1.Matches)(BackofficeLimits_1.ELIGIBILITY_ID_PATTERN),
|
|
27
|
+
__metadata("design:type", String)
|
|
28
|
+
], SimulateRequest.prototype, "evaluationId", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, class_transformer_1.Expose)(),
|
|
31
|
+
(0, class_validator_1.IsOptional)(),
|
|
32
|
+
(0, class_validator_1.ValidateNested)(),
|
|
33
|
+
(0, class_transformer_1.Type)(() => EvaluationRequest_1.EvaluationRequest),
|
|
34
|
+
__metadata("design:type", EvaluationRequest_1.EvaluationRequest)
|
|
35
|
+
], SimulateRequest.prototype, "evaluation", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, class_transformer_1.Expose)(),
|
|
38
|
+
(0, class_validator_1.Validate)(IsDynamicFormValues_1.IsDynamicFormValues),
|
|
39
|
+
__metadata("design:type", Object)
|
|
40
|
+
], SimulateRequest.prototype, "inputs", void 0);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { EvaluationOutcomeEnum } from '../../enums/EvaluationOutcomeEnum';
|
|
2
|
+
import { ResultTraceResponse } from './ResultTraceResponse';
|
|
3
|
+
export declare class SimulateResponse {
|
|
4
|
+
outcome: EvaluationOutcomeEnum;
|
|
5
|
+
/** Ausente si el sujeto ni siquiera pudo evaluarse (inputs inválidos). */
|
|
6
|
+
trace?: ResultTraceResponse;
|
|
7
|
+
beneficiaryDirectoryId?: string;
|
|
8
|
+
grantKey?: string;
|
|
9
|
+
/** Explicación corta: «Ya recibió el premio para la venta s-9». */
|
|
10
|
+
note?: string;
|
|
11
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** Dimensión de las métricas preagregadas (spec 5.7). `ALL` suma todas las campañas al consultar (no se escribe). */
|
|
2
|
+
export declare enum MetricsDimensionEnum {
|
|
3
|
+
CAMPAIGN = "CAMPAIGN",
|
|
4
|
+
EVALUATION = "EVALUATION",
|
|
5
|
+
PACKAGE = "PACKAGE",
|
|
6
|
+
TRIGGER = "TRIGGER",
|
|
7
|
+
ALL = "ALL"
|
|
8
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MetricsDimensionEnum = void 0;
|
|
4
|
+
/** Dimensión de las métricas preagregadas (spec 5.7). `ALL` suma todas las campañas al consultar (no se escribe). */
|
|
5
|
+
var MetricsDimensionEnum;
|
|
6
|
+
(function (MetricsDimensionEnum) {
|
|
7
|
+
MetricsDimensionEnum["CAMPAIGN"] = "CAMPAIGN";
|
|
8
|
+
MetricsDimensionEnum["EVALUATION"] = "EVALUATION";
|
|
9
|
+
MetricsDimensionEnum["PACKAGE"] = "PACKAGE";
|
|
10
|
+
MetricsDimensionEnum["TRIGGER"] = "TRIGGER";
|
|
11
|
+
MetricsDimensionEnum["ALL"] = "ALL";
|
|
12
|
+
})(MetricsDimensionEnum || (exports.MetricsDimensionEnum = MetricsDimensionEnum = {}));
|
|
@@ -4,5 +4,60 @@ export declare enum RewardsEligibilityErrorCodeEnum {
|
|
|
4
4
|
/** 404: el eventKey no existe o está inactivo. */
|
|
5
5
|
EVENT_TYPE_NOT_FOUND = "EVENT_TYPE_NOT_FOUND",
|
|
6
6
|
/** 404: GET /runs/{id} sin corrida. */
|
|
7
|
-
RUN_NOT_FOUND = "RUN_NOT_FOUND"
|
|
7
|
+
RUN_NOT_FOUND = "RUN_NOT_FOUND",
|
|
8
|
+
/** 400: el cuerpo no cumple el DTO (solo nombres de propiedad, nunca valores). */
|
|
9
|
+
VALIDATION_ERROR = "VALIDATION_ERROR",
|
|
10
|
+
/** 400: `limit` fuera de rango o `cursor` que no devolvió esta API. */
|
|
11
|
+
INVALID_PAGE = "INVALID_PAGE",
|
|
12
|
+
/** 400: un filtro de query (`outcome`, `status`, `dimension`, fechas…) no es válido. */
|
|
13
|
+
INVALID_FILTER = "INVALID_FILTER",
|
|
14
|
+
/** 503: el índice de listado aún no existe en la tabla (pendiente de infraestructura). */
|
|
15
|
+
LIST_INDEX_NOT_AVAILABLE = "LIST_INDEX_NOT_AVAILABLE",
|
|
16
|
+
/** 409: otra persona editó la misma fila. */
|
|
17
|
+
VERSION_CONFLICT = "VERSION_CONFLICT",
|
|
18
|
+
/** 400: el id de la ruta no coincide con el del cuerpo. */
|
|
19
|
+
REQUEST_ID_MISMATCH = "REQUEST_ID_MISMATCH",
|
|
20
|
+
/** 409: la transición de estado no está permitida. */
|
|
21
|
+
INVALID_STATUS_TRANSITION = "INVALID_STATUS_TRANSITION",
|
|
22
|
+
CAMPAIGN_NOT_FOUND = "CAMPAIGN_NOT_FOUND",
|
|
23
|
+
CAMPAIGN_ALREADY_EXISTS = "CAMPAIGN_ALREADY_EXISTS",
|
|
24
|
+
CAMPAIGN_INVALID = "CAMPAIGN_INVALID",
|
|
25
|
+
EVALUATION_NOT_FOUND = "EVALUATION_NOT_FOUND",
|
|
26
|
+
EVALUATION_ALREADY_EXISTS = "EVALUATION_ALREADY_EXISTS",
|
|
27
|
+
/** 400: la evaluación no pasa las validaciones del spec 5.1 (lista TODOS los problemas). */
|
|
28
|
+
EVALUATION_INVALID = "EVALUATION_INVALID",
|
|
29
|
+
/** 409: la evaluación o su campaña no están en condiciones de correr (estado o vigencia). */
|
|
30
|
+
EVALUATION_NOT_RUNNABLE = "EVALUATION_NOT_RUNNABLE",
|
|
31
|
+
EVENT_TYPE_ALREADY_EXISTS = "EVENT_TYPE_ALREADY_EXISTS",
|
|
32
|
+
EVENT_TYPE_INVALID = "EVENT_TYPE_INVALID",
|
|
33
|
+
/** 409: el tipo de evento lo escuchan evaluaciones ACTIVAS. */
|
|
34
|
+
EVENT_TYPE_IN_USE = "EVENT_TYPE_IN_USE",
|
|
35
|
+
PACKAGE_NOT_FOUND = "PACKAGE_NOT_FOUND",
|
|
36
|
+
/** 503: rewards-business no respondió al consultar un paquete. */
|
|
37
|
+
PACKAGE_LOOKUP_UNAVAILABLE = "PACKAGE_LOOKUP_UNAVAILABLE",
|
|
38
|
+
/** 400: la evaluación no tiene disparador MANUAL. */
|
|
39
|
+
MANUAL_TRIGGER_MISSING = "MANUAL_TRIGGER_MISSING",
|
|
40
|
+
/** 400: la corrida manual por población llega con la fase 4 (cron masivo). */
|
|
41
|
+
POPULATION_RUN_NOT_SUPPORTED = "POPULATION_RUN_NOT_SUPPORTED",
|
|
42
|
+
/** 409: la corrida no está esperando aprobación. */
|
|
43
|
+
RUN_NOT_AWAITING_APPROVAL = "RUN_NOT_AWAITING_APPROVAL",
|
|
44
|
+
/** 409: la corrida tiene más de un registro de reserva (aprobación masiva = fase 4). */
|
|
45
|
+
APPROVAL_RUN_TOO_LARGE = "APPROVAL_RUN_TOO_LARGE",
|
|
46
|
+
RESULT_NOT_FOUND = "RESULT_NOT_FOUND",
|
|
47
|
+
/** 409: solo se reintenta un sujeto en ERROR o REQUEST_FAILED de una corrida LIVE cerrada. */
|
|
48
|
+
RESULT_NOT_RETRYABLE = "RESULT_NOT_RETRYABLE",
|
|
49
|
+
/** 400: el rango pedido excede el tope de filas de la exportación. */
|
|
50
|
+
EXPORT_TOO_LARGE = "EXPORT_TOO_LARGE",
|
|
51
|
+
/** 503: la tabla de métricas no responde o no existe aún. */
|
|
52
|
+
METRICS_UNAVAILABLE = "METRICS_UNAVAILABLE",
|
|
53
|
+
/** 400: `POST /rules/generate` sin ningún turno de chat. */
|
|
54
|
+
AI_CHAT_HISTORY_EMPTY = "AI_CHAT_HISTORY_EMPTY",
|
|
55
|
+
/** 400: el chat tiene más de 10 turnos (se acota el prompt). */
|
|
56
|
+
AI_CHAT_HISTORY_TOO_LONG = "AI_CHAT_HISTORY_TOO_LONG",
|
|
57
|
+
/** 503: el motor de IA no respondió o falló. Reintentar. */
|
|
58
|
+
AI_GENERATION_FAILED = "AI_GENERATION_FAILED",
|
|
59
|
+
/** 503: la IA respondió algo que no se pudo leer como `{ explanation, rules }`. Reintentar. */
|
|
60
|
+
AI_RESPONSE_UNPARSEABLE = "AI_RESPONSE_UNPARSEABLE",
|
|
61
|
+
/** 503: la IA no contestó dentro del presupuesto de tiempo (el gateway corta a los 29 s). Reintentar. */
|
|
62
|
+
AI_GENERATION_TIMEOUT = "AI_GENERATION_TIMEOUT"
|
|
8
63
|
}
|