@fiado/type-kit 3.315.0 → 3.316.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 (76) hide show
  1. package/_test_/unit/card/CardIssuanceBySideRequest.test.ts +42 -0
  2. package/_test_/unit/onboarding/ExpedienteUpdatedMessage.test.ts +57 -0
  3. package/bin/benefitCenter/enums/BenefitFlowEnum.d.ts +11 -0
  4. package/bin/benefitCenter/enums/BenefitFlowEnum.js +15 -0
  5. package/bin/card/dtos/CardIssuanceBySideRequest.d.ts +16 -0
  6. package/bin/card/dtos/CardIssuanceBySideRequest.js +43 -0
  7. package/bin/card/dtos/CardIssuanceBySideResponse.d.ts +7 -0
  8. package/bin/card/dtos/CardIssuanceBySideResponse.js +6 -0
  9. package/bin/card/enums/issuance/CardIssuanceResultEnum.d.ts +4 -0
  10. package/bin/card/enums/issuance/CardIssuanceResultEnum.js +8 -0
  11. package/bin/card/enums/issuance/CardIssuanceSkipReasonEnum.d.ts +6 -0
  12. package/bin/card/enums/issuance/CardIssuanceSkipReasonEnum.js +10 -0
  13. package/bin/card/enums/issuance/CardIssuanceTriggerEnum.d.ts +5 -0
  14. package/bin/card/enums/issuance/CardIssuanceTriggerEnum.js +9 -0
  15. package/bin/card/index.d.ts +5 -0
  16. package/bin/card/index.js +5 -0
  17. package/bin/identity/dtos/InfoSelfVerifiedFields.d.ts +25 -0
  18. package/bin/identity/dtos/InfoSelfVerifiedFields.js +2 -0
  19. package/bin/identity/dtos/PeopleResponse.d.ts +7 -0
  20. package/bin/identity/dtos/PeopleUpdateRequest.d.ts +7 -0
  21. package/bin/identity/index.d.ts +1 -0
  22. package/bin/identity/index.js +1 -0
  23. package/bin/onboarding/dtos/ExpedienteUpdatedMessage.d.ts +22 -0
  24. package/bin/onboarding/dtos/ExpedienteUpdatedMessage.js +49 -0
  25. package/bin/onboarding/enums/ExpedienteUpdatedSourceEnum.d.ts +7 -0
  26. package/bin/onboarding/enums/ExpedienteUpdatedSourceEnum.js +11 -0
  27. package/bin/onboarding/index.d.ts +2 -0
  28. package/bin/onboarding/index.js +3 -0
  29. package/bin/places/dtos/CashInFeeDto.d.ts +17 -0
  30. package/bin/places/dtos/CashInFeeDto.js +12 -0
  31. package/bin/platformRbac/dtos/CompleteMyProfileRequest.d.ts +9 -0
  32. package/bin/platformRbac/dtos/CompleteMyProfileRequest.js +34 -0
  33. package/bin/retailCards/dtos/requests/AssignCardRequest.d.ts +6 -0
  34. package/bin/retailCards/dtos/requests/AssignCardRequest.js +30 -0
  35. package/bin/retailCards/dtos/requests/CancelCardRequest.d.ts +5 -0
  36. package/bin/retailCards/dtos/requests/CancelCardRequest.js +22 -0
  37. package/bin/retailCards/dtos/responses/RetailCardResponse.d.ts +12 -0
  38. package/bin/retailCards/dtos/responses/RetailCardResponse.js +2 -0
  39. package/bin/retailCards/enums/CardBatchStatusEnum.d.ts +17 -0
  40. package/bin/retailCards/enums/CardBatchStatusEnum.js +21 -0
  41. package/bin/retailCards/enums/CardCancelReasonEnum.d.ts +13 -0
  42. package/bin/retailCards/enums/CardCancelReasonEnum.js +17 -0
  43. package/bin/retailCards/enums/RetailCardStatusEnum.d.ts +13 -0
  44. package/bin/retailCards/enums/RetailCardStatusEnum.js +17 -0
  45. package/bin/retailCards/events/RetailCardAssignedV1.d.ts +10 -0
  46. package/bin/retailCards/events/RetailCardAssignedV1.js +2 -0
  47. package/bin/retailCards/events/RetailCardCancelledV1.d.ts +9 -0
  48. package/bin/retailCards/events/RetailCardCancelledV1.js +2 -0
  49. package/bin/retailCards/events/RetailCardReleasedV1.d.ts +7 -0
  50. package/bin/retailCards/events/RetailCardReleasedV1.js +2 -0
  51. package/bin/retailWizard/dtos/requests/CompleteSaleRequest.d.ts +9 -0
  52. package/bin/retailWizard/dtos/requests/CompleteSaleRequest.js +29 -0
  53. package/bin/retailWizard/dtos/requests/MarkPcfCardDeliveredRequest.d.ts +4 -0
  54. package/bin/retailWizard/dtos/requests/MarkPcfCardDeliveredRequest.js +23 -0
  55. package/bin/walletFunding/dtos/CancelFundingReferenceRequest.d.ts +14 -0
  56. package/bin/walletFunding/dtos/CancelFundingReferenceRequest.js +41 -0
  57. package/bin/walletFunding/dtos/CancelFundingReferenceResponse.d.ts +15 -0
  58. package/bin/walletFunding/dtos/CancelFundingReferenceResponse.js +13 -0
  59. package/bin/walletFunding/dtos/CancelWalletFundingRequest.d.ts +3 -0
  60. package/bin/walletFunding/dtos/CancelWalletFundingRequest.js +21 -0
  61. package/bin/walletFunding/dtos/CancelWalletFundingResponse.d.ts +7 -0
  62. package/bin/walletFunding/dtos/CancelWalletFundingResponse.js +6 -0
  63. package/package.json +1 -1
  64. package/src/card/dtos/CardIssuanceBySideRequest.ts +29 -0
  65. package/src/card/dtos/CardIssuanceBySideResponse.ts +8 -0
  66. package/src/card/enums/issuance/CardIssuanceResultEnum.ts +4 -0
  67. package/src/card/enums/issuance/CardIssuanceSkipReasonEnum.ts +6 -0
  68. package/src/card/enums/issuance/CardIssuanceTriggerEnum.ts +5 -0
  69. package/src/card/index.ts +5 -0
  70. package/src/identity/dtos/InfoSelfVerifiedFields.ts +25 -0
  71. package/src/identity/dtos/PeopleResponse.ts +7 -0
  72. package/src/identity/dtos/PeopleUpdateRequest.ts +7 -0
  73. package/src/identity/index.ts +1 -0
  74. package/src/onboarding/dtos/ExpedienteUpdatedMessage.ts +37 -0
  75. package/src/onboarding/enums/ExpedienteUpdatedSourceEnum.ts +7 -0
  76. package/src/onboarding/index.ts +4 -0
