@fiado/type-kit 3.555.0 → 3.556.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/retailWizard/accountOpeningCancelReasons.test.ts +9 -0
- package/_test_/unit/retailWizard/accountOpeningFlag.test.ts +37 -0
- package/_test_/unit/retailWizard/accountOpeningOccupation.test.ts +44 -0
- package/_test_/unit/retailWizard/accountOpeningsResponse.test.ts +22 -0
- package/bin/retailWizard/dtos/WizardSession.d.ts +2 -0
- package/bin/retailWizard/dtos/requests/OccupationRequest.d.ts +5 -0
- package/bin/retailWizard/dtos/requests/OccupationRequest.js +29 -0
- package/bin/retailWizard/dtos/requests/StartSessionRequest.d.ts +2 -0
- package/bin/retailWizard/dtos/requests/StartSessionRequest.js +6 -0
- package/bin/retailWizard/dtos/responses/BackofficeAccountOpeningsResponse.d.ts +19 -0
- package/bin/retailWizard/dtos/responses/BackofficeAccountOpeningsResponse.js +2 -0
- package/bin/retailWizard/enums/SystemCancelReasonEnum.d.ts +5 -1
- package/bin/retailWizard/enums/SystemCancelReasonEnum.js +4 -0
- package/bin/retailWizard/index.d.ts +1 -0
- package/bin/retailWizard/index.js +1 -0
- package/package.json +1 -1
- package/src/retailWizard/dtos/WizardSession.ts +2 -0
- package/src/retailWizard/dtos/requests/OccupationRequest.ts +31 -0
- package/src/retailWizard/dtos/requests/StartSessionRequest.ts +7 -1
- package/src/retailWizard/dtos/responses/BackofficeAccountOpeningsResponse.ts +20 -0
- package/src/retailWizard/enums/SystemCancelReasonEnum.ts +4 -0
- package/src/retailWizard/index.ts +1 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import 'reflect-metadata';
|
|
2
|
+
import { SystemCancelReasonEnum } from '../../../src/retailWizard';
|
|
3
|
+
|
|
4
|
+
describe('SystemCancelReasonEnum — motivos de la apertura', () => {
|
|
5
|
+
it('declara ALREADY_HAS_ACCOUNT y CURP_OF_OTHER_CUSTOMER', () => {
|
|
6
|
+
expect(SystemCancelReasonEnum.ALREADY_HAS_ACCOUNT).toBe('ALREADY_HAS_ACCOUNT');
|
|
7
|
+
expect(SystemCancelReasonEnum.CURP_OF_OTHER_CUSTOMER).toBe('CURP_OF_OTHER_CUSTOMER');
|
|
8
|
+
});
|
|
9
|
+
});
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import 'reflect-metadata';
|
|
2
|
+
import { plainToInstance } from 'class-transformer';
|
|
3
|
+
import { validateSync } from 'class-validator';
|
|
4
|
+
import { StartSessionRequest, type WizardSession } from '../../../src/retailWizard';
|
|
5
|
+
|
|
6
|
+
function startErrors(payload: Record<string, unknown>): string[] {
|
|
7
|
+
const dto = plainToInstance(StartSessionRequest, payload, { excludeExtraneousValues: true });
|
|
8
|
+
return validateSync(dto).map((e) => e.property);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
describe('StartSessionRequest — marca accountOpening', () => {
|
|
12
|
+
it('sin la marca sigue igual que hoy', () => {
|
|
13
|
+
expect(startErrors({ phone: '5512345678' })).toEqual([]);
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
it.each([true, false])('acepta accountOpening=%s y lo conserva', (value) => {
|
|
17
|
+
const dto = plainToInstance(
|
|
18
|
+
StartSessionRequest,
|
|
19
|
+
{ phone: '5512345678', accountOpening: value },
|
|
20
|
+
{ excludeExtraneousValues: true },
|
|
21
|
+
);
|
|
22
|
+
expect(validateSync(dto)).toEqual([]);
|
|
23
|
+
expect(dto.accountOpening).toBe(value);
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
it.each(['true', 1, 'si'])('rechaza accountOpening no booleano (%p)', (value) => {
|
|
27
|
+
expect(startErrors({ phone: '5512345678', accountOpening: value })).toContain('accountOpening');
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
describe('WizardSession — marca accountOpening', () => {
|
|
32
|
+
it('es opcional en la sesión', () => {
|
|
33
|
+
const session: Pick<WizardSession, 'accountOpening'> = { accountOpening: true };
|
|
34
|
+
const legacy: Pick<WizardSession, 'accountOpening'> = {};
|
|
35
|
+
expect([session.accountOpening, legacy.accountOpening]).toEqual([true, undefined]);
|
|
36
|
+
});
|
|
37
|
+
});
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import 'reflect-metadata';
|
|
2
|
+
import { plainToInstance } from 'class-transformer';
|
|
3
|
+
import { validateSync } from 'class-validator';
|
|
4
|
+
import { OccupationEnum, OccupationRequest } from '../../../src/retailWizard';
|
|
5
|
+
|
|
6
|
+
function occupationErrors(payload: Record<string, unknown>): string[] {
|
|
7
|
+
const dto = plainToInstance(OccupationRequest, payload, { excludeExtraneousValues: true });
|
|
8
|
+
return validateSync(dto).map((e) => e.property);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const BASE_OCCUPATION = { occupation: OccupationEnum.EMPLOYED, monthlyIncome: '20000' };
|
|
12
|
+
const FULL_PROFILE = {
|
|
13
|
+
monthlyExtraSupport: '0',
|
|
14
|
+
usageMonthly: '60',
|
|
15
|
+
maximumTx: '10000',
|
|
16
|
+
beneficialOwner: 'SELF',
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
describe('OccupationRequest — 4 MXN_* opcionales para la apertura', () => {
|
|
20
|
+
it('sin los MXN_* sigue igual que hoy', () => {
|
|
21
|
+
expect(occupationErrors(BASE_OCCUPATION)).toEqual([]);
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
it('acepta el perfil completo del catálogo y lo conserva', () => {
|
|
25
|
+
const dto = plainToInstance(
|
|
26
|
+
OccupationRequest,
|
|
27
|
+
{ ...BASE_OCCUPATION, ...FULL_PROFILE },
|
|
28
|
+
{ excludeExtraneousValues: true },
|
|
29
|
+
);
|
|
30
|
+
expect(validateSync(dto)).toEqual([]);
|
|
31
|
+
expect(dto).toMatchObject(FULL_PROFILE);
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
it('acepta OTHER en beneficialOwner: lo rechaza el negocio, no el DTO', () => {
|
|
35
|
+
expect(occupationErrors({ ...BASE_OCCUPATION, beneficialOwner: 'OTHER' })).toEqual([]);
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
it.each(['monthlyExtraSupport', 'usageMonthly', 'maximumTx', 'beneficialOwner'])(
|
|
39
|
+
'rechaza %s fuera del catálogo',
|
|
40
|
+
(field) => {
|
|
41
|
+
expect(occupationErrors({ ...BASE_OCCUPATION, ...FULL_PROFILE, [field]: 'X' })).toEqual([field]);
|
|
42
|
+
},
|
|
43
|
+
);
|
|
44
|
+
});
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import 'reflect-metadata';
|
|
2
|
+
import type { BackofficeAccountOpeningsResponse } from '../../../src/retailWizard';
|
|
3
|
+
|
|
4
|
+
describe('BackofficeAccountOpeningsResponse', () => {
|
|
5
|
+
it('declara las filas de aperturas y el cursor', () => {
|
|
6
|
+
const response: BackofficeAccountOpeningsResponse = {
|
|
7
|
+
nextToken: null,
|
|
8
|
+
items: [
|
|
9
|
+
{
|
|
10
|
+
sessionId: 'S1',
|
|
11
|
+
retailCustomerId: 'RC-1',
|
|
12
|
+
name: null,
|
|
13
|
+
phone: '5512345678',
|
|
14
|
+
storeId: 'ST-1',
|
|
15
|
+
sellerRetailUserId: 'RU-1',
|
|
16
|
+
openedAt: '2026-10-20T18:00:00.000Z',
|
|
17
|
+
},
|
|
18
|
+
],
|
|
19
|
+
};
|
|
20
|
+
expect(response.items[0].sessionId).toBe('S1');
|
|
21
|
+
});
|
|
22
|
+
});
|
|
@@ -156,6 +156,8 @@ export interface WizardSession {
|
|
|
156
156
|
* Crédito y derivación se rechazan con `CREDIT_IN_PROGRESS_OTHER_STORE`. Ausente = venta completa.
|
|
157
157
|
*/
|
|
158
158
|
cashOnly?: boolean;
|
|
159
|
+
/** Sesión de apertura de cuenta sin venta; ausente = venta de siempre. */
|
|
160
|
+
accountOpening?: boolean;
|
|
159
161
|
/** TTL DDB ~24h de inactividad (D14). */
|
|
160
162
|
ttlEpoch: number;
|
|
161
163
|
createdBy: string;
|
|
@@ -8,4 +8,9 @@ export declare class OccupationRequest {
|
|
|
8
8
|
occupationOther?: string;
|
|
9
9
|
/** Mismo catálogo cerrado que el paso 10 (`ProfileQuestionsRequest`). */
|
|
10
10
|
monthlyIncome: string;
|
|
11
|
+
/** MXN_* del perfil transaccional: opcionales aquí, la apertura de cuenta los exige en negocio. */
|
|
12
|
+
monthlyExtraSupport?: string;
|
|
13
|
+
usageMonthly?: string;
|
|
14
|
+
maximumTx?: string;
|
|
15
|
+
beneficialOwner?: string;
|
|
11
16
|
}
|
|
@@ -14,6 +14,7 @@ const class_transformer_1 = require("class-transformer");
|
|
|
14
14
|
const class_validator_1 = require("class-validator");
|
|
15
15
|
const OccupationEnum_1 = require("../../enums/OccupationEnum");
|
|
16
16
|
const monthlyIncome_1 = require("../../catalog/monthlyIncome");
|
|
17
|
+
const ProfileQuestionsRequest_1 = require("./ProfileQuestionsRequest");
|
|
17
18
|
/**
|
|
18
19
|
* POST /wizard/sessions/:id/occupation — registra la ocupación y el ingreso mensual del expediente
|
|
19
20
|
* PCF (viven en People de Fiado — D17). Los dos obligatorios; `OTHER` abre texto ≤60.
|
|
@@ -39,3 +40,31 @@ __decorate([
|
|
|
39
40
|
(0, class_validator_1.IsIn)(monthlyIncome_1.MONTHLY_INCOME_VALUES),
|
|
40
41
|
__metadata("design:type", String)
|
|
41
42
|
], OccupationRequest.prototype, "monthlyIncome", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, class_transformer_1.Expose)(),
|
|
45
|
+
(0, class_validator_1.IsOptional)(),
|
|
46
|
+
(0, class_validator_1.IsString)(),
|
|
47
|
+
(0, class_validator_1.IsIn)(ProfileQuestionsRequest_1.EXTRA_SUPPORT_VALUES),
|
|
48
|
+
__metadata("design:type", String)
|
|
49
|
+
], OccupationRequest.prototype, "monthlyExtraSupport", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
(0, class_transformer_1.Expose)(),
|
|
52
|
+
(0, class_validator_1.IsOptional)(),
|
|
53
|
+
(0, class_validator_1.IsString)(),
|
|
54
|
+
(0, class_validator_1.IsIn)(ProfileQuestionsRequest_1.USAGE_MONTHLY_VALUES),
|
|
55
|
+
__metadata("design:type", String)
|
|
56
|
+
], OccupationRequest.prototype, "usageMonthly", void 0);
|
|
57
|
+
__decorate([
|
|
58
|
+
(0, class_transformer_1.Expose)(),
|
|
59
|
+
(0, class_validator_1.IsOptional)(),
|
|
60
|
+
(0, class_validator_1.IsString)(),
|
|
61
|
+
(0, class_validator_1.IsIn)(ProfileQuestionsRequest_1.MAXIMUM_TX_VALUES),
|
|
62
|
+
__metadata("design:type", String)
|
|
63
|
+
], OccupationRequest.prototype, "maximumTx", void 0);
|
|
64
|
+
__decorate([
|
|
65
|
+
(0, class_transformer_1.Expose)(),
|
|
66
|
+
(0, class_validator_1.IsOptional)(),
|
|
67
|
+
(0, class_validator_1.IsString)(),
|
|
68
|
+
(0, class_validator_1.IsIn)(ProfileQuestionsRequest_1.BENEFICIAL_OWNER_VALUES),
|
|
69
|
+
__metadata("design:type", String)
|
|
70
|
+
], OccupationRequest.prototype, "beneficialOwner", void 0);
|
|
@@ -7,4 +7,6 @@ export declare class StartSessionRequest {
|
|
|
7
7
|
phone: string;
|
|
8
8
|
/** Prospecto a reanudar (opcional): si viene, la sesión se vincula al prospecto. */
|
|
9
9
|
prospectId?: string;
|
|
10
|
+
/** Marca de apertura de cuenta sin venta; ausente = venta de siempre. */
|
|
11
|
+
accountOpening?: boolean;
|
|
10
12
|
}
|
|
@@ -33,3 +33,9 @@ __decorate([
|
|
|
33
33
|
(0, class_validator_1.IsString)(),
|
|
34
34
|
__metadata("design:type", String)
|
|
35
35
|
], StartSessionRequest.prototype, "prospectId", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, class_transformer_1.Expose)(),
|
|
38
|
+
(0, class_validator_1.IsOptional)(),
|
|
39
|
+
(0, class_validator_1.IsBoolean)(),
|
|
40
|
+
__metadata("design:type", Boolean)
|
|
41
|
+
], StartSessionRequest.prototype, "accountOpening", void 0);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/** Una apertura de cuenta sin venta, cerrada en COMPLETED. */
|
|
2
|
+
export interface AccountOpeningRow {
|
|
3
|
+
sessionId: string;
|
|
4
|
+
retailCustomerId: string;
|
|
5
|
+
/** `null` si el cliente no se pudo leer. */
|
|
6
|
+
name: string | null;
|
|
7
|
+
phone: string;
|
|
8
|
+
storeId: string;
|
|
9
|
+
sellerRetailUserId: string;
|
|
10
|
+
openedAt: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* `GET /backoffice/customers/account-openings?storeId&from&to&limit&nextToken` — sección «Cuentas abiertas
|
|
14
|
+
* sin compra» de Clientes VL, paginada por fecha de apertura descendente.
|
|
15
|
+
*/
|
|
16
|
+
export interface BackofficeAccountOpeningsResponse {
|
|
17
|
+
nextToken: string | null;
|
|
18
|
+
items: AccountOpeningRow[];
|
|
19
|
+
}
|
|
@@ -2,8 +2,12 @@
|
|
|
2
2
|
* `cancelReason` que escribe el sistema (no el vendedor).
|
|
3
3
|
* SWEEP_CREDIT_DISCARDED: la saga cierra la venta cuyo crédito se descartó.
|
|
4
4
|
* TAKEN_OVER_BY_OTHER_STORE: otra tienda tomó al cliente y la venta no tenía dinero en juego.
|
|
5
|
+
* ALREADY_HAS_ACCOUNT: la apertura de cuenta se cierra porque el cliente ya tiene cuenta PagoConFiado.
|
|
6
|
+
* CURP_OF_OTHER_CUSTOMER: la apertura de cuenta se cierra porque la CURP ya es de otro cliente.
|
|
5
7
|
*/
|
|
6
8
|
export declare enum SystemCancelReasonEnum {
|
|
7
9
|
SWEEP_CREDIT_DISCARDED = "SWEEP_CREDIT_DISCARDED",
|
|
8
|
-
TAKEN_OVER_BY_OTHER_STORE = "TAKEN_OVER_BY_OTHER_STORE"
|
|
10
|
+
TAKEN_OVER_BY_OTHER_STORE = "TAKEN_OVER_BY_OTHER_STORE",
|
|
11
|
+
ALREADY_HAS_ACCOUNT = "ALREADY_HAS_ACCOUNT",
|
|
12
|
+
CURP_OF_OTHER_CUSTOMER = "CURP_OF_OTHER_CUSTOMER"
|
|
9
13
|
}
|
|
@@ -5,9 +5,13 @@ exports.SystemCancelReasonEnum = void 0;
|
|
|
5
5
|
* `cancelReason` que escribe el sistema (no el vendedor).
|
|
6
6
|
* SWEEP_CREDIT_DISCARDED: la saga cierra la venta cuyo crédito se descartó.
|
|
7
7
|
* TAKEN_OVER_BY_OTHER_STORE: otra tienda tomó al cliente y la venta no tenía dinero en juego.
|
|
8
|
+
* ALREADY_HAS_ACCOUNT: la apertura de cuenta se cierra porque el cliente ya tiene cuenta PagoConFiado.
|
|
9
|
+
* CURP_OF_OTHER_CUSTOMER: la apertura de cuenta se cierra porque la CURP ya es de otro cliente.
|
|
8
10
|
*/
|
|
9
11
|
var SystemCancelReasonEnum;
|
|
10
12
|
(function (SystemCancelReasonEnum) {
|
|
11
13
|
SystemCancelReasonEnum["SWEEP_CREDIT_DISCARDED"] = "SWEEP_CREDIT_DISCARDED";
|
|
12
14
|
SystemCancelReasonEnum["TAKEN_OVER_BY_OTHER_STORE"] = "TAKEN_OVER_BY_OTHER_STORE";
|
|
15
|
+
SystemCancelReasonEnum["ALREADY_HAS_ACCOUNT"] = "ALREADY_HAS_ACCOUNT";
|
|
16
|
+
SystemCancelReasonEnum["CURP_OF_OTHER_CUSTOMER"] = "CURP_OF_OTHER_CUSTOMER";
|
|
13
17
|
})(SystemCancelReasonEnum || (exports.SystemCancelReasonEnum = SystemCancelReasonEnum = {}));
|
|
@@ -160,6 +160,7 @@ export * from './dtos/responses/BackofficeSellerKpisResponse';
|
|
|
160
160
|
export * from './enums/SellerTableSourceStatusEnum';
|
|
161
161
|
export * from './dtos/responses/BackofficeSellerTableResponse';
|
|
162
162
|
export * from './dtos/responses/BackofficeCustomerTableResponse';
|
|
163
|
+
export * from './dtos/responses/BackofficeAccountOpeningsResponse';
|
|
163
164
|
export * from './enums/StoreKindEnum';
|
|
164
165
|
export * from './dtos/responses/BackofficeStoreTableResponse';
|
|
165
166
|
export * from './enums/StoreMixCategoryEnum';
|
|
@@ -193,6 +193,7 @@ __exportStar(require("./dtos/responses/BackofficeSellerKpisResponse"), exports);
|
|
|
193
193
|
__exportStar(require("./enums/SellerTableSourceStatusEnum"), exports);
|
|
194
194
|
__exportStar(require("./dtos/responses/BackofficeSellerTableResponse"), exports);
|
|
195
195
|
__exportStar(require("./dtos/responses/BackofficeCustomerTableResponse"), exports);
|
|
196
|
+
__exportStar(require("./dtos/responses/BackofficeAccountOpeningsResponse"), exports);
|
|
196
197
|
__exportStar(require("./enums/StoreKindEnum"), exports);
|
|
197
198
|
__exportStar(require("./dtos/responses/BackofficeStoreTableResponse"), exports);
|
|
198
199
|
__exportStar(require("./enums/StoreMixCategoryEnum"), exports);
|
package/package.json
CHANGED
|
@@ -160,6 +160,8 @@ export interface WizardSession {
|
|
|
160
160
|
* Crédito y derivación se rechazan con `CREDIT_IN_PROGRESS_OTHER_STORE`. Ausente = venta completa.
|
|
161
161
|
*/
|
|
162
162
|
cashOnly?: boolean;
|
|
163
|
+
/** Sesión de apertura de cuenta sin venta; ausente = venta de siempre. */
|
|
164
|
+
accountOpening?: boolean;
|
|
163
165
|
/** TTL DDB ~24h de inactividad (D14). */
|
|
164
166
|
ttlEpoch: number;
|
|
165
167
|
createdBy: string;
|
|
@@ -2,6 +2,12 @@ import { Expose } from 'class-transformer';
|
|
|
2
2
|
import { IsEnum, IsIn, IsOptional, IsString, MaxLength } from 'class-validator';
|
|
3
3
|
import { OccupationEnum } from '../../enums/OccupationEnum';
|
|
4
4
|
import { MONTHLY_INCOME_VALUES } from '../../catalog/monthlyIncome';
|
|
5
|
+
import {
|
|
6
|
+
BENEFICIAL_OWNER_VALUES,
|
|
7
|
+
EXTRA_SUPPORT_VALUES,
|
|
8
|
+
MAXIMUM_TX_VALUES,
|
|
9
|
+
USAGE_MONTHLY_VALUES,
|
|
10
|
+
} from './ProfileQuestionsRequest';
|
|
5
11
|
|
|
6
12
|
/**
|
|
7
13
|
* POST /wizard/sessions/:id/occupation — registra la ocupación y el ingreso mensual del expediente
|
|
@@ -23,4 +29,29 @@ export class OccupationRequest {
|
|
|
23
29
|
@IsString()
|
|
24
30
|
@IsIn(MONTHLY_INCOME_VALUES as unknown as string[])
|
|
25
31
|
monthlyIncome!: string;
|
|
32
|
+
|
|
33
|
+
/** MXN_* del perfil transaccional: opcionales aquí, la apertura de cuenta los exige en negocio. */
|
|
34
|
+
@Expose()
|
|
35
|
+
@IsOptional()
|
|
36
|
+
@IsString()
|
|
37
|
+
@IsIn(EXTRA_SUPPORT_VALUES as unknown as string[])
|
|
38
|
+
monthlyExtraSupport?: string;
|
|
39
|
+
|
|
40
|
+
@Expose()
|
|
41
|
+
@IsOptional()
|
|
42
|
+
@IsString()
|
|
43
|
+
@IsIn(USAGE_MONTHLY_VALUES as unknown as string[])
|
|
44
|
+
usageMonthly?: string;
|
|
45
|
+
|
|
46
|
+
@Expose()
|
|
47
|
+
@IsOptional()
|
|
48
|
+
@IsString()
|
|
49
|
+
@IsIn(MAXIMUM_TX_VALUES as unknown as string[])
|
|
50
|
+
maximumTx?: string;
|
|
51
|
+
|
|
52
|
+
@Expose()
|
|
53
|
+
@IsOptional()
|
|
54
|
+
@IsString()
|
|
55
|
+
@IsIn(BENEFICIAL_OWNER_VALUES as unknown as string[])
|
|
56
|
+
beneficialOwner?: string;
|
|
26
57
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Expose } from 'class-transformer';
|
|
2
|
-
import { IsOptional, IsString, Matches } from 'class-validator';
|
|
2
|
+
import { IsBoolean, IsOptional, IsString, Matches } from 'class-validator';
|
|
3
3
|
import { regexPhoneMx } from '../../../helpers/constans/regex';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -18,4 +18,10 @@ export class StartSessionRequest {
|
|
|
18
18
|
@IsOptional()
|
|
19
19
|
@IsString()
|
|
20
20
|
prospectId?: string;
|
|
21
|
+
|
|
22
|
+
/** Marca de apertura de cuenta sin venta; ausente = venta de siempre. */
|
|
23
|
+
@Expose()
|
|
24
|
+
@IsOptional()
|
|
25
|
+
@IsBoolean()
|
|
26
|
+
accountOpening?: boolean;
|
|
21
27
|
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/** Una apertura de cuenta sin venta, cerrada en COMPLETED. */
|
|
2
|
+
export interface AccountOpeningRow {
|
|
3
|
+
sessionId: string;
|
|
4
|
+
retailCustomerId: string;
|
|
5
|
+
/** `null` si el cliente no se pudo leer. */
|
|
6
|
+
name: string | null;
|
|
7
|
+
phone: string;
|
|
8
|
+
storeId: string;
|
|
9
|
+
sellerRetailUserId: string;
|
|
10
|
+
openedAt: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* `GET /backoffice/customers/account-openings?storeId&from&to&limit&nextToken` — sección «Cuentas abiertas
|
|
15
|
+
* sin compra» de Clientes VL, paginada por fecha de apertura descendente.
|
|
16
|
+
*/
|
|
17
|
+
export interface BackofficeAccountOpeningsResponse {
|
|
18
|
+
nextToken: string | null;
|
|
19
|
+
items: AccountOpeningRow[];
|
|
20
|
+
}
|
|
@@ -2,8 +2,12 @@
|
|
|
2
2
|
* `cancelReason` que escribe el sistema (no el vendedor).
|
|
3
3
|
* SWEEP_CREDIT_DISCARDED: la saga cierra la venta cuyo crédito se descartó.
|
|
4
4
|
* TAKEN_OVER_BY_OTHER_STORE: otra tienda tomó al cliente y la venta no tenía dinero en juego.
|
|
5
|
+
* ALREADY_HAS_ACCOUNT: la apertura de cuenta se cierra porque el cliente ya tiene cuenta PagoConFiado.
|
|
6
|
+
* CURP_OF_OTHER_CUSTOMER: la apertura de cuenta se cierra porque la CURP ya es de otro cliente.
|
|
5
7
|
*/
|
|
6
8
|
export enum SystemCancelReasonEnum {
|
|
7
9
|
SWEEP_CREDIT_DISCARDED = 'SWEEP_CREDIT_DISCARDED',
|
|
8
10
|
TAKEN_OVER_BY_OTHER_STORE = 'TAKEN_OVER_BY_OTHER_STORE',
|
|
11
|
+
ALREADY_HAS_ACCOUNT = 'ALREADY_HAS_ACCOUNT',
|
|
12
|
+
CURP_OF_OTHER_CUSTOMER = 'CURP_OF_OTHER_CUSTOMER',
|
|
9
13
|
}
|
|
@@ -185,6 +185,7 @@ export * from './dtos/responses/BackofficeSellerKpisResponse';
|
|
|
185
185
|
export * from './enums/SellerTableSourceStatusEnum';
|
|
186
186
|
export * from './dtos/responses/BackofficeSellerTableResponse';
|
|
187
187
|
export * from './dtos/responses/BackofficeCustomerTableResponse';
|
|
188
|
+
export * from './dtos/responses/BackofficeAccountOpeningsResponse';
|
|
188
189
|
export * from './enums/StoreKindEnum';
|
|
189
190
|
export * from './dtos/responses/BackofficeStoreTableResponse';
|
|
190
191
|
export * from './enums/StoreMixCategoryEnum';
|