@fiado/type-kit 3.568.0 → 3.570.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/collection/disbursementType.test.ts +3 -2
- package/_test_/unit/productCatalog/enums/ProductSubtypeEnum.test.ts +9 -0
- package/_test_/unit/retailWizard/storePendingRefundsResponse.test.ts +33 -0
- package/bin/collection/enums/DisbursementType.d.ts +6 -3
- package/bin/collection/enums/DisbursementType.js +5 -2
- package/bin/productCatalog/enums/ProductSubtypeEnum.d.ts +1 -0
- package/bin/productCatalog/enums/ProductSubtypeEnum.js +2 -0
- package/bin/retailWizard/dtos/SellerPendingRefundItem.d.ts +23 -0
- package/bin/retailWizard/dtos/SellerPendingRefundItem.js +2 -0
- package/bin/retailWizard/dtos/responses/StorePendingRefundsResponse.d.ts +7 -0
- package/bin/retailWizard/dtos/responses/StorePendingRefundsResponse.js +2 -0
- package/bin/retailWizard/enums/RefundStatusEnum.d.ts +5 -0
- package/bin/retailWizard/enums/RefundStatusEnum.js +9 -0
- package/bin/retailWizard/index.d.ts +3 -0
- package/bin/retailWizard/index.js +3 -0
- package/package.json +1 -1
- package/src/collection/enums/DisbursementType.ts +5 -2
- package/src/productCatalog/enums/ProductSubtypeEnum.ts +2 -0
- package/src/retailWizard/dtos/SellerPendingRefundItem.ts +24 -0
- package/src/retailWizard/dtos/responses/StorePendingRefundsResponse.ts +8 -0
- package/src/retailWizard/enums/RefundStatusEnum.ts +5 -0
- package/src/retailWizard/index.ts +3 -0
|
@@ -3,8 +3,8 @@ import { Collection } from '../../../src/index';
|
|
|
3
3
|
import { DisbursementType } from '../../../src/collection/index';
|
|
4
4
|
|
|
5
5
|
describe('DisbursementType', () => {
|
|
6
|
-
it('
|
|
7
|
-
expect(Object.values(DisbursementType)).toEqual(['MEX_BONUS']);
|
|
6
|
+
it('trae los productos de bono y comisión de vendedor', () => {
|
|
7
|
+
expect(Object.values(DisbursementType)).toEqual(['MEX_BONUS', 'MEX_SELLER_COMMISSION']);
|
|
8
8
|
});
|
|
9
9
|
|
|
10
10
|
it('cada clave es igual a su valor', () => {
|
|
@@ -15,5 +15,6 @@ describe('DisbursementType', () => {
|
|
|
15
15
|
|
|
16
16
|
it('sale por el index raíz', () => {
|
|
17
17
|
expect(Collection.DisbursementType.MEX_BONUS).toBe('MEX_BONUS');
|
|
18
|
+
expect(Collection.DisbursementType.MEX_SELLER_COMMISSION).toBe('MEX_SELLER_COMMISSION');
|
|
18
19
|
});
|
|
19
20
|
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import 'reflect-metadata';
|
|
2
|
+
import { ProductSubtypeEnum } from '../../../../src/productCatalog/enums/ProductSubtypeEnum';
|
|
3
|
+
|
|
4
|
+
describe('ProductSubtypeEnum SureKeep', () => {
|
|
5
|
+
it('trae los subtipos de bono y comisión de vendedor', () => {
|
|
6
|
+
expect(ProductSubtypeEnum.SUREKEEP_BONUS_MX).toBe('BONUS_MX');
|
|
7
|
+
expect(ProductSubtypeEnum.SUREKEEP_SELLER_COMMISSION_MX).toBe('SELLER_COMMISSION_MX');
|
|
8
|
+
});
|
|
9
|
+
});
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import 'reflect-metadata';
|
|
2
|
+
import { RefundStatusEnum, SalePaymentMethodEnum } from '../../../src/retailWizard';
|
|
3
|
+
import type { StorePendingRefundsResponse } from '../../../src/retailWizard';
|
|
4
|
+
|
|
5
|
+
describe('StorePendingRefundsResponse', () => {
|
|
6
|
+
it('expone el estado del reembolso y el trail de la entrega', () => {
|
|
7
|
+
const response: StorePendingRefundsResponse = {
|
|
8
|
+
refunds: [
|
|
9
|
+
{
|
|
10
|
+
sessionId: 'S1',
|
|
11
|
+
storeId: 'ST-1',
|
|
12
|
+
sellerId: 'RU-1',
|
|
13
|
+
sellerName: 'Ana',
|
|
14
|
+
creditId: 'C-1',
|
|
15
|
+
folio: 'ENG-1',
|
|
16
|
+
refundPendingCents: 150000,
|
|
17
|
+
paymentMethod: SalePaymentMethodEnum.CASH,
|
|
18
|
+
status: RefundStatusEnum.DELIVERED,
|
|
19
|
+
deliverable: false,
|
|
20
|
+
cancelledAt: '2026-10-20T10:00:00.000Z',
|
|
21
|
+
cancelledBy: 'sub-cancel',
|
|
22
|
+
deliveredAt: '2026-10-21T10:00:00.000Z',
|
|
23
|
+
deliveredBy: 'sub-v',
|
|
24
|
+
deliveredByName: 'Ana',
|
|
25
|
+
},
|
|
26
|
+
],
|
|
27
|
+
pendingCount: 0,
|
|
28
|
+
pendingTotalCents: 0,
|
|
29
|
+
};
|
|
30
|
+
expect(response.refunds[0].status).toBe('DELIVERED');
|
|
31
|
+
expect(Object.values(RefundStatusEnum)).toEqual(['PENDING', 'DELIVERED']);
|
|
32
|
+
});
|
|
33
|
+
});
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
2
|
+
* Producto con el que el motor de cobro deposita una dispersión.
|
|
3
|
+
* El detalle para la persona va en `concept`.
|
|
4
4
|
*/
|
|
5
5
|
export declare enum DisbursementType {
|
|
6
|
-
|
|
6
|
+
/** Bono. */
|
|
7
|
+
MEX_BONUS = "MEX_BONUS",
|
|
8
|
+
/** Comisión de vendedor. */
|
|
9
|
+
MEX_SELLER_COMMISSION = "MEX_SELLER_COMMISSION"
|
|
7
10
|
}
|
|
@@ -2,10 +2,13 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.DisbursementType = void 0;
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
6
|
-
*
|
|
5
|
+
* Producto con el que el motor de cobro deposita una dispersión.
|
|
6
|
+
* El detalle para la persona va en `concept`.
|
|
7
7
|
*/
|
|
8
8
|
var DisbursementType;
|
|
9
9
|
(function (DisbursementType) {
|
|
10
|
+
/** Bono. */
|
|
10
11
|
DisbursementType["MEX_BONUS"] = "MEX_BONUS";
|
|
12
|
+
/** Comisión de vendedor. */
|
|
13
|
+
DisbursementType["MEX_SELLER_COMMISSION"] = "MEX_SELLER_COMMISSION";
|
|
11
14
|
})(DisbursementType || (exports.DisbursementType = DisbursementType = {}));
|
|
@@ -59,6 +59,7 @@ export declare enum ProductSubtypeEnum {
|
|
|
59
59
|
*/
|
|
60
60
|
SP_CASH_IN_CASH_IN_OXXO = "CASH_IN_OXXO",
|
|
61
61
|
SUREKEEP_BONUS_MX = "BONUS_MX",
|
|
62
|
+
SUREKEEP_SELLER_COMMISSION_MX = "SELLER_COMMISSION_MX",
|
|
62
63
|
STORE_PHONE = "PHONE",
|
|
63
64
|
REFUND_PCF_DICTAMEN_PROCEDE = "DICTAMEN_PROCEDE",
|
|
64
65
|
REFUND_PCF_AUTO_T2_SIN_2FA = "AUTO_T2_SIN_2FA",
|
|
@@ -75,6 +75,8 @@ 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
|
+
// Comisión de vendedor de SureKeep abonada a la wallet.
|
|
79
|
+
ProductSubtypeEnum["SUREKEEP_SELLER_COMMISSION_MX"] = "SELLER_COMMISSION_MX";
|
|
78
80
|
//STORE
|
|
79
81
|
ProductSubtypeEnum["STORE_PHONE"] = "PHONE";
|
|
80
82
|
// REFUND_PCF
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { RefundStatusEnum } from '../enums/RefundStatusEnum';
|
|
2
|
+
import { SalePaymentMethodEnum } from '../enums/SalePaymentMethodEnum';
|
|
3
|
+
/** Un reembolso de enganche de la tienda en el Portal Vendedor (GET /portal/pending-refunds). */
|
|
4
|
+
export interface SellerPendingRefundItem {
|
|
5
|
+
sessionId: string;
|
|
6
|
+
storeId: string;
|
|
7
|
+
sellerId: string | null;
|
|
8
|
+
sellerName: string | null;
|
|
9
|
+
creditId: string | null;
|
|
10
|
+
folio: string | null;
|
|
11
|
+
refundPendingCents: number;
|
|
12
|
+
/** `null` = el registro no guardó con qué se cobró el enganche; no se puede marcar entregado. */
|
|
13
|
+
paymentMethod: SalePaymentMethodEnum | null;
|
|
14
|
+
status: RefundStatusEnum;
|
|
15
|
+
/** `true` si el vendedor puede marcarlo entregado: efectivo y pendiente. */
|
|
16
|
+
deliverable: boolean;
|
|
17
|
+
cancelledAt: string;
|
|
18
|
+
/** Actor que canceló la venta (cognitoSub o nombre del lambda). */
|
|
19
|
+
cancelledBy: string;
|
|
20
|
+
deliveredAt: string | null;
|
|
21
|
+
deliveredBy: string | null;
|
|
22
|
+
deliveredByName: string | null;
|
|
23
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { SellerPendingRefundItem } from '../SellerPendingRefundItem';
|
|
2
|
+
/** Respuesta de GET /portal/pending-refunds: pendientes de la tienda y entregados de los últimos 30 días. */
|
|
3
|
+
export interface StorePendingRefundsResponse {
|
|
4
|
+
refunds: SellerPendingRefundItem[];
|
|
5
|
+
pendingCount: number;
|
|
6
|
+
pendingTotalCents: number;
|
|
7
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RefundStatusEnum = void 0;
|
|
4
|
+
/** Estado del reembolso de enganche de una venta a crédito cancelada. SureKeep — Portal Vendedor. */
|
|
5
|
+
var RefundStatusEnum;
|
|
6
|
+
(function (RefundStatusEnum) {
|
|
7
|
+
RefundStatusEnum["PENDING"] = "PENDING";
|
|
8
|
+
RefundStatusEnum["DELIVERED"] = "DELIVERED";
|
|
9
|
+
})(RefundStatusEnum || (exports.RefundStatusEnum = RefundStatusEnum = {}));
|
|
@@ -7,6 +7,7 @@ export * from './enums/PaymentMethodEnum';
|
|
|
7
7
|
export * from './enums/ExternalProviderEnum';
|
|
8
8
|
export * from './enums/SaleTypeEnum';
|
|
9
9
|
export * from './enums/SalePaymentMethodEnum';
|
|
10
|
+
export * from './enums/RefundStatusEnum';
|
|
10
11
|
export * from './enums/SaleStatusEnum';
|
|
11
12
|
export * from './enums/CentralSyncStatusEnum';
|
|
12
13
|
export * from './enums/ProspectStatusEnum';
|
|
@@ -102,6 +103,8 @@ export * from './dtos/requests/SuggestIdentifiersQuery';
|
|
|
102
103
|
export * from './dtos/requests/SendEmailOtpRequest';
|
|
103
104
|
export * from './dtos/requests/VerifyEmailOtpRequest';
|
|
104
105
|
export * from './dtos/requests/CreateAccessorySaleRequest';
|
|
106
|
+
export * from './dtos/SellerPendingRefundItem';
|
|
107
|
+
export * from './dtos/responses/StorePendingRefundsResponse';
|
|
105
108
|
export * from './dtos/responses/KycPrepareResponse';
|
|
106
109
|
export * from './dtos/responses/ProofOfAddressPrepareResponse';
|
|
107
110
|
export * from './dtos/responses/SessionFinanciersResponse';
|
|
@@ -26,6 +26,7 @@ __exportStar(require("./enums/PaymentMethodEnum"), exports);
|
|
|
26
26
|
__exportStar(require("./enums/ExternalProviderEnum"), exports);
|
|
27
27
|
__exportStar(require("./enums/SaleTypeEnum"), exports);
|
|
28
28
|
__exportStar(require("./enums/SalePaymentMethodEnum"), exports);
|
|
29
|
+
__exportStar(require("./enums/RefundStatusEnum"), exports);
|
|
29
30
|
__exportStar(require("./enums/SaleStatusEnum"), exports);
|
|
30
31
|
__exportStar(require("./enums/CentralSyncStatusEnum"), exports);
|
|
31
32
|
__exportStar(require("./enums/ProspectStatusEnum"), exports);
|
|
@@ -128,6 +129,8 @@ __exportStar(require("./dtos/requests/SendEmailOtpRequest"), exports);
|
|
|
128
129
|
__exportStar(require("./dtos/requests/VerifyEmailOtpRequest"), exports);
|
|
129
130
|
__exportStar(require("./dtos/requests/CreateAccessorySaleRequest"), exports);
|
|
130
131
|
// Response DTOs (output tipado por endpoint)
|
|
132
|
+
__exportStar(require("./dtos/SellerPendingRefundItem"), exports);
|
|
133
|
+
__exportStar(require("./dtos/responses/StorePendingRefundsResponse"), exports);
|
|
131
134
|
__exportStar(require("./dtos/responses/KycPrepareResponse"), exports);
|
|
132
135
|
__exportStar(require("./dtos/responses/ProofOfAddressPrepareResponse"), exports);
|
|
133
136
|
__exportStar(require("./dtos/responses/SessionFinanciersResponse"), exports);
|
package/package.json
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
2
|
+
* Producto con el que el motor de cobro deposita una dispersión.
|
|
3
|
+
* El detalle para la persona va en `concept`.
|
|
4
4
|
*/
|
|
5
5
|
export enum DisbursementType {
|
|
6
|
+
/** Bono. */
|
|
6
7
|
MEX_BONUS = 'MEX_BONUS',
|
|
8
|
+
/** Comisión de vendedor. */
|
|
9
|
+
MEX_SELLER_COMMISSION = 'MEX_SELLER_COMMISSION',
|
|
7
10
|
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { RefundStatusEnum } from '../enums/RefundStatusEnum';
|
|
2
|
+
import { SalePaymentMethodEnum } from '../enums/SalePaymentMethodEnum';
|
|
3
|
+
|
|
4
|
+
/** Un reembolso de enganche de la tienda en el Portal Vendedor (GET /portal/pending-refunds). */
|
|
5
|
+
export interface SellerPendingRefundItem {
|
|
6
|
+
sessionId: string;
|
|
7
|
+
storeId: string;
|
|
8
|
+
sellerId: string | null;
|
|
9
|
+
sellerName: string | null;
|
|
10
|
+
creditId: string | null;
|
|
11
|
+
folio: string | null;
|
|
12
|
+
refundPendingCents: number;
|
|
13
|
+
/** `null` = el registro no guardó con qué se cobró el enganche; no se puede marcar entregado. */
|
|
14
|
+
paymentMethod: SalePaymentMethodEnum | null;
|
|
15
|
+
status: RefundStatusEnum;
|
|
16
|
+
/** `true` si el vendedor puede marcarlo entregado: efectivo y pendiente. */
|
|
17
|
+
deliverable: boolean;
|
|
18
|
+
cancelledAt: string;
|
|
19
|
+
/** Actor que canceló la venta (cognitoSub o nombre del lambda). */
|
|
20
|
+
cancelledBy: string;
|
|
21
|
+
deliveredAt: string | null;
|
|
22
|
+
deliveredBy: string | null;
|
|
23
|
+
deliveredByName: string | null;
|
|
24
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { SellerPendingRefundItem } from '../SellerPendingRefundItem';
|
|
2
|
+
|
|
3
|
+
/** Respuesta de GET /portal/pending-refunds: pendientes de la tienda y entregados de los últimos 30 días. */
|
|
4
|
+
export interface StorePendingRefundsResponse {
|
|
5
|
+
refunds: SellerPendingRefundItem[];
|
|
6
|
+
pendingCount: number;
|
|
7
|
+
pendingTotalCents: number;
|
|
8
|
+
}
|
|
@@ -10,6 +10,7 @@ export * from './enums/PaymentMethodEnum';
|
|
|
10
10
|
export * from './enums/ExternalProviderEnum';
|
|
11
11
|
export * from './enums/SaleTypeEnum';
|
|
12
12
|
export * from './enums/SalePaymentMethodEnum';
|
|
13
|
+
export * from './enums/RefundStatusEnum';
|
|
13
14
|
export * from './enums/SaleStatusEnum';
|
|
14
15
|
export * from './enums/CentralSyncStatusEnum';
|
|
15
16
|
export * from './enums/ProspectStatusEnum';
|
|
@@ -115,6 +116,8 @@ export * from './dtos/requests/VerifyEmailOtpRequest';
|
|
|
115
116
|
export * from './dtos/requests/CreateAccessorySaleRequest';
|
|
116
117
|
|
|
117
118
|
// Response DTOs (output tipado por endpoint)
|
|
119
|
+
export * from './dtos/SellerPendingRefundItem';
|
|
120
|
+
export * from './dtos/responses/StorePendingRefundsResponse';
|
|
118
121
|
export * from './dtos/responses/KycPrepareResponse';
|
|
119
122
|
export * from './dtos/responses/ProofOfAddressPrepareResponse';
|
|
120
123
|
export * from './dtos/responses/SessionFinanciersResponse';
|