@fiado/type-kit 3.183.0 → 3.185.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.
Files changed (99) hide show
  1. package/_test_/unit/retailOrg/dtos/RetailUser.test.ts +30 -0
  2. package/_test_/unit/retailOrg/dtos/Retailer.test.ts +1 -1
  3. package/_test_/unit/retailOrg/dtos/Store.test.ts +2 -2
  4. package/_test_/unit/retailOrg/dtos/requests/retailUserRequests.test.ts +34 -0
  5. package/_test_/unit/retailOrg/dtos/requests/retailerRequests.test.ts +9 -9
  6. package/_test_/unit/retailOrg/dtos/requests/storeRequests.test.ts +2 -2
  7. package/_test_/unit/retailOrg/dtos/responses/RetailerHierarchyResponse.test.ts +1 -1
  8. package/_test_/unit/retailOrg/dtos/validation/validationDtos.test.ts +2 -2
  9. package/_test_/unit/retailOrg/enums/CollectorSeniorityEnum.test.ts +12 -0
  10. package/_test_/unit/retailOrg/enums/RetailerTypeEnum.test.ts +5 -5
  11. package/bin/benefitCenter/enums/BenefitFlowEnum.d.ts +11 -0
  12. package/bin/benefitCenter/enums/BenefitFlowEnum.js +15 -0
  13. package/bin/cognitoBackofficeConnector/dtos/MfaPoolConfig.d.ts +7 -0
  14. package/bin/cognitoBackofficeConnector/dtos/MfaPoolConfig.js +36 -0
  15. package/bin/cognitoBackofficeConnector/dtos/PoolConfigResponse.d.ts +20 -0
  16. package/bin/cognitoBackofficeConnector/dtos/PoolConfigResponse.js +11 -0
  17. package/bin/cognitoBackofficeConnector/dtos/PoolsListResponse.d.ts +4 -0
  18. package/bin/cognitoBackofficeConnector/dtos/PoolsListResponse.js +6 -0
  19. package/bin/cognitoBackofficeConnector/validators/MfaTypesRequiresOne.d.ts +17 -0
  20. package/bin/cognitoBackofficeConnector/validators/MfaTypesRequiresOne.js +39 -0
  21. package/bin/index.d.ts +1 -0
  22. package/bin/index.js +3 -1
  23. package/bin/loanConfig/dtos/Parameter.d.ts +23 -0
  24. package/bin/loanConfig/dtos/Parameter.js +93 -0
  25. package/bin/loanConfig/dtos/requests/BulkGetParametersRequest.d.ts +9 -0
  26. package/bin/loanConfig/dtos/requests/BulkGetParametersRequest.js +40 -0
  27. package/bin/loanConfig/dtos/requests/BulkUpdateParametersRequest.d.ts +11 -0
  28. package/bin/loanConfig/dtos/requests/BulkUpdateParametersRequest.js +52 -0
  29. package/bin/loanConfig/dtos/requests/UpdateParameterRequest.d.ts +8 -0
  30. package/bin/loanConfig/dtos/requests/UpdateParameterRequest.js +33 -0
  31. package/bin/loanConfig/dtos/responses/ParameterResponse.d.ts +28 -0
  32. package/bin/loanConfig/dtos/responses/ParameterResponse.js +2 -0
  33. package/bin/loanConfig/enums/ModifiableByRoleEnum.d.ts +11 -0
  34. package/bin/loanConfig/enums/ModifiableByRoleEnum.js +15 -0
  35. package/bin/loanConfig/enums/ParameterTypeEnum.d.ts +20 -0
  36. package/bin/loanConfig/enums/ParameterTypeEnum.js +24 -0
  37. package/bin/loanConfig/enums/ParameterValueTypeEnum.d.ts +11 -0
  38. package/bin/loanConfig/enums/ParameterValueTypeEnum.js +15 -0
  39. package/bin/loanConfig/index.d.ts +8 -0
  40. package/bin/loanConfig/index.js +27 -0
  41. package/bin/places/dtos/CashInFeeDto.d.ts +17 -0
  42. package/bin/places/dtos/CashInFeeDto.js +12 -0
  43. package/bin/rbac/enums/PoolKind.d.ts +16 -0
  44. package/bin/rbac/enums/PoolKind.js +20 -0
  45. package/bin/rbac/index.d.ts +1 -0
  46. package/bin/rbac/index.js +17 -0
  47. package/bin/retailOrg/dtos/RetailUser.d.ts +7 -0
  48. package/bin/retailOrg/dtos/RetailUser.js +20 -0
  49. package/bin/retailOrg/dtos/Store.d.ts +6 -2
  50. package/bin/retailOrg/dtos/Store.js +1 -1
  51. package/bin/retailOrg/dtos/requests/CreateRetailUserRequest.d.ts +7 -0
  52. package/bin/retailOrg/dtos/requests/CreateRetailUserRequest.js +20 -0
  53. package/bin/retailOrg/dtos/requests/CreateStoreRequest.d.ts +6 -2
  54. package/bin/retailOrg/dtos/requests/CreateStoreRequest.js +1 -1
  55. package/bin/retailOrg/dtos/requests/CreateSubdistributorRequest.d.ts +3 -3
  56. package/bin/retailOrg/dtos/requests/CreateSubdistributorRequest.js +3 -3
  57. package/bin/retailOrg/dtos/requests/UpdateRetailUserRequest.d.ts +7 -0
  58. package/bin/retailOrg/dtos/requests/UpdateRetailUserRequest.js +20 -0
  59. package/bin/retailOrg/dtos/requests/UpdateStoreRequest.d.ts +2 -1
  60. package/bin/retailOrg/dtos/requests/UpdateStoreRequest.js +1 -1
  61. package/bin/retailOrg/enums/CollectorSeniorityEnum.d.ts +12 -0
  62. package/bin/retailOrg/enums/CollectorSeniorityEnum.js +16 -0
  63. package/bin/retailOrg/enums/RetailerTypeEnum.d.ts +6 -6
  64. package/bin/retailOrg/enums/RetailerTypeEnum.js +6 -6
  65. package/bin/retailOrg/index.d.ts +1 -0
  66. package/bin/retailOrg/index.js +1 -0
  67. package/bin/walletFunding/dtos/CancelFundingReferenceRequest.d.ts +5 -0
  68. package/bin/walletFunding/dtos/CancelFundingReferenceRequest.js +31 -0
  69. package/bin/walletFunding/dtos/CancelFundingReferenceResponse.d.ts +7 -0
  70. package/bin/walletFunding/dtos/CancelFundingReferenceResponse.js +6 -0
  71. package/bin/walletFunding/dtos/CancelFundingRequest.d.ts +11 -0
  72. package/bin/walletFunding/dtos/CancelFundingRequest.js +33 -0
  73. package/bin/walletFunding/dtos/CancelFundingResponse.d.ts +14 -0
  74. package/bin/walletFunding/dtos/CancelFundingResponse.js +12 -0
  75. package/bin/walletFunding/dtos/CancelWalletFundingRequest.d.ts +3 -0
  76. package/bin/walletFunding/dtos/CancelWalletFundingRequest.js +21 -0
  77. package/bin/walletFunding/dtos/CancelWalletFundingResponse.d.ts +7 -0
  78. package/bin/walletFunding/dtos/CancelWalletFundingResponse.js +6 -0
  79. package/package.json +1 -1
  80. package/src/index.ts +2 -0
  81. package/src/loanConfig/dtos/Parameter.ts +68 -0
  82. package/src/loanConfig/dtos/requests/BulkGetParametersRequest.ts +23 -0
  83. package/src/loanConfig/dtos/requests/BulkUpdateParametersRequest.ts +33 -0
  84. package/src/loanConfig/dtos/requests/UpdateParameterRequest.ts +18 -0
  85. package/src/loanConfig/dtos/responses/ParameterResponse.ts +28 -0
  86. package/src/loanConfig/enums/ModifiableByRoleEnum.ts +11 -0
  87. package/src/loanConfig/enums/ParameterTypeEnum.ts +20 -0
  88. package/src/loanConfig/enums/ParameterValueTypeEnum.ts +11 -0
  89. package/src/loanConfig/index.ts +14 -0
  90. package/src/retailOrg/dtos/RetailUser.ts +21 -1
  91. package/src/retailOrg/dtos/Store.ts +6 -2
  92. package/src/retailOrg/dtos/requests/CreateRetailUserRequest.ts +21 -1
  93. package/src/retailOrg/dtos/requests/CreateStoreRequest.ts +6 -2
  94. package/src/retailOrg/dtos/requests/CreateSubdistributorRequest.ts +4 -4
  95. package/src/retailOrg/dtos/requests/UpdateRetailUserRequest.ts +21 -1
  96. package/src/retailOrg/dtos/requests/UpdateStoreRequest.ts +2 -1
  97. package/src/retailOrg/enums/CollectorSeniorityEnum.ts +12 -0
  98. package/src/retailOrg/enums/RetailerTypeEnum.ts +6 -6
  99. package/src/retailOrg/index.ts +1 -0
