@fiado/type-kit 3.442.0 → 3.444.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 (33) hide show
  1. package/_test_/unit/productCatalog/enums/refund-product-enums.test.ts +18 -0
  2. package/_test_/unit/transaction/RefundChannelEnum.test.ts +15 -0
  3. package/_test_/unit/transaction/RefundManualExecutionStatus.test.ts +16 -0
  4. package/_test_/unit/transaction/RefundPathTypeEnum.test.ts +18 -0
  5. package/_test_/unit/transaction/refund-dtos.test.ts +78 -0
  6. package/bin/productCatalog/enums/ProductSubtypeEnum.d.ts +8 -1
  7. package/bin/productCatalog/enums/ProductSubtypeEnum.js +10 -0
  8. package/bin/productCatalog/enums/ProductTypeEnum.d.ts +19 -1
  9. package/bin/productCatalog/enums/ProductTypeEnum.js +18 -0
  10. package/bin/transaction/dtos/AuthorizeRefundRequest.d.ts +38 -0
  11. package/bin/transaction/dtos/AuthorizeRefundRequest.js +2 -0
  12. package/bin/transaction/dtos/ConfirmManualExecutionRequest.d.ts +7 -0
  13. package/bin/transaction/dtos/ConfirmManualExecutionRequest.js +2 -0
  14. package/bin/transaction/dtos/ReverseRefundRequest.d.ts +22 -0
  15. package/bin/transaction/dtos/ReverseRefundRequest.js +2 -0
  16. package/bin/transaction/enums/RefundChannelEnum.d.ts +4 -0
  17. package/bin/transaction/enums/RefundChannelEnum.js +8 -0
  18. package/bin/transaction/enums/RefundManualExecutionStatus.d.ts +5 -0
  19. package/bin/transaction/enums/RefundManualExecutionStatus.js +9 -0
  20. package/bin/transaction/enums/RefundPathTypeEnum.d.ts +7 -0
  21. package/bin/transaction/enums/RefundPathTypeEnum.js +11 -0
  22. package/bin/transaction/index.d.ts +6 -0
  23. package/bin/transaction/index.js +6 -0
  24. package/package.json +1 -1
  25. package/src/productCatalog/enums/ProductSubtypeEnum.ts +13 -0
  26. package/src/productCatalog/enums/ProductTypeEnum.ts +19 -1
  27. package/src/transaction/dtos/AuthorizeRefundRequest.ts +36 -0
  28. package/src/transaction/dtos/ConfirmManualExecutionRequest.ts +7 -0
  29. package/src/transaction/dtos/ReverseRefundRequest.ts +19 -0
  30. package/src/transaction/enums/RefundChannelEnum.ts +4 -0
  31. package/src/transaction/enums/RefundManualExecutionStatus.ts +5 -0
  32. package/src/transaction/enums/RefundPathTypeEnum.ts +7 -0
  33. package/src/transaction/index.ts +6 -0
