@fiado/type-kit 3.265.0 → 3.267.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 (46) hide show
  1. package/bin/phoneSales/DeviceVariantImageUploadUrlResponseDto.d.ts +6 -0
  2. package/bin/phoneSales/SaleResponseDto.d.ts +8 -0
  3. package/bin/phoneSales/UpdateDeviceVariantRequestDto.d.ts +6 -0
  4. package/bin/{walletFunding/dtos/CancelFundingReferenceRequest.js → phoneSales/UpdateDeviceVariantRequestDto.js} +15 -9
  5. package/bin/phoneSales/index.d.ts +1 -0
  6. package/bin/phoneSales/index.js +1 -0
  7. package/bin/retailWizard/dtos/RetailCustomerListItem.d.ts +36 -0
  8. package/bin/retailWizard/dtos/RetailCustomerListItem.js +2 -0
  9. package/bin/retailWizard/dtos/responses/BackofficeCustomerPurchasesResponse.d.ts +20 -0
  10. package/bin/retailWizard/dtos/responses/BackofficeCustomerPurchasesResponse.js +2 -0
  11. package/bin/retailWizard/dtos/responses/BackofficeCustomersResponse.d.ts +14 -0
  12. package/bin/retailWizard/dtos/responses/BackofficeCustomersResponse.js +2 -0
  13. package/bin/retailWizard/dtos/responses/BackofficeSellerKpisResponse.d.ts +27 -0
  14. package/bin/retailWizard/dtos/responses/BackofficeSellerKpisResponse.js +2 -0
  15. package/bin/retailWizard/dtos/responses/BackofficeStoreKpisResponse.d.ts +29 -0
  16. package/bin/retailWizard/dtos/responses/BackofficeStoreKpisResponse.js +2 -0
  17. package/bin/retailWizard/index.d.ts +5 -0
  18. package/bin/retailWizard/index.js +6 -0
  19. package/package.json +1 -1
  20. package/src/phoneSales/DeviceVariantImageUploadUrlResponseDto.ts +6 -0
  21. package/src/phoneSales/SaleResponseDto.ts +13 -0
  22. package/src/phoneSales/UpdateDeviceVariantRequestDto.ts +20 -0
  23. package/src/phoneSales/index.ts +1 -0
  24. package/src/retailWizard/dtos/RetailCustomerListItem.ts +36 -0
  25. package/src/retailWizard/dtos/responses/BackofficeCustomerPurchasesResponse.ts +21 -0
  26. package/src/retailWizard/dtos/responses/BackofficeCustomersResponse.ts +15 -0
  27. package/src/retailWizard/dtos/responses/BackofficeSellerKpisResponse.ts +28 -0
  28. package/src/retailWizard/dtos/responses/BackofficeStoreKpisResponse.ts +30 -0
  29. package/src/retailWizard/index.ts +6 -0
  30. package/bin/benefitCenter/enums/BenefitFlowEnum.d.ts +0 -11
  31. package/bin/benefitCenter/enums/BenefitFlowEnum.js +0 -15
  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/walletFunding/dtos/CancelFundingReferenceRequest.d.ts +0 -6
  37. package/bin/walletFunding/dtos/CancelFundingReferenceResponse.d.ts +0 -7
  38. package/bin/walletFunding/dtos/CancelFundingReferenceResponse.js +0 -6
  39. package/bin/walletFunding/dtos/CancelFundingRequest.d.ts +0 -11
  40. package/bin/walletFunding/dtos/CancelFundingRequest.js +0 -33
  41. package/bin/walletFunding/dtos/CancelFundingResponse.d.ts +0 -14
  42. package/bin/walletFunding/dtos/CancelFundingResponse.js +0 -12
  43. package/bin/walletFunding/dtos/CancelWalletFundingRequest.d.ts +0 -3
  44. package/bin/walletFunding/dtos/CancelWalletFundingRequest.js +0 -21
  45. package/bin/walletFunding/dtos/CancelWalletFundingResponse.d.ts +0 -7
  46. package/bin/walletFunding/dtos/CancelWalletFundingResponse.js +0 -6
