@fiado/type-kit 3.468.0 → 3.470.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.
@@ -115,14 +115,14 @@ describe('BackofficeUpdateProductRequest (backofficeUpdateProduct)', () => {
115
115
  describe('BackofficeCreateSkuPriceRequest (backofficeCreateSkuPrice)', () => {
116
116
  const ok = { basePriceCents: 90000 };
117
117
  it('acepta solo el precio base', () => expect(errorsOf(BackofficeCreateSkuPriceRequest, ok)).toEqual([]));
118
- it('acepta lista y combo', () => {
119
- expect(errorsOf(BackofficeCreateSkuPriceRequest, { ...ok, listPriceCents: 100000, comboPriceCents: 85000 })).toEqual([]);
118
+ it('acepta el precio de lista', () => {
119
+ expect(errorsOf(BackofficeCreateSkuPriceRequest, { ...ok, listPriceCents: 100000 })).toEqual([]);
120
120
  expect(errorsOf(BackofficeCreateSkuPriceRequest, { ...ok, listPriceCents: null })).toEqual([]);
121
121
  });
122
122
  it('rechaza sin precio base', () => expect(errorsOf(BackofficeCreateSkuPriceRequest, {})).toContain('basePriceCents'));
123
123
  it('rechaza negativos, decimales y strings', () => {
124
- const errors = errorsOf(BackofficeCreateSkuPriceRequest, { basePriceCents: -1, listPriceCents: 10.5, comboPriceCents: '100' });
125
- expect(errors).toEqual(expect.arrayContaining(['basePriceCents', 'listPriceCents', 'comboPriceCents']));
124
+ const errors = errorsOf(BackofficeCreateSkuPriceRequest, { basePriceCents: -1, listPriceCents: 10.5 });
125
+ expect(errors).toEqual(expect.arrayContaining(['basePriceCents', 'listPriceCents']));
126
126
  });
127
127
  });
128
128
 
@@ -19,6 +19,16 @@ describe('retailCatalog — campos nuevos opcionales en respuestas', () => {
19
19
  expect(item.itemType).toBe('PRODUCT');
20
20
  });
21
21
 
22
+ it('StoreCatalogItem acepta description y sigue válido sin ella', () => {
23
+ const kit: Pick<RetailCatalog.StoreCatalogItem, 'sku' | 'description'> = {
24
+ sku: 'KIT-1',
25
+ description: 'Kit de arranque',
26
+ };
27
+ const plain: Pick<RetailCatalog.StoreCatalogItem, 'sku' | 'description'> = { sku: 'SKU-1' };
28
+ expect(kit.description).toBe('Kit de arranque');
29
+ expect(plain.description).toBeUndefined();
30
+ });
31
+
22
32
  it('la fila del lente en modo lista acepta itemType', () => {
23
33
  const row: Pick<RetailCatalog.InventoryLensListItem, 'sku' | 'itemType'> = {
24
34
  sku: 'SKU-1',
@@ -39,15 +49,14 @@ describe('retailCatalog — campos nuevos opcionales en respuestas', () => {
39
49
  expect(priced.priceCents).toBe(150000);
40
50
  });
41
51
 
42
- it('SkuPriceEntry acepta comboPriceCents y el origen BACKOFFICE', () => {
52
+ it('SkuPriceEntry acepta el origen BACKOFFICE', () => {
43
53
  const entry: RetailCatalog.SkuPriceEntry = {
44
54
  effectiveFrom: '2026-09-24T00:00:00.000Z',
45
55
  listPriceCents: null,
46
56
  basePriceCents: 200000,
47
- comboPriceCents: 180000,
48
57
  source: RetailCatalog.PriceSourceEnum.BACKOFFICE,
49
58
  createdBy: 'system',
50
59
  };
51
- expect(entry.comboPriceCents).toBe(180000);
60
+ expect(entry.source).toBe(RetailCatalog.PriceSourceEnum.BACKOFFICE);
52
61
  });
53
62
  });
@@ -2,6 +2,4 @@
2
2
  export declare class BackofficeCreateSkuPriceRequest {
3
3
  basePriceCents: number;
4
4
  listPriceCents?: number | null;
5
- /** Precio dentro de un kit; se guarda, ninguna venta lo aplica. */
6
- comboPriceCents?: number;
7
5
  }
@@ -26,9 +26,3 @@ __decorate([
26
26
  (0, class_validator_1.Min)(0),
27
27
  __metadata("design:type", Number)
28
28
  ], BackofficeCreateSkuPriceRequest.prototype, "listPriceCents", void 0);
29
- __decorate([
30
- (0, class_validator_1.IsOptional)(),
31
- (0, class_validator_1.IsInt)(),
32
- (0, class_validator_1.Min)(0),
33
- __metadata("design:type", Number)
34
- ], BackofficeCreateSkuPriceRequest.prototype, "comboPriceCents", void 0);
@@ -4,8 +4,6 @@ export interface SkuPriceEntry {
4
4
  effectiveFrom: string;
5
5
  listPriceCents: number | null;
6
6
  basePriceCents: number;
7
- /** Precio del SKU dentro de un kit; informativo, no se aplica. */
8
- comboPriceCents?: number;
9
7
  source: PriceSourceEnum;
10
8
  createdBy: string;
11
9
  }
@@ -27,6 +27,8 @@ export interface StoreCatalogItem {
27
27
  components?: ProductComponent[];
28
28
  /** Producto físico o servicio. Ausente = PRODUCT. */
29
29
  itemType?: ItemTypeEnum;
30
+ /** Nombre visible para kits y servicios, que no tienen marca/modelo. */
31
+ description?: string;
30
32
  }
31
33
  /** Response de privateGetStoreStockCatalog. */
32
34
  export type GetStoreStockCatalogResponse = StoreCatalogItem[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fiado/type-kit",
3
- "version": "3.468.0",
3
+ "version": "3.470.0",
4
4
  "description": "",
5
5
  "main": "bin/index.js",
6
6
  "types": "bin/index.d.ts",
@@ -10,10 +10,4 @@ export class BackofficeCreateSkuPriceRequest {
10
10
  @IsInt()
11
11
  @Min(0)
12
12
  listPriceCents?: number | null;
13
-
14
- /** Precio dentro de un kit; se guarda, ninguna venta lo aplica. */
15
- @IsOptional()
16
- @IsInt()
17
- @Min(0)
18
- comboPriceCents?: number;
19
13
  }
@@ -5,8 +5,6 @@ export interface SkuPriceEntry {
5
5
  effectiveFrom: string;
6
6
  listPriceCents: number | null;
7
7
  basePriceCents: number;
8
- /** Precio del SKU dentro de un kit; informativo, no se aplica. */
9
- comboPriceCents?: number;
10
8
  source: PriceSourceEnum;
11
9
  createdBy: string;
12
10
  }
@@ -28,6 +28,8 @@ export interface StoreCatalogItem {
28
28
  components?: ProductComponent[];
29
29
  /** Producto físico o servicio. Ausente = PRODUCT. */
30
30
  itemType?: ItemTypeEnum;
31
+ /** Nombre visible para kits y servicios, que no tienen marca/modelo. */
32
+ description?: string;
31
33
  }
32
34
 
33
35
  /** Response de privateGetStoreStockCatalog. */