@fiado/type-kit 3.316.1 → 3.317.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 (69) hide show
  1. package/_test_/unit/retailCustomer/welcomeBonusRequests.test.ts +153 -0
  2. package/bin/retailCustomer/dtos/requests/WelcomeAccreditationRequest.d.ts +27 -0
  3. package/bin/retailCustomer/dtos/requests/WelcomeAccreditationRequest.js +113 -0
  4. package/bin/retailCustomer/dtos/requests/WelcomeAccreditationResultRequest.d.ts +17 -0
  5. package/bin/retailCustomer/dtos/requests/WelcomeAccreditationResultRequest.js +75 -0
  6. package/bin/retailCustomer/dtos/responses/WelcomeAccreditationResponse.d.ts +12 -0
  7. package/bin/retailCustomer/dtos/responses/WelcomeBonusResponse.d.ts +43 -0
  8. package/bin/retailCustomer/enums/WelcomeBonusAmountSourceEnum.d.ts +12 -0
  9. package/bin/retailCustomer/enums/WelcomeBonusAmountSourceEnum.js +16 -0
  10. package/bin/retailCustomer/enums/WelcomeBonusSettlementStatusEnum.d.ts +10 -0
  11. package/bin/retailCustomer/enums/WelcomeBonusSettlementStatusEnum.js +14 -0
  12. package/bin/retailCustomer/enums/WelcomeBonusStatusEnum.d.ts +17 -0
  13. package/bin/retailCustomer/enums/WelcomeBonusStatusEnum.js +21 -0
  14. package/bin/retailCustomer/index.d.ts +7 -0
  15. package/bin/retailCustomer/index.js +7 -0
  16. package/bin/walletFunding/dtos/CreditWalletFundingRequest.d.ts +0 -14
  17. package/bin/walletFunding/dtos/CreditWalletFundingRequest.js +0 -6
  18. package/package.json +1 -1
  19. package/src/retailCustomer/dtos/requests/WelcomeAccreditationRequest.ts +96 -0
  20. package/src/retailCustomer/dtos/requests/WelcomeAccreditationResultRequest.ts +62 -0
  21. package/src/retailCustomer/dtos/responses/WelcomeAccreditationResponse.ts +13 -0
  22. package/src/retailCustomer/dtos/responses/WelcomeBonusResponse.ts +44 -0
  23. package/src/retailCustomer/enums/WelcomeBonusAmountSourceEnum.ts +12 -0
  24. package/src/retailCustomer/enums/WelcomeBonusSettlementStatusEnum.ts +10 -0
  25. package/src/retailCustomer/enums/WelcomeBonusStatusEnum.ts +17 -0
  26. package/src/retailCustomer/index.ts +7 -0
  27. package/src/walletFunding/dtos/CreditWalletFundingRequest.ts +0 -14
  28. package/bin/benefitCenter/enums/BenefitFlowEnum.d.ts +0 -11
  29. package/bin/benefitCenter/enums/BenefitFlowEnum.js +0 -15
  30. package/bin/identity/enums/SelfieSourceEnum.d.ts +0 -10
  31. package/bin/identity/enums/SelfieSourceEnum.js +0 -14
  32. package/bin/loanCredit/dtos/requests/UpdateActivationChecklistRequest.d.ts +0 -11
  33. package/bin/loanCredit/dtos/requests/UpdateActivationChecklistRequest.js +0 -46
  34. package/bin/loanCredit/enums/ClientLevelEnum.d.ts +0 -11
  35. package/bin/loanCredit/enums/ClientLevelEnum.js +0 -15
  36. package/bin/retailCards/dtos/requests/AssignCardRequest.d.ts +0 -6
  37. package/bin/retailCards/dtos/requests/AssignCardRequest.js +0 -30
  38. package/bin/retailCards/dtos/requests/CancelCardRequest.d.ts +0 -5
  39. package/bin/retailCards/dtos/requests/CancelCardRequest.js +0 -22
  40. package/bin/retailCards/dtos/responses/RetailCardResponse.d.ts +0 -12
  41. package/bin/retailCards/enums/CardBatchStatusEnum.d.ts +0 -17
  42. package/bin/retailCards/enums/CardBatchStatusEnum.js +0 -21
  43. package/bin/retailCards/enums/CardCancelReasonEnum.d.ts +0 -13
  44. package/bin/retailCards/enums/CardCancelReasonEnum.js +0 -17
  45. package/bin/retailCards/enums/RetailCardStatusEnum.d.ts +0 -13
  46. package/bin/retailCards/enums/RetailCardStatusEnum.js +0 -17
  47. package/bin/retailCards/events/RetailCardAssignedV1.d.ts +0 -10
  48. package/bin/retailCards/events/RetailCardCancelledV1.d.ts +0 -9
  49. package/bin/retailCards/events/RetailCardCancelledV1.js +0 -2
  50. package/bin/retailCards/events/RetailCardReleasedV1.d.ts +0 -7
  51. package/bin/retailCards/events/RetailCardReleasedV1.js +0 -2
  52. package/bin/retailWizard/dtos/requests/CompleteSaleRequest.d.ts +0 -9
  53. package/bin/retailWizard/dtos/requests/CompleteSaleRequest.js +0 -29
  54. package/bin/retailWizard/dtos/requests/MarkPcfCardDeliveredRequest.d.ts +0 -4
  55. package/bin/retailWizard/dtos/requests/MarkPcfCardDeliveredRequest.js +0 -23
  56. package/bin/walletFunding/dtos/CancelFundingReferenceRequest.d.ts +0 -6
  57. package/bin/walletFunding/dtos/CancelFundingReferenceRequest.js +0 -31
  58. package/bin/walletFunding/dtos/CancelFundingReferenceResponse.d.ts +0 -7
  59. package/bin/walletFunding/dtos/CancelFundingReferenceResponse.js +0 -6
  60. package/bin/walletFunding/dtos/CancelFundingRequest.d.ts +0 -11
  61. package/bin/walletFunding/dtos/CancelFundingRequest.js +0 -33
  62. package/bin/walletFunding/dtos/CancelFundingResponse.d.ts +0 -14
  63. package/bin/walletFunding/dtos/CancelFundingResponse.js +0 -12
  64. package/bin/walletFunding/dtos/CancelWalletFundingRequest.d.ts +0 -3
  65. package/bin/walletFunding/dtos/CancelWalletFundingRequest.js +0 -21
  66. package/bin/walletFunding/dtos/CancelWalletFundingResponse.d.ts +0 -7
  67. package/bin/walletFunding/dtos/CancelWalletFundingResponse.js +0 -6
  68. /package/bin/{retailCards/dtos/responses/RetailCardResponse.js → retailCustomer/dtos/responses/WelcomeAccreditationResponse.js} +0 -0
  69. /package/bin/{retailCards/events/RetailCardAssignedV1.js → retailCustomer/dtos/responses/WelcomeBonusResponse.js} +0 -0