@@ -2,4 +2,10 @@ export interface DeviceVariantImageUploadUrlResponseDto {
2
2
  uploadUrl: string;
3
3
  imageUrl: string;
4
4
  expiresIn: number;
5
+ /**
6
+ * Tamaño máximo permitido para la imagen, en bytes. Fuente de verdad del límite de producto
7
+ * (hoy 5MB, ver MAX_IMAGE_SIZE_BYTES en DeviceVariantImageService del lambda fiado-phone-sales) —
8
+ * antes solo vivía hardcodeado en el front.
9
+ */
10
+ maxSizeBytes: number;
5
11
  }
@@ -8,4 +8,12 @@ export declare class SaleResponseDto {
8
8
  trackingCode: string | null;
9
9
  providerStatus: string | null;
10
10
  status: string;
11
+ /**
12
+ * Modelo de la variante (resuelto server-side por `variantId`, incluyendo variantes con
13
+ * stock=0). `null` si la resolución falló (variante borrada o error de infraestructura) — ver
14
+ * GET /sales (backoffice) en cell-phone-sales-business.
15
+ */
16
+ variantModel: string | null;
17
+ /** Color de la variante — mismo criterio de resolución/degradación que `variantModel`. */
18
+ variantColor: string | null;
11
19
  }
@@ -0,0 +1,6 @@
1
+ export declare class UpdateDeviceVariantRequestDto {
2
+ model?: string;
3
+ color?: string;
4
+ storage?: string;
5
+ price?: number;
6
+ }
@@ -9,23 +9,29 @@ var __metadata = (this && this.__metadata) || function (k, v) {
9
9
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.CancelFundingReferenceRequest = void 0;
12
+ exports.UpdateDeviceVariantRequestDto = void 0;
13
13
  const class_validator_1 = require("class-validator");
14
- class CancelFundingReferenceRequest {
14
+ class UpdateDeviceVariantRequestDto {
15
15
  }
16
- exports.CancelFundingReferenceRequest = CancelFundingReferenceRequest;
16
+ exports.UpdateDeviceVariantRequestDto = UpdateDeviceVariantRequestDto;
17
17
  __decorate([
18
+ (0, class_validator_1.IsOptional)(),
18
19
  (0, class_validator_1.IsString)(),
19
- (0, class_validator_1.MaxLength)(64),
20
20
  __metadata("design:type", String)
21
- ], CancelFundingReferenceRequest.prototype, "reference", void 0);
21
+ ], UpdateDeviceVariantRequestDto.prototype, "model", void 0);
22
22
  __decorate([
23
+ (0, class_validator_1.IsOptional)(),
23
24
  (0, class_validator_1.IsString)(),
24
- (0, class_validator_1.MaxLength)(64),
25
25
  __metadata("design:type", String)
26
- ], CancelFundingReferenceRequest.prototype, "directoryId", void 0);
26
+ ], UpdateDeviceVariantRequestDto.prototype, "color", void 0);
27
27
  __decorate([
28
+ (0, class_validator_1.IsOptional)(),
28
29
  (0, class_validator_1.IsString)(),
29
- (0, class_validator_1.MaxLength)(64),
30
30
  __metadata("design:type", String)
31
- ], CancelFundingReferenceRequest.prototype, "idempotencyKey", void 0);
31
+ ], UpdateDeviceVariantRequestDto.prototype, "storage", void 0);
32
+ __decorate([
33
+ (0, class_validator_1.IsOptional)(),
34
+ (0, class_validator_1.IsNumber)(),
35
+ (0, class_validator_1.Min)(0),
36
+ __metadata("design:type", Number)
37
+ ], UpdateDeviceVariantRequestDto.prototype, "price", void 0);
@@ -1,5 +1,6 @@
1
1
  export * from './DeviceVariantResponseDto';
2
2
  export * from './CreateDeviceVariantRequestDto';
3
+ export * from './UpdateDeviceVariantRequestDto';
3
4
  export * from './CreateSaleRequestDto';
4
5
  export * from './SaleResponseDto';
5
6
  export * from './RedeemSaleCodeRequestDto';
@@ -16,6 +16,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./DeviceVariantResponseDto"), exports);
18
18
  __exportStar(require("./CreateDeviceVariantRequestDto"), exports);
