@fiado/type-kit 3.644.0 → 3.646.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/collection/authorizeCollectionMovementRequest.test.ts +15 -0
- package/_test_/unit/collection/costCenter.test.ts +54 -0
- package/_test_/unit/collection/disburseRequest.test.ts +45 -0
- package/_test_/unit/collection/disbursementType.test.ts +7 -1
- package/_test_/unit/productCatalog/rewardTopupEnums.test.ts +16 -0
- package/_test_/unit/reconciliation/reconciliationRequests.test.ts +15 -0
- package/_test_/unit/rewards/mobileTopup.test.ts +78 -0
- package/_test_/unit/rewards/waitingLimit.test.ts +3 -3
- package/_test_/unit/transaction/transactionCreateRequestM8.test.ts +21 -6
- package/_test_/unit/transactionProcessor/authorizeRewardTopupRequest.test.ts +59 -0
- package/_test_/unit/transactionProcessor/rewardTopupCodes.test.ts +17 -0
- package/bin/collection/dtos/AuthorizeCollectionMovementRequest.d.ts +9 -0
- package/bin/collection/dtos/AuthorizeCollectionMovementRequest.js +6 -0
- package/bin/collection/dtos/CollectionProductConfigDto.d.ts +2 -0
- package/bin/collection/dtos/CollectionProductConfigDto.js +6 -0
- package/bin/collection/dtos/DisburseRequest.d.ts +8 -0
- package/bin/collection/dtos/DisburseRequest.js +15 -0
- package/bin/collection/dtos/DisburseTopupDetail.d.ts +9 -0
- package/bin/collection/dtos/DisburseTopupDetail.js +46 -0
- package/bin/collection/dtos/UpsertProductConfigRequest.d.ts +2 -0
- package/bin/collection/dtos/UpsertProductConfigRequest.js +6 -0
- package/bin/collection/enums/DisbursementType.d.ts +3 -1
- package/bin/collection/enums/DisbursementType.js +2 -0
- package/bin/collection/index.d.ts +1 -0
- package/bin/collection/index.js +1 -0
- package/bin/productCatalog/enums/ProductSubtypeEnum.d.ts +1 -0
- package/bin/productCatalog/enums/ProductSubtypeEnum.js +2 -0
- package/bin/reconciliation/dtos/ReconciliationDefinition.d.ts +2 -0
- package/bin/reconciliation/dtos/requests/ReconciliationFeedRequests.d.ts +5 -0
- package/bin/reconciliation/dtos/requests/ReconciliationFeedRequests.js +9 -0
- package/bin/rewards/dtos/backoffice/BackofficeGrantItemResponse.d.ts +2 -0
- package/bin/rewards/dtos/backoffice/MobileTopupConfigRequest.d.ts +10 -0
- package/bin/rewards/dtos/backoffice/MobileTopupConfigRequest.js +59 -0
- package/bin/rewards/dtos/backoffice/MobileTopupConfigResponse.d.ts +15 -0
- package/bin/rewards/dtos/backoffice/MobileTopupConfigResponse.js +2 -0
- package/bin/rewards/dtos/backoffice/MobileTopupContributionResponse.d.ts +9 -0
- package/bin/rewards/dtos/backoffice/MobileTopupContributionResponse.js +2 -0
- package/bin/rewards/dtos/backoffice/MobileTopupPlanListResponse.d.ts +5 -0
- package/bin/rewards/dtos/backoffice/MobileTopupPlanListResponse.js +2 -0
- package/bin/rewards/dtos/backoffice/MobileTopupPlanResponse.d.ts +22 -0
- package/bin/rewards/dtos/backoffice/MobileTopupPlanResponse.js +2 -0
- package/bin/rewards/dtos/backoffice/MobileTopupRechargeResponse.d.ts +8 -0
- package/bin/rewards/dtos/backoffice/MobileTopupRechargeResponse.js +2 -0
- package/bin/rewards/enums/MobileTopupPlanStatusEnum.d.ts +6 -0
- package/bin/rewards/enums/MobileTopupPlanStatusEnum.js +10 -0
- package/bin/rewards/enums/MobileTopupRechargeStatusEnum.d.ts +7 -0
- package/bin/rewards/enums/MobileTopupRechargeStatusEnum.js +11 -0
- package/bin/rewards/enums/RewardItemCodeEnum.d.ts +5 -1
- package/bin/rewards/enums/RewardItemCodeEnum.js +4 -0
- package/bin/rewards/index.d.ts +8 -0
- package/bin/rewards/index.js +8 -0
- package/bin/transaction/constants/costCenter.d.ts +5 -0
- package/bin/transaction/constants/costCenter.js +8 -0
- package/bin/transaction/dtos/TransactionCreateRequest.d.ts +5 -2
- package/bin/transaction/dtos/TransactionCreateRequest.js +1 -1
- package/bin/transaction/index.d.ts +1 -0
- package/bin/transaction/index.js +2 -0
- package/bin/transactionProcessor/dtos/AuthorizeBonusRequest.d.ts +2 -0
- package/bin/transactionProcessor/dtos/AuthorizeBonusRequest.js +6 -0
- package/bin/transactionProcessor/dtos/AuthorizeRewardTopupRequest.d.ts +21 -0
- package/bin/transactionProcessor/dtos/AuthorizeRewardTopupRequest.js +74 -0
- package/bin/transactionProcessor/enums/TransactionProcessorCodesEnum.d.ts +9 -1
- package/bin/transactionProcessor/enums/TransactionProcessorCodesEnum.js +8 -0
- package/bin/transactionProcessor/index.d.ts +1 -0
- package/bin/transactionProcessor/index.js +1 -0
- package/package.json +1 -1
- package/src/collection/dtos/AuthorizeCollectionMovementRequest.ts +10 -1
- package/src/collection/dtos/CollectionProductConfigDto.ts +3 -1
- package/src/collection/dtos/DisburseRequest.ts +16 -1
- package/src/collection/dtos/DisburseTopupDetail.ts +15 -0
- package/src/collection/dtos/UpsertProductConfigRequest.ts +3 -1
- package/src/collection/enums/DisbursementType.ts +2 -0
- package/src/collection/index.ts +1 -0
- package/src/productCatalog/enums/ProductSubtypeEnum.ts +2 -0
- package/src/reconciliation/dtos/ReconciliationDefinition.ts +2 -0
- package/src/reconciliation/dtos/requests/ReconciliationFeedRequests.ts +14 -2
- package/src/rewards/dtos/backoffice/BackofficeGrantItemResponse.ts +2 -0
- package/src/rewards/dtos/backoffice/MobileTopupConfigRequest.ts +41 -0
- package/src/rewards/dtos/backoffice/MobileTopupConfigResponse.ts +15 -0
- package/src/rewards/dtos/backoffice/MobileTopupContributionResponse.ts +9 -0
- package/src/rewards/dtos/backoffice/MobileTopupPlanListResponse.ts +6 -0
- package/src/rewards/dtos/backoffice/MobileTopupPlanResponse.ts +23 -0
- package/src/rewards/dtos/backoffice/MobileTopupRechargeResponse.ts +9 -0
- package/src/rewards/enums/MobileTopupPlanStatusEnum.ts +6 -0
- package/src/rewards/enums/MobileTopupRechargeStatusEnum.ts +7 -0
- package/src/rewards/enums/RewardItemCodeEnum.ts +4 -0
- package/src/rewards/index.ts +8 -0
- package/src/transaction/constants/costCenter.ts +5 -0
- package/src/transaction/dtos/TransactionCreateRequest.ts +5 -2
- package/src/transaction/index.ts +3 -0
- package/src/transactionProcessor/dtos/AuthorizeBonusRequest.ts +7 -1
- package/src/transactionProcessor/dtos/AuthorizeRewardTopupRequest.ts +44 -0
- package/src/transactionProcessor/enums/TransactionProcessorCodesEnum.ts +8 -0
- package/src/transactionProcessor/index.ts +1 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { IsNotEmpty, IsString, Matches, MaxLength } from 'class-validator';
|
|
2
|
+
|
|
3
|
+
/** Datos de la recarga Bait de una dispersión `MEX_REWARD_TOPUP`. */
|
|
4
|
+
export class DisburseTopupDetail {
|
|
5
|
+
/** Celular MX normalizado a 10 dígitos. */
|
|
6
|
+
@IsString() @Matches(/^[0-9]{10}$/) phone!: string;
|
|
7
|
+
|
|
8
|
+
@IsString() @IsNotEmpty() @MaxLength(64) moduleName!: string;
|
|
9
|
+
|
|
10
|
+
@IsString() @IsNotEmpty() @MaxLength(64) benefitId!: string;
|
|
11
|
+
|
|
12
|
+
@IsString() @IsNotEmpty() @MaxLength(256) leafId!: string;
|
|
13
|
+
|
|
14
|
+
@IsString() @IsNotEmpty() @MaxLength(64) productId!: string;
|
|
15
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IsString, IsArray, IsBoolean, ValidateNested } from 'class-validator';
|
|
1
|
+
import { IsString, IsArray, IsBoolean, IsNotEmpty, IsOptional, ValidateNested } from 'class-validator';
|
|
2
2
|
import { Type } from 'class-transformer';
|
|
3
3
|
import { CollectionSourceDto } from './CollectionSourceDto';
|
|
4
4
|
import { RetryPolicyDto } from './RetryPolicyDto';
|
|
@@ -12,4 +12,6 @@ export class UpsertProductConfigRequest {
|
|
|
12
12
|
@IsBoolean() allowPartial!: boolean;
|
|
13
13
|
@ValidateNested() @Type(() => RetryPolicyDto) retryPolicy!: RetryPolicyDto;
|
|
14
14
|
@IsArray() @IsString({ each: true }) reportTargets!: string[];
|
|
15
|
+
/** Centro de costo con el que el ledger registra los cobros de este producto. */
|
|
16
|
+
@IsOptional() @IsString() @IsNotEmpty() costCenterId?: string;
|
|
15
17
|
}
|
|
@@ -9,4 +9,6 @@ export enum DisbursementType {
|
|
|
9
9
|
MEX_SELLER_COMMISSION = 'MEX_SELLER_COMMISSION',
|
|
10
10
|
/** Abono de recompensas de `rewards-business`. */
|
|
11
11
|
MEX_REWARD = 'MEX_REWARD',
|
|
12
|
+
/** Recarga Bait de recompensas de `rewards-business`. */
|
|
13
|
+
MEX_REWARD_TOPUP = 'MEX_REWARD_TOPUP',
|
|
12
14
|
}
|
package/src/collection/index.ts
CHANGED
|
@@ -35,6 +35,7 @@ export * from './dtos/RegisterCollectibleResponse';
|
|
|
35
35
|
export * from './dtos/CollectionPricingDto';
|
|
36
36
|
export * from './dtos/ResolvePendingChargesRequest';
|
|
37
37
|
export * from './dtos/MoneyInEvent';
|
|
38
|
+
export * from './dtos/DisburseTopupDetail';
|
|
38
39
|
export * from './dtos/DisburseRequest';
|
|
39
40
|
export * from './dtos/DisburseResponse';
|
|
40
41
|
|
|
@@ -89,6 +89,8 @@ export enum ProductSubtypeEnum {
|
|
|
89
89
|
//REWARDS
|
|
90
90
|
// Abono de recompensas de `rewards-business`.
|
|
91
91
|
REWARD_MX = "REWARD_MX",
|
|
92
|
+
// Recarga Bait de recompensas de `rewards-business`.
|
|
93
|
+
REWARD_TOPUP_MX = "REWARD_TOPUP_MX",
|
|
92
94
|
|
|
93
95
|
//STORE
|
|
94
96
|
STORE_PHONE = "PHONE",
|
|
@@ -12,6 +12,8 @@ export interface ReconciliationDefinitionSource {
|
|
|
12
12
|
domain: ReconciliationFeedOwnerEnum;
|
|
13
13
|
concept: ReconciliationFeedConceptEnum;
|
|
14
14
|
partName?: string;
|
|
15
|
+
/** Centros de costo del ledger que pertenecen al tenant; el feed solo devuelve esos. */
|
|
16
|
+
costCenterIds?: string[];
|
|
15
17
|
}
|
|
16
18
|
|
|
17
19
|
/** Cuenta de FSA cuyo EdC lee una definición BANK_STATEMENT. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Expose } from 'class-transformer';
|
|
2
|
-
import { IsEnum, IsISO8601 } from 'class-validator';
|
|
1
|
+
import { Expose, Transform } from 'class-transformer';
|
|
2
|
+
import { IsArray, IsEnum, IsISO8601, IsNotEmpty, IsOptional, IsString } from 'class-validator';
|
|
3
3
|
import { ReconciliationFeedConceptEnum } from '../../enums/ReconciliationFeedConceptEnum';
|
|
4
4
|
import { OptionalEmail, PageToken, RequiredId } from './reconciliationRequestDecorators';
|
|
5
5
|
|
|
@@ -31,6 +31,18 @@ export class PrivateListReconciliationFeedQuery {
|
|
|
31
31
|
|
|
32
32
|
@PageToken()
|
|
33
33
|
cursor?: string;
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Centros de costo del tenant, en csv (`a,b`). El dueño del feed filtra por ellos; sin la
|
|
37
|
+
* lista responde vacío, nunca el ledger completo.
|
|
38
|
+
*/
|
|
39
|
+
@Expose()
|
|
40
|
+
@IsOptional()
|
|
41
|
+
@Transform(({ value }) => (typeof value === 'string' ? value.split(',').map((id) => id.trim()) : value))
|
|
42
|
+
@IsArray()
|
|
43
|
+
@IsString({ each: true })
|
|
44
|
+
@IsNotEmpty({ each: true })
|
|
45
|
+
costCenterIds?: string[];
|
|
34
46
|
}
|
|
35
47
|
|
|
36
48
|
/** Query de privateGetReconciliationFeedRecord; `author` y `actor` van al registro de acceso del dueño. */
|
|
@@ -5,6 +5,8 @@ import { BackofficeGrantAttemptResponse } from './BackofficeGrantAttemptResponse
|
|
|
5
5
|
export class BackofficeGrantItemResponse extends GrantItemResponse {
|
|
6
6
|
/** Nombre de la recompensa congelada en la entrega. */
|
|
7
7
|
name: string;
|
|
8
|
+
/** Tipo de recompensa congelado en la entrega (ej. `'MOBILE_TOPUP'`). */
|
|
9
|
+
type?: string;
|
|
8
10
|
attempts: BackofficeGrantAttemptResponse[];
|
|
9
11
|
/** Motivo de la espera por tope; solo cuando el ítem está en `WAITING_LIMIT`. */
|
|
10
12
|
waitReason?: LimitWaitReasonEnum;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { Expose } from 'class-transformer';
|
|
2
|
+
import { IsInt, IsNotEmpty, IsNumber, IsOptional, IsPositive, IsString, MaxLength, Min } from 'class-validator';
|
|
3
|
+
|
|
4
|
+
/** Guarda la configuración de la recarga Bait (producto en Multicenter y precio mensual). */
|
|
5
|
+
export class MobileTopupConfigRequest {
|
|
6
|
+
@Expose()
|
|
7
|
+
@IsString()
|
|
8
|
+
@IsNotEmpty()
|
|
9
|
+
@MaxLength(100)
|
|
10
|
+
moduleName: string;
|
|
11
|
+
|
|
12
|
+
@Expose()
|
|
13
|
+
@IsString()
|
|
14
|
+
@IsNotEmpty()
|
|
15
|
+
@MaxLength(100)
|
|
16
|
+
benefitId: string;
|
|
17
|
+
|
|
18
|
+
@Expose()
|
|
19
|
+
@IsString()
|
|
20
|
+
@IsNotEmpty()
|
|
21
|
+
@MaxLength(100)
|
|
22
|
+
leafId: string;
|
|
23
|
+
|
|
24
|
+
@Expose()
|
|
25
|
+
@IsString()
|
|
26
|
+
@IsNotEmpty()
|
|
27
|
+
@MaxLength(100)
|
|
28
|
+
productId: string;
|
|
29
|
+
|
|
30
|
+
@Expose()
|
|
31
|
+
@IsNumber({ maxDecimalPlaces: 2 })
|
|
32
|
+
@IsPositive()
|
|
33
|
+
monthlyPrice: number;
|
|
34
|
+
|
|
35
|
+
/** Candado optimista: versión que el operador vio al editar. */
|
|
36
|
+
@Expose()
|
|
37
|
+
@IsOptional()
|
|
38
|
+
@IsInt()
|
|
39
|
+
@Min(1)
|
|
40
|
+
expectedVersion?: number;
|
|
41
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export interface MobileTopupConfigResponse {
|
|
2
|
+
moduleName: string;
|
|
3
|
+
benefitId: string;
|
|
4
|
+
leafId: string;
|
|
5
|
+
productId: string;
|
|
6
|
+
monthlyPrice: number;
|
|
7
|
+
currency: 'MXN';
|
|
8
|
+
version: number;
|
|
9
|
+
updatedBy: string;
|
|
10
|
+
updatedAt: number;
|
|
11
|
+
/** Ítems del catálogo `MOBILE_TOPUP` recalculados al guardar. */
|
|
12
|
+
repricedItems?: number;
|
|
13
|
+
/** Ítems omitidos por conflicto de versión. */
|
|
14
|
+
skippedItems?: number;
|
|
15
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { MobileTopupPlanStatusEnum } from '../../enums/MobileTopupPlanStatusEnum';
|
|
2
|
+
import { MobileTopupContributionResponse } from './MobileTopupContributionResponse';
|
|
3
|
+
import { MobileTopupRechargeResponse } from './MobileTopupRechargeResponse';
|
|
4
|
+
|
|
5
|
+
/** Calendario de recargas Bait de un número. */
|
|
6
|
+
export interface MobileTopupPlanResponse {
|
|
7
|
+
phone: string;
|
|
8
|
+
status: MobileTopupPlanStatusEnum;
|
|
9
|
+
promised: number;
|
|
10
|
+
done: number;
|
|
11
|
+
pending: number;
|
|
12
|
+
nextDueAt?: number;
|
|
13
|
+
lastRechargeAt?: number;
|
|
14
|
+
lastFolio?: string;
|
|
15
|
+
failedAttempts: number;
|
|
16
|
+
lastError?: string;
|
|
17
|
+
closedUndelivered?: number;
|
|
18
|
+
closedBy?: string;
|
|
19
|
+
closedAt?: number;
|
|
20
|
+
contributions: MobileTopupContributionResponse[];
|
|
21
|
+
recharges?: MobileTopupRechargeResponse[];
|
|
22
|
+
updatedAt: number;
|
|
23
|
+
}
|
|
@@ -6,4 +6,8 @@ export enum RewardItemCodeEnum {
|
|
|
6
6
|
LIMIT_WAIT_EXPIRED = 'LIMIT_WAIT_EXPIRED',
|
|
7
7
|
/** Resultado desconocido agotado: no se puede asegurar si el abono ocurrió. */
|
|
8
8
|
OUTCOME_UNKNOWN = 'OUTCOME_UNKNOWN',
|
|
9
|
+
/** Bait rechazó la recarga de forma permanente: queda en atención del operador. */
|
|
10
|
+
TOPUP_REJECTED = 'TOPUP_REJECTED',
|
|
11
|
+
/** Un operador dio el ítem por fallido. */
|
|
12
|
+
ITEM_DISMISSED = 'ITEM_DISMISSED',
|
|
9
13
|
}
|
package/src/rewards/index.ts
CHANGED
|
@@ -13,6 +13,8 @@ export * from './enums/RewardsErrorCodeEnum';
|
|
|
13
13
|
export * from './enums/DeliveryDimensionEnum';
|
|
14
14
|
export * from './enums/DeliveryTopDimensionEnum';
|
|
15
15
|
export * from './enums/DeliveryTopByEnum';
|
|
16
|
+
export * from './enums/MobileTopupPlanStatusEnum';
|
|
17
|
+
export * from './enums/MobileTopupRechargeStatusEnum';
|
|
16
18
|
|
|
17
19
|
//Types
|
|
18
20
|
export * from './types/RewardInputs';
|
|
@@ -73,3 +75,9 @@ export * from './dtos/backoffice/DeliveryMetricsQuery';
|
|
|
73
75
|
export * from './dtos/backoffice/DeliveryTopQuery';
|
|
74
76
|
export * from './dtos/backoffice/DeliveryMetricsPoint';
|
|
75
77
|
export * from './dtos/backoffice/DeliveryTopEntry';
|
|
78
|
+
export * from './dtos/backoffice/MobileTopupConfigRequest';
|
|
79
|
+
export * from './dtos/backoffice/MobileTopupConfigResponse';
|
|
80
|
+
export * from './dtos/backoffice/MobileTopupContributionResponse';
|
|
81
|
+
export * from './dtos/backoffice/MobileTopupRechargeResponse';
|
|
82
|
+
export * from './dtos/backoffice/MobileTopupPlanResponse';
|
|
83
|
+
export * from './dtos/backoffice/MobileTopupPlanListResponse';
|
|
@@ -173,9 +173,12 @@ export class TransactionCreateRequest {
|
|
|
173
173
|
@IsOptional()
|
|
174
174
|
executionId?: string;
|
|
175
175
|
|
|
176
|
-
/**
|
|
176
|
+
/**
|
|
177
|
+
* Centro de costo contable de la transacción; con él se reparte el ledger entre dueños y
|
|
178
|
+
* conciliaciones. Si no llega, el ledger escribe `UNASSIGNED_COST_CENTER_ID`.
|
|
179
|
+
*/
|
|
177
180
|
@IsString()
|
|
178
181
|
@IsNotEmpty()
|
|
179
182
|
@IsOptional()
|
|
180
|
-
|
|
183
|
+
costCenterId?: string;
|
|
181
184
|
}
|
package/src/transaction/index.ts
CHANGED
|
@@ -40,6 +40,9 @@ export * from './dtos/internal/ProviderTransactionCompletionRequest';
|
|
|
40
40
|
export * from './dtos/internal/ProviderTransactionCompletionResponse';
|
|
41
41
|
|
|
42
42
|
|
|
43
|
+
//constants
|
|
44
|
+
export * from './constants/costCenter';
|
|
45
|
+
|
|
43
46
|
//enums
|
|
44
47
|
export * from './enums/OperationEnum';
|
|
45
48
|
export * from './enums/TransactionSourceEnum';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IsNotEmpty, IsNumber, IsPositive, IsString, MaxLength } from "class-validator";
|
|
1
|
+
import { IsNotEmpty, IsNumber, IsOptional, IsPositive, IsString, MaxLength } from "class-validator";
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Acreditación de un bono a la wallet PagoConfiado de una persona.
|
|
@@ -31,6 +31,12 @@ export class AuthorizeBonusRequest {
|
|
|
31
31
|
@IsString()
|
|
32
32
|
@MaxLength(120)
|
|
33
33
|
concept: string;
|
|
34
|
+
|
|
35
|
+
/** Centro de costo del bono en el ledger; ausente, el processor escribe `UNASSIGNED`. */
|
|
36
|
+
@IsOptional()
|
|
37
|
+
@IsString()
|
|
38
|
+
@IsNotEmpty()
|
|
39
|
+
costCenterId?: string;
|
|
34
40
|
}
|
|
35
41
|
|
|
36
42
|
export default AuthorizeBonusRequest;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { IsNotEmpty, IsNumber, IsPositive, IsString, Matches, MaxLength } from 'class-validator';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Pago de una recarga Bait de recompensa (`MEX_REWARD_TOPUP`). No toca ninguna wallet.
|
|
5
|
+
*
|
|
6
|
+
* `idempotencyKey` ≤ 60: el folio del proveedor admite 64 y se reservan 4 caracteres para el
|
|
7
|
+
* sufijo `-{k}` del folio por intento.
|
|
8
|
+
*/
|
|
9
|
+
export class AuthorizeRewardTopupRequest {
|
|
10
|
+
@IsString()
|
|
11
|
+
@IsNotEmpty()
|
|
12
|
+
@MaxLength(60)
|
|
13
|
+
@Matches(/^[^#]+$/)
|
|
14
|
+
idempotencyKey: string;
|
|
15
|
+
|
|
16
|
+
/** Titular beneficiario de la recompensa. */
|
|
17
|
+
@IsString()
|
|
18
|
+
@IsNotEmpty()
|
|
19
|
+
directoryId: string;
|
|
20
|
+
|
|
21
|
+
/** Celular MX normalizado a 10 dígitos. */
|
|
22
|
+
@IsString()
|
|
23
|
+
@Matches(/^[0-9]{10}$/)
|
|
24
|
+
phone: string;
|
|
25
|
+
|
|
26
|
+
@IsString() @IsNotEmpty() @MaxLength(64) moduleName: string;
|
|
27
|
+
|
|
28
|
+
@IsString() @IsNotEmpty() @MaxLength(64) benefitId: string;
|
|
29
|
+
|
|
30
|
+
@IsString() @IsNotEmpty() @MaxLength(256) leafId: string;
|
|
31
|
+
|
|
32
|
+
@IsString() @IsNotEmpty() @MaxLength(64) productId: string;
|
|
33
|
+
|
|
34
|
+
/** En PESOS, no centavos. */
|
|
35
|
+
@IsNumber({ maxDecimalPlaces: 2 })
|
|
36
|
+
@IsPositive()
|
|
37
|
+
amount: number;
|
|
38
|
+
|
|
39
|
+
@IsString()
|
|
40
|
+
@MaxLength(120)
|
|
41
|
+
concept: string;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export default AuthorizeRewardTopupRequest;
|
|
@@ -20,4 +20,12 @@ export enum TransactionProcessorCodesEnum {
|
|
|
20
20
|
PROVIDER_NOT_FOUND = "PROVIDER_NOT_FOUND",
|
|
21
21
|
/** El request no cumple el contrato del DTO. Nada tocó saldo. */
|
|
22
22
|
INVALID_REQUEST = "INVALID_REQUEST",
|
|
23
|
+
/** Recarga de recompensa: el proveedor la rechazó de forma permanente (o se agotaron los intentos de folio). */
|
|
24
|
+
REWARD_TOPUP_PROVIDER_REJECTED = "REWARD_TOPUP_PROVIDER_REJECTED",
|
|
25
|
+
/** Recarga de recompensa: rechazo transitorio del proveedor; reintentable con la misma llave. */
|
|
26
|
+
REWARD_TOPUP_UNAVAILABLE = "REWARD_TOPUP_UNAVAILABLE",
|
|
27
|
+
/** Recarga de recompensa: resultado desconocido (timeout/PENDING); no se repaga. */
|
|
28
|
+
REWARD_TOPUP_OUTCOME_UNKNOWN = "REWARD_TOPUP_OUTCOME_UNKNOWN",
|
|
29
|
+
/** Recarga de recompensa: la llave de idempotencia sigue en vuelo. */
|
|
30
|
+
REWARD_TOPUP_IN_FLIGHT = "REWARD_TOPUP_IN_FLIGHT",
|
|
23
31
|
}
|
|
@@ -11,6 +11,7 @@ export * from './dtos/AuthorizeSpeiBankTransferNcRequest';
|
|
|
11
11
|
export * from './dtos/AuthorizeCollectorTransactionRequest';
|
|
12
12
|
export * from './dtos/AuthorizeDisputeTransactionRequest';
|
|
13
13
|
export * from './dtos/AuthorizeBonusRequest';
|
|
14
|
+
export * from './dtos/AuthorizeRewardTopupRequest';
|
|
14
15
|
export * from './dtos/CardInfo';
|
|
15
16
|
export * from './dtos/InstallmentsInfo';
|
|
16
17
|
export * from './dtos/MerchantInfo';
|