@@ -0,0 +1,96 @@
1
+ import { Expose, Transform } from 'class-transformer';
2
+ import { IsEnum, IsInt, IsNotEmpty, IsOptional, IsPositive, IsString } from 'class-validator';
3
+ import { WelcomeBonusAmountSourceEnum } from '../../enums/WelcomeBonusAmountSourceEnum';
4
+
5
+ /** Recorta los strings del borde: un valor con espacios ensucia claves y cortes de conciliación. */
6
+ const trim = (): PropertyDecorator =>
7
+ Transform(({ value }) => (typeof value === 'string' ? value.trim() : value));
8
+
9
+ /**
10
+ * Datos de la venta que acompañan la reserva del bono de bienvenida (D33):
11
+ * `POST /private/customers/:id/welcome-accreditation`. SureKeep Fase 2 — pista Retail.
12
+ *
13
+ * **TODOS los campos son opcionales a propósito.** El customer despliega antes que el wizard, así que
14
+ * durante la ventana el wizard viejo sigue llamando sin body: el asiento nace incompleto y se acredita
15
+ * igual. Exigirlos convertiría esa ventana en un 400 que deja al cliente sin bono.
16
+ */
17
+ export class WelcomeAccreditationRequest {
18
+ /** Tienda donde se dio el bono — es la partición del asiento. */
19
+ @Expose()
20
+ @IsOptional()
21
+ @trim()
22
+ @IsString()
23
+ @IsNotEmpty()
24
+ storeId?: string;
25
+
26
+ @Expose()
27
+ @IsOptional()
28
+ @trim()
29
+ @IsString()
30
+ @IsNotEmpty()
31
+ retailerId?: string;
32
+
33
+ /** Vendedor que cerró la venta. */
34
+ @Expose()
35
+ @IsOptional()
36
+ @trim()
37
+ @IsString()
38
+ @IsNotEmpty()
39
+ sellerRetailUserId?: string;
40
+
41
+ @Expose()
42
+ @IsOptional()
43
+ @trim()
44
+ @IsString()
45
+ @IsNotEmpty()
46
+ saleId?: string;
47
+
48
+ /** Folio de la venta, tal como lo ve el vendedor en el ticket. */
49
+ @Expose()
50
+ @IsOptional()
51
+ @trim()
52
+ @IsString()
53
+ @IsNotEmpty()
54
+ folio?: string;
55
+
56
+ @Expose()
57
+ @IsOptional()
58
+ @trim()
59
+ @IsString()
60
+ @IsNotEmpty()
61
+ wizardSessionId?: string;
62
+
63
+ @Expose()
64
+ @IsOptional()
65
+ @IsInt()
66
+ @IsPositive()
67
+ amountCents?: number;
68
+
69
+ /** ISO-4217. Ausente ⇒ el server asienta `MXN`. */
70
+ @Expose()
71
+ @IsOptional()
72
+ @trim()
73
+ @IsString()
74
+ @IsNotEmpty()
75
+ currency?: string;
76
+
77
+ @Expose()
78
+ @IsOptional()
79
+ @IsEnum(WelcomeBonusAmountSourceEnum)
80
+ amountSource?: WelcomeBonusAmountSourceEnum;
81
+
82
+ /** Clave con la que el caller acredita en el processor — ata el asiento al movimiento de plata. */
83
+ @Expose()
84
+ @IsOptional()
85
+ @trim()
86
+ @IsString()
87
+ @IsNotEmpty()
88
+ idempotencyKey?: string;
89
+
90
+ @Expose()
91
+ @IsOptional()
92
+ @trim()
93
+ @IsString()
94
+ @IsNotEmpty()
95
+ providerName?: string;
96
+ }
@@ -0,0 +1,62 @@
1
+ import { Expose, Transform } from 'class-transformer';
2
+ import { IsIn, IsNotEmpty, IsOptional, IsString, ValidateIf } from 'class-validator';
3
+ import { WelcomeBonusStatusEnum } from '../../enums/WelcomeBonusStatusEnum';
4
+
5
+ /** Recorta los strings del borde: un valor con espacios ensucia claves y cortes de conciliación. */
6
+ const trim = (): PropertyDecorator =>
7
+ Transform(({ value }) => (typeof value === 'string' ? value.trim() : value));
8
+
9
+ /** Resultados que el caller puede asentar. `PENDING` lo escribe el server al reservar, no el caller. */
10
+ const RESULT_STATUSES = [
11
+ WelcomeBonusStatusEnum.ACCREDITED,
12
+ WelcomeBonusStatusEnum.FAILED,
13
+ WelcomeBonusStatusEnum.UNVERIFIED,
14
+ ];
15
+
16
+ /** Resultados que exigen un motivo legible: sin él nadie puede revisar el asiento después. */
17
+ const STATUSES_REQUIRING_REASON: WelcomeBonusStatusEnum[] = [
18
+ WelcomeBonusStatusEnum.FAILED,
19
+ WelcomeBonusStatusEnum.UNVERIFIED,
20
+ ];
21
+
22
+ /**
23
+ * Cierre del asiento del bono de bienvenida (D33):
24
+ * `PUT /private/customers/:id/welcome-accreditation/result`. SureKeep Fase 2 — pista Retail.
25
+ *
26
+ * `FAILED` libera el candado `welcomeAccredited` para que la venta se reintente. `UNVERIFIED` lo deja
27
+ * tomado: el `walletFundingCredit` del processor no deduplica, así que liberar tras un timeout podría
28
+ * acreditar plata real dos veces.
29
+ */
30
+ export class WelcomeAccreditationResultRequest {
31
+ /** Referencia opaca del asiento, tal como la devolvió la reserva. */
32
+ @Expose()
33
+ @trim()
34
+ @IsString()
35
+ @IsNotEmpty()
36
+ bonusKey!: string;
37
+
38
+ @Expose()
39
+ @IsIn(RESULT_STATUSES)
40
+ status!: WelcomeBonusStatusEnum;
41
+
42
+ @Expose()
43
+ @ValidateIf((o: WelcomeAccreditationResultRequest) => o.status === WelcomeBonusStatusEnum.ACCREDITED)
44
+ @trim()
45
+ @IsString()
46
+ @IsNotEmpty({ message: 'processorTransactionId es obligatorio cuando status es ACCREDITED' })
47
+ processorTransactionId?: string;
48
+
49
+ @Expose()
50
+ @ValidateIf((o: WelcomeAccreditationResultRequest) => STATUSES_REQUIRING_REASON.includes(o.status))
51
+ @trim()
52
+ @IsString()
53
+ @IsNotEmpty({ message: 'failReason es obligatorio cuando status es FAILED o UNVERIFIED' })
54
+ failReason?: string;
55
+
56
+ @Expose()
57
+ @IsOptional()
58
+ @trim()
59
+ @IsString()
60
+ @IsNotEmpty()
61
+ providerName?: string;
62
+ }
@@ -0,0 +1,13 @@
1
+ import { CustomerResponse } from './CustomerResponse';
2
+ import { WelcomeBonusResponse } from './WelcomeBonusResponse';
3
+
4
+ /**
5
+ * Respuesta de la reserva del bono de bienvenida (D33): el cliente con el candado ya tomado y el
6
+ * asiento recién abierto en `PENDING`. SureKeep Fase 2 — pista Retail.
7
+ *
8
+ * El `bonus.bonusKey` es lo que el caller guarda para cerrar el asiento con el resultado del processor.
9
+ */
10
+ export interface WelcomeAccreditationResponse {
11
+ customer: CustomerResponse;
12
+ bonus: WelcomeBonusResponse;
13
+ }
@@ -0,0 +1,44 @@
1
+ import { WelcomeBonusAmountSourceEnum } from '../../enums/WelcomeBonusAmountSourceEnum';
2
+ import { WelcomeBonusSettlementStatusEnum } from '../../enums/WelcomeBonusSettlementStatusEnum';
3
+ import { WelcomeBonusStatusEnum } from '../../enums/WelcomeBonusStatusEnum';
4
+
5
+ /**
6
+ * Asiento del bono de bienvenida (D33) hacia el consumidor. SureKeep Fase 2 — pista Retail.
7
+ *
8
+ * Es el libro contable del bono: monto, venta, tienda, vendedor y resultado del processor, para
9
+ * conciliar contra quien absorbe el costo (`fundedBy`). La unicidad del bono NO vive acá — sigue en
10
+ * `RetailCustomer.welcomeAccredited`.
11
+ *
12
+ * ⚠️ **Sin PII**: no lleva nombre, teléfono ni CLABE. El Cliente 360 los resuelve por
13
+ * `retailCustomerId`.
14
+ */
15
+ export interface WelcomeBonusResponse {
16
+ bonusId: string;
17
+ /** Referencia opaca del asiento — es lo que el caller manda para cerrarlo. */
18
+ bonusKey: string;
19
+ retailCustomerId: string;
20
+ fiadoDirectoryId: string | null;
21
+ saleId: string | null;
22
+ folio: string | null;
23
+ wizardSessionId: string | null;
24
+ retailerId: string | null;
25
+ /** Tienda donde se dio el bono. `UNKNOWN` cuando el caller no la declaró. */
26
+ storeId: string;
27
+ sellerRetailUserId: string | null;
28
+ amountCents: number | null;
29
+ currency: string;
30
+ amountSource: WelcomeBonusAmountSourceEnum | null;
31
+ status: WelcomeBonusStatusEnum;
32
+ failReason: string | null;
33
+ requestedAt: string;
34
+ resolvedAt: string | null;
35
+ processorTransactionId: string | null;
36
+ idempotencyKey: string | null;
37
+ providerName: string | null;
38
+ /** Quién absorbe el costo del bono. */
39
+ fundedBy: string;
40
+ settlementStatus: WelcomeBonusSettlementStatusEnum;
41
+ settlementBatchId: string | null;
42
+ createdAt: string;
43
+ updatedAt: string;
44
+ }
@@ -0,0 +1,12 @@
1
+ /**
2
+ * De dónde salió el monto del bono. SureKeep Fase 2 — pista Retail.
3
+ *
4
+ * El resolver del wizard cae a un default local cuando `loan-config` no responde; para conciliar
5
+ * importa distinguir el monto parametrizado del que salió del fallback.
6
+ */
7
+ export enum WelcomeBonusAmountSourceEnum {
8
+ /** Parámetro de negocio de `loan-config` (`WELCOME_BONUS/amount_cents`). */
9
+ PARAM = 'PARAM',
10
+ /** Default local del wizard, usado porque `loan-config` no respondió. */
11
+ DEFAULT = 'DEFAULT',
12
+ }
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Estado de conciliación del asiento contra quien absorbe el costo del bono (`fundedBy`).
3
+ * SureKeep Fase 2 — pista Retail.
4
+ */
5
+ export enum WelcomeBonusSettlementStatusEnum {
6
+ /** Asentado y todavía no remitido a quien lo financia. */
7
+ PENDING = 'PENDING',
8
+ /** Ya incluido en un lote de remisión (`settlementBatchId`). */
9
+ REMITTED = 'REMITTED',
10
+ }
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Estado del asiento del bono de bienvenida (D33). SureKeep Fase 2 — pista Retail.
3
+ *
4
+ * El fallo del processor NO es una sola cosa: `FAILED` es un rechazo inequívoco y libera el candado
5
+ * `welcomeAccredited` para reintentar; `UNVERIFIED` es un fallo ambiguo (timeout, 5xx) que pudo haber
6
+ * movido plata, así que el candado queda tomado y el caso va a revisión manual.
7
+ */
8
+ export enum WelcomeBonusStatusEnum {
9
+ /** Asiento reservado, antes de llamar al processor. */
10
+ PENDING = 'PENDING',
11
+ /** El processor confirmó la acreditación (llega con `processorTransactionId`). */
12
+ ACCREDITED = 'ACCREDITED',
13
+ /** Rechazo inequívoco del processor. Libera el candado → reintentable. */
14
+ FAILED = 'FAILED',
15
+ /** Fallo ambiguo: no se sabe si acreditó. Candado tomado → revisión manual. */
16
+ UNVERIFIED = 'UNVERIFIED',
17
+ }
@@ -4,6 +4,9 @@ export * from './enums/RetailKycStatusEnum';
4
4
  export * from './enums/KycModalityEnum';