@@ -12,6 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.UpdateRetailUserRequest = void 0;
13
13
  const class_transformer_1 = require("class-transformer");
14
14
  const class_validator_1 = require("class-validator");
15
+ const CollectorSeniorityEnum_1 = require("../../enums/CollectorSeniorityEnum");
15
16
  const EmploymentTypeEnum_1 = require("../../enums/EmploymentTypeEnum");
16
17
  /**
17
18
  * Body de PUT /users/:retailUserId — edición de usuario retail (campos editables opcionales).
@@ -39,3 +40,22 @@ __decorate([
39
40
  (0, class_validator_1.IsString)(),
40
41
  __metadata("design:type", String)
41
42
  ], UpdateRetailUserRequest.prototype, "zoneId", void 0);
43
+ __decorate([
44
+ (0, class_transformer_1.Expose)(),
45
+ (0, class_validator_1.IsOptional)(),
46
+ (0, class_validator_1.IsString)(),
47
+ __metadata("design:type", String)
48
+ ], UpdateRetailUserRequest.prototype, "phone", void 0);
49
+ __decorate([
50
+ (0, class_transformer_1.Expose)(),
51
+ (0, class_validator_1.IsOptional)(),
52
+ (0, class_validator_1.IsEnum)(CollectorSeniorityEnum_1.CollectorSeniorityEnum),
53
+ __metadata("design:type", String)
54
+ ], UpdateRetailUserRequest.prototype, "collectorSeniority", void 0);
55
+ __decorate([
56
+ (0, class_transformer_1.Expose)(),
57
+ (0, class_validator_1.IsOptional)(),
58
+ (0, class_validator_1.IsArray)(),
59
+ (0, class_validator_1.IsString)({ each: true }),
60
+ __metadata("design:type", Array)
61
+ ], UpdateRetailUserRequest.prototype, "coverageStoreIds", void 0);
@@ -14,5 +14,6 @@ export declare class UpdateStoreRequest {
14
14
  phone?: string;
15
15
  managerRetailUserId?: string | null;
16
16
  schedule?: string | null;
17
- dailyAvgSalesCents?: number | null;
17
+ /** Conteo promedio de transacciones de cobro por día (NO es un monto de dinero). */
18
+ dailyAvgCollectionsCount?: number | null;
18
19
  }
