@fiado/type-kit 3.469.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.
- package/_test_/unit/retailCatalog/backofficeRequests.test.ts +4 -4
- package/_test_/unit/retailCatalog/responseFields.test.ts +2 -3
- package/bin/retailCatalog/dtos/requests/BackofficeCreateSkuPriceRequest.d.ts +0 -2
- package/bin/retailCatalog/dtos/requests/BackofficeCreateSkuPriceRequest.js +0 -6
- package/bin/retailCatalog/dtos/responses/SkuPriceEntry.d.ts +0 -2
- package/package.json +1 -1
- package/src/retailCatalog/dtos/requests/BackofficeCreateSkuPriceRequest.ts +0 -6
- package/src/retailCatalog/dtos/responses/SkuPriceEntry.ts +0 -2
|
@@ -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
|
|
119
|
-
expect(errorsOf(BackofficeCreateSkuPriceRequest, { ...ok, listPriceCents: 100000
|
|
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
|
|
125
|
-
expect(errors).toEqual(expect.arrayContaining(['basePriceCents', 'listPriceCents'
|
|
124
|
+
const errors = errorsOf(BackofficeCreateSkuPriceRequest, { basePriceCents: -1, listPriceCents: 10.5 });
|
|
125
|
+
expect(errors).toEqual(expect.arrayContaining(['basePriceCents', 'listPriceCents']));
|
|
126
126
|
});
|
|
127
127
|
});
|
|
128
128
|
|
|
@@ -49,15 +49,14 @@ describe('retailCatalog — campos nuevos opcionales en respuestas', () => {
|
|
|
49
49
|
expect(priced.priceCents).toBe(150000);
|
|
50
50
|
});
|
|
51
51
|
|
|
52
|
-
it('SkuPriceEntry acepta
|
|
52
|
+
it('SkuPriceEntry acepta el origen BACKOFFICE', () => {
|
|
53
53
|
const entry: RetailCatalog.SkuPriceEntry = {
|
|
54
54
|
effectiveFrom: '2026-09-24T00:00:00.000Z',
|
|
55
55
|
listPriceCents: null,
|
|
56
56
|
basePriceCents: 200000,
|
|
57
|
-
comboPriceCents: 180000,
|
|
58
57
|
source: RetailCatalog.PriceSourceEnum.BACKOFFICE,
|
|
59
58
|
createdBy: 'system',
|
|
60
59
|
};
|
|
61
|
-
expect(entry.
|
|
60
|
+
expect(entry.source).toBe(RetailCatalog.PriceSourceEnum.BACKOFFICE);
|
|
62
61
|
});
|
|
63
62
|
});
|
|
@@ -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);
|
package/package.json
CHANGED
|
@@ -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
|
}
|