@@ -0,0 +1,18 @@
1
+ import 'reflect-metadata';
2
+ import { ProductTypeEnum } from '../../../../src/productCatalog/enums/ProductTypeEnum';
3
+ import { ProductSubtypeEnum } from '../../../../src/productCatalog/enums/ProductSubtypeEnum';
4
+
5
+ describe('Enums refund PCF', () => {
6
+ it('agrega REFUND_PCF y REFUND_PCF_REVERSE a ProductTypeEnum', () => {
7
+ expect(ProductTypeEnum.REFUND_PCF).toBe('REFUND_PCF');
8
+ expect(ProductTypeEnum.REFUND_PCF_REVERSE).toBe('REFUND_PCF_REVERSE');
9
+ });
10
+ it('agrega los 6 subtypes de refund', () => {
11
+ expect(ProductSubtypeEnum.REFUND_PCF_DICTAMEN_PROCEDE).toBe('DICTAMEN_PROCEDE');
12
+ expect(ProductSubtypeEnum.REFUND_PCF_AUTO_T2_SIN_2FA).toBe('AUTO_T2_SIN_2FA');
13
+ expect(ProductSubtypeEnum.REFUND_PCF_ERROR_OPERATIVO).toBe('ERROR_OPERATIVO');
14
+ expect(ProductSubtypeEnum.REFUND_PCF_DOMICILIACION_T1_60D).toBe('DOMICILIACION_T1_60D');
15
+ expect(ProductSubtypeEnum.REFUND_PCF_DOMICILIACION_T1_61_90D).toBe('DOMICILIACION_T1_61_90D');
16
+ expect(ProductSubtypeEnum.REFUND_PCF_REVERSE_DICTAMEN_CON_2FA_TARDIO).toBe('DICTAMEN_CON_2FA_TARDIO');
17
+ });
18
+ });
@@ -0,0 +1,15 @@
1
+ import 'reflect-metadata';
2
+ import { RefundChannelEnum } from '../../../src/transaction';
3
+
4
+ describe('RefundChannelEnum', () => {
5
+ it('expone INTERNAL_PCF y SPEI_OUT_MANUAL', () => {
6
+ expect(RefundChannelEnum.INTERNAL_PCF).toBe('INTERNAL_PCF');
7
+ expect(RefundChannelEnum.SPEI_OUT_MANUAL).toBe('SPEI_OUT_MANUAL');
8
+ });
9
+
10
+ it('no tiene valores de más', () => {
11
+ expect(Object.values(RefundChannelEnum).sort()).toEqual(
12
+ ['INTERNAL_PCF', 'SPEI_OUT_MANUAL'].sort()
13
+ );
14
+ });
15
+ });
@@ -0,0 +1,16 @@
1
+ import 'reflect-metadata';
2
+ import { RefundManualExecutionStatus } from '../../../src/transaction';
3
+
4
+ describe('RefundManualExecutionStatus', () => {
5
+ it('expone PENDING_MANUAL_EXECUTION, EXECUTED, CANCELLED', () => {
6
+ expect(RefundManualExecutionStatus.PENDING_MANUAL_EXECUTION).toBe('PENDING_MANUAL_EXECUTION');
7
+ expect(RefundManualExecutionStatus.EXECUTED).toBe('EXECUTED');
8
+ expect(RefundManualExecutionStatus.CANCELLED).toBe('CANCELLED');
9
+ });
10
+
11
+ it('no tiene valores de más', () => {
12
+ expect(Object.values(RefundManualExecutionStatus).sort()).toEqual(
13
+ ['PENDING_MANUAL_EXECUTION', 'EXECUTED', 'CANCELLED'].sort()
14
+ );
15
+ });
16
+ });
@@ -0,0 +1,18 @@
1
+ import 'reflect-metadata';
2
+ import { RefundPathTypeEnum } from '../../../src/transaction';
3
+
4
+ describe('RefundPathTypeEnum', () => {
5
+ it('expone las 5 rutas de reintegro definidas en SP1', () => {
6
+ expect(RefundPathTypeEnum.DICTAMEN_PROCEDE).toBe('DICTAMEN_PROCEDE');
7
+ expect(RefundPathTypeEnum.AUTO_T2_SIN_2FA).toBe('AUTO_T2_SIN_2FA');
8
+ expect(RefundPathTypeEnum.ERROR_OPERATIVO).toBe('ERROR_OPERATIVO');
9
+ expect(RefundPathTypeEnum.DOMICILIACION_T1_60D).toBe('DOMICILIACION_T1_60D');
10
+ expect(RefundPathTypeEnum.DOMICILIACION_T1_61_90D).toBe('DOMICILIACION_T1_61_90D');
11
+ });
12
+
13
+ it('no tiene valores de más', () => {
14
+ expect(Object.values(RefundPathTypeEnum).sort()).toEqual(
15
+ ['DICTAMEN_PROCEDE', 'AUTO_T2_SIN_2FA', 'ERROR_OPERATIVO', 'DOMICILIACION_T1_60D', 'DOMICILIACION_T1_61_90D'].sort()
16
+ );
17
+ });
18
+ });
@@ -0,0 +1,78 @@
1
+ import 'reflect-metadata';
2
+ import { AuthorizeRefundRequest, ReverseRefundRequest, ConfirmManualExecutionRequest } from '../../../src/transaction';
3
+ import { RefundChannelEnum, RefundPathTypeEnum } from '../../../src/transaction';
4
+
5
+ describe('Refund DTOs', () => {
6
+ it('importa AuthorizeRefundRequest, ReverseRefundRequest, ConfirmManualExecutionRequest', () => {
7
+ // AuthorizeRefundRequest
8
+ const authRequest: AuthorizeRefundRequest = {
9
+ idempotencyKey: 'key-123',
10
+ directoryId: 'dir-456',
11
+ peopleId: 'person-789',
12
+ productCatalogId: 'MEX_REFUND_PCF',
13
+ operation: 'ADD',
14
+ amount: { total: 1000, currencyId: 'MXN' },
15
+ refundChannel: RefundChannelEnum.SPEI_OUT_MANUAL,
16
+ refundChannelData: {
17
+ targetClabe: '012180001232011635',
18
+ targetBankId: 'BBVAMXMM',
19
+ targetName: 'Beneficiario',
20
+ },
21
+ refundCase: {
22
+ pathType: RefundPathTypeEnum.DICTAMEN_PROCEDE,
23
+ caseFolio: 'FOLIO-001',
24
+ originalTransactionId: 'TX-123',
25
+ originalAmount: 1000,
26
+ originalChannel: 'SPEI_IN',
27
+ },
28
+ approval: {
29
+ makerUserId: 'user-maker-001',
30
+ checkerUserId: 'user-checker-001',
31
+ minuteS3Key: 's3://bucket/minute.pdf',
32
+ },
33
+ reason: 'Restitución por solicitud del cliente',
34
+ evidence: {
35
+ dictamenS3Key: 's3://bucket/dictamen.pdf',
36
+ incidentReportS3Key: 's3://bucket/incident.pdf',
37
+ objectionFormS3Key: null,
38
+ },
39
+ pldOverrideMinuteS3Key: null,
40
+ };
41
+ expect(authRequest.idempotencyKey).toBe('key-123');
42
+ expect(authRequest.refundChannel).toBe(RefundChannelEnum.SPEI_OUT_MANUAL);
43
+
44
+ // ReverseRefundRequest
45
+ const reverseRequest: ReverseRefundRequest = {
46
+ idempotencyKey: 'key-456',
47
+ directoryId: 'dir-456',
48
+ peopleId: 'person-789',
49
+ productCatalogId: 'MEX_REFUND_PCF_REVERSE',
50
+ operation: 'DEBIT',
51
+ originalRefundTransactionId: 'REFUND-TX-123',
52
+ originalIdempotencyKey: 'key-123',
53
+ amount: { total: 1000, currencyId: 'MXN' },
54
+ reverseReason: {
55
+ type: 'DICTAMEN_CON_2FA_TARDIO',
56
+ resolutionS3Key: 's3://bucket/resolution.pdf',
57
+ dictamenS3Key: 's3://bucket/dictamen-new.pdf',
58
+ },
59
+ approval: {
60
+ makerUserId: 'user-maker-002',
61
+ checkerUserId: 'user-checker-002',
62
+ },
63
+ };
64
+ expect(reverseRequest.originalRefundTransactionId).toBe('REFUND-TX-123');
65
+ expect(reverseRequest.reverseReason.type).toBe('DICTAMEN_CON_2FA_TARDIO');
66
+
67
+ // ConfirmManualExecutionRequest
68
+ const confirmRequest: ConfirmManualExecutionRequest = {
69
+ idempotencyKey: 'key-789',
70
+ speiTrackingKey: 'SPE-TRACK-001',
71
+ executedAt: '2026-09-17T22:00:00Z',
72
+ acuseS3Key: 's3://bucket/acuse.pdf',
73
+ executedByUserId: 'user-controller-001',
74
+ };
75
+ expect(confirmRequest.speiTrackingKey).toBe('SPE-TRACK-001');
76
+ expect(confirmRequest.executedAt).toBe('2026-09-17T22:00:00Z');
77
+ });
78
+ });
@@ -58,5 +58,12 @@ export declare enum ProductSubtypeEnum {
58
58
  * de pagos del proveedor.
59
59
  */
60
60
  SP_CASH_IN_CASH_IN_OXXO = "CASH_IN_OXXO",
61
- SUREKEEP_BONUS_MX = "BONUS_MX"
61
+ SUREKEEP_BONUS_MX = "BONUS_MX",
62
+ STORE_PHONE = "PHONE",
63
+ REFUND_PCF_DICTAMEN_PROCEDE = "DICTAMEN_PROCEDE",
64
+ REFUND_PCF_AUTO_T2_SIN_2FA = "AUTO_T2_SIN_2FA",
65
+ REFUND_PCF_ERROR_OPERATIVO = "ERROR_OPERATIVO",
66
+ REFUND_PCF_DOMICILIACION_T1_60D = "DOMICILIACION_T1_60D",
67
+ REFUND_PCF_DOMICILIACION_T1_61_90D = "DOMICILIACION_T1_61_90D",
68
+ REFUND_PCF_REVERSE_DICTAMEN_CON_2FA_TARDIO = "DICTAMEN_CON_2FA_TARDIO"
62
69
  }