@@ -78,4 +78,4 @@ __decorate([
78
78
  (0, class_validator_1.IsOptional)(),
79
79
  (0, class_validator_1.IsNumber)(),
80
80
  __metadata("design:type", Number)
81
- ], UpdateStoreRequest.prototype, "dailyAvgSalesCents", void 0);
81
+ ], UpdateStoreRequest.prototype, "dailyAvgCollectionsCount", void 0);
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Antigüedad / seniority de un cobrador retail en SureKeep.
3
+ * Solo aplica a usuarios retail que cumplen rol de cobrador.
4
+ * @enum {string}
5
+ *
6
+ * @property {string} JUNIOR - Cobrador de menor antigüedad / experiencia.
7
+ * @property {string} SENIOR - Cobrador de mayor antigüedad / experiencia.
8
+ */
9
+ export declare enum CollectorSeniorityEnum {
10
+ JUNIOR = "JUNIOR",
11
+ SENIOR = "SENIOR"
12
+ }
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CollectorSeniorityEnum = void 0;
4
+ /**
5
+ * Antigüedad / seniority de un cobrador retail en SureKeep.
6
+ * Solo aplica a usuarios retail que cumplen rol de cobrador.
7
+ * @enum {string}
8
+ *
9
+ * @property {string} JUNIOR - Cobrador de menor antigüedad / experiencia.
10
+ * @property {string} SENIOR - Cobrador de mayor antigüedad / experiencia.
11
+ */
12
+ var CollectorSeniorityEnum;
13
+ (function (CollectorSeniorityEnum) {
14
+ CollectorSeniorityEnum["JUNIOR"] = "JUNIOR";
15
+ CollectorSeniorityEnum["SENIOR"] = "SENIOR";
16
+ })(CollectorSeniorityEnum || (exports.CollectorSeniorityEnum = CollectorSeniorityEnum = {}));
@@ -2,12 +2,12 @@
2
2
  * Tipo de retailer en la organización comercial de SureKeep.
3
3
  * @enum {string}
4
4
  *
5
- * @property {string} CADENA - Cadena comercial con múltiples tiendas propias.
6
- * @property {string} SUBDISTRIBUIDOR - Subdistribuidor que opera bajo un distribuidor mayor.
7
- * @property {string} FRANQUICIA - Franquicia operada por un tercero bajo la marca.
5
+ * @property {string} CHAIN - Cadena comercial con múltiples tiendas propias.
6
+ * @property {string} SUBDISTRIBUTOR - Subdistribuidor que opera bajo un distribuidor mayor.
7
+ * @property {string} FRANCHISE - Franquicia operada por un tercero bajo la marca.
8
8
  */
