@fiado/type-kit 3.464.0 → 3.465.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 +283 -0
- package/_test_/unit/retailCatalog/catalogEnums.test.ts +28 -1
- package/_test_/unit/retailCatalog/responseFields.test.ts +53 -0
- package/_test_/unit/retailCatalog/returnConditions.test.ts +64 -0
- package/_test_/unit/retailWizard/cancelSaleConditions.test.ts +41 -0
- package/bin/retailCatalog/constants/AdjustmentReasons.d.ts +3 -0
- package/bin/retailCatalog/constants/AdjustmentReasons.js +10 -0
- package/bin/retailCatalog/constants/NonBundleCategories.d.ts +3 -0
- package/bin/retailCatalog/constants/NonBundleCategories.js +6 -0
- package/bin/retailCatalog/dtos/Product.d.ts +3 -0
- package/bin/retailCatalog/dtos/requests/BackofficeCreateKitRequest.d.ts +14 -0
- package/bin/retailCatalog/dtos/requests/BackofficeCreateKitRequest.js +66 -0
- package/bin/retailCatalog/dtos/requests/BackofficeCreateProductRequest.d.ts +30 -0
- package/bin/retailCatalog/dtos/requests/BackofficeCreateProductRequest.js +117 -0
- package/bin/retailCatalog/dtos/requests/BackofficeCreateServiceRequest.d.ts +9 -0
- package/bin/retailCatalog/dtos/requests/BackofficeCreateServiceRequest.js +43 -0
- package/bin/retailCatalog/dtos/requests/BackofficeCreateSkuPriceRequest.d.ts +7 -0
- package/bin/retailCatalog/dtos/requests/BackofficeCreateSkuPriceRequest.js +34 -0
- package/bin/retailCatalog/dtos/requests/BackofficeCreateTransferRequest.d.ts +9 -0
- package/bin/retailCatalog/dtos/requests/BackofficeCreateTransferRequest.js +48 -0
- package/bin/retailCatalog/dtos/requests/BackofficeListTransfersQuery.d.ts +5 -0
- package/bin/retailCatalog/dtos/requests/BackofficeListTransfersQuery.js +23 -0
- package/bin/retailCatalog/dtos/requests/BackofficeRegisterAdjustmentRequest.d.ts +12 -0
- package/bin/retailCatalog/dtos/requests/BackofficeRegisterAdjustmentRequest.js +49 -0
- package/bin/retailCatalog/dtos/requests/BackofficeRegisterEntryRequest.d.ts +9 -0
- package/bin/retailCatalog/dtos/requests/BackofficeRegisterEntryRequest.js +43 -0
- package/bin/retailCatalog/dtos/requests/BackofficeUpdateProductRequest.d.ts +27 -0
- package/bin/retailCatalog/dtos/requests/BackofficeUpdateProductRequest.js +118 -0
- package/bin/retailCatalog/dtos/requests/ChangeInventoryStatusRequest.d.ts +1 -0
- package/bin/retailCatalog/dtos/requests/ChangeInventoryStatusRequest.js +1 -0
- package/bin/retailCatalog/dtos/requests/CreateProductRequest.d.ts +4 -1
- package/bin/retailCatalog/dtos/requests/CreateProductRequest.js +4 -1
- package/bin/retailCatalog/dtos/requests/RegisterInventoryRequest.d.ts +4 -1
- package/bin/retailCatalog/dtos/requests/RegisterInventoryRequest.js +4 -1
- package/bin/retailCatalog/dtos/requests/ReturnPieceCondition.d.ts +11 -0
- package/bin/retailCatalog/dtos/requests/ReturnPieceCondition.js +57 -0
- package/bin/retailCatalog/dtos/requests/ReturnStockLine.d.ts +6 -0
- package/bin/retailCatalog/dtos/requests/ReturnStockLine.js +27 -0
- package/bin/retailCatalog/dtos/requests/ReturnStockRequest.d.ts +2 -2
- package/bin/retailCatalog/dtos/requests/ReturnStockRequest.js +2 -2
- package/bin/retailCatalog/dtos/requests/TransferInventoryRequest.d.ts +4 -1
- package/bin/retailCatalog/dtos/requests/TransferInventoryRequest.js +4 -1
- package/bin/retailCatalog/dtos/requests/UpdateProductRequest.d.ts +4 -1
- package/bin/retailCatalog/dtos/requests/UpdateProductRequest.js +4 -1
- package/bin/retailCatalog/dtos/requests/UpdateProductStatusRequest.d.ts +4 -1
- package/bin/retailCatalog/dtos/requests/UpdateProductStatusRequest.js +4 -1
- package/bin/retailCatalog/dtos/responses/InventoryLensResponse.d.ts +3 -0
- package/bin/retailCatalog/dtos/responses/ListTransfersResponse.d.ts +5 -0
- package/bin/retailCatalog/dtos/responses/ListTransfersResponse.js +2 -0
- package/bin/retailCatalog/dtos/responses/ReserveStockResponse.d.ts +2 -0
- package/bin/retailCatalog/dtos/responses/SkuPriceEntry.d.ts +2 -0
- package/bin/retailCatalog/dtos/responses/StoreCatalogItem.d.ts +3 -0
- package/bin/retailCatalog/dtos/responses/TransferResponse.d.ts +16 -0
- package/bin/retailCatalog/dtos/responses/TransferResponse.js +2 -0
- package/bin/retailCatalog/enums/InventoryItemStatusEnum.d.ts +3 -1
- package/bin/retailCatalog/enums/InventoryItemStatusEnum.js +2 -0
- package/bin/retailCatalog/enums/InventoryMovementReasonEnum.d.ts +7 -0
- package/bin/retailCatalog/enums/InventoryMovementReasonEnum.js +11 -0
- package/bin/retailCatalog/enums/InventoryMovementTypeEnum.d.ts +4 -1
- package/bin/retailCatalog/enums/InventoryMovementTypeEnum.js +3 -0
- package/bin/retailCatalog/enums/ItemTypeEnum.d.ts +5 -0
- package/bin/retailCatalog/enums/ItemTypeEnum.js +9 -0
- package/bin/retailCatalog/enums/PriceSourceEnum.d.ts +3 -2
- package/bin/retailCatalog/enums/PriceSourceEnum.js +2 -1
- package/bin/retailCatalog/enums/ReturnConditionEnum.d.ts +5 -0
- package/bin/retailCatalog/enums/ReturnConditionEnum.js +9 -0
- package/bin/retailCatalog/enums/TransferStateEnum.d.ts +6 -0
- package/bin/retailCatalog/enums/TransferStateEnum.js +10 -0
- package/bin/retailCatalog/index.d.ts +20 -0
- package/bin/retailCatalog/index.js +21 -0
- package/bin/retailCatalog/validators/IsPieceRefConstraint.d.ts +6 -0
- package/bin/retailCatalog/validators/IsPieceRefConstraint.js +26 -0
- package/bin/retailWizard/dtos/requests/BackofficeCancelSaleRequest.d.ts +3 -0
- package/bin/retailWizard/dtos/requests/BackofficeCancelSaleRequest.js +9 -0
- package/bin/retailWizard/dtos/requests/CancelSaleRequest.d.ts +3 -0
- package/bin/retailWizard/dtos/requests/CancelSaleRequest.js +9 -0
- package/package.json +1 -1
- package/src/retailCatalog/constants/AdjustmentReasons.ts +8 -0
- package/src/retailCatalog/constants/NonBundleCategories.ts +4 -0
- package/src/retailCatalog/dtos/Product.ts +3 -0
- package/src/retailCatalog/dtos/requests/BackofficeCreateKitRequest.ts +47 -0
- package/src/retailCatalog/dtos/requests/BackofficeCreateProductRequest.ts +92 -0
- package/src/retailCatalog/dtos/requests/BackofficeCreateServiceRequest.ts +26 -0
- package/src/retailCatalog/dtos/requests/BackofficeCreateSkuPriceRequest.ts +19 -0
- package/src/retailCatalog/dtos/requests/BackofficeCreateTransferRequest.ts +31 -0
- package/src/retailCatalog/dtos/requests/BackofficeListTransfersQuery.ts +9 -0
- package/src/retailCatalog/dtos/requests/BackofficeRegisterAdjustmentRequest.ts +34 -0
- package/src/retailCatalog/dtos/requests/BackofficeRegisterEntryRequest.ts +28 -0
- package/src/retailCatalog/dtos/requests/BackofficeUpdateProductRequest.ts +93 -0
- package/src/retailCatalog/dtos/requests/ChangeInventoryStatusRequest.ts +1 -0
- package/src/retailCatalog/dtos/requests/CreateProductRequest.ts +4 -1
- package/src/retailCatalog/dtos/requests/RegisterInventoryRequest.ts +4 -1
- package/src/retailCatalog/dtos/requests/ReturnPieceCondition.ts +48 -0
- package/src/retailCatalog/dtos/requests/ReturnStockLine.ts +13 -0
- package/src/retailCatalog/dtos/requests/ReturnStockRequest.ts +3 -3
- package/src/retailCatalog/dtos/requests/TransferInventoryRequest.ts +4 -1
- package/src/retailCatalog/dtos/requests/UpdateProductRequest.ts +4 -1
- package/src/retailCatalog/dtos/requests/UpdateProductStatusRequest.ts +4 -1
- package/src/retailCatalog/dtos/responses/InventoryLensResponse.ts +3 -0
- package/src/retailCatalog/dtos/responses/ListTransfersResponse.ts +6 -0
- package/src/retailCatalog/dtos/responses/ReserveStockResponse.ts +2 -0
- package/src/retailCatalog/dtos/responses/SkuPriceEntry.ts +2 -0
- package/src/retailCatalog/dtos/responses/StoreCatalogItem.ts +3 -0
- package/src/retailCatalog/dtos/responses/TransferResponse.ts +17 -0
- package/src/retailCatalog/enums/InventoryItemStatusEnum.ts +2 -0
- package/src/retailCatalog/enums/InventoryMovementReasonEnum.ts +7 -0
- package/src/retailCatalog/enums/InventoryMovementTypeEnum.ts +3 -0
- package/src/retailCatalog/enums/ItemTypeEnum.ts +5 -0
- package/src/retailCatalog/enums/PriceSourceEnum.ts +2 -1
- package/src/retailCatalog/enums/ReturnConditionEnum.ts +5 -0
- package/src/retailCatalog/enums/TransferStateEnum.ts +6 -0
- package/src/retailCatalog/index.ts +22 -0
- package/src/retailCatalog/validators/IsPieceRefConstraint.ts +19 -0
- package/src/retailWizard/dtos/requests/BackofficeCancelSaleRequest.ts +11 -2
- package/src/retailWizard/dtos/requests/CancelSaleRequest.ts +11 -2
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ReturnConditionEnum } from '../../enums/ReturnConditionEnum';
|
|
2
|
+
/** Condición de una pieza devuelta; ausente = GOOD. Un accesorio por cantidad se declara con sku + qty. */
|
|
3
|
+
export declare class ReturnPieceCondition {
|
|
4
|
+
sku: string;
|
|
5
|
+
identifier?: string;
|
|
6
|
+
/** Unidades del SKU por cantidad con esta condición; las no declaradas vuelven GOOD. */
|
|
7
|
+
qty?: number;
|
|
8
|
+
condition: ReturnConditionEnum;
|
|
9
|
+
/** Motivo del daño; obligatorio con DAMAGED, opcional con GOOD. */
|
|
10
|
+
reason?: string;
|
|
11
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
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.ReturnPieceCondition = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
const SkuPattern_1 = require("../../constants/SkuPattern");
|
|
16
|
+
const ReturnConditionEnum_1 = require("../../enums/ReturnConditionEnum");
|
|
17
|
+
const IsPieceRefConstraint_1 = require("../../validators/IsPieceRefConstraint");
|
|
18
|
+
/** Condición de una pieza devuelta; ausente = GOOD. Un accesorio por cantidad se declara con sku + qty. */
|
|
19
|
+
class ReturnPieceCondition {
|
|
20
|
+
constructor() {
|
|
21
|
+
this.condition = ReturnConditionEnum_1.ReturnConditionEnum.GOOD;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
exports.ReturnPieceCondition = ReturnPieceCondition;
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, class_transformer_1.Expose)(),
|
|
27
|
+
(0, class_validator_1.Matches)(SkuPattern_1.SKU_PATTERN, { message: 'sku admite solo [A-Za-z0-9-]' }),
|
|
28
|
+
(0, class_validator_1.Length)(1, 64),
|
|
29
|
+
(0, class_validator_1.IsString)(),
|
|
30
|
+
__metadata("design:type", String)
|
|
31
|
+
], ReturnPieceCondition.prototype, "sku", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, class_transformer_1.Expose)(),
|
|
34
|
+
(0, class_validator_1.Validate)(IsPieceRefConstraint_1.IsPieceRefConstraint),
|
|
35
|
+
__metadata("design:type", String)
|
|
36
|
+
], ReturnPieceCondition.prototype, "identifier", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, class_transformer_1.Expose)(),
|
|
39
|
+
(0, class_validator_1.ValidateIf)((o) => o.qty !== undefined),
|
|
40
|
+
(0, class_validator_1.IsInt)(),
|
|
41
|
+
(0, class_validator_1.Min)(1),
|
|
42
|
+
__metadata("design:type", Number)
|
|
43
|
+
], ReturnPieceCondition.prototype, "qty", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, class_transformer_1.Expose)(),
|
|
46
|
+
(0, class_transformer_1.Transform)(({ value }) => value ?? ReturnConditionEnum_1.ReturnConditionEnum.GOOD),
|
|
47
|
+
(0, class_validator_1.IsEnum)(ReturnConditionEnum_1.ReturnConditionEnum),
|
|
48
|
+
__metadata("design:type", String)
|
|
49
|
+
], ReturnPieceCondition.prototype, "condition", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
(0, class_transformer_1.Expose)(),
|
|
52
|
+
(0, class_validator_1.ValidateIf)((o) => o.condition === ReturnConditionEnum_1.ReturnConditionEnum.DAMAGED || o.reason != null),
|
|
53
|
+
(0, class_validator_1.MaxLength)(200),
|
|
54
|
+
(0, class_validator_1.Matches)(/\S/),
|
|
55
|
+
(0, class_validator_1.IsString)(),
|
|
56
|
+
__metadata("design:type", String)
|
|
57
|
+
], ReturnPieceCondition.prototype, "reason", void 0);
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ReturnPieceCondition } from './ReturnPieceCondition';
|
|
2
|
+
import { StockLine } from './StockLine';
|
|
3
|
+
/** Línea de devolución: la línea vendida más la condición de sus piezas; las no listadas vuelven GOOD. */
|
|
4
|
+
export declare class ReturnStockLine extends StockLine {
|
|
5
|
+
conditions?: ReturnPieceCondition[];
|
|
6
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
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.ReturnStockLine = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
const ReturnPieceCondition_1 = require("./ReturnPieceCondition");
|
|
16
|
+
const StockLine_1 = require("./StockLine");
|
|
17
|
+
/** Línea de devolución: la línea vendida más la condición de sus piezas; las no listadas vuelven GOOD. */
|
|
18
|
+
class ReturnStockLine extends StockLine_1.StockLine {
|
|
19
|
+
}
|
|
20
|
+
exports.ReturnStockLine = ReturnStockLine;
|
|
21
|
+
__decorate([
|
|
22
|
+
(0, class_validator_1.IsOptional)(),
|
|
23
|
+
(0, class_validator_1.IsArray)(),
|
|
24
|
+
(0, class_validator_1.ValidateNested)({ each: true }),
|
|
25
|
+
(0, class_transformer_1.Type)(() => ReturnPieceCondition_1.ReturnPieceCondition),
|
|
26
|
+
__metadata("design:type", Array)
|
|
27
|
+
], ReturnStockLine.prototype, "conditions", void 0);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ReturnStockLine } from './ReturnStockLine';
|
|
2
2
|
/** Body de PUT /private/stores/{storeId}/returns (privateReturnStock); componentes guardados en la venta. */
|
|
3
3
|
export declare class ReturnStockRequest {
|
|
4
4
|
saleId: string;
|
|
5
5
|
retailerId: string;
|
|
6
6
|
/** Fecha de la venta; fija el día de negocio del contador DAY# que se descuenta. */
|
|
7
7
|
soldAt: string;
|
|
8
|
-
lines:
|
|
8
|
+
lines: ReturnStockLine[];
|
|
9
9
|
}
|
|
@@ -12,7 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.ReturnStockRequest = void 0;
|
|
13
13
|
const class_transformer_1 = require("class-transformer");
|
|
14
14
|
const class_validator_1 = require("class-validator");
|
|
15
|
-
const
|
|
15
|
+
const ReturnStockLine_1 = require("./ReturnStockLine");
|
|
16
16
|
/** Body de PUT /private/stores/{storeId}/returns (privateReturnStock); componentes guardados en la venta. */
|
|
17
17
|
class ReturnStockRequest {
|
|
18
18
|
}
|
|
@@ -33,6 +33,6 @@ __decorate([
|
|
|
33
33
|
(0, class_validator_1.IsArray)(),
|
|
34
34
|
(0, class_validator_1.ArrayMinSize)(1),
|
|
35
35
|
(0, class_validator_1.ValidateNested)({ each: true }),
|
|
36
|
-
(0, class_transformer_1.Type)(() =>
|
|
36
|
+
(0, class_transformer_1.Type)(() => ReturnStockLine_1.ReturnStockLine),
|
|
37
37
|
__metadata("design:type", Array)
|
|
38
38
|
], ReturnStockRequest.prototype, "lines", void 0);
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/**
|
|
2
|
+
* Body de PUT /retailers/:retailerId/inventory/:imei/transfer — mover IMEI a otro store.
|
|
3
|
+
* @deprecated Modelo viejo por IMEI; usar BackofficeCreateTransferRequest. Se conserva porque otras ramas lo importan.
|
|
4
|
+
*/
|
|
2
5
|
export declare class TransferInventoryRequest {
|
|
3
6
|
newStoreId: string;
|
|
4
7
|
}
|
|
@@ -11,7 +11,10 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.TransferInventoryRequest = void 0;
|
|
13
13
|
const class_validator_1 = require("class-validator");
|
|
14
|
-
/**
|
|
14
|
+
/**
|
|
15
|
+
* Body de PUT /retailers/:retailerId/inventory/:imei/transfer — mover IMEI a otro store.
|
|
16
|
+
* @deprecated Modelo viejo por IMEI; usar BackofficeCreateTransferRequest. Se conserva porque otras ramas lo importan.
|
|
17
|
+
*/
|
|
15
18
|
class TransferInventoryRequest {
|
|
16
19
|
}
|
|
17
20
|
exports.TransferInventoryRequest = TransferInventoryRequest;
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { MdmLockModeEnum } from '../../enums/MdmLockModeEnum';
|
|
2
2
|
import { MdmProviderEnum } from '../../enums/MdmProviderEnum';
|
|
3
3
|
import { ProductTierEnum } from '../../enums/ProductTierEnum';
|
|
4
|
-
/**
|
|
4
|
+
/**
|
|
5
|
+
* Body de PUT /retailers/:retailerId/products/:sku — actualización parcial (sku y status son inmutables acá).
|
|
6
|
+
* @deprecated Modelo viejo por IMEI; usar BackofficeUpdateProductRequest. Se conserva porque otras ramas lo importan.
|
|
7
|
+
*/
|
|
5
8
|
export declare class UpdateProductRequest {
|
|
6
9
|
externalId?: string | null;
|
|
7
10
|
brand?: string;
|
|
@@ -15,7 +15,10 @@ const MdmLockModeEnum_1 = require("../../enums/MdmLockModeEnum");
|
|
|
15
15
|
const MdmProviderEnum_1 = require("../../enums/MdmProviderEnum");
|
|
16
16
|
const ProductTierEnum_1 = require("../../enums/ProductTierEnum");
|
|
17
17
|
const IsMdmCoherentConstraint_1 = require("../../validators/IsMdmCoherentConstraint");
|
|
18
|
-
/**
|
|
18
|
+
/**
|
|
19
|
+
* Body de PUT /retailers/:retailerId/products/:sku — actualización parcial (sku y status son inmutables acá).
|
|
20
|
+
* @deprecated Modelo viejo por IMEI; usar BackofficeUpdateProductRequest. Se conserva porque otras ramas lo importan.
|
|
21
|
+
*/
|
|
19
22
|
class UpdateProductRequest {
|
|
20
23
|
}
|
|
21
24
|
exports.UpdateProductRequest = UpdateProductRequest;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { ProductStatusEnum } from '../../enums/ProductStatusEnum';
|
|
2
|
-
/**
|
|
2
|
+
/**
|
|
3
|
+
* Body de PUT /retailers/:retailerId/products/:sku/status — ACTIVE | DISCONTINUED.
|
|
4
|
+
* @deprecated Modelo viejo por IMEI; usar backofficeDeactivateProduct (sin body). Se conserva porque otras ramas lo importan.
|
|
5
|
+
*/
|
|
3
6
|
export declare class UpdateProductStatusRequest {
|
|
4
7
|
status: ProductStatusEnum;
|
|
5
8
|
}
|
|
@@ -12,7 +12,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.UpdateProductStatusRequest = void 0;
|
|
13
13
|
const class_validator_1 = require("class-validator");
|
|
14
14
|
const ProductStatusEnum_1 = require("../../enums/ProductStatusEnum");
|
|
15
|
-
/**
|
|
15
|
+
/**
|
|
16
|
+
* Body de PUT /retailers/:retailerId/products/:sku/status — ACTIVE | DISCONTINUED.
|
|
17
|
+
* @deprecated Modelo viejo por IMEI; usar backofficeDeactivateProduct (sin body). Se conserva porque otras ramas lo importan.
|
|
18
|
+
*/
|
|
16
19
|
class UpdateProductStatusRequest {
|
|
17
20
|
}
|
|
18
21
|
exports.UpdateProductStatusRequest = UpdateProductStatusRequest;
|
|
@@ -4,6 +4,7 @@ import type { ProductCategoryEnum } from '../../enums/ProductCategoryEnum';
|
|
|
4
4
|
import type { ProductTierEnum } from '../../enums/ProductTierEnum';
|
|
5
5
|
import type { InventoryLensUnavailableReasonEnum } from '../../enums/InventoryLensUnavailableReasonEnum';
|
|
6
6
|
import type { InventoryTransferReasonEnum } from '../../enums/InventoryTransferReasonEnum';
|
|
7
|
+
import type { ItemTypeEnum } from '../../enums/ItemTypeEnum';
|
|
7
8
|
/**
|
|
8
9
|
* Los contadores que la pantalla «Inventario» del Admin VL pinta arriba, siempre — los cuatro viajan
|
|
9
10
|
* con cualquier `filter`, porque las tarjetas no cambian al cambiar de tab.
|
|
@@ -112,6 +113,8 @@ export interface InventoryLensListItem {
|
|
|
112
113
|
coverage: InventoryLensCoverage;
|
|
113
114
|
alerts: InventoryLensAlerts;
|
|
114
115
|
sold30d: number;
|
|
116
|
+
/** Producto físico o servicio. Ausente = PRODUCT. */
|
|
117
|
+
itemType?: ItemTypeEnum;
|
|
115
118
|
}
|
|
116
119
|
/** Fila del lente — el tipo depende del tab pedido. */
|
|
117
120
|
export type InventoryLensItem = InventoryLensSkuItem | InventoryLensTransferSuggestion | InventoryLensListItem;
|
|
@@ -7,6 +7,8 @@ export interface ReservedComponent {
|
|
|
7
7
|
qty: number;
|
|
8
8
|
category: ProductCategoryEnum;
|
|
9
9
|
trackingMode: TrackingModeEnum;
|
|
10
|
+
/** Precio vigente del componente, para repartir el precio del kit. */
|
|
11
|
+
priceCents?: number;
|
|
10
12
|
}
|
|
11
13
|
/** Response de privateReserveStock; el precio de la línea es `basePriceCents`. */
|
|
12
14
|
export interface ReserveStockResponse {
|
|
@@ -3,6 +3,7 @@ import type { MdmProviderEnum } from '../../enums/MdmProviderEnum';
|
|
|
3
3
|
import type { ProductCategoryEnum } from '../../enums/ProductCategoryEnum';
|
|
4
4
|
import type { ProductTierEnum } from '../../enums/ProductTierEnum';
|
|
5
5
|
import type { TrackingModeEnum } from '../../enums/TrackingModeEnum';
|
|
6
|
+
import type { ItemTypeEnum } from '../../enums/ItemTypeEnum';
|
|
6
7
|
import type { ProductComponent } from '../ProductComponent';
|
|
7
8
|
/** Fila por SKU del catálogo de venta de una tienda (privateGetStoreStockCatalog). */
|
|
8
9
|
export interface StoreCatalogItem {
|
|
@@ -24,6 +25,8 @@ export interface StoreCatalogItem {
|
|
|
24
25
|
mdmLockMode: MdmLockModeEnum | null;
|
|
25
26
|
/** Solo si es kit. */
|
|
26
27
|
components?: ProductComponent[];
|
|
28
|
+
/** Producto físico o servicio. Ausente = PRODUCT. */
|
|
29
|
+
itemType?: ItemTypeEnum;
|
|
27
30
|
}
|
|
28
31
|
/** Response de privateGetStoreStockCatalog. */
|
|
29
32
|
export type GetStoreStockCatalogResponse = StoreCatalogItem[];
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { TransferStateEnum } from '../../enums/TransferStateEnum';
|
|
2
|
+
/** Un traspaso entre tiendas (TRF#); response de crear, recibir y cancelar. */
|
|
3
|
+
export interface TransferResponse {
|
|
4
|
+
transferId: string;
|
|
5
|
+
fromStoreId: string;
|
|
6
|
+
toStoreId: string;
|
|
7
|
+
sku: string;
|
|
8
|
+
qty: number;
|
|
9
|
+
/** IMEI o serie de cada pieza; vacío si el SKU se rastrea por cantidad. */
|
|
10
|
+
identifiers: string[];
|
|
11
|
+
state: TransferStateEnum;
|
|
12
|
+
createdBy: string;
|
|
13
|
+
updatedBy: string;
|
|
14
|
+
createdAt: string;
|
|
15
|
+
updatedAt: string;
|
|
16
|
+
}
|
|
@@ -8,11 +8,13 @@
|
|
|
8
8
|
* @property {string} SOLD - Vendida.
|
|
9
9
|
* @property {string} RETURNED - Devuelta por el cliente.
|
|
10
10
|
* @property {string} DAMAGED - Dañada, fuera de stock vendible.
|
|
11
|
+
* @property {string} IN_TRANSIT - En traspaso entre tiendas, fuera de stock vendible.
|
|
11
12
|
*/
|
|
12
13
|
export declare enum InventoryItemStatusEnum {
|
|
13
14
|
AVAILABLE = "AVAILABLE",
|
|
14
15
|
RESERVED = "RESERVED",
|
|
15
16
|
SOLD = "SOLD",
|
|
16
17
|
RETURNED = "RETURNED",
|
|
17
|
-
DAMAGED = "DAMAGED"
|
|
18
|
+
DAMAGED = "DAMAGED",
|
|
19
|
+
IN_TRANSIT = "IN_TRANSIT"
|
|
18
20
|
}
|
|
@@ -11,6 +11,7 @@ exports.InventoryItemStatusEnum = void 0;
|
|
|
11
11
|
* @property {string} SOLD - Vendida.
|
|
12
12
|
* @property {string} RETURNED - Devuelta por el cliente.
|
|
13
13
|
* @property {string} DAMAGED - Dañada, fuera de stock vendible.
|
|
14
|
+
* @property {string} IN_TRANSIT - En traspaso entre tiendas, fuera de stock vendible.
|
|
14
15
|
*/
|
|
15
16
|
var InventoryItemStatusEnum;
|
|
16
17
|
(function (InventoryItemStatusEnum) {
|
|
@@ -19,4 +20,5 @@ var InventoryItemStatusEnum;
|
|
|
19
20
|
InventoryItemStatusEnum["SOLD"] = "SOLD";
|
|
20
21
|
InventoryItemStatusEnum["RETURNED"] = "RETURNED";
|
|
21
22
|
InventoryItemStatusEnum["DAMAGED"] = "DAMAGED";
|
|
23
|
+
InventoryItemStatusEnum["IN_TRANSIT"] = "IN_TRANSIT";
|
|
22
24
|
})(InventoryItemStatusEnum || (exports.InventoryItemStatusEnum = InventoryItemStatusEnum = {}));
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** Motivo de un movimiento manual de inventario (MOV#): merma, ajuste, garantía o devolución dañada. */
|
|
2
|
+
export declare enum InventoryMovementReasonEnum {
|
|
3
|
+
SHRINKAGE = "SHRINKAGE",
|
|
4
|
+
ADJUSTMENT = "ADJUSTMENT",
|
|
5
|
+
WARRANTY = "WARRANTY",
|
|
6
|
+
DAMAGED_RETURN = "DAMAGED_RETURN"
|
|
7
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.InventoryMovementReasonEnum = void 0;
|
|
4
|
+
/** Motivo de un movimiento manual de inventario (MOV#): merma, ajuste, garantía o devolución dañada. */
|
|
5
|
+
var InventoryMovementReasonEnum;
|
|
6
|
+
(function (InventoryMovementReasonEnum) {
|
|
7
|
+
InventoryMovementReasonEnum["SHRINKAGE"] = "SHRINKAGE";
|
|
8
|
+
InventoryMovementReasonEnum["ADJUSTMENT"] = "ADJUSTMENT";
|
|
9
|
+
InventoryMovementReasonEnum["WARRANTY"] = "WARRANTY";
|
|
10
|
+
InventoryMovementReasonEnum["DAMAGED_RETURN"] = "DAMAGED_RETURN";
|
|
11
|
+
})(InventoryMovementReasonEnum || (exports.InventoryMovementReasonEnum = InventoryMovementReasonEnum = {}));
|
|
@@ -5,5 +5,8 @@ export declare enum InventoryMovementTypeEnum {
|
|
|
5
5
|
RELEASE = "RELEASE",
|
|
6
6
|
SALE = "SALE",
|
|
7
7
|
RETURN = "RETURN",
|
|
8
|
-
ADJUSTMENT = "ADJUSTMENT"
|
|
8
|
+
ADJUSTMENT = "ADJUSTMENT",
|
|
9
|
+
TRANSFER_OUT = "TRANSFER_OUT",
|
|
10
|
+
TRANSFER_IN = "TRANSFER_IN",
|
|
11
|
+
TRANSFER_CANCEL = "TRANSFER_CANCEL"
|
|
9
12
|
}
|
|
@@ -10,4 +10,7 @@ var InventoryMovementTypeEnum;
|
|
|
10
10
|
InventoryMovementTypeEnum["SALE"] = "SALE";
|
|
11
11
|
InventoryMovementTypeEnum["RETURN"] = "RETURN";
|
|
12
12
|
InventoryMovementTypeEnum["ADJUSTMENT"] = "ADJUSTMENT";
|
|
13
|
+
InventoryMovementTypeEnum["TRANSFER_OUT"] = "TRANSFER_OUT";
|
|
14
|
+
InventoryMovementTypeEnum["TRANSFER_IN"] = "TRANSFER_IN";
|
|
15
|
+
InventoryMovementTypeEnum["TRANSFER_CANCEL"] = "TRANSFER_CANCEL";
|
|
13
16
|
})(InventoryMovementTypeEnum || (exports.InventoryMovementTypeEnum = InventoryMovementTypeEnum = {}));
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ItemTypeEnum = void 0;
|
|
4
|
+
/** Tipo de ítem del catálogo: producto físico o servicio sin stock. Inmutable tras el alta. */
|
|
5
|
+
var ItemTypeEnum;
|
|
6
|
+
(function (ItemTypeEnum) {
|
|
7
|
+
ItemTypeEnum["PRODUCT"] = "PRODUCT";
|
|
8
|
+
ItemTypeEnum["SERVICE"] = "SERVICE";
|
|
9
|
+
})(ItemTypeEnum || (exports.ItemTypeEnum = ItemTypeEnum = {}));
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
/** Origen de un registro
|
|
1
|
+
/** Origen de un registro de catálogo (PRODUCT#, PRICE#, MOV#): la puerta de Zentral o el backoffice. */
|
|
2
2
|
export declare enum PriceSourceEnum {
|
|
3
|
-
ZENTRAL_SYNC = "ZENTRAL_SYNC"
|
|
3
|
+
ZENTRAL_SYNC = "ZENTRAL_SYNC",
|
|
4
|
+
BACKOFFICE = "BACKOFFICE"
|
|
4
5
|
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.PriceSourceEnum = void 0;
|
|
4
|
-
/** Origen de un registro
|
|
4
|
+
/** Origen de un registro de catálogo (PRODUCT#, PRICE#, MOV#): la puerta de Zentral o el backoffice. */
|
|
5
5
|
var PriceSourceEnum;
|
|
6
6
|
(function (PriceSourceEnum) {
|
|
7
7
|
PriceSourceEnum["ZENTRAL_SYNC"] = "ZENTRAL_SYNC";
|
|
8
|
+
PriceSourceEnum["BACKOFFICE"] = "BACKOFFICE";
|
|
8
9
|
})(PriceSourceEnum || (exports.PriceSourceEnum = PriceSourceEnum = {}));
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ReturnConditionEnum = void 0;
|
|
4
|
+
/** Condición de una pieza devuelta; DAMAGED no regresa al disponible. */
|
|
5
|
+
var ReturnConditionEnum;
|
|
6
|
+
(function (ReturnConditionEnum) {
|
|
7
|
+
ReturnConditionEnum["GOOD"] = "GOOD";
|
|
8
|
+
ReturnConditionEnum["DAMAGED"] = "DAMAGED";
|
|
9
|
+
})(ReturnConditionEnum || (exports.ReturnConditionEnum = ReturnConditionEnum = {}));
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TransferStateEnum = void 0;
|
|
4
|
+
/** Estado de un traspaso entre tiendas (TRF#); solo uno OPEN se recibe o cancela. */
|
|
5
|
+
var TransferStateEnum;
|
|
6
|
+
(function (TransferStateEnum) {
|
|
7
|
+
TransferStateEnum["OPEN"] = "OPEN";
|
|
8
|
+
TransferStateEnum["RECEIVED"] = "RECEIVED";
|
|
9
|
+
TransferStateEnum["CANCELLED"] = "CANCELLED";
|
|
10
|
+
})(TransferStateEnum || (exports.TransferStateEnum = TransferStateEnum = {}));
|
|
@@ -7,7 +7,10 @@ export * from './enums/InventoryLensFilterEnum';
|
|
|
7
7
|
export * from './enums/InventoryLensUnavailableReasonEnum';
|
|
8
8
|
export * from './enums/InventoryTransferReasonEnum';
|
|
9
9
|
export * from './constants/SkuPattern';
|
|
10
|
+
export * from './constants/NonBundleCategories';
|
|
11
|
+
export * from './constants/AdjustmentReasons';
|
|
10
12
|
export * from './validators/IsMdmCoherentConstraint';
|
|
13
|
+
export * from './validators/IsPieceRefConstraint';
|
|
11
14
|
export * from './dtos/Product';
|
|
12
15
|
export * from './dtos/InventoryItem';
|
|
13
16
|
export * from './dtos/requests/CreateProductRequest';
|
|
@@ -35,6 +38,8 @@ export * from './enums/InventoryLensPeriodEnum';
|
|
|
35
38
|
export * from './dtos/ProductComponent';
|
|
36
39
|
export * from './dtos/requests/ReservationLineRef';
|
|
37
40
|
export * from './dtos/requests/StockLine';
|
|
41
|
+
export * from './dtos/requests/ReturnPieceCondition';
|
|
42
|
+
export * from './dtos/requests/ReturnStockLine';
|
|
38
43
|
export * from './dtos/requests/ReserveStockRequest';
|
|
39
44
|
export * from './dtos/requests/RenewReservationsRequest';
|
|
40
45
|
export * from './dtos/requests/SuggestPiecesQuery';
|
|
@@ -54,3 +59,18 @@ export * from './dtos/responses/StoreCatalogItem';
|
|
|
54
59
|
export * from './dtos/responses/SkuPriceEntry';
|
|
55
60
|
export * from './dtos/responses/GetInventorySkuResponse';
|
|
56
61
|
export * from './dtos/responses/ListSkuPricesResponse';
|
|
62
|
+
export * from './enums/ItemTypeEnum';
|
|
63
|
+
export * from './enums/ReturnConditionEnum';
|
|
64
|
+
export * from './enums/TransferStateEnum';
|
|
65
|
+
export * from './enums/InventoryMovementReasonEnum';
|
|
66
|
+
export * from './dtos/requests/BackofficeCreateProductRequest';
|
|
67
|
+
export * from './dtos/requests/BackofficeCreateKitRequest';
|
|
68
|
+
export * from './dtos/requests/BackofficeCreateServiceRequest';
|
|
69
|
+
export * from './dtos/requests/BackofficeUpdateProductRequest';
|
|
70
|
+
export * from './dtos/requests/BackofficeCreateSkuPriceRequest';
|
|
71
|
+
export * from './dtos/requests/BackofficeRegisterEntryRequest';
|
|
72
|
+
export * from './dtos/requests/BackofficeRegisterAdjustmentRequest';
|
|
73
|
+
export * from './dtos/requests/BackofficeCreateTransferRequest';
|
|
74
|
+
export * from './dtos/requests/BackofficeListTransfersQuery';
|
|
75
|
+
export * from './dtos/responses/TransferResponse';
|
|
76
|
+
export * from './dtos/responses/ListTransfersResponse';
|
|
@@ -25,8 +25,11 @@ __exportStar(require("./enums/InventoryLensUnavailableReasonEnum"), exports);
|
|
|
25
25
|
__exportStar(require("./enums/InventoryTransferReasonEnum"), exports);
|
|
26
26
|
// Constantes del dominio
|
|
27
27
|
__exportStar(require("./constants/SkuPattern"), exports);
|
|
28
|
+
__exportStar(require("./constants/NonBundleCategories"), exports);
|
|
29
|
+
__exportStar(require("./constants/AdjustmentReasons"), exports);
|
|
28
30
|
// Validators custom
|
|
29
31
|
__exportStar(require("./validators/IsMdmCoherentConstraint"), exports);
|
|
32
|
+
__exportStar(require("./validators/IsPieceRefConstraint"), exports);
|
|
30
33
|
// Entity DTOs
|
|
31
34
|
__exportStar(require("./dtos/Product"), exports);
|
|
32
35
|
__exportStar(require("./dtos/InventoryItem"), exports);
|
|
@@ -59,6 +62,8 @@ __exportStar(require("./enums/InventoryLensPeriodEnum"), exports);
|
|
|
59
62
|
__exportStar(require("./dtos/ProductComponent"), exports);
|
|
60
63
|
__exportStar(require("./dtos/requests/ReservationLineRef"), exports);
|
|
61
64
|
__exportStar(require("./dtos/requests/StockLine"), exports);
|
|
65
|
+
__exportStar(require("./dtos/requests/ReturnPieceCondition"), exports);
|
|
66
|
+
__exportStar(require("./dtos/requests/ReturnStockLine"), exports);
|
|
62
67
|
__exportStar(require("./dtos/requests/ReserveStockRequest"), exports);
|
|
63
68
|
__exportStar(require("./dtos/requests/RenewReservationsRequest"), exports);
|
|
64
69
|
__exportStar(require("./dtos/requests/SuggestPiecesQuery"), exports);
|
|
@@ -78,3 +83,19 @@ __exportStar(require("./dtos/responses/StoreCatalogItem"), exports);
|
|
|
78
83
|
__exportStar(require("./dtos/responses/SkuPriceEntry"), exports);
|
|
79
84
|
__exportStar(require("./dtos/responses/GetInventorySkuResponse"), exports);
|
|
80
85
|
__exportStar(require("./dtos/responses/ListSkuPricesResponse"), exports);
|
|
86
|
+
// Operación independiente (ciclo 2)
|
|
87
|
+
__exportStar(require("./enums/ItemTypeEnum"), exports);
|
|
88
|
+
__exportStar(require("./enums/ReturnConditionEnum"), exports);
|
|
89
|
+
__exportStar(require("./enums/TransferStateEnum"), exports);
|
|
90
|
+
__exportStar(require("./enums/InventoryMovementReasonEnum"), exports);
|
|
91
|
+
__exportStar(require("./dtos/requests/BackofficeCreateProductRequest"), exports);
|
|
92
|
+
__exportStar(require("./dtos/requests/BackofficeCreateKitRequest"), exports);
|
|
93
|
+
__exportStar(require("./dtos/requests/BackofficeCreateServiceRequest"), exports);
|
|
94
|
+
__exportStar(require("./dtos/requests/BackofficeUpdateProductRequest"), exports);
|
|
95
|
+
__exportStar(require("./dtos/requests/BackofficeCreateSkuPriceRequest"), exports);
|
|
96
|
+
__exportStar(require("./dtos/requests/BackofficeRegisterEntryRequest"), exports);
|
|
97
|
+
__exportStar(require("./dtos/requests/BackofficeRegisterAdjustmentRequest"), exports);
|
|
98
|
+
__exportStar(require("./dtos/requests/BackofficeCreateTransferRequest"), exports);
|
|
99
|
+
__exportStar(require("./dtos/requests/BackofficeListTransfersQuery"), exports);
|
|
100
|
+
__exportStar(require("./dtos/responses/TransferResponse"), exports);
|
|
101
|
+
__exportStar(require("./dtos/responses/ListTransfersResponse"), exports);
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type ValidationArguments, type ValidatorConstraintInterface } from 'class-validator';
|
|
2
|
+
/** Exige identifier (pieza con IMEI o serie) o qty (SKU por cantidad), nunca los dos. */
|
|
3
|
+
export declare class IsPieceRefConstraint implements ValidatorConstraintInterface {
|
|
4
|
+
validate(identifier: unknown, args: ValidationArguments): boolean;
|
|
5
|
+
defaultMessage(): string;
|
|
6
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.IsPieceRefConstraint = void 0;
|
|
10
|
+
const class_validator_1 = require("class-validator");
|
|
11
|
+
/** Exige identifier (pieza con IMEI o serie) o qty (SKU por cantidad), nunca los dos. */
|
|
12
|
+
let IsPieceRefConstraint = class IsPieceRefConstraint {
|
|
13
|
+
validate(identifier, args) {
|
|
14
|
+
const { qty } = args.object;
|
|
15
|
+
if (qty !== undefined)
|
|
16
|
+
return identifier === undefined;
|
|
17
|
+
return typeof identifier === 'string' && /^\S+$/.test(identifier);
|
|
18
|
+
}
|
|
19
|
+
defaultMessage() {
|
|
20
|
+
return 'identifier (pieza con IMEI o serie) o qty (por cantidad), exactamente uno';
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
exports.IsPieceRefConstraint = IsPieceRefConstraint;
|
|
24
|
+
exports.IsPieceRefConstraint = IsPieceRefConstraint = __decorate([
|
|
25
|
+
(0, class_validator_1.ValidatorConstraint)({ name: 'isPieceRef', async: false })
|
|
26
|
+
], IsPieceRefConstraint);
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ReturnPieceCondition } from '../../../retailCatalog/dtos/requests/ReturnPieceCondition';
|
|
1
2
|
/**
|
|
2
3
|
* POST /backoffice/sales/:saleId/cancel — cancelación del Admin VL. SureKeep Fase 3 — pista Retail.
|
|
3
4
|
*
|
|
@@ -23,4 +24,6 @@ export declare class BackofficeCancelSaleRequest {
|
|
|
23
24
|
* la venta YA está fuera de ventana; dentro de ventana se ignora.
|
|
24
25
|
*/
|
|
25
26
|
outOfWindowExceptionId?: string;
|
|
27
|
+
/** Condición de cada pieza que regresa al inventario; las no listadas vuelven GOOD. */
|
|
28
|
+
returnConditions?: ReturnPieceCondition[];
|
|
26
29
|
}
|
|
@@ -12,6 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.BackofficeCancelSaleRequest = void 0;
|
|
13
13
|
const class_transformer_1 = require("class-transformer");
|
|
14
14
|
const class_validator_1 = require("class-validator");
|
|
15
|
+
const ReturnPieceCondition_1 = require("../../../retailCatalog/dtos/requests/ReturnPieceCondition");
|
|
15
16
|
/**
|
|
16
17
|
* POST /backoffice/sales/:saleId/cancel — cancelación del Admin VL. SureKeep Fase 3 — pista Retail.
|
|
17
18
|
*
|
|
@@ -46,3 +47,11 @@ __decorate([
|
|
|
46
47
|
(0, class_validator_1.MaxLength)(64),
|
|
47
48
|
__metadata("design:type", String)
|
|
48
49
|
], BackofficeCancelSaleRequest.prototype, "outOfWindowExceptionId", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
(0, class_transformer_1.Expose)(),
|
|
52
|
+
(0, class_validator_1.IsOptional)(),
|
|
53
|
+
(0, class_validator_1.IsArray)(),
|
|
54
|
+
(0, class_validator_1.ValidateNested)({ each: true }),
|
|
55
|
+
(0, class_transformer_1.Type)(() => ReturnPieceCondition_1.ReturnPieceCondition),
|
|
56
|
+
__metadata("design:type", Array)
|
|
57
|
+
], BackofficeCancelSaleRequest.prototype, "returnConditions", void 0);
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ReturnPieceCondition } from '../../../retailCatalog/dtos/requests/ReturnPieceCondition';
|
|
1
2
|
/**
|
|
2
3
|
* POST /sales/:saleId/cancel — cancela una venta (flujo C, solo BO dentro de ventana param). `reason`
|
|
3
4
|
* OBLIGATORIO (AuditTrail). Retorna el IMEI al silo (`SOLD → AVAILABLE`) y emite `SaleCancelledV1`.
|
|
@@ -19,4 +20,6 @@ export declare class CancelSaleRequest {
|
|
|
19
20
|
* que el string `"false"` se rechaza en vez de colarse como truthy.
|
|
20
21
|
*/
|
|
21
22
|
equipmentVerified?: boolean;
|
|
23
|
+
/** Condición de cada pieza que regresa al inventario; las no listadas vuelven GOOD. */
|
|
24
|
+
returnConditions?: ReturnPieceCondition[];
|
|
22
25
|
}
|