@@ -75,4 +75,14 @@ var ProductSubtypeEnum;
75
75
  ProductSubtypeEnum["SP_CASH_IN_CASH_IN_OXXO"] = "CASH_IN_OXXO";
76
76
  //SUREKEEP
77
77
  ProductSubtypeEnum["SUREKEEP_BONUS_MX"] = "BONUS_MX";
78
+ //STORE
79
+ ProductSubtypeEnum["STORE_PHONE"] = "PHONE";
80
+ // REFUND_PCF
81
+ ProductSubtypeEnum["REFUND_PCF_DICTAMEN_PROCEDE"] = "DICTAMEN_PROCEDE";
82
+ ProductSubtypeEnum["REFUND_PCF_AUTO_T2_SIN_2FA"] = "AUTO_T2_SIN_2FA";
83
+ ProductSubtypeEnum["REFUND_PCF_ERROR_OPERATIVO"] = "ERROR_OPERATIVO";
84
+ ProductSubtypeEnum["REFUND_PCF_DOMICILIACION_T1_60D"] = "DOMICILIACION_T1_60D";
85
+ ProductSubtypeEnum["REFUND_PCF_DOMICILIACION_T1_61_90D"] = "DOMICILIACION_T1_61_90D";
86
+ // REFUND_PCF_REVERSE
87
+ ProductSubtypeEnum["REFUND_PCF_REVERSE_DICTAMEN_CON_2FA_TARDIO"] = "DICTAMEN_CON_2FA_TARDIO";
78
88
  })(ProductSubtypeEnum || (exports.ProductSubtypeEnum = ProductSubtypeEnum = {}));