9
9
  export declare enum RetailerTypeEnum {
10
- CADENA = "CADENA",
11
- SUBDISTRIBUIDOR = "SUBDISTRIBUIDOR",
12
- FRANQUICIA = "FRANQUICIA"
10
+ CHAIN = "CHAIN",
11
+ SUBDISTRIBUTOR = "SUBDISTRIBUTOR",
12
+ FRANCHISE = "FRANCHISE"
13
13
  }
@@ -5,13 +5,13 @@ exports.RetailerTypeEnum = void 0;
5
5
  * Tipo de retailer en la organización comercial de SureKeep.
6
6
  * @enum {string}
7
7
  *
8
- * @property {string} CADENA - Cadena comercial con múltiples tiendas propias.
9
- * @property {string} SUBDISTRIBUIDOR - Subdistribuidor que opera bajo un distribuidor mayor.
10
- * @property {string} FRANQUICIA - Franquicia operada por un tercero bajo la marca.
8
+ * @property {string} CHAIN - Cadena comercial con múltiples tiendas propias.
9
+ * @property {string} SUBDISTRIBUTOR - Subdistribuidor que opera bajo un distribuidor mayor.
10
+ * @property {string} FRANCHISE - Franquicia operada por un tercero bajo la marca.
11
11
  */
12
12
  var RetailerTypeEnum;
13
13
  (function (RetailerTypeEnum) {
14
- RetailerTypeEnum["CADENA"] = "CADENA";
15
- RetailerTypeEnum["SUBDISTRIBUIDOR"] = "SUBDISTRIBUIDOR";
16
- RetailerTypeEnum["FRANQUICIA"] = "FRANQUICIA";
14
+ RetailerTypeEnum["CHAIN"] = "CHAIN";
15
+ RetailerTypeEnum["SUBDISTRIBUTOR"] = "SUBDISTRIBUTOR";
16
+ RetailerTypeEnum["FRANCHISE"] = "FRANCHISE";
17
17
  })(RetailerTypeEnum || (exports.RetailerTypeEnum = RetailerTypeEnum = {}));
@@ -4,6 +4,7 @@ export * from './enums/ZoneStatusEnum';
4
4
  export * from './enums/StoreStatusEnum';
5
5
  export * from './enums/RetailUserStatusEnum';
6
6
  export * from './enums/EmploymentTypeEnum';
7
+ export * from './enums/CollectorSeniorityEnum';
7
8
  export * from './dtos/GeoLocation';
8
9
  export * from './dtos/Retailer';
9
10
  export * from './dtos/Zone';
@@ -20,6 +20,7 @@ __exportStar(require("./enums/ZoneStatusEnum"), exports);
20
20
  __exportStar(require("./enums/StoreStatusEnum"), exports);
21
21
  __exportStar(require("./enums/RetailUserStatusEnum"), exports);
22
22
  __exportStar(require("./enums/EmploymentTypeEnum"), exports);
23
+ __exportStar(require("./enums/CollectorSeniorityEnum"), exports);
23
24
  // Entity DTOs
24
25
  __exportStar(require("./dtos/GeoLocation"), exports);
25
26
  __exportStar(require("./dtos/Retailer"), exports);
