@fiado/type-kit 3.314.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.
- package/_test_/unit/card/CardIssuanceBySideRequest.test.ts +42 -0
- package/_test_/unit/onboarding/ExpedienteUpdatedMessage.test.ts +57 -0
- package/_test_/unit/retailCards/cardStockRequests.test.ts +52 -2
- package/bin/benefitCenter/enums/BenefitFlowEnum.d.ts +11 -0
- package/bin/benefitCenter/enums/BenefitFlowEnum.js +15 -0
- package/bin/card/dtos/CardIssuanceBySideRequest.d.ts +16 -0
- package/bin/card/dtos/CardIssuanceBySideRequest.js +43 -0
- package/bin/card/dtos/CardIssuanceBySideResponse.d.ts +7 -0
- package/bin/card/dtos/CardIssuanceBySideResponse.js +6 -0
- package/bin/card/enums/issuance/CardIssuanceResultEnum.d.ts +4 -0
- package/bin/card/enums/issuance/CardIssuanceResultEnum.js +8 -0
- package/bin/card/enums/issuance/CardIssuanceSkipReasonEnum.d.ts +6 -0
- package/bin/card/enums/issuance/CardIssuanceSkipReasonEnum.js +10 -0
- package/bin/card/enums/issuance/CardIssuanceTriggerEnum.d.ts +5 -0
- package/bin/card/enums/issuance/CardIssuanceTriggerEnum.js +9 -0
- package/bin/card/index.d.ts +5 -0
- package/bin/card/index.js +5 -0
- package/bin/identity/dtos/InfoSelfVerifiedFields.d.ts +25 -0
- package/bin/identity/dtos/InfoSelfVerifiedFields.js +2 -0
- package/bin/identity/dtos/PeopleResponse.d.ts +7 -0
- package/bin/identity/dtos/PeopleUpdateRequest.d.ts +7 -0
- package/bin/identity/index.d.ts +1 -0
- package/bin/identity/index.js +1 -0
- package/bin/onboarding/dtos/ExpedienteUpdatedMessage.d.ts +22 -0
- package/bin/onboarding/dtos/ExpedienteUpdatedMessage.js +49 -0
- package/bin/onboarding/enums/ExpedienteUpdatedSourceEnum.d.ts +7 -0
- package/bin/onboarding/enums/ExpedienteUpdatedSourceEnum.js +11 -0
- package/bin/onboarding/index.d.ts +2 -0
- package/bin/onboarding/index.js +3 -0
- package/bin/places/dtos/CashInFeeDto.d.ts +17 -0
- package/bin/places/dtos/CashInFeeDto.js +12 -0
- package/bin/platformRbac/dtos/CompleteMyProfileRequest.d.ts +9 -0
- package/bin/platformRbac/dtos/CompleteMyProfileRequest.js +34 -0
- package/bin/retailCards/dtos/requests/AssignCardRequest.d.ts +6 -0
- package/bin/retailCards/dtos/requests/AssignCardRequest.js +30 -0
- package/bin/retailCards/dtos/requests/CancelCardRequest.d.ts +5 -0
- package/bin/retailCards/dtos/requests/CancelCardRequest.js +22 -0
- package/bin/retailCards/dtos/requests/RegisterCardBatchRequest.d.ts +4 -1
- package/bin/retailCards/dtos/requests/RegisterCardBatchRequest.js +3 -0
- package/bin/retailCards/dtos/requests/WriteOffCardStockRequest.d.ts +5 -0
- package/bin/retailCards/dtos/requests/WriteOffCardStockRequest.js +4 -0
- package/bin/retailCards/dtos/responses/CardDeliveryResponse.d.ts +5 -2
- package/bin/retailCards/dtos/responses/RetailCardResponse.d.ts +12 -0
- package/bin/retailCards/dtos/responses/RetailCardResponse.js +2 -0
- package/bin/retailCards/enums/CardBatchStatusEnum.d.ts +17 -0
- package/bin/retailCards/enums/CardBatchStatusEnum.js +21 -0
- package/bin/retailCards/enums/CardCancelReasonEnum.d.ts +13 -0
- package/bin/retailCards/enums/CardCancelReasonEnum.js +17 -0
- package/bin/retailCards/enums/RetailCardStatusEnum.d.ts +13 -0
- package/bin/retailCards/enums/RetailCardStatusEnum.js +17 -0
- package/bin/retailCards/events/RetailCardAssignedV1.d.ts +10 -0
- package/bin/retailCards/events/RetailCardAssignedV1.js +2 -0
- package/bin/retailCards/events/RetailCardCancelledV1.d.ts +9 -0
- package/bin/retailCards/events/RetailCardCancelledV1.js +2 -0
- package/bin/retailCards/events/RetailCardReleasedV1.d.ts +7 -0
- package/bin/retailCards/events/RetailCardReleasedV1.js +2 -0
- package/bin/retailWizard/dtos/requests/CompleteSaleRequest.d.ts +9 -0
- package/bin/retailWizard/dtos/requests/CompleteSaleRequest.js +29 -0
- package/bin/retailWizard/dtos/requests/MarkPcfCardDeliveredRequest.d.ts +4 -0
- package/bin/retailWizard/dtos/requests/MarkPcfCardDeliveredRequest.js +23 -0
- package/bin/walletFunding/dtos/CancelFundingReferenceRequest.d.ts +14 -0
- package/bin/walletFunding/dtos/CancelFundingReferenceRequest.js +41 -0
- package/bin/walletFunding/dtos/CancelFundingReferenceResponse.d.ts +15 -0
- package/bin/walletFunding/dtos/CancelFundingReferenceResponse.js +13 -0
- package/bin/walletFunding/dtos/CancelWalletFundingRequest.d.ts +3 -0
- package/bin/walletFunding/dtos/CancelWalletFundingRequest.js +21 -0
- package/bin/walletFunding/dtos/CancelWalletFundingResponse.d.ts +7 -0
- package/bin/walletFunding/dtos/CancelWalletFundingResponse.js +6 -0
- package/package.json +1 -1
- package/src/card/dtos/CardIssuanceBySideRequest.ts +29 -0
- package/src/card/dtos/CardIssuanceBySideResponse.ts +8 -0
- package/src/card/enums/issuance/CardIssuanceResultEnum.ts +4 -0
- package/src/card/enums/issuance/CardIssuanceSkipReasonEnum.ts +6 -0
- package/src/card/enums/issuance/CardIssuanceTriggerEnum.ts +5 -0
- package/src/card/index.ts +5 -0
- package/src/identity/dtos/InfoSelfVerifiedFields.ts +25 -0
- package/src/identity/dtos/PeopleResponse.ts +7 -0
- package/src/identity/dtos/PeopleUpdateRequest.ts +7 -0
- package/src/identity/index.ts +1 -0
- package/src/onboarding/dtos/ExpedienteUpdatedMessage.ts +37 -0
- package/src/onboarding/enums/ExpedienteUpdatedSourceEnum.ts +7 -0
- package/src/onboarding/index.ts +4 -0
- package/src/retailCards/dtos/requests/RegisterCardBatchRequest.ts +8 -2
- package/src/retailCards/dtos/requests/WriteOffCardStockRequest.ts +8 -1
- package/src/retailCards/dtos/responses/CardDeliveryResponse.ts +5 -2
|
@@ -0,0 +1,34 @@
|
|
|
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.CompleteMyProfileRequest = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
/**
|
|
16
|
+
* Body del PUT /me/profile/complete (autenticado, gate post-MFA del autoregistro). DEC-RBAC-034.
|
|
17
|
+
* Opera sobre el propio usuario (cognitoSub del token). Valida nombre + los `userFieldDefs` requeridos
|
|
18
|
+
* del tenant (422 MISSING_REQUIRED_FIELDS si faltan) y flipea `profileComplete=true`.
|
|
19
|
+
*/
|
|
20
|
+
class CompleteMyProfileRequest {
|
|
21
|
+
}
|
|
22
|
+
exports.CompleteMyProfileRequest = CompleteMyProfileRequest;
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, class_transformer_1.Expose)(),
|
|
25
|
+
(0, class_validator_1.IsString)(),
|
|
26
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
27
|
+
__metadata("design:type", String)
|
|
28
|
+
], CompleteMyProfileRequest.prototype, "displayName", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, class_transformer_1.Expose)(),
|
|
31
|
+
(0, class_validator_1.IsOptional)(),
|
|
32
|
+
(0, class_validator_1.IsObject)(),
|
|
33
|
+
__metadata("design:type", Object)
|
|
34
|
+
], CompleteMyProfileRequest.prototype, "customFields", void 0);
|
|
@@ -0,0 +1,30 @@
|
|
|
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.AssignCardRequest = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
/** Body de la asignación de una tarjeta física a un cliente. */
|
|
15
|
+
class AssignCardRequest {
|
|
16
|
+
}
|
|
17
|
+
exports.AssignCardRequest = AssignCardRequest;
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, class_validator_1.IsString)(),
|
|
20
|
+
__metadata("design:type", String)
|
|
21
|
+
], AssignCardRequest.prototype, "assignedToCustomerId", void 0);
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, class_validator_1.IsString)(),
|
|
24
|
+
__metadata("design:type", String)
|
|
25
|
+
], AssignCardRequest.prototype, "assignedByUserId", void 0);
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, class_validator_1.IsOptional)(),
|
|
28
|
+
(0, class_validator_1.IsString)(),
|
|
29
|
+
__metadata("design:type", String)
|
|
30
|
+
], AssignCardRequest.prototype, "creditId", void 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);
|
|
@@ -5,7 +5,10 @@
|
|
|
5
5
|
export declare class RegisterCardBatchRequest {
|
|
6
6
|
storeId: string;
|
|
7
7
|
quantity: number;
|
|
8
|
-
/**
|
|
8
|
+
/**
|
|
9
|
+
* Folio de la remesa del proveedor: lo único que distingue dos entradas iguales a la misma tienda.
|
|
10
|
+
* Se recorta y no admite blanco, porque es la clave de idempotencia de la recepción.
|
|
11
|
+
*/
|
|
9
12
|
supplierBatchRef: string;
|
|
10
13
|
notes?: string | null;
|
|
11
14
|
}
|
|
@@ -10,6 +10,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.RegisterCardBatchRequest = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
13
14
|
const class_validator_1 = require("class-validator");
|
|
14
15
|
/**
|
|
15
16
|
* Body del registro (recepción) de un lote de tarjetas para una tienda. Los sobres llegan sellados:
|
|
@@ -30,6 +31,8 @@ __decorate([
|
|
|
30
31
|
], RegisterCardBatchRequest.prototype, "quantity", void 0);
|
|
31
32
|
__decorate([
|
|
32
33
|
(0, class_validator_1.IsString)(),
|
|
34
|
+
(0, class_transformer_1.Transform)(({ value }) => (typeof value === 'string' ? value.trim() : value)),
|
|
35
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
33
36
|
__metadata("design:type", String)
|
|
34
37
|
], RegisterCardBatchRequest.prototype, "supplierBatchRef", void 0);
|
|
35
38
|
__decorate([
|
|
@@ -3,5 +3,10 @@ import { CardWriteOffReasonEnum } from '../../enums/CardWriteOffReasonEnum';
|
|
|
3
3
|
export declare class WriteOffCardStockRequest {
|
|
4
4
|
quantity: number;
|
|
5
5
|
reason: CardWriteOffReasonEnum;
|
|
6
|
+
/**
|
|
7
|
+
* Clave de idempotencia de la baja, generada por el caller una vez por intento. Un reintento
|
|
8
|
+
* devuelve el asiento original: sin ella un doble clic descontaría el doble.
|
|
9
|
+
*/
|
|
10
|
+
operationId: string;
|
|
6
11
|
notes?: string | null;
|
|
7
12
|
}
|
|
@@ -25,6 +25,10 @@ __decorate([
|
|
|
25
25
|
(0, class_validator_1.IsEnum)(CardWriteOffReasonEnum_1.CardWriteOffReasonEnum),
|
|
26
26
|
__metadata("design:type", String)
|
|
27
27
|
], WriteOffCardStockRequest.prototype, "reason", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, class_validator_1.IsUUID)(),
|
|
30
|
+
__metadata("design:type", String)
|
|
31
|
+
], WriteOffCardStockRequest.prototype, "operationId", void 0);
|
|
28
32
|
__decorate([
|
|
29
33
|
(0, class_validator_1.IsOptional)(),
|
|
30
34
|
(0, class_validator_1.IsString)(),
|
|
@@ -5,7 +5,10 @@
|
|
|
5
5
|
export interface CardDeliveryResponse {
|
|
6
6
|
deliveryId: string;
|
|
7
7
|
movementSk: string;
|
|
8
|
-
/**
|
|
9
|
-
|
|
8
|
+
/**
|
|
9
|
+
* Saldo disponible de la tienda al momento de responder, leído después de la transacción. No es
|
|
10
|
+
* el saldo del instante del asiento: si otra entrega cae en medio, refleja las dos.
|
|
11
|
+
*/
|
|
12
|
+
availableNow: number;
|
|
10
13
|
occurredAt: string;
|
|
11
14
|
}
|
|
@@ -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,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,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,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,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,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
|
+
}
|
package/package.json
CHANGED
|
@@ -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
|
+
}
|
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'
|