19
+ __exportStar(require("./UpdateDeviceVariantRequestDto"), exports);
19
20
  __exportStar(require("./CreateSaleRequestDto"), exports);
20
21
  __exportStar(require("./SaleResponseDto"), exports);
21
22
  __exportStar(require("./RedeemSaleCodeRequestDto"), exports);
@@ -0,0 +1,36 @@
1
+ /**
2
+ * Una fila de la lista **Clientes VL** del Portal Admin VentasLuga (A1).
3
+ * SureKeep Fase 3 — pista Retail.
4
+ *
5
+ * Sale del ítem de estadísticas de por vida (`RETAILER#<retailerId>` / `CUSTSTATS#<customerId>`
6
+ * dentro de `RetailSale_GT`), no de barrer ventas: por eso los totales son **de por vida** y no del
7
+ * periodo filtrado. Ver D19 / DEC-040.
8
+ *
9
+ * ⚠️ `customerName` y `customerPhone` son PII. Nunca loguear. La lectura queda registrada en
10
+ * `PiiAccessLog` igual que el listado de ventas.
11
+ */
12
+ export interface RetailCustomerListItem {
13
+ retailCustomerId: string;
14
+ /** Congelado en la venta. `null` si nunca se pudo resolver. */
15
+ customerName: string | null;
16
+ customerPhone: string | null;
17
+ /** Compras DE POR VIDA. Puede venir negativo si hubo cancelaciones antes del backfill. */
18
+ salesCount: number;
19
+ /** Gastado DE POR VIDA, en centavos. Mide volumen COLOCADO (precio del equipo), no lo cobrado. */
20
+ totalSpentCents: number;
21
+ /** ISO-8601 de la primera compra. `null` mientras el backfill no lo haya sembrado. */
22
+ firstSaleAt: string | null;
23
+ /** ISO-8601 de la última compra. Es el campo por el que filtra la pantalla. */
24
+ lastSaleAt: string | null;
25
+ /**
26
+ * Tienda y vendedor de la ÚLTIMA compra.
27
+ *
28
+ * ⚠️ El mockup los llama «tienda favorita» y «vendedor recurrente», que serían la MODA. Acá es el
29
+ * ÚLTIMO: la moda exigiría un contador por (cliente × tienda), que multiplica el ítem por cada
30
+ * tienda donde el cliente compró. Se sirve el último y se declara. Ver `TD-F3-WIZ-MODA`.
31
+ */
32
+ lastStoreId: string | null;
33
+ lastStoreName: string | null;
34
+ lastSellerId: string | null;
35
+ lastSellerName: string | null;
36
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,20 @@
1
+ import type { Sale } from '../Sale';
2
+ /**
3
+ * GET /backoffice/customers/{id}/purchases — el historial de compras de un cliente (A2).
4
+ * SureKeep Fase 3 — pista Retail.
5
+ *
6
+ * Lee `RetailSale_GT` por `customerId-soldAt-index`, así que viene ordenado por fecha y pagina por
7
+ * cursor: un cliente puede tener muchas compras y la ficha las muestra de a poco.
8
+ *
9
+ * `compras30` / `compras90` se cuentan sobre la MISMA lectura cuando la ventana entra en la página;
10
+ * son los contadores que la pantalla muestra como sublínea del total de por vida.
11
+ */
12
+ export interface BackofficeCustomerPurchasesResponse {
13
+ items: Sale[];
14
+ count: number;
15
+ nextToken?: string;
16
+ /** Compras en los últimos 30 días. */
17
+ last30Count: number;
18
+ /** Compras en los últimos 90 días — el que define el segmento `inactivo` (=== 0). */
19
+ last90Count: number;
20
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,14 @@
1
+ import type { RetailCustomerListItem } from '../RetailCustomerListItem';
2
+ /**
3
+ * GET /backoffice/customers — la lista de Clientes VL (A1). SureKeep Fase 3 — pista Retail.
4
+ *
5
+ * NO pagina por cursor: una Query trae todos los clientes de la cadena (una fila por CLIENTE, ~200 B,
6
+ * no una por venta) y la pantalla ordena y filtra sobre el conjunto. `truncated` avisa cuando la
7
+ * cadena excede el tope de lectura — un listado recortado servido en silencio se lee como completo.
8
+ */
9
+ export interface BackofficeCustomersResponse {
10
+ items: RetailCustomerListItem[];
11
+ count: number;
12
+ /** `true` si se alcanzó el tope de lectura y la lista NO está completa. */
13
+ truncated: boolean;
14
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,27 @@
1
+ /** KPIs de un vendedor en la ventana consultada. */
2
+ export interface SellerKpiRow {
3
+ sellerRetailUserId: string;
4
+ /** Congelado en la venta; `null` si nunca se resolvió. */
5
+ sellerName: string | null;
6
+ storeId: string | null;
7
+ storeName: string | null;
8
+ salesCount: number;
9
+ /** Volumen COLOCADO (precio del equipo), no lo cobrado en caja. */
10
+ placedCents: number;
11
+ averageTicketCents: number;
12
+ lastSaleAt: string | null;
13
+ }
14
+ /**
15
+ * GET /backoffice/sellers/kpis — la pantalla Vendedores del Admin VL (A4).
16
+ * SureKeep Fase 3 — pista Retail.
17
+ *
18
+ * Mismo criterio que A3: el eje es la venta, así que solo aparecen los vendedores que vendieron en
19
+ * la ventana. El roster completo vive en `retail-org-business`.
20
+ */
21
+ export interface BackofficeSellerKpisResponse {
22
+ items: SellerKpiRow[];
23
+ count: number;
24
+ from: string;
25
+ to: string | null;
26
+ truncated: boolean;
27
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,29 @@
1
+ /** KPIs de una tienda en la ventana consultada. */
2
+ export interface StoreKpiRow {
3
+ storeId: string;
4
+ /** Congelado en la venta; `null` si nunca se resolvió. */
5
+ storeName: string | null;
6
+ zoneName: string | null;
7
+ salesCount: number;
8
+ /** Volumen COLOCADO (precio del equipo), no lo cobrado en caja. */
9
+ placedCents: number;
10
+ averageTicketCents: number;
11
+ /** ISO-8601 de la venta más reciente de la tienda en la ventana. `null` si no vendió. */
12
+ lastSaleAt: string | null;
13
+ }
14
+ /**
15
+ * GET /backoffice/stores/kpis — la pantalla Tiendas del Admin VL (A3).
16
+ * SureKeep Fase 3 — pista Retail.
17
+ *
18
+ * El eje es la VENTA: solo aparecen las tiendas que vendieron en la ventana. El roster completo
19
+ * (incluidas las que no vendieron) lo tiene `retail-org-business`; la pantalla los cruza.
20
+ */
21
+ export interface BackofficeStoreKpisResponse {
22
+ items: StoreKpiRow[];
23
+ count: number;
24
+ /** ISO-8601 de la ventana efectivamente agregada. */
25
+ from: string;
26
+ to: string | null;
27
+ /** `true` si se alcanzó el tope de agregación y los números están TRUNCADOS. */
28
+ truncated: boolean;
29
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -90,6 +90,11 @@ export * from './dtos/requests/BackofficeCancelSaleRequest';
90
90
  export * from './dtos/responses/BackofficeSalesStatsResponse';
91
91
  export * from './dtos/responses/BackofficeSalesKpisResponse';
92
92
  export * from './dtos/responses/BackofficeReportsResponse';
93
+ export * from './dtos/RetailCustomerListItem';
94
+ export * from './dtos/responses/BackofficeCustomersResponse';
95
+ export * from './dtos/responses/BackofficeCustomerPurchasesResponse';
96
+ export * from './dtos/responses/BackofficeStoreKpisResponse';
97
+ export * from './dtos/responses/BackofficeSellerKpisResponse';
93
98
  export * from './events/SaleCompletedV1';
94
99
  export * from './events/SaleCancelledV1';
95
100
  export * from './events/SaleCompletedV2';
@@ -118,6 +118,12 @@ __exportStar(require("./dtos/requests/BackofficeCancelSaleRequest"), exports);
118
118
  __exportStar(require("./dtos/responses/BackofficeSalesStatsResponse"), exports);
119
119
  __exportStar(require("./dtos/responses/BackofficeSalesKpisResponse"), exports);
120
120
  __exportStar(require("./dtos/responses/BackofficeReportsResponse"), exports);
121
+ // A1-A4 · agregados del portal (D17)
122
+ __exportStar(require("./dtos/RetailCustomerListItem"), exports);
123
+ __exportStar(require("./dtos/responses/BackofficeCustomersResponse"), exports);
124
+ __exportStar(require("./dtos/responses/BackofficeCustomerPurchasesResponse"), exports);
125
+ __exportStar(require("./dtos/responses/BackofficeStoreKpisResponse"), exports);
126
+ __exportStar(require("./dtos/responses/BackofficeSellerKpisResponse"), exports);
121
127
  // Contratos de eventos (PascalCase + sufijo V1)
122
128
  __exportStar(require("./events/SaleCompletedV1"), exports);
123
129
  __exportStar(require("./events/SaleCancelledV1"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fiado/type-kit",
3
- "version": "3.265.0",
3
+ "version": "3.267.0",
4
4
  "description": "",
5
5
  "main": "bin/index.js",
6
6
  "types": "bin/index.d.ts",
@@ -2,4 +2,10 @@ export interface DeviceVariantImageUploadUrlResponseDto {
2
2
  uploadUrl: string;
3
3
  imageUrl: string;
4
4
  expiresIn: number;
5
+ /**
6
+ * Tamaño máximo permitido para la imagen, en bytes. Fuente de verdad del límite de producto
7
+ * (hoy 5MB, ver MAX_IMAGE_SIZE_BYTES en DeviceVariantImageService del lambda fiado-phone-sales) —
8
+ * antes solo vivía hardcodeado en el front.
9
+ */
10
+ maxSizeBytes: number;
5
11
  }
@@ -8,4 +8,17 @@ export class SaleResponseDto {
8
8
  trackingCode!: string | null;
9
9
  providerStatus!: string | null;
10
10
  status!: string;
11
+ /**
12
+ * Modelo de la variante (resuelto server-side por `variantId`, incluyendo variantes con
13
+ * stock=0). `null` si la resolución falló (variante borrada o error de infraestructura) — ver
14
+ * GET /sales (backoffice) en cell-phone-sales-business.
15
+ */
16
+ variantModel!: string | null;
17
+ /** Color de la variante — mismo criterio de resolución/degradación que `variantModel`. */
18
+ variantColor!: string | null;
19
+ // Nota (v1, 2026-08-03): `buyerDirectorId` (arriba) sigue siendo el ID crudo del comprador a
20
+ // propósito. Se evaluó agregar `buyerName` resuelto server-side (vía servicio de directorios,
21
+ // @fiado/api-invoker IDirectoriesApi) pero requería wiring de infra pendiente
22
+ // (DIRECTORIES_LAMBDA_URL) — el líder de producto confirmó que para v1 alcanza con el ID
23
+ // crudo. Pospuesto a v2.
11
24
  }
@@ -0,0 +1,20 @@
1
+ import { IsString, IsNumber, IsOptional, Min } from 'class-validator';
2
+
3
+ export class UpdateDeviceVariantRequestDto {
4
+ @IsOptional()
5
+ @IsString()
6
+ model?: string;
7
+
8
+ @IsOptional()
9
+ @IsString()
10
+ color?: string;
11
+
12
+ @IsOptional()
13
+ @IsString()
14
+ storage?: string;
15
+
16
+ @IsOptional()
17
+ @IsNumber()
18
+ @Min(0)
19
+ price?: number;
20
+ }
@@ -1,5 +1,6 @@
1
1
  export * from './DeviceVariantResponseDto';
2
2
  export * from './CreateDeviceVariantRequestDto';
3
+ export * from './UpdateDeviceVariantRequestDto';
3
4
  export * from './CreateSaleRequestDto';
4
5
  export * from './SaleResponseDto';
5
6
  export * from './RedeemSaleCodeRequestDto';
@@ -0,0 +1,36 @@
1
+ /**
2
+ * Una fila de la lista **Clientes VL** del Portal Admin VentasLuga (A1).
3
+ * SureKeep Fase 3 — pista Retail.
4
+ *
5
+ * Sale del ítem de estadísticas de por vida (`RETAILER#<retailerId>` / `CUSTSTATS#<customerId>`
6
+ * dentro de `RetailSale_GT`), no de barrer ventas: por eso los totales son **de por vida** y no del
7
+ * periodo filtrado. Ver D19 / DEC-040.
8
+ *
9
+ * ⚠️ `customerName` y `customerPhone` son PII. Nunca loguear. La lectura queda registrada en
10
+ * `PiiAccessLog` igual que el listado de ventas.
11
+ */
12
+ export interface RetailCustomerListItem {
13
+ retailCustomerId: string;
14
+ /** Congelado en la venta. `null` si nunca se pudo resolver. */
15
+ customerName: string | null;
16
+ customerPhone: string | null;
17
+ /** Compras DE POR VIDA. Puede venir negativo si hubo cancelaciones antes del backfill. */
18
+ salesCount: number;
19
+ /** Gastado DE POR VIDA, en centavos. Mide volumen COLOCADO (precio del equipo), no lo cobrado. */
20
+ totalSpentCents: number;
21
+ /** ISO-8601 de la primera compra. `null` mientras el backfill no lo haya sembrado. */
22
+ firstSaleAt: string | null;
23
+ /** ISO-8601 de la última compra. Es el campo por el que filtra la pantalla. */
24
+ lastSaleAt: string | null;
25
+ /**
26
+ * Tienda y vendedor de la ÚLTIMA compra.
27
+ *
28
+ * ⚠️ El mockup los llama «tienda favorita» y «vendedor recurrente», que serían la MODA. Acá es el
29
+ * ÚLTIMO: la moda exigiría un contador por (cliente × tienda), que multiplica el ítem por cada
30
+ * tienda donde el cliente compró. Se sirve el último y se declara. Ver `TD-F3-WIZ-MODA`.
31
+ */
32
+ lastStoreId: string | null;
33
+ lastStoreName: string | null;
34
+ lastSellerId: string | null;
35
+ lastSellerName: string | null;
36
+ }
@@ -0,0 +1,21 @@
1
+ import type { Sale } from '../Sale';
2
+
3
+ /**
4
+ * GET /backoffice/customers/{id}/purchases — el historial de compras de un cliente (A2).
5
+ * SureKeep Fase 3 — pista Retail.
6
+ *
7
+ * Lee `RetailSale_GT` por `customerId-soldAt-index`, así que viene ordenado por fecha y pagina por
8
+ * cursor: un cliente puede tener muchas compras y la ficha las muestra de a poco.
9
+ *
10
+ * `compras30` / `compras90` se cuentan sobre la MISMA lectura cuando la ventana entra en la página;
11
+ * son los contadores que la pantalla muestra como sublínea del total de por vida.
12
+ */
13
+ export interface BackofficeCustomerPurchasesResponse {
14
+ items: Sale[];
15
+ count: number;
16
+ nextToken?: string;
17
+ /** Compras en los últimos 30 días. */
18
+ last30Count: number;
19
+ /** Compras en los últimos 90 días — el que define el segmento `inactivo` (=== 0). */
20
+ last90Count: number;
21
+ }
@@ -0,0 +1,15 @@
1
+ import type { RetailCustomerListItem } from '../RetailCustomerListItem';
2
+
3
+ /**
4
+ * GET /backoffice/customers — la lista de Clientes VL (A1). SureKeep Fase 3 — pista Retail.
5
+ *
6
+ * NO pagina por cursor: una Query trae todos los clientes de la cadena (una fila por CLIENTE, ~200 B,
7
+ * no una por venta) y la pantalla ordena y filtra sobre el conjunto. `truncated` avisa cuando la
8
+ * cadena excede el tope de lectura — un listado recortado servido en silencio se lee como completo.
9
+ */
10
+ export interface BackofficeCustomersResponse {
11
+ items: RetailCustomerListItem[];
12
+ count: number;
13
+ /** `true` si se alcanzó el tope de lectura y la lista NO está completa. */
14
+ truncated: boolean;
15
+ }
@@ -0,0 +1,28 @@
1
+ /** KPIs de un vendedor en la ventana consultada. */
2
+ export interface SellerKpiRow {
3
+ sellerRetailUserId: string;
4
+ /** Congelado en la venta; `null` si nunca se resolvió. */
5
+ sellerName: string | null;
6
+ storeId: string | null;
7
+ storeName: string | null;
8
+ salesCount: number;
9
+ /** Volumen COLOCADO (precio del equipo), no lo cobrado en caja. */
10
+ placedCents: number;
11
+ averageTicketCents: number;
12
+ lastSaleAt: string | null;
13
+ }
14
+
15
+ /**
16
+ * GET /backoffice/sellers/kpis — la pantalla Vendedores del Admin VL (A4).
17
+ * SureKeep Fase 3 — pista Retail.
18
+ *
19
+ * Mismo criterio que A3: el eje es la venta, así que solo aparecen los vendedores que vendieron en
20
+ * la ventana. El roster completo vive en `retail-org-business`.
21
+ */
22
+ export interface BackofficeSellerKpisResponse {
23
+ items: SellerKpiRow[];
24
+ count: number;
25
+ from: string;
26
+ to: string | null;
27
+ truncated: boolean;
28
+ }
@@ -0,0 +1,30 @@
1
+ /** KPIs de una tienda en la ventana consultada. */
2
+ export interface StoreKpiRow {
3
+ storeId: string;
4
+ /** Congelado en la venta; `null` si nunca se resolvió. */
5
+ storeName: string | null;
6
+ zoneName: string | null;
7
+ salesCount: number;
8
+ /** Volumen COLOCADO (precio del equipo), no lo cobrado en caja. */
9
+ placedCents: number;
10
+ averageTicketCents: number;
11
+ /** ISO-8601 de la venta más reciente de la tienda en la ventana. `null` si no vendió. */
12
+ lastSaleAt: string | null;
13
+ }
14
+
15
+ /**
16
+ * GET /backoffice/stores/kpis — la pantalla Tiendas del Admin VL (A3).
17
+ * SureKeep Fase 3 — pista Retail.
18
+ *
19
+ * El eje es la VENTA: solo aparecen las tiendas que vendieron en la ventana. El roster completo
20
+ * (incluidas las que no vendieron) lo tiene `retail-org-business`; la pantalla los cruza.
21
+ */
22
+ export interface BackofficeStoreKpisResponse {
23
+ items: StoreKpiRow[];
24
+ count: number;
25
+ /** ISO-8601 de la ventana efectivamente agregada. */
26
+ from: string;
27
+ to: string | null;
28
+ /** `true` si se alcanzó el tope de agregación y los números están TRUNCADOS. */
29
+ truncated: boolean;
30
+ }
@@ -112,6 +112,12 @@ export * from './dtos/requests/BackofficeCancelSaleRequest';
112
112
  export * from './dtos/responses/BackofficeSalesStatsResponse';
113
113
  export * from './dtos/responses/BackofficeSalesKpisResponse';
114
114
  export * from './dtos/responses/BackofficeReportsResponse';
115
+ // A1-A4 · agregados del portal (D17)
116
+ export * from './dtos/RetailCustomerListItem';
117
+ export * from './dtos/responses/BackofficeCustomersResponse';
118
+ export * from './dtos/responses/BackofficeCustomerPurchasesResponse';
119
+ export * from './dtos/responses/BackofficeStoreKpisResponse';
120
+ export * from './dtos/responses/BackofficeSellerKpisResponse';
115
121
 
116
122
  // Contratos de eventos (PascalCase + sufijo V1)
117
123
  export * from './events/SaleCompletedV1';
@@ -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,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
- export declare class CancelFundingReferenceRequest {
2
- /** Referencia Passport (PK de EqualityFundingReference_GT). */
3
- reference: string;
4
- directoryId: string;
5
- idempotencyKey: string;
6
- }
@@ -1,7 +0,0 @@
1
- import { BenefitPaymentStatusEnum } from "../../benefitCenter/enums/BenefitPaymentStatusEnum";
2
- import { WalletFundingErrorCodeEnum } from "../enums/WalletFundingErrorCodeEnum";
3
- export declare class CancelFundingReferenceResponse {
4
- reference: string;
5
- status: BenefitPaymentStatusEnum;
6
- errorCode?: WalletFundingErrorCodeEnum;
7
- }
@@ -1,6 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CancelFundingReferenceResponse = void 0;
4
- class CancelFundingReferenceResponse {
5
- }
6
- exports.CancelFundingReferenceResponse = CancelFundingReferenceResponse;
@@ -1,11 +0,0 @@
1
- /**
2
- * Request del cancel via Centro de Beneficios (spec 13 v2.0).
3
- * `reference` viaja en el path, `directoryId` se resuelve del JWT.
4
- * `providerModuleName` permite al marketplace rutear al publisher correcto
5
- * sin tener que persistir el mapping (el wallet-app sabe el moduleName
6
- * porque vino en la respuesta del authorize).
7
- */
8
- export declare class CancelFundingRequest {
9
- idempotencyKey: string;
10
- providerModuleName: string;
11
- }
@@ -1,33 +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.CancelFundingRequest = void 0;
13
- const class_validator_1 = require("class-validator");
14
- /**
15
- * Request del cancel via Centro de Beneficios (spec 13 v2.0).
16
- * `reference` viaja en el path, `directoryId` se resuelve del JWT.
17
- * `providerModuleName` permite al marketplace rutear al publisher correcto
18
- * sin tener que persistir el mapping (el wallet-app sabe el moduleName
19
- * porque vino en la respuesta del authorize).
20
- */
21
- class CancelFundingRequest {
22
- }
23
- exports.CancelFundingRequest = CancelFundingRequest;
24
- __decorate([
25
- (0, class_validator_1.IsString)(),
26
- (0, class_validator_1.MaxLength)(64),
27
- __metadata("design:type", String)
28
- ], CancelFundingRequest.prototype, "idempotencyKey", void 0);
29
- __decorate([
30
- (0, class_validator_1.IsString)(),
31
- (0, class_validator_1.MaxLength)(128),
32
- __metadata("design:type", String)
33
- ], CancelFundingRequest.prototype, "providerModuleName", void 0);
@@ -1,14 +0,0 @@
1
- import { BenefitPaymentStatusEnum } from "../../benefitCenter/enums/BenefitPaymentStatusEnum";
2
- import { WalletFundingErrorCodeEnum } from "../enums/WalletFundingErrorCodeEnum";
3
- /**
4
- * Response del cancel via Centro de Beneficios (spec 13 v2.0).
5
- * `status` reusa `BenefitPaymentStatusEnum` (APPROVED = cancel aceptado;
6
- * REJECTED = no se pudo) para consistencia con `CancelFundingReferenceResponse`
7
- * (marketplace ↔ connector). Idempotente: re-cancelar devuelve APPROVED.
8
- */
9
- export declare class CancelFundingResponse {
10
- reference: string;
11
- status: BenefitPaymentStatusEnum;
12
- errorCode?: WalletFundingErrorCodeEnum;
13
- message?: string;
14
- }
@@ -1,12 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CancelFundingResponse = void 0;
4
- /**
5
- * Response del cancel via Centro de Beneficios (spec 13 v2.0).
6
- * `status` reusa `BenefitPaymentStatusEnum` (APPROVED = cancel aceptado;
7
- * REJECTED = no se pudo) para consistencia con `CancelFundingReferenceResponse`
8
- * (marketplace ↔ connector). Idempotente: re-cancelar devuelve APPROVED.
9
- */
10
- class CancelFundingResponse {
11
- }
12
- exports.CancelFundingResponse = CancelFundingResponse;
@@ -1,3 +0,0 @@
1
- export declare class CancelWalletFundingRequest {
2
- idempotencyKey: string;
3
- }
@@ -1,21 +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.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);
@@ -1,7 +0,0 @@
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
- reference?: string;
7
- }
@@ -1,6 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CancelWalletFundingResponse = void 0;
4
- class CancelWalletFundingResponse {
5
- }
6
- exports.CancelWalletFundingResponse = CancelWalletFundingResponse;