@@ -0,0 +1,5 @@
1
+ export declare class CancelFundingReferenceRequest {
2
+ fundingId: string;
3
+ directoryId: string;
4
+ idempotencyKey: string;
5
+ }
@@ -0,0 +1,31 @@
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.CancelFundingReferenceRequest = void 0;
13
+ const class_validator_1 = require("class-validator");
14
+ class CancelFundingReferenceRequest {
15
+ }
16
+ exports.CancelFundingReferenceRequest = CancelFundingReferenceRequest;
17
+ __decorate([
18
+ (0, class_validator_1.IsString)(),
19
+ (0, class_validator_1.MaxLength)(64),
20
+ __metadata("design:type", String)
21
+ ], CancelFundingReferenceRequest.prototype, "fundingId", void 0);
22
+ __decorate([
23
+ (0, class_validator_1.IsString)(),
24
+ (0, class_validator_1.MaxLength)(64),
25
+ __metadata("design:type", String)
26
+ ], CancelFundingReferenceRequest.prototype, "directoryId", void 0);
27
+ __decorate([
28
+ (0, class_validator_1.IsString)(),
29
+ (0, class_validator_1.MaxLength)(64),
30
+ __metadata("design:type", String)
31
+ ], CancelFundingReferenceRequest.prototype, "idempotencyKey", void 0);
@@ -0,0 +1,7 @@
1
+ import { BenefitPaymentStatusEnum } from "../../benefitCenter/enums/BenefitPaymentStatusEnum";
2
+ import { WalletFundingErrorCodeEnum } from "../enums/WalletFundingErrorCodeEnum";
3
+ export declare class CancelFundingReferenceResponse {
4
+ fundingId: string;
5
+ status: BenefitPaymentStatusEnum;
6
+ errorCode?: WalletFundingErrorCodeEnum;
7
+ }
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CancelFundingReferenceResponse = void 0;
4
+ class CancelFundingReferenceResponse {
5
+ }
6
+ exports.CancelFundingReferenceResponse = CancelFundingReferenceResponse;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Request del cancel via Centro de Beneficios (spec 13 v2.0).
3
+ * `fundingId` viaja en el path, `directoryId` se resuelve del JWT.
4
+ * `providerModuleName` permite al marketplace rutear al publisher correcto
5
+ * sin tener que persistir el mapping (el wallet-app sabe el moduleName
6
+ * porque vino en la respuesta del authorize).
7
+ */
8
+ export declare class CancelFundingRequest {
9
+ idempotencyKey: string;
10
+ providerModuleName: string;
11
+ }
@@ -0,0 +1,33 @@
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.CancelFundingRequest = void 0;
13
+ const class_validator_1 = require("class-validator");
14
+ /**
15
+ * Request del cancel via Centro de Beneficios (spec 13 v2.0).
16
+ * `fundingId` viaja en el path, `directoryId` se resuelve del JWT.
17
+ * `providerModuleName` permite al marketplace rutear al publisher correcto
18
+ * sin tener que persistir el mapping (el wallet-app sabe el moduleName
19
+ * porque vino en la respuesta del authorize).
20
+ */
21
+ class CancelFundingRequest {
22
+ }
23
+ exports.CancelFundingRequest = CancelFundingRequest;
24
+ __decorate([
25
+ (0, class_validator_1.IsString)(),
26
+ (0, class_validator_1.MaxLength)(64),
27
+ __metadata("design:type", String)
28
+ ], CancelFundingRequest.prototype, "idempotencyKey", void 0);
29
+ __decorate([
30
+ (0, class_validator_1.IsString)(),
31
+ (0, class_validator_1.MaxLength)(128),
32
+ __metadata("design:type", String)
33
+ ], CancelFundingRequest.prototype, "providerModuleName", void 0);
@@ -0,0 +1,14 @@
1
+ import { BenefitPaymentStatusEnum } from "../../benefitCenter/enums/BenefitPaymentStatusEnum";
2
+ import { WalletFundingErrorCodeEnum } from "../enums/WalletFundingErrorCodeEnum";
3
+ /**
4
+ * Response del cancel via Centro de Beneficios (spec 13 v2.0).
5
+ * `status` reusa `BenefitPaymentStatusEnum` (APPROVED = cancel aceptado;
6
+ * REJECTED = no se pudo) para consistencia con `CancelFundingReferenceResponse`
7
+ * (marketplace ↔ connector). Idempotente: re-cancelar devuelve APPROVED.
8
+ */
9
+ export declare class CancelFundingResponse {
10
+ fundingId: string;
11
+ status: BenefitPaymentStatusEnum;
12
+ errorCode?: WalletFundingErrorCodeEnum;
13
+ message?: string;
14
+ }
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CancelFundingResponse = void 0;
4
+ /**
5
+ * Response del cancel via Centro de Beneficios (spec 13 v2.0).
6
+ * `status` reusa `BenefitPaymentStatusEnum` (APPROVED = cancel aceptado;
7
+ * REJECTED = no se pudo) para consistencia con `CancelFundingReferenceResponse`
8
+ * (marketplace ↔ connector). Idempotente: re-cancelar devuelve APPROVED.
9
+ */
10
+ class CancelFundingResponse {
11
+ }
12
+ exports.CancelFundingResponse = CancelFundingResponse;
@@ -0,0 +1,3 @@
1
+ export declare class CancelWalletFundingRequest {
2
+ idempotencyKey: string;
3
+ }
@@ -0,0 +1,21 @@
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.CancelWalletFundingRequest = void 0;
13
+ const class_validator_1 = require("class-validator");
14
+ class CancelWalletFundingRequest {
15
+ }
16
+ exports.CancelWalletFundingRequest = CancelWalletFundingRequest;
17
+ __decorate([
18
+ (0, class_validator_1.IsString)(),
19
+ (0, class_validator_1.MaxLength)(64),
20
+ __metadata("design:type", String)
21
+ ], CancelWalletFundingRequest.prototype, "idempotencyKey", void 0);
@@ -0,0 +1,7 @@
1
+ import { BenefitPaymentStatusEnum } from "../../benefitCenter/enums/BenefitPaymentStatusEnum";
2
+ import { WalletFundingErrorCodeEnum } from "../enums/WalletFundingErrorCodeEnum";
3
+ export declare class CancelWalletFundingResponse {
4
+ status: BenefitPaymentStatusEnum;
5
+ errorCode?: WalletFundingErrorCodeEnum;
6
+ fundingId?: string;
7
+ }
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CancelWalletFundingResponse = void 0;
4
+ class CancelWalletFundingResponse {
5
+ }
6
+ exports.CancelWalletFundingResponse = CancelWalletFundingResponse;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fiado/type-kit",
3
- "version": "3.183.0",
3
+ "version": "3.185.0",
4
4
  "description": "",