@@ -40,5 +40,23 @@ export declare enum ProductTypeEnum {
40
40
  * FUERA del switch de `CreateTransactionManager`: el camino por defecto es el que escribe el par
41
41
  * de asientos FiadoTx + PagoConFiadoTx.
42
42
  */
43
- SUREKEEP = "SUREKEEP"
43
+ SUREKEEP = "SUREKEEP",
44
+ /**
45
+ * Compra de un producto físico en tienda/catálogo Fiado (ej. venta de celulares vía
46
+ * cell-phone-sales-business). Cobro en crédito (USD, pocket FiadoInc) o débito (MXN,
47
+ * PagoConfiado) según el país — ambos casos caen en el camino por defecto de
48
+ * `CreateTransactionManager` (no está en su switch), que ya arma `credit`/`debit` de forma
49
+ * data-driven por monto, no por este type.
50
+ */
51
+ STORE = "STORE",
52
+ /**
53
+ * Reembolso a cliente PCF — transacción iniciada desde dashboard de reclamaciones.
54
+ * Tipología: transfer SPEI out manual con aprobación de maker/checker.
55
+ */
56
+ REFUND_PCF = "REFUND_PCF",
57
+ /**
58
+ * Reversa de un reembolso anterior — se devuelve el dinero del reembolso al cliente
59
+ * cuando el dictamen fue incorrecto o se detectó fraude post-reembolso.
60
+ */
61
+ REFUND_PCF_REVERSE = "REFUND_PCF_REVERSE"
44
62
  }
@@ -45,4 +45,22 @@ var ProductTypeEnum;
45
45
  * de asientos FiadoTx + PagoConFiadoTx.
46
46
  */
47
47
  ProductTypeEnum["SUREKEEP"] = "SUREKEEP";