5
5
  export * from './enums/KycReviewResultEnum';
6
6
  export * from './enums/RetailCustomerStatusEnum';
7
+ export * from './enums/WelcomeBonusStatusEnum';
8
+ export * from './enums/WelcomeBonusAmountSourceEnum';
9
+ export * from './enums/WelcomeBonusSettlementStatusEnum';
7
10
 
8
11
  // Entidades (planas, con class-validator + @Expose)
9
12
  export * from './dtos/KycReview';
@@ -16,10 +19,14 @@ export * from './dtos/requests/UpsertCustomerFromKycRequest';
16
19
  export * from './dtos/requests/UpdateCustomerRequest';
17
20
  export * from './dtos/requests/AccountResultRequest';
18
21
  export * from './dtos/requests/KycReviewRequest';
22
+ export * from './dtos/requests/WelcomeAccreditationRequest';
23
+ export * from './dtos/requests/WelcomeAccreditationResultRequest';
19
24
 
20
25
  // Response DTOs
21
26
  export * from './dtos/responses/CustomerResponse';
22
27
  export * from './dtos/responses/Customer360Response';
28
+ export * from './dtos/responses/WelcomeBonusResponse';
29
+ export * from './dtos/responses/WelcomeAccreditationResponse';
23
30
 
24
31
  // Contratos de eventos (PascalCase + sufijo V1)