5
5
  "main": "bin/index.js",
6
6
  "types": "bin/index.d.ts",
package/src/index.ts CHANGED
@@ -103,5 +103,7 @@ export * as EmailVerification from './emailVerification';
103
103
  // RetailOrg: DTOs/enums del lambda retail-org-business (SureKeep Fase 1 — pista Retail).
104
104
  // Dominio de retailers → zonas → tiendas → usuarios retail.
105
105
  export * as RetailOrg from './retailOrg';
106
+ // LoanConfig: DTOs/enums del lambda loan-config-business (comp 09 — parámetros operativos del SOFOM).
107
+ export * as LoanConfig from './loanConfig';
106
108
  export * from './messaging';
107
109
  export * from './complaint';
@@ -0,0 +1,68 @@
1
+ import { Expose } from 'class-transformer';
2
+ import { IsEnum, IsOptional, IsString, Matches } from 'class-validator';
3
+ import { regexIso8601 } from '../../helpers/constans/regex';
4
+ import { ModifiableByRoleEnum } from '../enums/ModifiableByRoleEnum';
5
+ import { ParameterTypeEnum } from '../enums/ParameterTypeEnum';
6
+ import { ParameterValueTypeEnum } from '../enums/ParameterValueTypeEnum';
7
+
8
+ /**
9
+ * Parameter — parámetro operativo clave/valor del SOFOM (M6 §8 + §5).
10
+ * Identidad lógica `parameterId = ${paramType}#${key}` (D1). `value` null → aplica `defaultValue`.
11
+ */
12
+ export class Parameter {
13
+ @Expose()
14
+ @IsString()
15
+ parameterId!: string;
16
+
17
+ @Expose()
18
+ @IsEnum(ParameterTypeEnum)
19
+ paramType!: ParameterTypeEnum;
20
+
21
+ @Expose()
22
+ @IsString()
23
+ key!: string;
24
+
25
+ /** Siempre string; `null` cuando el valor está pendiente de definición por negocio. */
26
+ @Expose()
27
+ @IsOptional()
28
+ @IsString()
29
+ value!: string | null;
30
+
31
+ @Expose()
32
+ @IsEnum(ParameterValueTypeEnum)
33
+ valueType!: ParameterValueTypeEnum;
34
+
35
+ @Expose()
36
+ @IsString()
37
+ defaultValue!: string;
38
+
39
+ @Expose()
40
+ @IsString()
41
+ description!: string;
42
+
43
+ @Expose()
44
+ @IsEnum(ModifiableByRoleEnum)
45
+ modifiableBy!: ModifiableByRoleEnum;
46
+
47
+ @Expose()
48
+ @IsString()
49
+ lastModifiedByUserId!: string;
50
+
51
+ @Expose()
52
+ @IsString()
53
+ createdBy!: string;
54
+
55
+ @Expose()
56
+ @IsString()
57
+ updatedBy!: string;
58
+
59
+ @Expose()
60
+ @IsString()
61
+ @Matches(regexIso8601, { message: 'createdAt debe ser una fecha ISO 8601' })
62
+ createdAt!: string;
63
+
64
+ @Expose()
65
+ @IsString()
66
+ @Matches(regexIso8601, { message: 'updatedAt debe ser una fecha ISO 8601' })
67
+ updatedAt!: string;
68
+ }
@@ -0,0 +1,23 @@
1
+ import { Expose, Type } from 'class-transformer';
2
+ import { ArrayNotEmpty, IsArray, IsEnum, IsString, ValidateNested } from 'class-validator';
3
+ import { ParameterTypeEnum } from '../../enums/ParameterTypeEnum';
4
+
5
+ export class ParameterKeyRef {
6
+ @Expose()
7
+ @IsEnum(ParameterTypeEnum)
8
+ paramType!: ParameterTypeEnum;
9
+
10
+ @Expose()
11
+ @IsString()
12
+ key!: string;
13
+ }
14
+
15
+ /** Body de POST /private/parameters/bulk-get — hot path para consumers (cachean 5 min). */
16
+ export class BulkGetParametersRequest {
17
+ @Expose()
18
+ @IsArray()
19
+ @ArrayNotEmpty()
20
+ @ValidateNested({ each: true })
21
+ @Type(() => ParameterKeyRef)
22
+ items!: ParameterKeyRef[];
23
+ }
@@ -0,0 +1,33 @@
1
+ import { Expose, Type } from 'class-transformer';
2
+ import { ArrayNotEmpty, IsArray, IsEnum, IsOptional, IsString, ValidateNested } from 'class-validator';
3
+ import { ParameterTypeEnum } from '../../enums/ParameterTypeEnum';
4
+
5
+ export class BulkUpdateParameterItem {
6
+ @Expose()
7
+ @IsEnum(ParameterTypeEnum)
8
+ paramType!: ParameterTypeEnum;
9
+
10
+ @Expose()
11
+ @IsString()
12
+ key!: string;
13
+
14
+ @Expose()
15
+ @IsOptional()
16
+ @IsString()
17
+ value!: string | null;
18
+
19
+ @Expose()
20
+ @IsOptional()
21
+ @IsString()
22
+ reason?: string;
23
+ }
24
+
25
+ /** Body de POST /parameters/bulk-update — carga inicial / ajuste masivo. */
26
+ export class BulkUpdateParametersRequest {
27
+ @Expose()
28
+ @IsArray()
29
+ @ArrayNotEmpty()
30
+ @ValidateNested({ each: true })
31
+ @Type(() => BulkUpdateParameterItem)
32
+ parameters!: BulkUpdateParameterItem[];
33
+ }
@@ -0,0 +1,18 @@
1
+ import { Expose } from 'class-transformer';
2
+ import { IsOptional, IsString } from 'class-validator';
3
+
4
+ /**
5
+ * Body de PUT /parameters/:paramType/:key. `value` puede ser null (parámetro pendiente).
6
+ * `reason` opcional en F1; el manager lo exigirá para cambios críticos (modelo-datos §10).
7
+ */
8
+ export class UpdateParameterRequest {
9
+ @Expose()
10
+ @IsOptional()
11
+ @IsString()
12
+ value!: string | null;
13
+
14
+ @Expose()
15
+ @IsOptional()
16
+ @IsString()
17
+ reason?: string;
18
+ }
@@ -0,0 +1,28 @@
1
+ import { ModifiableByRoleEnum } from '../../enums/ModifiableByRoleEnum';
2
+ import { ParameterTypeEnum } from '../../enums/ParameterTypeEnum';
3
+ import { ParameterValueTypeEnum } from '../../enums/ParameterValueTypeEnum';
4
+
5
+ /** Shape de salida de un parámetro. `effectiveValue` = value ?? defaultValue. */
6
+ export interface ParameterResponse {
7
+ parameterId: string;
8
+ paramType: ParameterTypeEnum;
9
+ key: string;
10
+ value: string | null;
11
+ effectiveValue: string;
12
+ valueType: ParameterValueTypeEnum;
13
+ defaultValue: string;
14
+ description: string;
15
+ modifiableBy: ModifiableByRoleEnum;
16
+ lastModifiedByUserId: string;
17
+ createdAt: string;
18
+ updatedAt: string;
19
+ }
20
+
21
+ /** Respuesta de GET /parameters — agrupado por paramType (flow 08.1). */
22
+ export type ParametersByTypeResponse = Partial<Record<ParameterTypeEnum, ParameterResponse[]>>;
23
+
24
+ /** Respuesta de POST /private/parameters/bulk-get. */
25
+ export interface BulkGetParametersResponse {
26
+ parameters: ParameterResponse[];
27
+ notFound: { paramType: ParameterTypeEnum; key: string }[];
28
+ }
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Rol RBAC mínimo que puede modificar un parámetro (RBAC a nivel de parámetro, modelo-datos §8).
3
+ * `retailer_admin` = "Admin VentasLuga" de M6 §8. Valores = identificadores de rol de RBAC F0.
4
+ * TD-004: confirmar mapeo super_admin ↔ platform_super_admin con el naming real de F0.
5
+ * @enum {string}
6
+ */
7
+ export enum ModifiableByRoleEnum {
8
+ SUPER_ADMIN = 'super_admin',
9
+ SOFOM_ADMIN = 'sofom_admin',
10
+ RETAILER_ADMIN = 'retailer_admin',
11
+ }
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Sub-tipos de parámetro operativo del SOFOM (M6 §8 = 13 + SCORING de §5 = 14).
3
+ * @enum {string}
4
+ */
5
+ export enum ParameterTypeEnum {
6
+ CREDIT = 'CREDIT',
7
+ WARRANTY = 'WARRANTY',
8
+ WELCOME_BONUS = 'WELCOME_BONUS',
9
+ MORA_BLOCK = 'MORA_BLOCK',
10
+ UNBLOCK = 'UNBLOCK',
11
+ PAY_INVESTIGATION = 'PAY_INVESTIGATION',
12
+ COLLECTIONS = 'COLLECTIONS',
13
+ ANTI_FRAUD = 'ANTI_FRAUD',
14
+ REMITTANCE = 'REMITTANCE',
15
+ NOTIFICATIONS = 'NOTIFICATIONS',
16
+ CROSS_BORDER = 'CROSS_BORDER',
17
+ WIZARD = 'WIZARD',
18
+ INTEGRATIONS = 'INTEGRATIONS',
19
+ SCORING = 'SCORING',
20
+ }
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Tipo lógico del `value` (siempre persistido como string; el consumer parsea según esto).
3
+ * Valores en minúscula por contrato del modelo (modelo-datos §8).
4
+ * @enum {string}
5
+ */
6
+ export enum ParameterValueTypeEnum {
7
+ STRING = 'string',
8
+ NUMBER = 'number',
9
+ BOOLEAN = 'boolean',
10
+ JSON = 'json',
11
+ }
@@ -0,0 +1,14 @@
1
+ export * from './enums/ParameterTypeEnum';
2
+ export * from './enums/ParameterValueTypeEnum';
3
+ export * from './enums/ModifiableByRoleEnum';
4
+
5
+ // Entity DTOs
6
+ export * from './dtos/Parameter';
7
+
8
+ // Request DTOs
9
+ export * from './dtos/requests/UpdateParameterRequest';
10
+ export * from './dtos/requests/BulkUpdateParametersRequest';
11
+ export * from './dtos/requests/BulkGetParametersRequest';
12
+
13
+ // Response DTOs
14
+ export * from './dtos/responses/ParameterResponse';
@@ -1,6 +1,7 @@
1
1
  import { Expose } from 'class-transformer';
