@fiado/type-kit 3.551.0 → 3.552.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/retailCatalog/singlePriceFields.test.ts +48 -0
- package/_test_/unit/retailIntegration/eventPayloads.test.ts +1 -0
- package/_test_/unit/retailPromotions/giftOptionValue.test.ts +20 -0
- package/_test_/unit/retailWizard/linesWithoutListPrice.test.ts +40 -0
- package/bin/retailCatalog/dtos/Product.d.ts +2 -1
- package/bin/retailCatalog/dtos/requests/BackofficeCreateSkuPriceRequest.d.ts +1 -0
- package/bin/retailCatalog/dtos/requests/CreateProductRequest.d.ts +1 -0
- package/bin/retailCatalog/dtos/requests/SyncInventoryRequest.d.ts +1 -0
- package/bin/retailCatalog/dtos/requests/UpdateProductRequest.d.ts +1 -0
- package/bin/retailCatalog/dtos/responses/InventoryLensResponse.d.ts +1 -1
- package/bin/retailCatalog/dtos/responses/ReserveStockResponse.d.ts +4 -1
- package/bin/retailCatalog/dtos/responses/SkuPriceEntry.d.ts +2 -1
- package/bin/retailCatalog/dtos/responses/StoreCatalogItem.d.ts +1 -1
- package/bin/retailPromotions/dtos/responses/WizardSalePromotionResponses.d.ts +4 -1
- package/bin/retailWizard/dtos/SaleLine.d.ts +2 -1
- package/bin/retailWizard/dtos/WizardGiftLine.d.ts +1 -1
- package/bin/retailWizard/dtos/WizardLinePromotionFields.d.ts +1 -1
- package/bin/retailWizard/dtos/WizardReservedLine.d.ts +2 -1
- package/bin/retailWizard/events/SaleCompletedV1.d.ts +1 -1
- package/bin/retailWizard/events/SaleCompletedV2.d.ts +1 -1
- package/package.json +1 -1
- package/src/retailCatalog/dtos/Product.ts +2 -1
- package/src/retailCatalog/dtos/requests/BackofficeCreateSkuPriceRequest.ts +1 -0
- package/src/retailCatalog/dtos/requests/CreateProductRequest.ts +1 -0
- package/src/retailCatalog/dtos/requests/SyncInventoryRequest.ts +1 -0
- package/src/retailCatalog/dtos/requests/UpdateProductRequest.ts +1 -0
- package/src/retailCatalog/dtos/responses/InventoryLensResponse.ts +1 -1
- package/src/retailCatalog/dtos/responses/ReserveStockResponse.ts +4 -1
- package/src/retailCatalog/dtos/responses/SkuPriceEntry.ts +2 -1
- package/src/retailCatalog/dtos/responses/StoreCatalogItem.ts +1 -1
- package/src/retailPromotions/dtos/responses/WizardSalePromotionResponses.ts +4 -1
- package/src/retailWizard/dtos/SaleLine.ts +2 -1
- package/src/retailWizard/dtos/WizardGiftLine.ts +1 -1
- package/src/retailWizard/dtos/WizardLinePromotionFields.ts +1 -1
- package/src/retailWizard/dtos/WizardReservedLine.ts +2 -1
- package/src/retailWizard/events/SaleCompletedV1.ts +1 -1
- package/src/retailWizard/events/SaleCompletedV2.ts +1 -1
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import 'reflect-metadata';
|
|
2
|
+
import * as RetailCatalog from '../../../src/retailCatalog';
|
|
3
|
+
|
|
4
|
+
// ts-jest compila con type-check: si un campo sigue obligatorio o no existe, la suite no compila.
|
|
5
|
+
describe('retailCatalog — un solo precio y valor del regalo', () => {
|
|
6
|
+
const reservation: RetailCatalog.ReserveStockResponse = {
|
|
7
|
+
expiresAt: '2026-10-20T20:30:00.000Z',
|
|
8
|
+
basePriceCents: 0,
|
|
9
|
+
priceSk: '2026-10-01T00:00:00.000Z',
|
|
10
|
+
eligibleFinanciers: [],
|
|
11
|
+
sellItemCost: 1,
|
|
12
|
+
mdmEnabled: false,
|
|
13
|
+
mdmProvider: null,
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
it('ReserveStockResponse es válida sin listPriceCents ni giftValueCents', () => {
|
|
17
|
+
expect(reservation.giftValueCents).toBeUndefined();
|
|
18
|
+
expect(reservation.listPriceCents).toBeUndefined();
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
it('la reserva de regalo trae giftValueCents', () => {
|
|
22
|
+
const gift: RetailCatalog.ReserveStockResponse = { ...reservation, giftValueCents: 35000 };
|
|
23
|
+
expect(gift.giftValueCents).toBe(35000);
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
it('acepta los dos nombres con el mismo valor mientras dure la transición', () => {
|
|
27
|
+
const gift: RetailCatalog.ReserveStockResponse = { ...reservation, giftValueCents: 35000, listPriceCents: 35000 };
|
|
28
|
+
expect(gift.listPriceCents).toBe(gift.giftValueCents);
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
it('Product es válido sin listPriceCents', () => {
|
|
32
|
+
const product: Pick<RetailCatalog.Product, 'sku' | 'basePriceCents' | 'listPriceCents'> = {
|
|
33
|
+
sku: 'SKU-1',
|
|
34
|
+
basePriceCents: 129900,
|
|
35
|
+
};
|
|
36
|
+
expect(product.listPriceCents).toBeUndefined();
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
it('SkuPriceEntry es válido sin listPriceCents', () => {
|
|
40
|
+
const entry: RetailCatalog.SkuPriceEntry = {
|
|
41
|
+
effectiveFrom: '2026-10-20T00:00:00.000Z',
|
|
42
|
+
basePriceCents: 129900,
|
|
43
|
+
source: RetailCatalog.PriceSourceEnum.BACKOFFICE,
|
|
44
|
+
createdBy: 'backoffice-user-1',
|
|
45
|
+
};
|
|
46
|
+
expect(entry.listPriceCents).toBeUndefined();
|
|
47
|
+
});
|
|
48
|
+
});
|
|
@@ -94,6 +94,7 @@ describe('ProductEventPayload', () => {
|
|
|
94
94
|
['price.effectiveFrom', { price: { ...product.price, effectiveFrom: '2026-08-17T20:32:05' } }],
|
|
95
95
|
['eligibleFinanciers', { eligibleFinanciers: ['NADIE'] }],
|
|
96
96
|
['tier', { tier: undefined }],
|
|
97
|
+
['price.listPrice', { price: { basePrice: '4299.00', effectiveFrom: '2026-08-17T20:32:05Z' } }],
|
|
97
98
|
])('rechaza %s', async (path, over) => {
|
|
98
99
|
expect(await errorsOf(ProductEventPayload, { ...product, ...over })).toContain(path);
|
|
99
100
|
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import 'reflect-metadata';
|
|
2
|
+
import type { GiftOption } from '../../../src/retailPromotions/index';
|
|
3
|
+
|
|
4
|
+
describe('GiftOption.valueCents', () => {
|
|
5
|
+
it('trae el valor del regalo sin listPriceCents', () => {
|
|
6
|
+
const option: GiftOption = { sku: 'CASE-1', name: 'Funda', valueCents: 35000, inStock: true };
|
|
7
|
+
expect(option.valueCents).toBe(35000);
|
|
8
|
+
expect(option.listPriceCents).toBeUndefined();
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
it('acepta los dos nombres con el mismo valor mientras dure la transición', () => {
|
|
12
|
+
const option: GiftOption = { sku: 'CASE-1', name: 'Funda', valueCents: 35000, listPriceCents: 35000, inStock: true };
|
|
13
|
+
expect(option.listPriceCents).toBe(option.valueCents);
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
it('sigue aceptando solo el nombre viejo, para no romper a promotions develop', () => {
|
|
17
|
+
const legacy: GiftOption = { sku: 'CASE-1', name: 'Funda', listPriceCents: 35000, inStock: true };
|
|
18
|
+
expect(legacy.valueCents).toBeUndefined();
|
|
19
|
+
});
|
|
20
|
+
});
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import 'reflect-metadata';
|
|
2
|
+
import {
|
|
3
|
+
LinePaymentTypeEnum,
|
|
4
|
+
WizardLineStatusEnum,
|
|
5
|
+
type SaleLine,
|
|
6
|
+
type WizardReservedLine,
|
|
7
|
+
} from '../../../src/retailWizard';
|
|
8
|
+
|
|
9
|
+
describe('retailWizard — líneas sin precio de lista', () => {
|
|
10
|
+
it('WizardReservedLine es válida sin listPriceCents', () => {
|
|
11
|
+
const line: WizardReservedLine = {
|
|
12
|
+
lineId: 'L1',
|
|
13
|
+
sku: 'PHONE-1',
|
|
14
|
+
qty: 1,
|
|
15
|
+
status: WizardLineStatusEnum.RESERVED,
|
|
16
|
+
reservationId: 'r-1',
|
|
17
|
+
expiresAt: '2026-10-20T20:30:00.000Z',
|
|
18
|
+
basePriceCents: 349900,
|
|
19
|
+
priceSk: 'p',
|
|
20
|
+
eligibleFinanciers: ['SUREKEEP'],
|
|
21
|
+
financeable: true,
|
|
22
|
+
paymentType: LinePaymentTypeEnum.CREDIT,
|
|
23
|
+
sellItemCost: 1,
|
|
24
|
+
};
|
|
25
|
+
expect(line.listPriceCents).toBeUndefined();
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
it('SaleLine es válida sin listPriceCents', () => {
|
|
29
|
+
const line: SaleLine = {
|
|
30
|
+
lineId: 'L1',
|
|
31
|
+
sku: 'PHONE-1',
|
|
32
|
+
qty: 1,
|
|
33
|
+
basePriceCents: 349900,
|
|
34
|
+
priceSk: 'p',
|
|
35
|
+
paymentType: LinePaymentTypeEnum.CREDIT,
|
|
36
|
+
components: [{ sku: 'PHONE-1', qty: 1, identifiers: ['356938035643809'] }],
|
|
37
|
+
};
|
|
38
|
+
expect(line.listPriceCents).toBeUndefined();
|
|
39
|
+
});
|
|
40
|
+
});
|
|
@@ -27,7 +27,8 @@ export declare class Product {
|
|
|
27
27
|
/** `null` = Sin gama. */
|
|
28
28
|
tier: ProductTierEnum | null;
|
|
29
29
|
basePriceCents: number;
|
|
30
|
-
|
|
30
|
+
/** @deprecated Ya no se usa; el único precio es `basePriceCents`. */
|
|
31
|
+
listPriceCents?: number | null;
|
|
31
32
|
eligibleFinanciers: string[];
|
|
32
33
|
mdmEnabled: boolean;
|
|
33
34
|
mdmProvider: MdmProviderEnum | null;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/** Body de POST /backoffice/inventory/skus/{sku}/prices (backofficeCreateSkuPrice); crea un PRICE# nuevo con origen BACKOFFICE. */
|
|
2
2
|
export declare class BackofficeCreateSkuPriceRequest {
|
|
3
3
|
basePriceCents: number;
|
|
4
|
+
/** @deprecated Ya no se usa; el único precio es `basePriceCents`. */
|
|
4
5
|
listPriceCents?: number | null;
|
|
5
6
|
}
|
|
@@ -17,6 +17,7 @@ export declare class CreateProductRequest {
|
|
|
17
17
|
imageUrl?: string | null;
|
|
18
18
|
tier: ProductTierEnum;
|
|
19
19
|
basePriceCents: number;
|
|
20
|
+
/** @deprecated Ya no se usa; el único precio es `basePriceCents`. */
|
|
20
21
|
listPriceCents?: number | null;
|
|
21
22
|
eligibleFinanciers: string[];
|
|
22
23
|
mdmEnabled: boolean;
|
|
@@ -6,6 +6,7 @@ import { TrackingModeEnum } from '../../enums/TrackingModeEnum';
|
|
|
6
6
|
import { ProductComponent } from '../ProductComponent';
|
|
7
7
|
/** Precio de un producto en la puerta de entrada; crea PRICE# solo si cambió el monto. */
|
|
8
8
|
export declare class SyncPrice {
|
|
9
|
+
/** @deprecated Ya no se usa; el único precio es `basePriceCents`. */
|
|
9
10
|
listPriceCents?: number | null;
|
|
10
11
|
basePriceCents: number;
|
|
11
12
|
effectiveFrom: string;
|
|
@@ -16,6 +16,7 @@ export declare class UpdateProductRequest {
|
|
|
16
16
|
imageUrl?: string | null;
|
|
17
17
|
tier?: ProductTierEnum;
|
|
18
18
|
basePriceCents?: number;
|
|
19
|
+
/** @deprecated Ya no se usa; el único precio es `basePriceCents`. */
|
|
19
20
|
listPriceCents?: number | null;
|
|
20
21
|
eligibleFinanciers?: string[];
|
|
21
22
|
mdmEnabled?: boolean;
|
|
@@ -61,7 +61,7 @@ export interface InventoryLensSkuItem {
|
|
|
61
61
|
criticalStock: boolean;
|
|
62
62
|
/** Unidades de este SKU vendidas hoy en esta tienda, **financiadas por SureKeep**. */
|
|
63
63
|
soldTodayUnits: number;
|
|
64
|
-
/** Precio de contado en centavos (`
|
|
64
|
+
/** Precio de contado en centavos (`basePriceCents`). */
|
|
65
65
|
cashPriceCents: number;
|
|
66
66
|
}
|
|
67
67
|
/** Una fila del tab `transfers`: mover unidades de un SKU de una tienda con excedente a una en crítico. */
|
|
@@ -14,7 +14,10 @@ export interface ReservedComponent {
|
|
|
14
14
|
export interface ReserveStockResponse {
|
|
15
15
|
expiresAt: string;
|
|
16
16
|
basePriceCents: number;
|
|
17
|
-
|
|
17
|
+
/** @deprecated Usa `giftValueCents`; en reservas GIFT trae el mismo valor, en las demás `null`. */
|
|
18
|
+
listPriceCents?: number | null;
|
|
19
|
+
/** Solo en reservas `purpose: GIFT`: valor del regalo, su precio de venta. */
|
|
20
|
+
giftValueCents?: number;
|
|
18
21
|
/** Llave del registro PRICE# del que salió el precio fijado. */
|
|
19
22
|
priceSk: string;
|
|
20
23
|
eligibleFinanciers: string[];
|
|
@@ -2,7 +2,8 @@ import type { PriceSourceEnum } from '../../enums/PriceSourceEnum';
|
|
|
2
2
|
/** Un registro del historial de precios PRICE# de un SKU. */
|
|
3
3
|
export interface SkuPriceEntry {
|
|
4
4
|
effectiveFrom: string;
|
|
5
|
-
|
|
5
|
+
/** @deprecated Ya no se usa; el único precio es `basePriceCents`. */
|
|
6
|
+
listPriceCents?: number | null;
|
|
6
7
|
basePriceCents: number;
|
|
7
8
|
source: PriceSourceEnum;
|
|
8
9
|
createdBy: string;
|
|
@@ -36,7 +36,7 @@ export interface StoreCatalogItem {
|
|
|
36
36
|
itemType?: ItemTypeEnum;
|
|
37
37
|
/** Nombre visible para kits y servicios, que no tienen marca/modelo. */
|
|
38
38
|
description?: string;
|
|
39
|
-
/**
|
|
39
|
+
/** @deprecated Ya no se usa; el valor de un regalo es `basePriceCents`. */
|
|
40
40
|
listPriceCents?: number;
|
|
41
41
|
/** Prioridad de venta de 0 a 100; «Recomendados» ordena por ella. */
|
|
42
42
|
salePriority?: number;
|
|
@@ -42,7 +42,10 @@ export interface ListStoreSalePromotionsResponse {
|
|
|
42
42
|
export interface GiftOption {
|
|
43
43
|
sku: string;
|
|
44
44
|
name: string;
|
|
45
|
-
|
|
45
|
+
/** Valor del regalo: su precio de venta. */
|
|
46
|
+
valueCents?: number;
|
|
47
|
+
/** @deprecated Usa `valueCents`; trae el mismo valor. */
|
|
48
|
+
listPriceCents?: number;
|
|
46
49
|
inStock: boolean;
|
|
47
50
|
}
|
|
48
51
|
/** Lo que se entrega al cerrar («Después en la venta»). `quantity`: recargas o meses de garantía. */
|
|
@@ -8,7 +8,8 @@ export interface SaleLine extends WizardLinePromotionFields {
|
|
|
8
8
|
sku: string;
|
|
9
9
|
qty: number;
|
|
10
10
|
basePriceCents: number;
|
|
11
|
-
|
|
11
|
+
/** @deprecated Ya no se escribe; el valor de un regalo vive en `originalPriceCents`. */
|
|
12
|
+
listPriceCents?: number | null;
|
|
12
13
|
/** Llave del registro PRICE# del que salió el precio. */
|
|
13
14
|
priceSk: string;
|
|
14
15
|
paymentType: LinePaymentTypeEnum;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { WizardLineRoleEnum } from '../enums/WizardLineRoleEnum';
|
|
2
2
|
import type { WizardReservedLine } from './WizardReservedLine';
|
|
3
|
-
/** Línea GIFT: ligada a un ancla, con su promo y el
|
|
3
|
+
/** Línea GIFT: ligada a un ancla, con su promo y el valor del regalo (su precio de venta). */
|
|
4
4
|
export type WizardGiftLine = WizardReservedLine & {
|
|
5
5
|
role: WizardLineRoleEnum.GIFT;
|
|
6
6
|
linkedLineId: string;
|
|
@@ -11,7 +11,7 @@ export interface WizardLinePromotionFields {
|
|
|
11
11
|
discountCode?: string;
|
|
12
12
|
/** Descuento total de la línea; neto = basePriceCents × qty − discountCents. */
|
|
13
13
|
discountCents?: number;
|
|
14
|
-
/** Precio antes del descuento; en un regalo,
|
|
14
|
+
/** Precio antes del descuento; en un regalo, su precio de venta con la línea a $0. */
|
|
15
15
|
originalPriceCents?: number;
|
|
16
16
|
/** Descuento de cada promo en la línea; sin el campo, la de `promotionId` lleva todo menos el código. */
|
|
17
17
|
promotionDiscounts?: LinePromotionAmount[];
|
|
@@ -17,7 +17,8 @@ export interface WizardReservedLine extends WizardLinePromotionFields {
|
|
|
17
17
|
expiresAt: string;
|
|
18
18
|
/** Precio fijado de la línea (el del kit si es kit). */
|
|
19
19
|
basePriceCents: number | null;
|
|
20
|
-
|
|
20
|
+
/** @deprecated Ya no se escribe; el valor de un regalo vive en `originalPriceCents`. */
|
|
21
|
+
listPriceCents?: number | null;
|
|
21
22
|
/** Llave del registro PRICE# del que salió el precio. */
|
|
22
23
|
priceSk: string | null;
|
|
23
24
|
eligibleFinanciers: string[];
|
|
@@ -23,7 +23,7 @@ export interface SaleCompletedV1 {
|
|
|
23
23
|
* sin `type` un crédito con $1,300 de enganche era indistinguible de un contado de $1,300.
|
|
24
24
|
*/
|
|
25
25
|
type?: SaleTypeEnum;
|
|
26
|
-
/** Precio
|
|
26
|
+
/** Precio neto del equipo: su precio de venta menos su descuento. Sin equipo se omite. */
|
|
27
27
|
equipmentPriceCents?: number;
|
|
28
28
|
/** Enganche cobrado (solo `type=CREDIT`). */
|
|
29
29
|
downPaymentCents?: number;
|
|
@@ -30,7 +30,7 @@ export interface SaleCompletedV2 {
|
|
|
30
30
|
imei: string | null;
|
|
31
31
|
/** Lo COBRADO en caja. En contado == precio del equipo; en CREDIT es SOLO el enganche. */
|
|
32
32
|
amountCents: number;
|
|
33
|
-
/** Precio
|
|
33
|
+
/** Precio neto del equipo (venta menos descuento), la base de comisión. `null` sin el dato. */
|
|
34
34
|
equipmentPriceCents: number | null;
|
|
35
35
|
downPaymentCents: number | null;
|
|
36
36
|
creditId: string | null;
|
package/package.json
CHANGED
|
@@ -28,7 +28,8 @@ export class Product {
|
|
|
28
28
|
/** `null` = Sin gama. */
|
|
29
29
|
tier!: ProductTierEnum | null;
|
|
30
30
|
basePriceCents!: number;
|
|
31
|
-
|
|
31
|
+
/** @deprecated Ya no se usa; el único precio es `basePriceCents`. */
|
|
32
|
+
listPriceCents?: number | null;
|
|
32
33
|
eligibleFinanciers!: string[];
|
|
33
34
|
mdmEnabled!: boolean;
|
|
34
35
|
mdmProvider!: MdmProviderEnum | null;
|
|
@@ -22,6 +22,7 @@ import { ProductComponent } from '../ProductComponent';
|
|
|
22
22
|
|
|
23
23
|
/** Precio de un producto en la puerta de entrada; crea PRICE# solo si cambió el monto. */
|
|
24
24
|
export class SyncPrice {
|
|
25
|
+
/** @deprecated Ya no se usa; el único precio es `basePriceCents`. */
|
|
25
26
|
@IsOptional()
|
|
26
27
|
@IsInt()
|
|
27
28
|
@Min(0)
|
|
@@ -69,7 +69,7 @@ export interface InventoryLensSkuItem {
|
|
|
69
69
|
/** Unidades de este SKU vendidas hoy en esta tienda, **financiadas por SureKeep**. */
|
|
70
70
|
soldTodayUnits: number;
|
|
71
71
|
|
|
72
|
-
/** Precio de contado en centavos (`
|
|
72
|
+
/** Precio de contado en centavos (`basePriceCents`). */
|
|
73
73
|
cashPriceCents: number;
|
|
74
74
|
}
|
|
75
75
|
|
|
@@ -16,7 +16,10 @@ export interface ReservedComponent {
|
|
|
16
16
|
export interface ReserveStockResponse {
|
|
17
17
|
expiresAt: string;
|
|
18
18
|
basePriceCents: number;
|
|
19
|
-
|
|
19
|
+
/** @deprecated Usa `giftValueCents`; en reservas GIFT trae el mismo valor, en las demás `null`. */
|
|
20
|
+
listPriceCents?: number | null;
|
|
21
|
+
/** Solo en reservas `purpose: GIFT`: valor del regalo, su precio de venta. */
|
|
22
|
+
giftValueCents?: number;
|
|
20
23
|
/** Llave del registro PRICE# del que salió el precio fijado. */
|
|
21
24
|
priceSk: string;
|
|
22
25
|
eligibleFinanciers: string[];
|
|
@@ -3,7 +3,8 @@ import type { PriceSourceEnum } from '../../enums/PriceSourceEnum';
|
|
|
3
3
|
/** Un registro del historial de precios PRICE# de un SKU. */
|
|
4
4
|
export interface SkuPriceEntry {
|
|
5
5
|
effectiveFrom: string;
|
|
6
|
-
|
|
6
|
+
/** @deprecated Ya no se usa; el único precio es `basePriceCents`. */
|
|
7
|
+
listPriceCents?: number | null;
|
|
7
8
|
basePriceCents: number;
|
|
8
9
|
source: PriceSourceEnum;
|
|
9
10
|
createdBy: string;
|
|
@@ -38,7 +38,7 @@ export interface StoreCatalogItem {
|
|
|
38
38
|
itemType?: ItemTypeEnum;
|
|
39
39
|
/** Nombre visible para kits y servicios, que no tienen marca/modelo. */
|
|
40
40
|
description?: string;
|
|
41
|
-
/**
|
|
41
|
+
/** @deprecated Ya no se usa; el valor de un regalo es `basePriceCents`. */
|
|
42
42
|
listPriceCents?: number;
|
|
43
43
|
/** Prioridad de venta de 0 a 100; «Recomendados» ordena por ella. */
|
|
44
44
|
salePriority?: number;
|
|
@@ -46,7 +46,10 @@ export interface ListStoreSalePromotionsResponse {
|
|
|
46
46
|
export interface GiftOption {
|
|
47
47
|
sku: string;
|
|
48
48
|
name: string;
|
|
49
|
-
|
|
49
|
+
/** Valor del regalo: su precio de venta. */
|
|
50
|
+
valueCents?: number;
|
|
51
|
+
/** @deprecated Usa `valueCents`; trae el mismo valor. */
|
|
52
|
+
listPriceCents?: number;
|
|
50
53
|
inStock: boolean;
|
|
51
54
|
}
|
|
52
55
|
|
|
@@ -9,7 +9,8 @@ export interface SaleLine extends WizardLinePromotionFields {
|
|
|
9
9
|
sku: string;
|
|
10
10
|
qty: number;
|
|
11
11
|
basePriceCents: number;
|
|
12
|
-
|
|
12
|
+
/** @deprecated Ya no se escribe; el valor de un regalo vive en `originalPriceCents`. */
|
|
13
|
+
listPriceCents?: number | null;
|
|
13
14
|
/** Llave del registro PRICE# del que salió el precio. */
|
|
14
15
|
priceSk: string;
|
|
15
16
|
paymentType: LinePaymentTypeEnum;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { WizardLineRoleEnum } from '../enums/WizardLineRoleEnum';
|
|
2
2
|
import type { WizardReservedLine } from './WizardReservedLine';
|
|
3
3
|
|
|
4
|
-
/** Línea GIFT: ligada a un ancla, con su promo y el
|
|
4
|
+
/** Línea GIFT: ligada a un ancla, con su promo y el valor del regalo (su precio de venta). */
|
|
5
5
|
export type WizardGiftLine = WizardReservedLine & {
|
|
6
6
|
role: WizardLineRoleEnum.GIFT;
|
|
7
7
|
linkedLineId: string;
|
|
@@ -12,7 +12,7 @@ export interface WizardLinePromotionFields {
|
|
|
12
12
|
discountCode?: string;
|
|
13
13
|
/** Descuento total de la línea; neto = basePriceCents × qty − discountCents. */
|
|
14
14
|
discountCents?: number;
|
|
15
|
-
/** Precio antes del descuento; en un regalo,
|
|
15
|
+
/** Precio antes del descuento; en un regalo, su precio de venta con la línea a $0. */
|
|
16
16
|
originalPriceCents?: number;
|
|
17
17
|
/** Descuento de cada promo en la línea; sin el campo, la de `promotionId` lleva todo menos el código. */
|
|
18
18
|
promotionDiscounts?: LinePromotionAmount[];
|
|
@@ -18,7 +18,8 @@ export interface WizardReservedLine extends WizardLinePromotionFields {
|
|
|
18
18
|
expiresAt: string;
|
|
19
19
|
/** Precio fijado de la línea (el del kit si es kit). */
|
|
20
20
|
basePriceCents: number | null;
|
|
21
|
-
|
|
21
|
+
/** @deprecated Ya no se escribe; el valor de un regalo vive en `originalPriceCents`. */
|
|
22
|
+
listPriceCents?: number | null;
|
|
22
23
|
/** Llave del registro PRICE# del que salió el precio. */
|
|
23
24
|
priceSk: string | null;
|
|
24
25
|
eligibleFinanciers: string[];
|
|
@@ -24,7 +24,7 @@ export interface SaleCompletedV1 {
|
|
|
24
24
|
* sin `type` un crédito con $1,300 de enganche era indistinguible de un contado de $1,300.
|
|
25
25
|
*/
|
|
26
26
|
type?: SaleTypeEnum;
|
|
27
|
-
/** Precio
|
|
27
|
+
/** Precio neto del equipo: su precio de venta menos su descuento. Sin equipo se omite. */
|
|
28
28
|
equipmentPriceCents?: number;
|
|
29
29
|
/** Enganche cobrado (solo `type=CREDIT`). */
|
|
30
30
|
downPaymentCents?: number;
|
|
@@ -31,7 +31,7 @@ export interface SaleCompletedV2 {
|
|
|
31
31
|
imei: string | null;
|
|
32
32
|
/** Lo COBRADO en caja. En contado == precio del equipo; en CREDIT es SOLO el enganche. */
|
|
33
33
|
amountCents: number;
|
|
34
|
-
/** Precio
|
|
34
|
+
/** Precio neto del equipo (venta menos descuento), la base de comisión. `null` sin el dato. */
|
|
35
35
|
equipmentPriceCents: number | null;
|
|
36
36
|
downPaymentCents: number | null;
|
|
37
37
|
creditId: string | null;
|