48
+ /**
49
+ * Compra de un producto físico en tienda/catálogo Fiado (ej. venta de celulares vía
50
+ * cell-phone-sales-business). Cobro en crédito (USD, pocket FiadoInc) o débito (MXN,
51
+ * PagoConfiado) según el país — ambos casos caen en el camino por defecto de
52
+ * `CreateTransactionManager` (no está en su switch), que ya arma `credit`/`debit` de forma
53
+ * data-driven por monto, no por este type.
54
+ */
55
+ ProductTypeEnum["STORE"] = "STORE";
56
+ /**
57
+ * Reembolso a cliente PCF — transacción iniciada desde dashboard de reclamaciones.
58
+ * Tipología: transfer SPEI out manual con aprobación de maker/checker.
59
+ */
60
+ ProductTypeEnum["REFUND_PCF"] = "REFUND_PCF";
61
+ /**
62
+ * Reversa de un reembolso anterior — se devuelve el dinero del reembolso al cliente
63
+ * cuando el dictamen fue incorrecto o se detectó fraude post-reembolso.
64
+ */
65
+ ProductTypeEnum["REFUND_PCF_REVERSE"] = "REFUND_PCF_REVERSE";
48
66
  })(ProductTypeEnum || (exports.ProductTypeEnum = ProductTypeEnum = {}));