2
- import { IsEnum, IsOptional, IsString, Matches } from 'class-validator';
2
+ import { IsArray, IsEnum, IsOptional, IsString, Matches } from 'class-validator';
3
3
  import { regexIso8601 } from '../../helpers/constans/regex';
4
+ import { CollectorSeniorityEnum } from '../enums/CollectorSeniorityEnum';
4
5
  import { EmploymentTypeEnum } from '../enums/EmploymentTypeEnum';
5
6
  import { RetailUserStatusEnum } from '../enums/RetailUserStatusEnum';
6
7
 
@@ -39,6 +40,25 @@ export class RetailUser {
39
40
  @IsString()
40
41
  commissionTier!: string;
41
42
 
43
+ /** Teléfono de contacto del usuario retail; opcional. */
44
+ @Expose()
45
+ @IsOptional()
46
+ @IsString()
47
+ phone?: string;
48
+
49
+ /** Seniority del cobrador; solo aplica a usuarios retail con rol de cobrador. */
50
+ @Expose()
51
+ @IsOptional()
52
+ @IsEnum(CollectorSeniorityEnum)
53
+ collectorSeniority?: CollectorSeniorityEnum;
54
+
55
+ /** Tiendas que cubre el cobrador (zona de cobranza); opcional. */
56
+ @Expose()
57
+ @IsOptional()
58
+ @IsArray()
59
+ @IsString({ each: true })
60
+ coverageStoreIds?: string[];
61
+
42
62
  @Expose()
43
63
  @IsEnum(RetailUserStatusEnum)
44
64
  status!: RetailUserStatusEnum;
@@ -75,11 +75,15 @@ export class Store {
75
75
  @IsString()
76
76
  schedule!: string | null;
77
77
 
78
- /** Venta diaria promedio en centavos; `null` si no está registrada. */
78
+ /**
79
+ * Conteo promedio de transacciones de cobro por día (NO es un monto de dinero).
80
+ * `null` si no está registrado. El factor 2× que amplifica este conteo es global
81
+ * y vive en loan-config, no acá.
82
+ */
79
83
  @Expose()
80
84
  @IsOptional()
81
85
  @IsNumber()
82
- dailyAvgSalesCents!: number | null;
86
+ dailyAvgCollectionsCount!: number | null;
83
87
 
84
88
  @Expose()
85
89
  @IsEnum(StoreStatusEnum)