25
32
  export * from './events/CustomerCreatedV1';
@@ -21,18 +21,4 @@ export class CreditWalletFundingRequest {
21
21
  @IsOptional() @IsString() @MaxLength(64) center?: string;
22
22
  /** Si viene, la FiadoTx se crea con este folio en vez de generar uno nuevo. */
23
23
  @IsOptional() @IsString() @MaxLength(64) processorTransactionNumber?: string;
24
- /**
25
- * Producto de `ProductCatalog_GT` con el que tarifar este fondeo — de ahi
26
- * salen la comision que Fiado le cobra al cliente y su IVA.
27
- *
28
- * Lo decide el CONNECTOR y no el processor porque la tarifa depende del
29
- * canal, y solo el connector ve donde pago el cliente: el proveedor manda
30
- * el comercio en el webhook del cash-in. Ej. `SP_CASH_IN` (cuota fija fuera
31
- * de OXXO) vs `SP_CASH_IN_OXXO` (porcentual en OXXO).
32
- *
33
- * Opcional por compatibilidad: los callers que no lo mandan siguen cayendo
34
- * al producto por defecto del processor (`MEX_WALLET_FUNDING_CREDIT`), que
35
- * es el que usa Equality/Passport hoy.
36
- */
37
- @IsOptional() @IsString() @MaxLength(64) productCatalogId?: string;
38
24
  }