@@ -0,0 +1,38 @@
1
+ import { RefundChannelEnum } from '../enums/RefundChannelEnum';
2
+ import { RefundPathTypeEnum } from '../enums/RefundPathTypeEnum';
3
+ export interface AuthorizeRefundRequest {
4
+ idempotencyKey: string;
5
+ directoryId: string;
6
+ peopleId: string;
7
+ productCatalogId: 'MEX_REFUND_PCF';
8
+ operation: 'ADD';
9
+ amount: {
10
+ total: number;
11
+ currencyId: 'MXN';
12
+ };
13
+ refundChannel: RefundChannelEnum;
14
+ refundChannelData?: {
15
+ targetClabe?: string;
16
+ targetBankId?: string;
17
+ targetName?: string;
18
+ };
19
+ refundCase: {
20
+ pathType: RefundPathTypeEnum;
21
+ caseFolio: string;
22
+ originalTransactionId: string | null;
23
+ originalAmount: number;
24
+ originalChannel: 'PCF_P2P' | 'SPEI_IN' | 'SPEI_OUT' | 'CARD' | 'DOMICILIATION_FSA';
25
+ };
26
+ approval: {
27
+ makerUserId: string;
28
+ checkerUserId: string | null;
29
+ minuteS3Key: string | null;
30
+ };
31
+ reason: string;
32
+ evidence: {
33
+ dictamenS3Key: string | null;
34
+ incidentReportS3Key: string | null;
35
+ objectionFormS3Key: string | null;
36
+ };
37
+ pldOverrideMinuteS3Key: string | null;
38
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,7 @@
1
+ export interface ConfirmManualExecutionRequest {
2
+ idempotencyKey: string;
3
+ speiTrackingKey: string;
4
+ executedAt: string;
5
+ acuseS3Key: string;
6
+ executedByUserId: string;
7
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,22 @@
1
+ export interface ReverseRefundRequest {
2
+ idempotencyKey: string;
3
+ directoryId: string;
4
+ peopleId: string;
5
+ productCatalogId: 'MEX_REFUND_PCF_REVERSE';
6
+ operation: 'DEBIT';
7
+ originalRefundTransactionId: string;
8
+ originalIdempotencyKey: string;
9
+ amount: {
10
+ total: number;
11
+ currencyId: 'MXN';
12
+ };
13
+ reverseReason: {
14
+ type: 'DICTAMEN_CON_2FA_TARDIO';
15
+ resolutionS3Key: string;
16
+ dictamenS3Key: string;
17
+ };
18
+ approval: {
19
+ makerUserId: string;
20
+ checkerUserId: string | null;
21
+ };
22
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,4 @@
1
+ export declare enum RefundChannelEnum {
2
+ INTERNAL_PCF = "INTERNAL_PCF",
3
+ SPEI_OUT_MANUAL = "SPEI_OUT_MANUAL"
4
+ }
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RefundChannelEnum = void 0;
4
+ var RefundChannelEnum;
5
+ (function (RefundChannelEnum) {
6
+ RefundChannelEnum["INTERNAL_PCF"] = "INTERNAL_PCF";
7
+ RefundChannelEnum["SPEI_OUT_MANUAL"] = "SPEI_OUT_MANUAL";
8
+ })(RefundChannelEnum || (exports.RefundChannelEnum = RefundChannelEnum = {}));
@@ -0,0 +1,5 @@
1
+ export declare enum RefundManualExecutionStatus {
2
+ PENDING_MANUAL_EXECUTION = "PENDING_MANUAL_EXECUTION",
3
+ EXECUTED = "EXECUTED",
4
+ CANCELLED = "CANCELLED"
5
+ }
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RefundManualExecutionStatus = void 0;
4
+ var RefundManualExecutionStatus;
5
+ (function (RefundManualExecutionStatus) {
6
+ RefundManualExecutionStatus["PENDING_MANUAL_EXECUTION"] = "PENDING_MANUAL_EXECUTION";
7
+ RefundManualExecutionStatus["EXECUTED"] = "EXECUTED";
8
+ RefundManualExecutionStatus["CANCELLED"] = "CANCELLED";
9
+ })(RefundManualExecutionStatus || (exports.RefundManualExecutionStatus = RefundManualExecutionStatus = {}));
@@ -0,0 +1,7 @@
1
+ export declare enum RefundPathTypeEnum {
2
+ DICTAMEN_PROCEDE = "DICTAMEN_PROCEDE",
3
+ AUTO_T2_SIN_2FA = "AUTO_T2_SIN_2FA",
4
+ ERROR_OPERATIVO = "ERROR_OPERATIVO",
5
+ DOMICILIACION_T1_60D = "DOMICILIACION_T1_60D",
6
+ DOMICILIACION_T1_61_90D = "DOMICILIACION_T1_61_90D"
7
+ }
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RefundPathTypeEnum = void 0;
4
+ var RefundPathTypeEnum;
5
+ (function (RefundPathTypeEnum) {
6
+ RefundPathTypeEnum["DICTAMEN_PROCEDE"] = "DICTAMEN_PROCEDE";
7
+ RefundPathTypeEnum["AUTO_T2_SIN_2FA"] = "AUTO_T2_SIN_2FA";
8
+ RefundPathTypeEnum["ERROR_OPERATIVO"] = "ERROR_OPERATIVO";
9
+ RefundPathTypeEnum["DOMICILIACION_T1_60D"] = "DOMICILIACION_T1_60D";
10
+ RefundPathTypeEnum["DOMICILIACION_T1_61_90D"] = "DOMICILIACION_T1_61_90D";
11
+ })(RefundPathTypeEnum || (exports.RefundPathTypeEnum = RefundPathTypeEnum = {}));
@@ -14,6 +14,9 @@ export * from './dtos/Product';
14
14
  export * from './dtos/ProductDetail';
15
15
  export * from './dtos/Total';
16
16
  export * from './dtos/ActivityProblemGetResponse';
17
+ export * from './dtos/AuthorizeRefundRequest';
18
+ export * from './dtos/ReverseRefundRequest';
19
+ export * from './dtos/ConfirmManualExecutionRequest';
17
20
  export * from './dtos/internal/BaseProviderTransaction';
18
21
  export * from './dtos/internal/BaseProviderTransactionQueryParams';
19
22
  export * from './dtos/internal/CentralPaymentsQueryParams';
@@ -33,3 +36,6 @@ export * from './enums/TransactionStatusEnum';
33
36
  export * from './enums/DisputeOrFraudEnum';
34
37
  export * from './enums/DisputeOrFraudStatusEnum';
35
38
  export * from './enums/ActivityProblemStatusEnum';
39
+ export * from './enums/RefundChannelEnum';
40
+ export * from './enums/RefundPathTypeEnum';
41
+ export * from './enums/RefundManualExecutionStatus';
@@ -31,6 +31,9 @@ __exportStar(require("./dtos/Product"), exports);
31
31
  __exportStar(require("./dtos/ProductDetail"), exports);
32
32
  __exportStar(require("./dtos/Total"), exports);
33
33
  __exportStar(require("./dtos/ActivityProblemGetResponse"), exports);
34
+ __exportStar(require("./dtos/AuthorizeRefundRequest"), exports);
35
+ __exportStar(require("./dtos/ReverseRefundRequest"), exports);
36
+ __exportStar(require("./dtos/ConfirmManualExecutionRequest"), exports);
34
37
  __exportStar(require("./dtos/internal/BaseProviderTransaction"), exports);
35
38
  __exportStar(require("./dtos/internal/BaseProviderTransactionQueryParams"), exports);
36
39
  __exportStar(require("./dtos/internal/CentralPaymentsQueryParams"), exports);
@@ -51,3 +54,6 @@ __exportStar(require("./enums/TransactionStatusEnum"), exports);
51
54
  __exportStar(require("./enums/DisputeOrFraudEnum"), exports);
52
55
  __exportStar(require("./enums/DisputeOrFraudStatusEnum"), exports);
53
56
  __exportStar(require("./enums/ActivityProblemStatusEnum"), exports);
57
+ __exportStar(require("./enums/RefundChannelEnum"), exports);
58
+ __exportStar(require("./enums/RefundPathTypeEnum"), exports);
59
+ __exportStar(require("./enums/RefundManualExecutionStatus"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fiado/type-kit",
3
- "version": "3.442.0",
3
+ "version": "3.444.0",
4
4
  "description": "",
5
5
  "main": "bin/index.js",
6
6
  "types": "bin/index.d.ts",
@@ -83,4 +83,17 @@ export enum ProductSubtypeEnum {
83
83
 
84
84
  //SUREKEEP
85
85
  SUREKEEP_BONUS_MX = "BONUS_MX",
86
+
87
+ //STORE
88
+ STORE_PHONE = "PHONE",
89
+
90
+ // REFUND_PCF
91
+ REFUND_PCF_DICTAMEN_PROCEDE = "DICTAMEN_PROCEDE",
92
+ REFUND_PCF_AUTO_T2_SIN_2FA = "AUTO_T2_SIN_2FA",
93
+ REFUND_PCF_ERROR_OPERATIVO = "ERROR_OPERATIVO",
94
+ REFUND_PCF_DOMICILIACION_T1_60D = "DOMICILIACION_T1_60D",
95
+ REFUND_PCF_DOMICILIACION_T1_61_90D = "DOMICILIACION_T1_61_90D",
96
+
97
+ // REFUND_PCF_REVERSE
98
+ REFUND_PCF_REVERSE_DICTAMEN_CON_2FA_TARDIO = "DICTAMEN_CON_2FA_TARDIO",
86
99
  }
@@ -40,5 +40,23 @@ export enum ProductTypeEnum {
40
40
  * FUERA del switch de `CreateTransactionManager`: el camino por defecto es el que escribe el par
41
41
  * de asientos FiadoTx + PagoConFiadoTx.
42
42
  */
43
- SUREKEEP = "SUREKEEP"
43
+ SUREKEEP = "SUREKEEP",
44
+ /**
45
+ * Compra de un producto físico en tienda/catálogo Fiado (ej. venta de celulares vía
46
+ * cell-phone-sales-business). Cobro en crédito (USD, pocket FiadoInc) o débito (MXN,
47
+ * PagoConfiado) según el país — ambos casos caen en el camino por defecto de
48
+ * `CreateTransactionManager` (no está en su switch), que ya arma `credit`/`debit` de forma
49
+ * data-driven por monto, no por este type.
50
+ */
51
+ STORE = "STORE",
52
+ /**
53
+ * Reembolso a cliente PCF — transacción iniciada desde dashboard de reclamaciones.
54
+ * Tipología: transfer SPEI out manual con aprobación de maker/checker.
55
+ */
56
+ REFUND_PCF = "REFUND_PCF",
57
+ /**
58
+ * Reversa de un reembolso anterior — se devuelve el dinero del reembolso al cliente
59
+ * cuando el dictamen fue incorrecto o se detectó fraude post-reembolso.
60
+ */
61
+ REFUND_PCF_REVERSE = "REFUND_PCF_REVERSE"
44
62
  }
@@ -0,0 +1,36 @@
1
+ import { RefundChannelEnum } from '../enums/RefundChannelEnum';
2
+ import { RefundPathTypeEnum } from '../enums/RefundPathTypeEnum';
3
+
4
+ export interface AuthorizeRefundRequest {
5
+ idempotencyKey: string;
6
+ directoryId: string;
7
+ peopleId: string;
8
+ productCatalogId: 'MEX_REFUND_PCF';
9
+ operation: 'ADD';
10
+ amount: { total: number; currencyId: 'MXN' };
11
+ refundChannel: RefundChannelEnum;
12
+ refundChannelData?: {
13
+ targetClabe?: string;
14
+ targetBankId?: string;
15
+ targetName?: string;
16
+ };
17
+ refundCase: {
18
+ pathType: RefundPathTypeEnum;
19
+ caseFolio: string;
20
+ originalTransactionId: string | null;
21
+ originalAmount: number;
22
+ originalChannel: 'PCF_P2P' | 'SPEI_IN' | 'SPEI_OUT' | 'CARD' | 'DOMICILIATION_FSA';
23
+ };
24
+ approval: {
25
+ makerUserId: string;
26
+ checkerUserId: string | null;
27
+ minuteS3Key: string | null;
28
+ };
29
+ reason: string;
30
+ evidence: {
31
+ dictamenS3Key: string | null;
32
+ incidentReportS3Key: string | null;
33
+ objectionFormS3Key: string | null;
34
+ };
35
+ pldOverrideMinuteS3Key: string | null;
36
+ }
@@ -0,0 +1,7 @@
1
+ export interface ConfirmManualExecutionRequest {
2
+ idempotencyKey: string;
3
+ speiTrackingKey: string; // Clave de rastreo Banxico devuelta por BBVA
4
+ executedAt: string; // ISO 8601
5
+ acuseS3Key: string; // Comprobante SPEI subido por el Contralor
6
+ executedByUserId: string; // Contralor que ejecutó el SPEI
7
+ }
@@ -0,0 +1,19 @@
1
+ export interface ReverseRefundRequest {
2
+ idempotencyKey: string;
3
+ directoryId: string;
4
+ peopleId: string;
5
+ productCatalogId: 'MEX_REFUND_PCF_REVERSE';
6
+ operation: 'DEBIT';
7
+ originalRefundTransactionId: string;
8
+ originalIdempotencyKey: string;
9
+ amount: { total: number; currencyId: 'MXN' };
10
+ reverseReason: {
11
+ type: 'DICTAMEN_CON_2FA_TARDIO';
12
+ resolutionS3Key: string;
13
+ dictamenS3Key: string;
14
+ };
15
+ approval: {
16
+ makerUserId: string;
17
+ checkerUserId: string | null;
18
+ };
19
+ }
@@ -0,0 +1,4 @@
1
+ export enum RefundChannelEnum {
2
+ INTERNAL_PCF = "INTERNAL_PCF",
3
+ SPEI_OUT_MANUAL = "SPEI_OUT_MANUAL",
4
+ }
@@ -0,0 +1,5 @@
1
+ export enum RefundManualExecutionStatus {
2
+ PENDING_MANUAL_EXECUTION = "PENDING_MANUAL_EXECUTION",
3
+ EXECUTED = "EXECUTED",
4
+ CANCELLED = "CANCELLED",
5
+ }
@@ -0,0 +1,7 @@
1
+ export enum RefundPathTypeEnum {
2
+ DICTAMEN_PROCEDE = "DICTAMEN_PROCEDE",
3
+ AUTO_T2_SIN_2FA = "AUTO_T2_SIN_2FA",
4
+ ERROR_OPERATIVO = "ERROR_OPERATIVO",
5
+ DOMICILIACION_T1_60D = "DOMICILIACION_T1_60D",
6
+ DOMICILIACION_T1_61_90D = "DOMICILIACION_T1_61_90D",
7
+ }
@@ -15,6 +15,9 @@ export * from './dtos/Product';
15
15
  export * from './dtos/ProductDetail';
16
16
  export * from './dtos/Total';
17
17
  export * from './dtos/ActivityProblemGetResponse';
18
+ export * from './dtos/AuthorizeRefundRequest';
19
+ export * from './dtos/ReverseRefundRequest';
20
+ export * from './dtos/ConfirmManualExecutionRequest';
18
21
 
19
22
  export * from './dtos/internal/BaseProviderTransaction';
20
23
  export * from './dtos/internal/BaseProviderTransactionQueryParams';
@@ -38,3 +41,6 @@ export * from './enums/TransactionStatusEnum';
38
41
  export * from './enums/DisputeOrFraudEnum';
39
42
  export * from './enums/DisputeOrFraudStatusEnum';
40
43
  export * from './enums/ActivityProblemStatusEnum';
44
+ export * from './enums/RefundChannelEnum';
45
+ export * from './enums/RefundPathTypeEnum';
46
+ export * from './enums/RefundManualExecutionStatus';