@fiado/type-kit 3.174.0 → 3.175.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/bin/remittance/dtos/internal/RemittancePricingSchedule.d.ts +40 -0
- package/bin/remittance/dtos/internal/RemittancePricingSchedule.js +104 -0
- package/bin/remittance/index.d.ts +1 -0
- package/bin/remittance/index.js +1 -0
- package/package.json +1 -1
- package/src/remittance/dtos/internal/RemittancePricingSchedule.ts +87 -0
- package/src/remittance/index.ts +1 -0
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { RemittanceCorridor } from "../../enums/RemittanceCorridor";
|
|
2
|
+
import { PromotionKind } from "../../enums/PromotionKind";
|
|
3
|
+
/**
|
|
4
|
+
* Request del schedule de precio por corredor (Fase B — F2 app). El connector lo
|
|
5
|
+
* llama (passthrough desde benefits) para mostrarle al usuario la tabla de tramos de
|
|
6
|
+
* service fee + la promoción automática vigente ANTES de teclear el monto.
|
|
7
|
+
*/
|
|
8
|
+
export declare class PricingScheduleRequest {
|
|
9
|
+
directoryId: string;
|
|
10
|
+
corridor: RemittanceCorridor;
|
|
11
|
+
}
|
|
12
|
+
/** Un tramo del schedule. `serviceFee` YA refleja la promo automática aplicada (D5). */
|
|
13
|
+
export declare class PricingScheduleTier {
|
|
14
|
+
amountMin: number;
|
|
15
|
+
/** Display; null/ausente = último tramo (sin tope). El matching usa amountMin. */
|
|
16
|
+
amountMax?: number | null;
|
|
17
|
+
serviceFee: number;
|
|
18
|
+
}
|
|
19
|
+
/** Promoción AUTOMATIC vigente aplicada al schedule (ausente = no hay). */
|
|
20
|
+
export declare class PricingScheduleAppliedPromo {
|
|
21
|
+
id: string;
|
|
22
|
+
kind: PromotionKind;
|
|
23
|
+
name: string;
|
|
24
|
+
/** Texto legible del efecto (ej. "−$1 de comisión", "Mejor tipo de cambio"). */
|
|
25
|
+
effectSummary: string;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Respuesta del schedule. INFORMATIVO/de referencia (D5): el número realmente cobrado
|
|
29
|
+
* sale del quote en send-time (con RuleEngine). `markupBps` y el `serviceFee` de cada
|
|
30
|
+
* tramo YA reflejan la promo automática vigente si la hay. `appliedPromo` ausente = sin
|
|
31
|
+
* promo automática.
|
|
32
|
+
*/
|
|
33
|
+
export declare class PricingScheduleResponse {
|
|
34
|
+
corridor: RemittanceCorridor;
|
|
35
|
+
segmentId: string;
|
|
36
|
+
/** CON SIGNO (negativo = subsidio). Efectivo tras la promo automática. */
|
|
37
|
+
markupBps: number;
|
|
38
|
+
tramos: PricingScheduleTier[];
|
|
39
|
+
appliedPromo?: PricingScheduleAppliedPromo;
|
|
40
|
+
}
|
|
@@ -0,0 +1,104 @@
|
|
|
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.PricingScheduleResponse = exports.PricingScheduleAppliedPromo = exports.PricingScheduleTier = exports.PricingScheduleRequest = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
const RemittanceCorridor_1 = require("../../enums/RemittanceCorridor");
|
|
16
|
+
const PromotionKind_1 = require("../../enums/PromotionKind");
|
|
17
|
+
/**
|
|
18
|
+
* Request del schedule de precio por corredor (Fase B — F2 app). El connector lo
|
|
19
|
+
* llama (passthrough desde benefits) para mostrarle al usuario la tabla de tramos de
|
|
20
|
+
* service fee + la promoción automática vigente ANTES de teclear el monto.
|
|
21
|
+
*/
|
|
22
|
+
class PricingScheduleRequest {
|
|
23
|
+
}
|
|
24
|
+
exports.PricingScheduleRequest = PricingScheduleRequest;
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, class_validator_1.IsUUID)(),
|
|
27
|
+
__metadata("design:type", String)
|
|
28
|
+
], PricingScheduleRequest.prototype, "directoryId", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, class_validator_1.IsEnum)(RemittanceCorridor_1.RemittanceCorridor),
|
|
31
|
+
__metadata("design:type", String)
|
|
32
|
+
], PricingScheduleRequest.prototype, "corridor", void 0);
|
|
33
|
+
/** Un tramo del schedule. `serviceFee` YA refleja la promo automática aplicada (D5). */
|
|
34
|
+
class PricingScheduleTier {
|
|
35
|
+
}
|
|
36
|
+
exports.PricingScheduleTier = PricingScheduleTier;
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, class_validator_1.IsNumber)(),
|
|
39
|
+
(0, class_validator_1.Min)(1),
|
|
40
|
+
__metadata("design:type", Number)
|
|
41
|
+
], PricingScheduleTier.prototype, "amountMin", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, class_validator_1.IsOptional)(),
|
|
44
|
+
(0, class_validator_1.IsNumber)(),
|
|
45
|
+
__metadata("design:type", Number)
|
|
46
|
+
], PricingScheduleTier.prototype, "amountMax", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, class_validator_1.IsNumber)(),
|
|
49
|
+
(0, class_validator_1.Min)(0),
|
|
50
|
+
__metadata("design:type", Number)
|
|
51
|
+
], PricingScheduleTier.prototype, "serviceFee", void 0);
|
|
52
|
+
/** Promoción AUTOMATIC vigente aplicada al schedule (ausente = no hay). */
|
|
53
|
+
class PricingScheduleAppliedPromo {
|
|
54
|
+
}
|
|
55
|
+
exports.PricingScheduleAppliedPromo = PricingScheduleAppliedPromo;
|
|
56
|
+
__decorate([
|
|
57
|
+
(0, class_validator_1.IsString)(),
|
|
58
|
+
__metadata("design:type", String)
|
|
59
|
+
], PricingScheduleAppliedPromo.prototype, "id", void 0);
|
|
60
|
+
__decorate([
|
|
61
|
+
(0, class_validator_1.IsEnum)(PromotionKind_1.PromotionKind),
|
|
62
|
+
__metadata("design:type", String)
|
|
63
|
+
], PricingScheduleAppliedPromo.prototype, "kind", void 0);
|
|
64
|
+
__decorate([
|
|
65
|
+
(0, class_validator_1.IsString)(),
|
|
66
|
+
__metadata("design:type", String)
|
|
67
|
+
], PricingScheduleAppliedPromo.prototype, "name", void 0);
|
|
68
|
+
__decorate([
|
|
69
|
+
(0, class_validator_1.IsString)(),
|
|
70
|
+
__metadata("design:type", String)
|
|
71
|
+
], PricingScheduleAppliedPromo.prototype, "effectSummary", void 0);
|
|
72
|
+
/**
|
|
73
|
+
* Respuesta del schedule. INFORMATIVO/de referencia (D5): el número realmente cobrado
|
|
74
|
+
* sale del quote en send-time (con RuleEngine). `markupBps` y el `serviceFee` de cada
|
|
75
|
+
* tramo YA reflejan la promo automática vigente si la hay. `appliedPromo` ausente = sin
|
|
76
|
+
* promo automática.
|
|
77
|
+
*/
|
|
78
|
+
class PricingScheduleResponse {
|
|
79
|
+
}
|
|
80
|
+
exports.PricingScheduleResponse = PricingScheduleResponse;
|
|
81
|
+
__decorate([
|
|
82
|
+
(0, class_validator_1.IsEnum)(RemittanceCorridor_1.RemittanceCorridor),
|
|
83
|
+
__metadata("design:type", String)
|
|
84
|
+
], PricingScheduleResponse.prototype, "corridor", void 0);
|
|
85
|
+
__decorate([
|
|
86
|
+
(0, class_validator_1.IsString)(),
|
|
87
|
+
__metadata("design:type", String)
|
|
88
|
+
], PricingScheduleResponse.prototype, "segmentId", void 0);
|
|
89
|
+
__decorate([
|
|
90
|
+
(0, class_validator_1.IsInt)(),
|
|
91
|
+
__metadata("design:type", Number)
|
|
92
|
+
], PricingScheduleResponse.prototype, "markupBps", void 0);
|
|
93
|
+
__decorate([
|
|
94
|
+
(0, class_validator_1.IsArray)(),
|
|
95
|
+
(0, class_validator_1.ValidateNested)({ each: true }),
|
|
96
|
+
(0, class_transformer_1.Type)(() => PricingScheduleTier),
|
|
97
|
+
__metadata("design:type", Array)
|
|
98
|
+
], PricingScheduleResponse.prototype, "tramos", void 0);
|
|
99
|
+
__decorate([
|
|
100
|
+
(0, class_validator_1.IsOptional)(),
|
|
101
|
+
(0, class_validator_1.ValidateNested)(),
|
|
102
|
+
(0, class_transformer_1.Type)(() => PricingScheduleAppliedPromo),
|
|
103
|
+
__metadata("design:type", PricingScheduleAppliedPromo)
|
|
104
|
+
], PricingScheduleResponse.prototype, "appliedPromo", void 0);
|
|
@@ -7,4 +7,5 @@ export * from "./dtos/internal/RemittanceSegmentMetrics";
|
|
|
7
7
|
export * from "./dtos/internal/RemittancePricingBridge";
|
|
8
8
|
export * from "./dtos/internal/RemittancePromotionReach";
|
|
9
9
|
export * from "./dtos/internal/RemittancePricingResolve";
|
|
10
|
+
export * from "./dtos/internal/RemittancePricingSchedule";
|
|
10
11
|
export * from "./dtos/internal/RemittanceCohortUserMatch";
|
package/bin/remittance/index.js
CHANGED
|
@@ -25,4 +25,5 @@ __exportStar(require("./dtos/internal/RemittanceSegmentMetrics"), exports);
|
|
|
25
25
|
__exportStar(require("./dtos/internal/RemittancePricingBridge"), exports);
|
|
26
26
|
__exportStar(require("./dtos/internal/RemittancePromotionReach"), exports);
|
|
27
27
|
__exportStar(require("./dtos/internal/RemittancePricingResolve"), exports);
|
|
28
|
+
__exportStar(require("./dtos/internal/RemittancePricingSchedule"), exports);
|
|
28
29
|
__exportStar(require("./dtos/internal/RemittanceCohortUserMatch"), exports);
|
package/package.json
CHANGED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { Type } from "class-transformer";
|
|
2
|
+
import {
|
|
3
|
+
IsArray,
|
|
4
|
+
IsEnum,
|
|
5
|
+
IsInt,
|
|
6
|
+
IsNumber,
|
|
7
|
+
IsOptional,
|
|
8
|
+
IsString,
|
|
9
|
+
IsUUID,
|
|
10
|
+
Min,
|
|
11
|
+
ValidateNested,
|
|
12
|
+
} from "class-validator";
|
|
13
|
+
import { RemittanceCorridor } from "../../enums/RemittanceCorridor";
|
|
14
|
+
import { PromotionKind } from "../../enums/PromotionKind";
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Request del schedule de precio por corredor (Fase B — F2 app). El connector lo
|
|
18
|
+
* llama (passthrough desde benefits) para mostrarle al usuario la tabla de tramos de
|
|
19
|
+
* service fee + la promoción automática vigente ANTES de teclear el monto.
|
|
20
|
+
*/
|
|
21
|
+
export class PricingScheduleRequest {
|
|
22
|
+
@IsUUID()
|
|
23
|
+
directoryId!: string;
|
|
24
|
+
|
|
25
|
+
@IsEnum(RemittanceCorridor)
|
|
26
|
+
corridor!: RemittanceCorridor;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/** Un tramo del schedule. `serviceFee` YA refleja la promo automática aplicada (D5). */
|
|
30
|
+
export class PricingScheduleTier {
|
|
31
|
+
@IsNumber()
|
|
32
|
+
@Min(1)
|
|
33
|
+
amountMin!: number;
|
|
34
|
+
|
|
35
|
+
/** Display; null/ausente = último tramo (sin tope). El matching usa amountMin. */
|
|
36
|
+
@IsOptional()
|
|
37
|
+
@IsNumber()
|
|
38
|
+
amountMax?: number | null;
|
|
39
|
+
|
|
40
|
+
@IsNumber()
|
|
41
|
+
@Min(0)
|
|
42
|
+
serviceFee!: number;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/** Promoción AUTOMATIC vigente aplicada al schedule (ausente = no hay). */
|
|
46
|
+
export class PricingScheduleAppliedPromo {
|
|
47
|
+
@IsString()
|
|
48
|
+
id!: string;
|
|
49
|
+
|
|
50
|
+
@IsEnum(PromotionKind)
|
|
51
|
+
kind!: PromotionKind;
|
|
52
|
+
|
|
53
|
+
@IsString()
|
|
54
|
+
name!: string;
|
|
55
|
+
|
|
56
|
+
/** Texto legible del efecto (ej. "−$1 de comisión", "Mejor tipo de cambio"). */
|
|
57
|
+
@IsString()
|
|
58
|
+
effectSummary!: string;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Respuesta del schedule. INFORMATIVO/de referencia (D5): el número realmente cobrado
|
|
63
|
+
* sale del quote en send-time (con RuleEngine). `markupBps` y el `serviceFee` de cada
|
|
64
|
+
* tramo YA reflejan la promo automática vigente si la hay. `appliedPromo` ausente = sin
|
|
65
|
+
* promo automática.
|
|
66
|
+
*/
|
|
67
|
+
export class PricingScheduleResponse {
|
|
68
|
+
@IsEnum(RemittanceCorridor)
|
|
69
|
+
corridor!: RemittanceCorridor;
|
|
70
|
+
|
|
71
|
+
@IsString()
|
|
72
|
+
segmentId!: string;
|
|
73
|
+
|
|
74
|
+
/** CON SIGNO (negativo = subsidio). Efectivo tras la promo automática. */
|
|
75
|
+
@IsInt()
|
|
76
|
+
markupBps!: number;
|
|
77
|
+
|
|
78
|
+
@IsArray()
|
|
79
|
+
@ValidateNested({ each: true })
|
|
80
|
+
@Type(() => PricingScheduleTier)
|
|
81
|
+
tramos!: PricingScheduleTier[];
|
|
82
|
+
|
|
83
|
+
@IsOptional()
|
|
84
|
+
@ValidateNested()
|
|
85
|
+
@Type(() => PricingScheduleAppliedPromo)
|
|
86
|
+
appliedPromo?: PricingScheduleAppliedPromo;
|
|
87
|
+
}
|
package/src/remittance/index.ts
CHANGED
|
@@ -9,4 +9,5 @@ export * from "./dtos/internal/RemittanceSegmentMetrics";
|
|
|
9
9
|
export * from "./dtos/internal/RemittancePricingBridge";
|
|
10
10
|
export * from "./dtos/internal/RemittancePromotionReach";
|
|
11
11
|
export * from "./dtos/internal/RemittancePricingResolve";
|
|
12
|
+
export * from "./dtos/internal/RemittancePricingSchedule";
|
|
12
13
|
export * from "./dtos/internal/RemittanceCohortUserMatch";
|