@@ -1,11 +0,0 @@
1
- export declare enum BenefitFlowEnum {
2
- TOPUPS = "TOPUPS",
3
- BILL_PAYMENT = "BILL_PAYMENT",
4
- CREDIT = "CREDIT",
5
- INSURANCE = "INSURANCE",
6
- DONATION = "DONATION",
7
- PHARMACY = "PHARMACY",
8
- REMITTANCE = "REMITTANCE",
9
- /** Fondeo de wallet PCF con efectivo via provider externo (Equality/Passport, OpenPay, …) — spec 13. */
10
- WALLET_FUNDING = "WALLET_FUNDING"
11
- }
@@ -1,15 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.BenefitFlowEnum = void 0;
4
- var BenefitFlowEnum;
5
- (function (BenefitFlowEnum) {
6
- BenefitFlowEnum["TOPUPS"] = "TOPUPS";
7
- BenefitFlowEnum["BILL_PAYMENT"] = "BILL_PAYMENT";
8
- BenefitFlowEnum["CREDIT"] = "CREDIT";
9
- BenefitFlowEnum["INSURANCE"] = "INSURANCE";
10
- BenefitFlowEnum["DONATION"] = "DONATION";
11
- BenefitFlowEnum["PHARMACY"] = "PHARMACY";
12
- BenefitFlowEnum["REMITTANCE"] = "REMITTANCE";
13
- /** Fondeo de wallet PCF con efectivo via provider externo (Equality/Passport, OpenPay, …) — spec 13. */
14
- BenefitFlowEnum["WALLET_FUNDING"] = "WALLET_FUNDING";
15
- })(BenefitFlowEnum || (exports.BenefitFlowEnum = BenefitFlowEnum = {}));
@@ -1,10 +0,0 @@
1
- /**
2
- * Con qué criterio se resolvió cuál archivo de S3 es la selfie del usuario.
3
- * Le dice al consumidor qué tan confiable es el match antes de mandarla a un facematch.
4
- */
5
- export declare enum SelfieSourceEnum {
6
- /** Matcheó el verificationId de la verificación vigente en People. */
7
- VERIFICATION = "VERIFICATION",
8
- /** No hubo match por verificación: se tomó el archivo de selfie más reciente del bucket. */
9
- LATEST = "LATEST"
10
- }
@@ -1,14 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SelfieSourceEnum = void 0;
4
- /**
5
- * Con qué criterio se resolvió cuál archivo de S3 es la selfie del usuario.
6
- * Le dice al consumidor qué tan confiable es el match antes de mandarla a un facematch.
7
- */
8
- var SelfieSourceEnum;
9
- (function (SelfieSourceEnum) {
10
- /** Matcheó el verificationId de la verificación vigente en People. */
11
- SelfieSourceEnum["VERIFICATION"] = "VERIFICATION";
12
- /** No hubo match por verificación: se tomó el archivo de selfie más reciente del bucket. */
13
- SelfieSourceEnum["LATEST"] = "LATEST";
14
- })(SelfieSourceEnum || (exports.SelfieSourceEnum = SelfieSourceEnum = {}));
@@ -1,11 +0,0 @@
1
- /**
2
- * Body de PUT /credits/:creditId/checklist (loan-credit-business). Marca condiciones de activación
3
- * cumplidas. Solo se mandan las que cambian; en F3 las marcarán los flujos de firma de contrato
4
- * (`downPayment` + `contractSigned`) y de enrolamiento MDM (`imeiEnrolled` + `lockVerified`).
5
- */
6
- export declare class UpdateActivationChecklistRequest {
7
- downPayment?: boolean;
8
- contractSigned?: boolean;
9
- imeiEnrolled?: boolean;
10
- lockVerified?: boolean;
11
- }
@@ -1,46 +0,0 @@
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.UpdateActivationChecklistRequest = void 0;
13
- const class_transformer_1 = require("class-transformer");
14
- const class_validator_1 = require("class-validator");
15
- /**
16
- * Body de PUT /credits/:creditId/checklist (loan-credit-business). Marca condiciones de activación
17
- * cumplidas. Solo se mandan las que cambian; en F3 las marcarán los flujos de firma de contrato
18
- * (`downPayment` + `contractSigned`) y de enrolamiento MDM (`imeiEnrolled` + `lockVerified`).
19
- */
20
- class UpdateActivationChecklistRequest {
21
- }
22
- exports.UpdateActivationChecklistRequest = UpdateActivationChecklistRequest;
23
- __decorate([
24
- (0, class_transformer_1.Expose)(),
25
- (0, class_validator_1.IsOptional)(),
26
- (0, class_validator_1.IsBoolean)(),
27
- __metadata("design:type", Boolean)
28
- ], UpdateActivationChecklistRequest.prototype, "downPayment", void 0);
29
- __decorate([
30
- (0, class_transformer_1.Expose)(),
31
- (0, class_validator_1.IsOptional)(),
32
- (0, class_validator_1.IsBoolean)(),
33
- __metadata("design:type", Boolean)
34
- ], UpdateActivationChecklistRequest.prototype, "contractSigned", void 0);
35
- __decorate([
36
- (0, class_transformer_1.Expose)(),
37
- (0, class_validator_1.IsOptional)(),
38
- (0, class_validator_1.IsBoolean)(),
39
- __metadata("design:type", Boolean)
40
- ], UpdateActivationChecklistRequest.prototype, "imeiEnrolled", void 0);
41
- __decorate([
42
- (0, class_transformer_1.Expose)(),
43
- (0, class_validator_1.IsOptional)(),
44
- (0, class_validator_1.IsBoolean)(),
45
- __metadata("design:type", Boolean)
46
- ], UpdateActivationChecklistRequest.prototype, "lockVerified", void 0);
@@ -1,11 +0,0 @@
1
- /**
2
- * Nivel del cliente según su SCI (M7/05_MOTOR §3.2): 21-60 Bronce · 61-80 Plata · 81-100 Oro.
3
- * Distinto de `CreditPlanLevelEnum` de loanOfferings (que además tiene `ALL` para planes):
4
- * un CLIENTE nunca es `ALL`.
5
- * @enum {string}
6
- */
7
- export declare enum ClientLevelEnum {
8
- BRONZE = "BRONZE",
9
- SILVER = "SILVER",
10
- GOLD = "GOLD"
11
- }
@@ -1,15 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ClientLevelEnum = void 0;
4
- /**
5
- * Nivel del cliente según su SCI (M7/05_MOTOR §3.2): 21-60 Bronce · 61-80 Plata · 81-100 Oro.
6
- * Distinto de `CreditPlanLevelEnum` de loanOfferings (que además tiene `ALL` para planes):
7
- * un CLIENTE nunca es `ALL`.
8
- * @enum {string}
9
- */
10
- var ClientLevelEnum;
11
- (function (ClientLevelEnum) {
12
- ClientLevelEnum["BRONZE"] = "BRONZE";
13
- ClientLevelEnum["SILVER"] = "SILVER";
14
- ClientLevelEnum["GOLD"] = "GOLD";
15
- })(ClientLevelEnum || (exports.ClientLevelEnum = ClientLevelEnum = {}));
@@ -1,6 +0,0 @@
1
- /** Body de la asignación de una tarjeta física a un cliente. */
2
- export declare class AssignCardRequest {
3
- assignedToCustomerId: string;
4
- assignedByUserId: string;
5
- creditId?: string;
6
- }
@@ -1,30 +0,0 @@
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);
@@ -1,5 +0,0 @@
1
- import { CardCancelReasonEnum } from '../../enums/CardCancelReasonEnum';
2
- /** Body de la cancelación (anulación) de una tarjeta física. */
3
- export declare class CancelCardRequest {
4
- reason: CardCancelReasonEnum;
5
- }
@@ -1,22 +0,0 @@
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);
@@ -1,12 +0,0 @@
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
- }
@@ -1,17 +0,0 @@
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
- }
@@ -1,21 +0,0 @@
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 = {}));
@@ -1,13 +0,0 @@
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
- }
@@ -1,17 +0,0 @@
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 = {}));
@@ -1,13 +0,0 @@
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
- }
@@ -1,17 +0,0 @@
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 = {}));
@@ -1,10 +0,0 @@
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
- }