@@ -0,0 +1,22 @@
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.CancelCardRequest = void 0;
13
+ const class_validator_1 = require("class-validator");
14
+ const CardCancelReasonEnum_1 = require("../../enums/CardCancelReasonEnum");
15
+ /** Body de la cancelación (anulación) de una tarjeta física. */
16
+ class CancelCardRequest {
17
+ }
18
+ exports.CancelCardRequest = CancelCardRequest;
19
+ __decorate([
20
+ (0, class_validator_1.IsEnum)(CardCancelReasonEnum_1.CardCancelReasonEnum),
21
+ __metadata("design:type", String)
22
+ ], CancelCardRequest.prototype, "reason", void 0);
@@ -0,0 +1,12 @@
1
+ import { RetailCardStatusEnum } from '../../enums/RetailCardStatusEnum';
2
+ /** Representación de una tarjeta física hacia el cliente. */
3
+ export interface RetailCardResponse {
4
+ cardNumber: string;
5
+ retailerId: string;
6
+ batchId: string;
7
+ storeId: string;
8
+ status: RetailCardStatusEnum;
9
+ assignedToCustomerId: string | null;
10
+ assignedAt: string | null;
11
+ assignedByUserId: string | null;
12
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Estado de un lote de tarjetas.
3
+ * @enum {string}
4
+ *
5
+ * @property {string} RECEIVING - Transitorio, carga en curso (DEC-004/DEC-008).
6
+ * @property {string} RECEIVED - Carga completada, lote atado a una tienda (happy-path F1).
7
+ * @property {string} FAILED - Terminal, la carga del lote falló (DEC-004/DEC-008).
8
+ * @property {string} DISTRIBUTED - Reservado F1 — lote centralizado repartido a varias tiendas (TD-008).
9
+ * @property {string} CLOSED - Reservado F1 — cierre manual del lote (TD-008).
10
+ */
11
+ export declare enum CardBatchStatusEnum {
12
+ RECEIVING = "RECEIVING",
13
+ RECEIVED = "RECEIVED",
14
+ FAILED = "FAILED",
15
+ DISTRIBUTED = "DISTRIBUTED",
16
+ CLOSED = "CLOSED"
17
+ }
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CardBatchStatusEnum = void 0;
4
+ /**
5
+ * Estado de un lote de tarjetas.
6
+ * @enum {string}
7
+ *
8
+ * @property {string} RECEIVING - Transitorio, carga en curso (DEC-004/DEC-008).
9
+ * @property {string} RECEIVED - Carga completada, lote atado a una tienda (happy-path F1).
10
+ * @property {string} FAILED - Terminal, la carga del lote falló (DEC-004/DEC-008).
11
+ * @property {string} DISTRIBUTED - Reservado F1 — lote centralizado repartido a varias tiendas (TD-008).
12
+ * @property {string} CLOSED - Reservado F1 — cierre manual del lote (TD-008).
13
+ */
14
+ var CardBatchStatusEnum;
15
+ (function (CardBatchStatusEnum) {
16
+ CardBatchStatusEnum["RECEIVING"] = "RECEIVING";
17
+ CardBatchStatusEnum["RECEIVED"] = "RECEIVED";
18
+ CardBatchStatusEnum["FAILED"] = "FAILED";
19
+ CardBatchStatusEnum["DISTRIBUTED"] = "DISTRIBUTED";
20
+ CardBatchStatusEnum["CLOSED"] = "CLOSED";
21
+ })(CardBatchStatusEnum || (exports.CardBatchStatusEnum = CardBatchStatusEnum = {}));
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Motivo de cancelación de una tarjeta física.
3
+ * @enum {string}
4
+ *
5
+ * @property {string} PLASTIC_DAMAGED - Plástico dañado.
6
+ * @property {string} LOST - Tarjeta perdida.
7
+ * @property {string} THEFT_REPORTED - Robo reportado.
8
+ */
9
+ export declare enum CardCancelReasonEnum {
10
+ PLASTIC_DAMAGED = "PLASTIC_DAMAGED",
11
+ LOST = "LOST",
12
+ THEFT_REPORTED = "THEFT_REPORTED"
13
+ }
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CardCancelReasonEnum = void 0;
4
+ /**
5
+ * Motivo de cancelación de una tarjeta física.
6
+ * @enum {string}
7
+ *
8
+ * @property {string} PLASTIC_DAMAGED - Plástico dañado.
9
+ * @property {string} LOST - Tarjeta perdida.
10
+ * @property {string} THEFT_REPORTED - Robo reportado.
11
+ */
12
+ var CardCancelReasonEnum;
13
+ (function (CardCancelReasonEnum) {
14
+ CardCancelReasonEnum["PLASTIC_DAMAGED"] = "PLASTIC_DAMAGED";
15
+ CardCancelReasonEnum["LOST"] = "LOST";
16
+ CardCancelReasonEnum["THEFT_REPORTED"] = "THEFT_REPORTED";
17
+ })(CardCancelReasonEnum || (exports.CardCancelReasonEnum = CardCancelReasonEnum = {}));
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Estado de una tarjeta física individual.
3
+ * @enum {string}
4
+ *
5
+ * @property {string} AVAILABLE - Cargada en stock, disponible para asignar.
6
+ * @property {string} ASSIGNED - Asignada a un cliente.
7
+ * @property {string} CANCELLED - Anulada (plástico dañado, pérdida o robo). Estado terminal.
8
+ */
9
+ export declare enum RetailCardStatusEnum {
10
+ AVAILABLE = "AVAILABLE",
11
+ ASSIGNED = "ASSIGNED",
12
+ CANCELLED = "CANCELLED"
13
+ }
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RetailCardStatusEnum = void 0;
4
+ /**
5
+ * Estado de una tarjeta física individual.
6
+ * @enum {string}
7
+ *
8
+ * @property {string} AVAILABLE - Cargada en stock, disponible para asignar.
9
+ * @property {string} ASSIGNED - Asignada a un cliente.
10
+ * @property {string} CANCELLED - Anulada (plástico dañado, pérdida o robo). Estado terminal.
11
+ */
12
+ var RetailCardStatusEnum;
13
+ (function (RetailCardStatusEnum) {
14
+ RetailCardStatusEnum["AVAILABLE"] = "AVAILABLE";
15
+ RetailCardStatusEnum["ASSIGNED"] = "ASSIGNED";
16
+ RetailCardStatusEnum["CANCELLED"] = "CANCELLED";
17
+ })(RetailCardStatusEnum || (exports.RetailCardStatusEnum = RetailCardStatusEnum = {}));
@@ -0,0 +1,10 @@
1
+ /** Emitido cuando una tarjeta se asigna a un cliente. */
2
+ export interface RetailCardAssignedV1 {
3
+ cardNumber: string;
4
+ retailerId: string;
5
+ storeId: string;
6
+ assignedToCustomerId: string;
7
+ assignedByUserId: string;
8
+ creditId?: string;
9
+ occurredAt: string;
10
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,9 @@
1
+ import { CardCancelReasonEnum } from '../enums/CardCancelReasonEnum';
2
+ /** Emitido cuando una tarjeta se cancela (anula). */
3
+ export interface RetailCardCancelledV1 {
4
+ cardNumber: string;
5
+ retailerId: string;
6
+ storeId: string;
7
+ reason: CardCancelReasonEnum;
8
+ occurredAt: string;
9
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,7 @@
1
+ /** Emitido cuando una tarjeta se libera (vuelve a AVAILABLE). */
2
+ export interface RetailCardReleasedV1 {
3
+ cardNumber: string;
4
+ retailerId: string;
5
+ storeId: string;
6
+ occurredAt: string;
7
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,9 @@
1
+ /**
2
+ * POST /wizard/sessions/:id/complete-sale — cierra la venta (saga de 2 pasos, flujo 09). Exige
3
+ * payment registrado (regla dura). Consume el IMEI del silo (SOLD), asigna la tarjeta PCF, persiste
4
+ * la Sale con `UNIQ#FOLIO` y emite el outbox `SaleCompletedV1` en la MISMA tx. Cierra el prospecto
5
+ * vinculado si lo hay. `cardNumber` = tarjeta física entregada en tienda (S7). SureKeep Fase 2 — pista Retail.
6
+ */
7
+ export declare class CompleteSaleRequest {
8
+ cardNumber?: string;
9
+ }
@@ -0,0 +1,29 @@
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.CompleteSaleRequest = void 0;
13
+ const class_transformer_1 = require("class-transformer");
14
+ const class_validator_1 = require("class-validator");
15
+ /**
16
+ * POST /wizard/sessions/:id/complete-sale — cierra la venta (saga de 2 pasos, flujo 09). Exige
17
+ * payment registrado (regla dura). Consume el IMEI del silo (SOLD), asigna la tarjeta PCF, persiste
18
+ * la Sale con `UNIQ#FOLIO` y emite el outbox `SaleCompletedV1` en la MISMA tx. Cierra el prospecto
19
+ * vinculado si lo hay. `cardNumber` = tarjeta física entregada en tienda (S7). SureKeep Fase 2 — pista Retail.
20
+ */
21
+ class CompleteSaleRequest {
22
+ }
23
+ exports.CompleteSaleRequest = CompleteSaleRequest;
24
+ __decorate([
25
+ (0, class_transformer_1.Expose)(),
26
+ (0, class_validator_1.IsOptional)(),
27
+ (0, class_validator_1.IsString)(),
28
+ __metadata("design:type", String)
29
+ ], CompleteSaleRequest.prototype, "cardNumber", void 0);
@@ -0,0 +1,4 @@
1
+ /** POST /wizard/sessions/:id/pcf-card/mark-delivered — marca la tarjeta física PCF como entregada (S7). SureKeep Fase 2 — pista Retail. */
2
+ export declare class MarkPcfCardDeliveredRequest {
3
+ cardNumber: string;
4
+ }
@@ -0,0 +1,23 @@
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.MarkPcfCardDeliveredRequest = void 0;
13
+ const class_transformer_1 = require("class-transformer");
14
+ const class_validator_1 = require("class-validator");
15
+ /** POST /wizard/sessions/:id/pcf-card/mark-delivered — marca la tarjeta física PCF como entregada (S7). SureKeep Fase 2 — pista Retail. */
16
+ class MarkPcfCardDeliveredRequest {
17
+ }
18
+ exports.MarkPcfCardDeliveredRequest = MarkPcfCardDeliveredRequest;
19
+ __decorate([
20
+ (0, class_transformer_1.Expose)(),
21
+ (0, class_validator_1.IsString)(),
22
+ __metadata("design:type", String)
23
+ ], MarkPcfCardDeliveredRequest.prototype, "cardNumber", void 0);
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Body para cancelar una referencia de funding ya creada. La referencia/fundingId
3
+ * viaja en la URL (`/funding/{moduleName}/{fundingId}/cancel`); este body aporta
4
+ * el contexto del solicitante + idempotencia.
5
+ *
6
+ * NOTA: shape inferido desde el uso en `@fiado/api-invoker`
7
+ * (benefits-marketplace / equality-connector) — confirmar con el dueño del
8
+ * módulo walletFunding / el lambda equality-connector que implementa el cancel.
9
+ */
10
+ export declare class CancelFundingReferenceRequest {
11
+ directoryId: string;
12
+ reason?: string;
13
+ idempotencyKey: string;
14
+ }
@@ -0,0 +1,41 @@
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
+ /**
15
+ * Body para cancelar una referencia de funding ya creada. La referencia/fundingId
16
+ * viaja en la URL (`/funding/{moduleName}/{fundingId}/cancel`); este body aporta
17
+ * el contexto del solicitante + idempotencia.
18
+ *
19
+ * NOTA: shape inferido desde el uso en `@fiado/api-invoker`
20
+ * (benefits-marketplace / equality-connector) — confirmar con el dueño del
21
+ * módulo walletFunding / el lambda equality-connector que implementa el cancel.
22
+ */
23
+ class CancelFundingReferenceRequest {
24
+ }
25
+ exports.CancelFundingReferenceRequest = CancelFundingReferenceRequest;
26
+ __decorate([
27
+ (0, class_validator_1.IsString)(),
28
+ (0, class_validator_1.MaxLength)(64),
29
+ __metadata("design:type", String)
30
+ ], CancelFundingReferenceRequest.prototype, "directoryId", void 0);
31
+ __decorate([
32
+ (0, class_validator_1.IsOptional)(),
33
+ (0, class_validator_1.IsString)(),
34
+ (0, class_validator_1.MaxLength)(256),
35
+ __metadata("design:type", String)
36
+ ], CancelFundingReferenceRequest.prototype, "reason", void 0);
37
+ __decorate([
38
+ (0, class_validator_1.IsString)(),
39
+ (0, class_validator_1.MaxLength)(64),
40
+ __metadata("design:type", String)
41
+ ], CancelFundingReferenceRequest.prototype, "idempotencyKey", void 0);
@@ -0,0 +1,15 @@
1
+ import { BenefitPaymentStatusEnum } from "../../benefitCenter/enums/BenefitPaymentStatusEnum";
2
+ import { WalletFundingErrorCodeEnum } from "../enums/WalletFundingErrorCodeEnum";
3
+ /**
4
+ * Respuesta de la cancelación de una referencia de funding. Mismo estilo que
5
+ * CreateFundingReferenceResponse.
6
+ *
7
+ * NOTA: shape inferido desde el uso en `@fiado/api-invoker` — confirmar con el
8
+ * dueño del módulo walletFunding / el lambda equality-connector.
9
+ */
10
+ export declare class CancelFundingReferenceResponse {
11
+ /** Referencia cancelada (misma PK que se creó). */
12
+ reference: string;
13
+ status: BenefitPaymentStatusEnum;
14
+ errorCode?: WalletFundingErrorCodeEnum;
15
+ }
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CancelFundingReferenceResponse = void 0;
4
+ /**
5
+ * Respuesta de la cancelación de una referencia de funding. Mismo estilo que
6
+ * CreateFundingReferenceResponse.
7
+ *
8
+ * NOTA: shape inferido desde el uso en `@fiado/api-invoker` — confirmar con el
9
+ * dueño del módulo walletFunding / el lambda equality-connector.
10
+ */
11
+ class CancelFundingReferenceResponse {
12
+ }
13
+ exports.CancelFundingReferenceResponse = CancelFundingReferenceResponse;
@@ -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.315.0",
3
+ "version": "3.316.0",
4
4
  "description": "",
5
5
  "main": "bin/index.js",
6
6
  "types": "bin/index.d.ts",
@@ -0,0 +1,29 @@
1
+ import { IsEnum, IsOptional, IsUUID } from "class-validator";
2
+ import { Country } from "../../country/enums/Country";
3
+ import { InfoSelfVerifiedStatus } from "../../identity/enums/InfoSelfVerifiedStatus";
4
+ import { CardIssuanceTriggerEnum } from "../enums/issuance/CardIssuanceTriggerEnum";
5
+
6
+ /**
7
+ * Request de privateIssuance (fiado-card-business). Con `side` emite SOLO ese lado
8
+ * (DEC-025 de onboarding-business); sin `side` conserva el comportamiento histórico
9
+ * (ambos lados según wish flags — vías manuales).
10
+ */
11
+ export class CardIssuanceBySideRequest {
12
+
13
+ @IsUUID()
14
+ directoryId: string;
15
+
16
+ @IsOptional()
17
+ @IsEnum(Country)
18
+ side?: Country;
19
+
20
+ /** Default en el server: MANUAL (misma semántica que hoy). */
21
+ @IsOptional()
22
+ @IsEnum(CardIssuanceTriggerEnum)
23
+ trigger?: CardIssuanceTriggerEnum;
24
+
25
+ /** Solo vías manuales. El disparo AUTOMATIC no lo manda: la confirmación ya viene garantizada por el step. */
26
+ @IsOptional()
27
+ @IsEnum(InfoSelfVerifiedStatus)
28
+ USA_InfoSelfVerified?: InfoSelfVerifiedStatus;
29
+ }
@@ -0,0 +1,8 @@
1
+ import { CardIssuanceResultEnum } from "../enums/issuance/CardIssuanceResultEnum";
2
+ import { CardIssuanceSkipReasonEnum } from "../enums/issuance/CardIssuanceSkipReasonEnum";
3
+
4
+ export class CardIssuanceBySideResponse {
5
+ result: CardIssuanceResultEnum;
6
+ /** Presente solo cuando result = SKIPPED. */
7
+ reason?: CardIssuanceSkipReasonEnum;
8
+ }
@@ -0,0 +1,4 @@
1
+ export enum CardIssuanceResultEnum {
2
+ CREATED = "CREATED",
3
+ SKIPPED = "SKIPPED",
4
+ }
@@ -0,0 +1,6 @@
1
+ /** Por qué el guard atómico por lado NO emitió (respuesta SKIPPED — resultado normal, no error). */
2
+ export enum CardIssuanceSkipReasonEnum {
3
+ IN_PROCESS = "IN_PROCESS",
4
+ ALREADY_ISSUED = "ALREADY_ISSUED",
5
+ FAILED_REQUIRES_MANUAL = "FAILED_REQUIRES_MANUAL",
6
+ }
@@ -0,0 +1,5 @@
1
+ /** Quién dispara la emisión. AUTOMATIC (evaluador reactivo de onboarding-business, DEC-025) tiene guard estricto: nunca re-emite FAILED. */
2
+ export enum CardIssuanceTriggerEnum {
3
+ AUTOMATIC = "AUTOMATIC",
4
+ MANUAL = "MANUAL",
5
+ }
package/src/card/index.ts CHANGED
@@ -68,6 +68,11 @@ export * from './enums/issuance/UserStatus'
68
68
  export * from './enums/issuance/IssuanceFlow'
69
69
  export * from './enums/issuance/ObservationStep'
70
70
  export * from './enums/issuance/ObservationStatus'
71
+ export * from './enums/issuance/CardIssuanceTriggerEnum'
72
+ export * from './enums/issuance/CardIssuanceSkipReasonEnum'
73
+ export * from './enums/issuance/CardIssuanceResultEnum'
74
+ export * from './dtos/CardIssuanceBySideRequest'
75
+ export * from './dtos/CardIssuanceBySideResponse'
71
76
  export * from './enums/ReplaceBankAccountCardReasonEnum'
72
77
  export * from './enums/CardReasonStatus'
73
78
  export * from './enums/KycReason'
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Confirmación de datos POR CAMPO, no por lado.
3
+ *
4
+ * La app dejó de mandar un "confirmo / no confirmo" a secas: ahora manda qué campo está bien y cuál
5
+ * mal. `false` significa INCORRECTO — el usuario pide que se corrija ese dato.
6
+ *
7
+ * Sólo llegan las claves de los campos que el usuario efectivamente pudo responder: si el expediente
8
+ * no tiene nombre US, la app no manda `verifyNameUS`. Ausente ≠ incorrecto.
9
+ *
10
+ * Acompaña a `MEX_InfoSelfVerified` / `USA_InfoSelfVerified` sin reemplazarlos: esos dos siguen
11
+ * siendo el enum de siempre y dicen SI el lado quedó confirmado; éste dice QUÉ campo falló, que es
12
+ * lo que permite reabrir el paso correcto y saber qué documento pedir.
13
+ *
14
+ * Se guarda aparte y no concatenado dentro del propio `*_InfoSelfVerified` porque las ~30
15
+ * comparaciones que hay contra ese campo en los distintos repos son todas por igualdad exacta:
16
+ * un valor compuesto no matchearía con ninguna y caería en el `else` de todas, sin error.
17
+ */
18
+ export interface InfoSelfVerifiedFields {
19
+ /** Nombre estadounidense (`usNames` + `usLastNames`). Es el que abre el lado azul. */
20
+ verifyNameUS?: boolean;
21
+ /** Nombre latino (`latNames` + apellidos). Es el que abre el lado rosa. */
22
+ verifyNameLAT?: boolean;
23
+ /** Domicilio de Estados Unidos. */
24
+ verifyAddressUS?: boolean;
25
+ }
@@ -6,6 +6,7 @@ import { CPStatusEnum } from '../enums/CPStatusEnum';
6
6
  import { InfoSelfVerifiedStatus } from '../enums/InfoSelfVerifiedStatus';
7
7
  import { SexDocument } from '../enums/SexDocument';
8
8
  import { IdentificationDocument } from './IdentificationDocument';
9
+ import { InfoSelfVerifiedFields } from './InfoSelfVerifiedFields';
9
10
  import { ManualApproval } from './ManualApproval';
10
11
  import { PeopleName } from './PeopleName';
11
12
 
@@ -99,6 +100,12 @@ export class PeopleResponse {
99
100
  MEX_Signed:boolean | null;
100
101
  USA_Beneficiaries:boolean | null;
101
102
  USA_InfoSelfVerified:InfoSelfVerifiedStatus;
103
+ /**
104
+ * Qué campo marcó el usuario como incorrecto. Detalla a los dos `*_InfoSelfVerified`.
105
+ * Opcional a diferencia del resto: los expedientes anteriores a la confirmación por campo
106
+ * no lo tienen.
107
+ */
108
+ infoSelfVerifiedFields?:InfoSelfVerifiedFields;
102
109
  USA_Signed:boolean | null;
103
110
  older18:boolean | null;
104
111
  signature:boolean;
@@ -4,6 +4,7 @@ import { CPStatusEnum } from "../enums/CPStatusEnum";
4
4
  import { InfoSelfVerifiedStatus } from "../enums/InfoSelfVerifiedStatus";
5
5
  import { SexDocument } from "../enums/SexDocument";
6
6
  import { IdentificationDocument } from "./IdentificationDocument";
7
+ import { InfoSelfVerifiedFields } from "./InfoSelfVerifiedFields";
7
8
  import { ManualApproval } from "./ManualApproval";
8
9
  import { PeopleName } from "./PeopleName";
9
10
 
@@ -90,6 +91,12 @@ export class PeopleUpdateRequest {
90
91
  pepLevel?: string | null;
91
92
  USA_InfoSelfVerified?: InfoSelfVerifiedStatus;
92
93
  MEX_InfoSelfVerified?: InfoSelfVerifiedStatus;
94
+ /**
95
+ * Qué campo marcó el usuario como incorrecto al revisar sus datos. Lo manda la app en el PUT y
96
+ * de acá se derivan los dos `*_InfoSelfVerified` de arriba: un lado se confirma cuando todas
97
+ * sus banderas están en `true`, y pide corrección si alguna está en `false`.
98
+ */
99
+ infoSelfVerifiedFields?: InfoSelfVerifiedFields;
93
100
  infoSelfVerified?: InfoSelfVerifiedStatus;
94
101
  beneficialOwner?: string | null;
95
102
  weeklyIncomeUSD?: string | null;
@@ -3,6 +3,7 @@
3
3
  export * from './dtos/IdentificationDocument'
4
4
  export * from './dtos/ManualApproval';
5
5
  export * from './dtos/PeopleCreateRequest';
6
+ export * from './dtos/InfoSelfVerifiedFields';
6
7
  export * from './dtos/PeopleResponse';
7
8
  export * from './dtos/PeopleName';
8
9
  export * from './dtos/TypeOfDocument';
@@ -0,0 +1,37 @@
1
+ import { Equals, IsEnum, IsISO8601, IsUUID, Matches } from "class-validator";
2
+ import { ExpedienteUpdatedSourceEnum } from "../enums/ExpedienteUpdatedSourceEnum";
3
+
4
+ /**
5
+ * Evento EXPEDIENTE_UPDATED (cola OnboardingReadinessQueue).
6
+ * Producer: fiado-identity-lambda (tras cada escritura exitosa de People/ARC).
7
+ * Consumer: onboarding-business (ExpedienteUpdatedSubscriber, DEC-025).
8
+ * Payload anémico a propósito: el subscriber SIEMPRE lee el expediente fresco;
9
+ * nada de datos de negocio acá para que un mensaje viejo no decida con datos viejos.
10
+ */
11
+ export class ExpedienteUpdatedMessage {
12
+
13
+ /**
14
+ * Discriminador. La cola es dedicada hoy, pero agregarlo ahora es gratis y
15
+ * agregarlo después de publicar sería breaking (mismo criterio que
16
+ * KycStepCompletedV1.eventType).
17
+ */
18
+ @Equals("EXPEDIENTE_UPDATED")
19
+ eventType: "EXPEDIENTE_UPDATED";
20
+
21
+ @IsUUID()
22
+ eventId: string;
23
+
24
+ @IsUUID()
25
+ directoryId: string;
26
+
27
+ @IsUUID()
28
+ peopleId: string;
29
+
30
+ @IsEnum(ExpedienteUpdatedSourceEnum)
31
+ source: ExpedienteUpdatedSourceEnum;
32
+
33
+ /** ISO-8601 estricto y en UTC (sufijo Z) — @IsISO8601 pelado acepta fechas sin hora y offsets locales (precedente: KycStepCompletedV1). */
34
+ @IsISO8601({ strict: true })
35
+ @Matches(/Z$/, { message: "occurredAt debe estar en UTC (sufijo Z)" })
36
+ occurredAt: string;
37
+ }
@@ -0,0 +1,7 @@
1
+ /** Qué write-path de fiado-identity-lambda originó el evento (solo diagnóstico — el subscriber no decide por source). */
2
+ export enum ExpedienteUpdatedSourceEnum {
3
+ PEOPLE = "PEOPLE",
4
+ ACCOUNT_REQUIREMENT_CONTROL = "ACCOUNT_REQUIREMENT_CONTROL",
5
+ DOCUMENT = "DOCUMENT",
6
+ AGENT = "AGENT",
7
+ }
@@ -4,6 +4,10 @@ export * from './enums/OnboardingStepStatusEnum';
4
4
  export * from './enums/OnboardingAccountStatusEnum';
5
5
  export * from './enums/OnboardingAccountReasonEnum';
6
6
  export * from './enums/OnboardingAccountMessageKeyEnum';
7
+ export * from './enums/ExpedienteUpdatedSourceEnum';
7
8
 
8
9
  // Response DTOs
9
10
  export * from './dtos/responses/OnboardingStepsResponse';
11
+
12
+ // Queue messages
13
+ export * from './dtos/ExpedienteUpdatedMessage';