@fiado/type-kit 3.463.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/moneyTransfer/dtos.test.ts +298 -0
- package/_test_/unit/moneyTransfer/enums.test.ts +56 -0
- 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/_test_/unit/stpSpei/additive.test.ts +84 -0
- package/bin/bankAccount/enums/BeneficiaryAccountTypeEnum.d.ts +20 -0
- package/bin/bankAccount/enums/BeneficiaryAccountTypeEnum.js +24 -0
- package/bin/bankAccount/index.d.ts +1 -0
- package/bin/bankAccount/index.js +1 -0
- package/bin/index.d.ts +1 -0
- package/bin/index.js +5 -1
- package/bin/moneyTransfer/dtos/BatchScheduleRequest.d.ts +7 -0
- package/bin/moneyTransfer/dtos/BatchScheduleRequest.js +28 -0
- package/bin/moneyTransfer/dtos/CreateSettlementRequest.d.ts +12 -0
- package/bin/moneyTransfer/dtos/CreateSettlementRequest.js +42 -0
- package/bin/moneyTransfer/dtos/MoneyTransferProductRequest.d.ts +37 -0
- package/bin/moneyTransfer/dtos/MoneyTransferProductRequest.js +131 -0
- package/bin/moneyTransfer/dtos/MoneyTransferServiceCreateRequest.d.ts +22 -0
- package/bin/moneyTransfer/dtos/MoneyTransferServiceCreateRequest.js +88 -0
- package/bin/moneyTransfer/dtos/MoneyTransferServiceUpdateRequest.d.ts +22 -0
- package/bin/moneyTransfer/dtos/MoneyTransferServiceUpdateRequest.js +103 -0
- package/bin/moneyTransfer/dtos/PendingDetailsResponse.d.ts +8 -0
- package/bin/moneyTransfer/dtos/PendingDetailsResponse.js +7 -0
- package/bin/moneyTransfer/dtos/RescheduleSettlementRequest.d.ts +5 -0
- package/bin/moneyTransfer/dtos/RescheduleSettlementRequest.js +23 -0
- package/bin/moneyTransfer/dtos/SettlementActionRequest.d.ts +4 -0
- package/bin/moneyTransfer/dtos/SettlementActionRequest.js +21 -0
- package/bin/moneyTransfer/dtos/SettlementListResponse.d.ts +6 -0
- package/bin/moneyTransfer/dtos/SettlementListResponse.js +7 -0
- package/bin/moneyTransfer/dtos/SettlementResponse.d.ts +36 -0
- package/bin/moneyTransfer/dtos/SettlementResponse.js +10 -0
- package/bin/moneyTransfer/dtos/SettlementStatusMessage.d.ts +12 -0
- package/bin/moneyTransfer/dtos/SettlementStatusMessage.js +38 -0
- package/bin/moneyTransfer/dtos/TransactionDetailResponse.d.ts +24 -0
- package/bin/moneyTransfer/dtos/TransactionDetailResponse.js +10 -0
- package/bin/moneyTransfer/enums/SettlementModeEnum.d.ts +5 -0
- package/bin/moneyTransfer/enums/SettlementModeEnum.js +9 -0
- package/bin/moneyTransfer/enums/SettlementStatusEnum.d.ts +11 -0
- package/bin/moneyTransfer/enums/SettlementStatusEnum.js +15 -0
- package/bin/moneyTransfer/enums/SpeiOrderStatusEnum.d.ts +11 -0
- package/bin/moneyTransfer/enums/SpeiOrderStatusEnum.js +15 -0
- package/bin/moneyTransfer/enums/TransactionDetailStatusEnum.d.ts +7 -0
- package/bin/moneyTransfer/enums/TransactionDetailStatusEnum.js +11 -0
- package/bin/moneyTransfer/enums/TransferChannelEnum.d.ts +5 -0
- package/bin/moneyTransfer/enums/TransferChannelEnum.js +9 -0
- package/bin/moneyTransfer/index.d.ts +17 -0
- package/bin/moneyTransfer/index.js +40 -0
- package/bin/productCatalog/enums/ProductTypeEnum.d.ts +6 -1
- package/bin/productCatalog/enums/ProductTypeEnum.js +5 -0
- package/bin/provider/enums/Provider.d.ts +2 -1
- package/bin/provider/enums/Provider.js +1 -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/bin/stpSpei/dtos/ConsultStpOrderRequest.d.ts +8 -0
- package/bin/stpSpei/dtos/ConsultStpOrderRequest.js +6 -0
- package/bin/stpSpei/dtos/PutStpOrderRequest.d.ts +16 -8
- package/bin/stpSpei/enums/StpOrderSourceEnum.d.ts +9 -0
- package/bin/stpSpei/enums/StpOrderSourceEnum.js +13 -0
- package/bin/stpSpei/index.d.ts +2 -0
- package/bin/stpSpei/index.js +2 -0
- package/package.json +1 -1
- package/src/bankAccount/enums/BeneficiaryAccountTypeEnum.ts +20 -0
- package/src/bankAccount/index.ts +1 -0
- package/src/index.ts +4 -0
- package/src/moneyTransfer/dtos/BatchScheduleRequest.ts +15 -0
- package/src/moneyTransfer/dtos/CreateSettlementRequest.ts +26 -0
- package/src/moneyTransfer/dtos/MoneyTransferProductRequest.ts +111 -0
- package/src/moneyTransfer/dtos/MoneyTransferServiceCreateRequest.ts +62 -0
- package/src/moneyTransfer/dtos/MoneyTransferServiceUpdateRequest.ts +87 -0
- package/src/moneyTransfer/dtos/PendingDetailsResponse.ts +9 -0
- package/src/moneyTransfer/dtos/RescheduleSettlementRequest.ts +9 -0
- package/src/moneyTransfer/dtos/SettlementActionRequest.ts +7 -0
- package/src/moneyTransfer/dtos/SettlementListResponse.ts +7 -0
- package/src/moneyTransfer/dtos/SettlementResponse.ts +37 -0
- package/src/moneyTransfer/dtos/SettlementStatusMessage.ts +23 -0
- package/src/moneyTransfer/dtos/TransactionDetailResponse.ts +25 -0
- package/src/moneyTransfer/enums/SettlementModeEnum.ts +5 -0
- package/src/moneyTransfer/enums/SettlementStatusEnum.ts +11 -0
- package/src/moneyTransfer/enums/SpeiOrderStatusEnum.ts +11 -0
- package/src/moneyTransfer/enums/TransactionDetailStatusEnum.ts +7 -0
- package/src/moneyTransfer/enums/TransferChannelEnum.ts +5 -0
- package/src/moneyTransfer/index.ts +27 -0
- package/src/productCatalog/enums/ProductTypeEnum.ts +6 -1
- package/src/provider/enums/Provider.ts +2 -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
- package/src/stpSpei/dtos/ConsultStpOrderRequest.ts +9 -0
- package/src/stpSpei/dtos/PutStpOrderRequest.ts +18 -9
- package/src/stpSpei/enums/StpOrderSourceEnum.ts +9 -0
- package/src/stpSpei/index.ts +2 -0
|
@@ -58,5 +58,10 @@ export declare enum ProductTypeEnum {
|
|
|
58
58
|
* Reversa de un reembolso anterior — se devuelve el dinero del reembolso al cliente
|
|
59
59
|
* cuando el dictamen fue incorrecto o se detectó fraude post-reembolso.
|
|
60
60
|
*/
|
|
61
|
-
REFUND_PCF_REVERSE = "REFUND_PCF_REVERSE"
|
|
61
|
+
REFUND_PCF_REVERSE = "REFUND_PCF_REVERSE",
|
|
62
|
+
/**
|
|
63
|
+
* Dispersión SPEI de liquidaciones de beneficios (money-transfer-connector).
|
|
64
|
+
* Producto del catálogo para la orden STP que sale con `source=BENEFITS_SETTLEMENT`.
|
|
65
|
+
*/
|
|
66
|
+
MONEY_TRANSFER_SA = "MONEY_TRANSFER_SA"
|
|
62
67
|
}
|
|
@@ -63,4 +63,9 @@ var ProductTypeEnum;
|
|
|
63
63
|
* cuando el dictamen fue incorrecto o se detectó fraude post-reembolso.
|
|
64
64
|
*/
|
|
65
65
|
ProductTypeEnum["REFUND_PCF_REVERSE"] = "REFUND_PCF_REVERSE";
|
|
66
|
+
/**
|
|
67
|
+
* Dispersión SPEI de liquidaciones de beneficios (money-transfer-connector).
|
|
68
|
+
* Producto del catálogo para la orden STP que sale con `source=BENEFITS_SETTLEMENT`.
|
|
69
|
+
*/
|
|
70
|
+
ProductTypeEnum["MONEY_TRANSFER_SA"] = "MONEY_TRANSFER_SA";
|
|
66
71
|
})(ProductTypeEnum || (exports.ProductTypeEnum = ProductTypeEnum = {}));
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ADJUSTMENT_REASONS = void 0;
|
|
4
|
+
const InventoryMovementReasonEnum_1 = require("../enums/InventoryMovementReasonEnum");
|
|
5
|
+
/** Motivos que el admin puede registrar en un ajuste; DAMAGED_RETURN lo genera la devolución. */
|
|
6
|
+
exports.ADJUSTMENT_REASONS = [
|
|
7
|
+
InventoryMovementReasonEnum_1.InventoryMovementReasonEnum.SHRINKAGE,
|
|
8
|
+
InventoryMovementReasonEnum_1.InventoryMovementReasonEnum.ADJUSTMENT,
|
|
9
|
+
InventoryMovementReasonEnum_1.InventoryMovementReasonEnum.WARRANTY,
|
|
10
|
+
];
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { ProductCategoryEnum } from '../enums/ProductCategoryEnum';
|
|
2
|
+
/** Categorías que admite el alta y la edición de producto; el kit (BUNDLE) tiene su propio endpoint. */
|
|
3
|
+
export declare const NON_BUNDLE_CATEGORIES: (ProductCategoryEnum.PHONE | ProductCategoryEnum.SIM | ProductCategoryEnum.MODEM | ProductCategoryEnum.ACCESSORY)[];
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NON_BUNDLE_CATEGORIES = void 0;
|
|
4
|
+
const ProductCategoryEnum_1 = require("../enums/ProductCategoryEnum");
|
|
5
|
+
/** Categorías que admite el alta y la edición de producto; el kit (BUNDLE) tiene su propio endpoint. */
|
|
6
|
+
exports.NON_BUNDLE_CATEGORIES = Object.values(ProductCategoryEnum_1.ProductCategoryEnum).filter((c) => c !== ProductCategoryEnum_1.ProductCategoryEnum.BUNDLE);
|
|
@@ -4,6 +4,7 @@ import { ProductStatusEnum } from '../enums/ProductStatusEnum';
|
|
|
4
4
|
import { ProductTierEnum } from '../enums/ProductTierEnum';
|
|
5
5
|
import { ProductCategoryEnum } from '../enums/ProductCategoryEnum';
|
|
6
6
|
import { TrackingModeEnum } from '../enums/TrackingModeEnum';
|
|
7
|
+
import { ItemTypeEnum } from '../enums/ItemTypeEnum';
|
|
7
8
|
import { ProductComponent } from './ProductComponent';
|
|
8
9
|
/**
|
|
9
10
|
* Product — aggregate root del catálogo del dominio `retailCatalog`
|
|
@@ -45,4 +46,6 @@ export declare class Product {
|
|
|
45
46
|
components?: ProductComponent[] | null;
|
|
46
47
|
/** Llave del registro PRICE# del que salen basePriceCents y listPriceCents. */
|
|
47
48
|
currentPriceSk?: string | null;
|
|
49
|
+
/** Producto físico o servicio; inmutable tras el alta. Ausente = PRODUCT. */
|
|
50
|
+
itemType?: ItemTypeEnum;
|
|
48
51
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ProductComponent } from '../ProductComponent';
|
|
2
|
+
/** Body de POST /backoffice/catalog/kits (backofficeCreateKit); category BUNDLE y origen BACKOFFICE los fija el servidor. */
|
|
3
|
+
export declare class BackofficeCreateKitRequest {
|
|
4
|
+
sku: string;
|
|
5
|
+
sellable: boolean;
|
|
6
|
+
showInSalesFlow: boolean;
|
|
7
|
+
components: ProductComponent[];
|
|
8
|
+
description?: string;
|
|
9
|
+
imageUrl?: string;
|
|
10
|
+
/** Id del SKU en el sistema del retailer. */
|
|
11
|
+
externalId?: string;
|
|
12
|
+
/** Financieras que pueden financiar este SKU; vacío = no financiable. */
|
|
13
|
+
eligibleFinanciers?: string[];
|
|
14
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
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.BackofficeCreateKitRequest = 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 ProductComponent_1 = require("../ProductComponent");
|
|
17
|
+
/** Body de POST /backoffice/catalog/kits (backofficeCreateKit); category BUNDLE y origen BACKOFFICE los fija el servidor. */
|
|
18
|
+
class BackofficeCreateKitRequest {
|
|
19
|
+
}
|
|
20
|
+
exports.BackofficeCreateKitRequest = BackofficeCreateKitRequest;
|
|
21
|
+
__decorate([
|
|
22
|
+
(0, class_validator_1.Matches)(SkuPattern_1.SKU_PATTERN, { message: 'sku admite solo [A-Za-z0-9-]' }),
|
|
23
|
+
(0, class_validator_1.Length)(1, 64),
|
|
24
|
+
(0, class_validator_1.IsString)(),
|
|
25
|
+
__metadata("design:type", String)
|
|
26
|
+
], BackofficeCreateKitRequest.prototype, "sku", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, class_validator_1.IsBoolean)(),
|
|
29
|
+
__metadata("design:type", Boolean)
|
|
30
|
+
], BackofficeCreateKitRequest.prototype, "sellable", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, class_validator_1.IsBoolean)(),
|
|
33
|
+
__metadata("design:type", Boolean)
|
|
34
|
+
], BackofficeCreateKitRequest.prototype, "showInSalesFlow", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, class_validator_1.IsArray)(),
|
|
37
|
+
(0, class_validator_1.ArrayMinSize)(1),
|
|
38
|
+
(0, class_validator_1.ValidateNested)({ each: true }),
|
|
39
|
+
(0, class_transformer_1.Type)(() => ProductComponent_1.ProductComponent),
|
|
40
|
+
__metadata("design:type", Array)
|
|
41
|
+
], BackofficeCreateKitRequest.prototype, "components", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, class_validator_1.IsOptional)(),
|
|
44
|
+
(0, class_validator_1.Matches)(/\S/),
|
|
45
|
+
(0, class_validator_1.IsString)(),
|
|
46
|
+
__metadata("design:type", String)
|
|
47
|
+
], BackofficeCreateKitRequest.prototype, "description", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, class_validator_1.IsOptional)(),
|
|
50
|
+
(0, class_validator_1.Matches)(/\S/),
|
|
51
|
+
(0, class_validator_1.IsString)(),
|
|
52
|
+
__metadata("design:type", String)
|
|
53
|
+
], BackofficeCreateKitRequest.prototype, "imageUrl", void 0);
|
|
54
|
+
__decorate([
|
|
55
|
+
(0, class_validator_1.IsOptional)(),
|
|
56
|
+
(0, class_validator_1.Matches)(/\S/),
|
|
57
|
+
(0, class_validator_1.IsString)(),
|
|
58
|
+
__metadata("design:type", String)
|
|
59
|
+
], BackofficeCreateKitRequest.prototype, "externalId", void 0);
|
|
60
|
+
__decorate([
|
|
61
|
+
(0, class_validator_1.IsOptional)(),
|
|
62
|
+
(0, class_validator_1.IsArray)(),
|
|
63
|
+
(0, class_validator_1.Matches)(/\S/, { each: true }),
|
|
64
|
+
(0, class_validator_1.IsString)({ each: true }),
|
|
65
|
+
__metadata("design:type", Array)
|
|
66
|
+
], BackofficeCreateKitRequest.prototype, "eligibleFinanciers", void 0);
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ProductCategoryEnum } from '../../enums/ProductCategoryEnum';
|
|
2
|
+
import { ProductTierEnum } from '../../enums/ProductTierEnum';
|
|
3
|
+
import { TrackingModeEnum } from '../../enums/TrackingModeEnum';
|
|
4
|
+
import { MdmLockModeEnum } from '../../enums/MdmLockModeEnum';
|
|
5
|
+
import { MdmProviderEnum } from '../../enums/MdmProviderEnum';
|
|
6
|
+
/** Body de POST /backoffice/catalog/products (backofficeCreateProduct); itemType PRODUCT y origen BACKOFFICE los fija el servidor. */
|
|
7
|
+
export declare class BackofficeCreateProductRequest {
|
|
8
|
+
sku: string;
|
|
9
|
+
/** El kit (BUNDLE) se da de alta en backofficeCreateKit. */
|
|
10
|
+
category: ProductCategoryEnum;
|
|
11
|
+
/** Inmutable tras el alta. */
|
|
12
|
+
trackingMode: TrackingModeEnum;
|
|
13
|
+
sellable: boolean;
|
|
14
|
+
showInSalesFlow: boolean;
|
|
15
|
+
tier?: ProductTierEnum;
|
|
16
|
+
brand?: string;
|
|
17
|
+
model?: string;
|
|
18
|
+
capacity?: string;
|
|
19
|
+
color?: string;
|
|
20
|
+
description?: string;
|
|
21
|
+
imageUrl?: string;
|
|
22
|
+
/** Id del SKU en el sistema del retailer. */
|
|
23
|
+
externalId?: string;
|
|
24
|
+
/** Financieras que pueden financiar este SKU; vacío = no financiable. */
|
|
25
|
+
eligibleFinanciers?: string[];
|
|
26
|
+
/** En el alta se evalúa aunque falte: si vienen mdmProvider o mdmLockMode, exige mdmEnabled=true. */
|
|
27
|
+
mdmEnabled?: boolean;
|
|
28
|
+
mdmProvider?: MdmProviderEnum | null;
|
|
29
|
+
mdmLockMode?: MdmLockModeEnum | null;
|
|
30
|
+
}
|
|
@@ -0,0 +1,117 @@
|
|
|
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.BackofficeCreateProductRequest = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
const SkuPattern_1 = require("../../constants/SkuPattern");
|
|
15
|
+
const NonBundleCategories_1 = require("../../constants/NonBundleCategories");
|
|
16
|
+
const ProductCategoryEnum_1 = require("../../enums/ProductCategoryEnum");
|
|
17
|
+
const ProductTierEnum_1 = require("../../enums/ProductTierEnum");
|
|
18
|
+
const TrackingModeEnum_1 = require("../../enums/TrackingModeEnum");
|
|
19
|
+
const MdmLockModeEnum_1 = require("../../enums/MdmLockModeEnum");
|
|
20
|
+
const MdmProviderEnum_1 = require("../../enums/MdmProviderEnum");
|
|
21
|
+
const IsMdmCoherentConstraint_1 = require("../../validators/IsMdmCoherentConstraint");
|
|
22
|
+
/** Body de POST /backoffice/catalog/products (backofficeCreateProduct); itemType PRODUCT y origen BACKOFFICE los fija el servidor. */
|
|
23
|
+
class BackofficeCreateProductRequest {
|
|
24
|
+
}
|
|
25
|
+
exports.BackofficeCreateProductRequest = BackofficeCreateProductRequest;
|
|
26
|
+
__decorate([
|
|
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
|
+
], BackofficeCreateProductRequest.prototype, "sku", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, class_validator_1.IsIn)(NonBundleCategories_1.NON_BUNDLE_CATEGORIES),
|
|
34
|
+
__metadata("design:type", String)
|
|
35
|
+
], BackofficeCreateProductRequest.prototype, "category", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, class_validator_1.IsEnum)(TrackingModeEnum_1.TrackingModeEnum),
|
|
38
|
+
__metadata("design:type", String)
|
|
39
|
+
], BackofficeCreateProductRequest.prototype, "trackingMode", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, class_validator_1.IsBoolean)(),
|
|
42
|
+
__metadata("design:type", Boolean)
|
|
43
|
+
], BackofficeCreateProductRequest.prototype, "sellable", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, class_validator_1.IsBoolean)(),
|
|
46
|
+
__metadata("design:type", Boolean)
|
|
47
|
+
], BackofficeCreateProductRequest.prototype, "showInSalesFlow", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, class_validator_1.IsOptional)(),
|
|
50
|
+
(0, class_validator_1.IsEnum)(ProductTierEnum_1.ProductTierEnum),
|
|
51
|
+
__metadata("design:type", String)
|
|
52
|
+
], BackofficeCreateProductRequest.prototype, "tier", void 0);
|
|
53
|
+
__decorate([
|
|
54
|
+
(0, class_validator_1.IsOptional)(),
|
|
55
|
+
(0, class_validator_1.Matches)(/\S/),
|
|
56
|
+
(0, class_validator_1.IsString)(),
|
|
57
|
+
__metadata("design:type", String)
|
|
58
|
+
], BackofficeCreateProductRequest.prototype, "brand", void 0);
|
|
59
|
+
__decorate([
|
|
60
|
+
(0, class_validator_1.IsOptional)(),
|
|
61
|
+
(0, class_validator_1.Matches)(/\S/),
|
|
62
|
+
(0, class_validator_1.IsString)(),
|
|
63
|
+
__metadata("design:type", String)
|
|
64
|
+
], BackofficeCreateProductRequest.prototype, "model", void 0);
|
|
65
|
+
__decorate([
|
|
66
|
+
(0, class_validator_1.IsOptional)(),
|
|
67
|
+
(0, class_validator_1.Matches)(/\S/),
|
|
68
|
+
(0, class_validator_1.IsString)(),
|
|
69
|
+
__metadata("design:type", String)
|
|
70
|
+
], BackofficeCreateProductRequest.prototype, "capacity", void 0);
|
|
71
|
+
__decorate([
|
|
72
|
+
(0, class_validator_1.IsOptional)(),
|
|
73
|
+
(0, class_validator_1.Matches)(/\S/),
|
|
74
|
+
(0, class_validator_1.IsString)(),
|
|
75
|
+
__metadata("design:type", String)
|
|
76
|
+
], BackofficeCreateProductRequest.prototype, "color", void 0);
|
|
77
|
+
__decorate([
|
|
78
|
+
(0, class_validator_1.IsOptional)(),
|
|
79
|
+
(0, class_validator_1.Matches)(/\S/),
|
|
80
|
+
(0, class_validator_1.IsString)(),
|
|
81
|
+
__metadata("design:type", String)
|
|
82
|
+
], BackofficeCreateProductRequest.prototype, "description", void 0);
|
|
83
|
+
__decorate([
|
|
84
|
+
(0, class_validator_1.IsOptional)(),
|
|
85
|
+
(0, class_validator_1.Matches)(/\S/),
|
|
86
|
+
(0, class_validator_1.IsString)(),
|
|
87
|
+
__metadata("design:type", String)
|
|
88
|
+
], BackofficeCreateProductRequest.prototype, "imageUrl", void 0);
|
|
89
|
+
__decorate([
|
|
90
|
+
(0, class_validator_1.IsOptional)(),
|
|
91
|
+
(0, class_validator_1.Matches)(/\S/),
|
|
92
|
+
(0, class_validator_1.IsString)(),
|
|
93
|
+
__metadata("design:type", String)
|
|
94
|
+
], BackofficeCreateProductRequest.prototype, "externalId", void 0);
|
|
95
|
+
__decorate([
|
|
96
|
+
(0, class_validator_1.IsOptional)(),
|
|
97
|
+
(0, class_validator_1.IsArray)(),
|
|
98
|
+
(0, class_validator_1.Matches)(/\S/, { each: true }),
|
|
99
|
+
(0, class_validator_1.IsString)({ each: true }),
|
|
100
|
+
__metadata("design:type", Array)
|
|
101
|
+
], BackofficeCreateProductRequest.prototype, "eligibleFinanciers", void 0);
|
|
102
|
+
__decorate([
|
|
103
|
+
(0, class_validator_1.Validate)(IsMdmCoherentConstraint_1.IsMdmCoherentConstraint),
|
|
104
|
+
(0, class_validator_1.ValidateIf)((o) => o.mdmEnabled != null || o.mdmProvider != null || o.mdmLockMode != null),
|
|
105
|
+
(0, class_validator_1.IsBoolean)(),
|
|
106
|
+
__metadata("design:type", Boolean)
|
|
107
|
+
], BackofficeCreateProductRequest.prototype, "mdmEnabled", void 0);
|
|
108
|
+
__decorate([
|
|
109
|
+
(0, class_validator_1.IsOptional)(),
|
|
110
|
+
(0, class_validator_1.IsEnum)(MdmProviderEnum_1.MdmProviderEnum),
|
|
111
|
+
__metadata("design:type", String)
|
|
112
|
+
], BackofficeCreateProductRequest.prototype, "mdmProvider", void 0);
|
|
113
|
+
__decorate([
|
|
114
|
+
(0, class_validator_1.IsOptional)(),
|
|
115
|
+
(0, class_validator_1.IsEnum)(MdmLockModeEnum_1.MdmLockModeEnum),
|
|
116
|
+
__metadata("design:type", String)
|
|
117
|
+
], BackofficeCreateProductRequest.prototype, "mdmLockMode", void 0);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** Body de POST /backoffice/catalog/services (backofficeCreateService); itemType SERVICE y trackingMode QUANTITY los fija el servidor. */
|
|
2
|
+
export declare class BackofficeCreateServiceRequest {
|
|
3
|
+
sku: string;
|
|
4
|
+
description: string;
|
|
5
|
+
sellable: boolean;
|
|
6
|
+
showInSalesFlow: boolean;
|
|
7
|
+
/** Id del SKU en el sistema del retailer. */
|
|
8
|
+
externalId?: string;
|
|
9
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
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.BackofficeCreateServiceRequest = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
const SkuPattern_1 = require("../../constants/SkuPattern");
|
|
15
|
+
/** Body de POST /backoffice/catalog/services (backofficeCreateService); itemType SERVICE y trackingMode QUANTITY los fija el servidor. */
|
|
16
|
+
class BackofficeCreateServiceRequest {
|
|
17
|
+
}
|
|
18
|
+
exports.BackofficeCreateServiceRequest = BackofficeCreateServiceRequest;
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, class_validator_1.Matches)(SkuPattern_1.SKU_PATTERN, { message: 'sku admite solo [A-Za-z0-9-]' }),
|
|
21
|
+
(0, class_validator_1.Length)(1, 64),
|
|
22
|
+
(0, class_validator_1.IsString)(),
|
|
23
|
+
__metadata("design:type", String)
|
|
24
|
+
], BackofficeCreateServiceRequest.prototype, "sku", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, class_validator_1.Matches)(/\S/),
|
|
27
|
+
(0, class_validator_1.IsString)(),
|
|
28
|
+
__metadata("design:type", String)
|
|
29
|
+
], BackofficeCreateServiceRequest.prototype, "description", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, class_validator_1.IsBoolean)(),
|
|
32
|
+
__metadata("design:type", Boolean)
|
|
33
|
+
], BackofficeCreateServiceRequest.prototype, "sellable", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, class_validator_1.IsBoolean)(),
|
|
36
|
+
__metadata("design:type", Boolean)
|
|
37
|
+
], BackofficeCreateServiceRequest.prototype, "showInSalesFlow", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, class_validator_1.IsOptional)(),
|
|
40
|
+
(0, class_validator_1.Matches)(/\S/),
|
|
41
|
+
(0, class_validator_1.IsString)(),
|
|
42
|
+
__metadata("design:type", String)
|
|
43
|
+
], BackofficeCreateServiceRequest.prototype, "externalId", void 0);
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** Body de POST /backoffice/inventory/skus/{sku}/prices (backofficeCreateSkuPrice); crea un PRICE# nuevo con origen BACKOFFICE. */
|
|
2
|
+
export declare class BackofficeCreateSkuPriceRequest {
|
|
3
|
+
basePriceCents: number;
|
|
4
|
+
listPriceCents?: number | null;
|
|
5
|
+
/** Precio dentro de un kit; se guarda, ninguna venta lo aplica. */
|
|
6
|
+
comboPriceCents?: number;
|
|
7
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
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.BackofficeCreateSkuPriceRequest = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
/** Body de POST /backoffice/inventory/skus/{sku}/prices (backofficeCreateSkuPrice); crea un PRICE# nuevo con origen BACKOFFICE. */
|
|
15
|
+
class BackofficeCreateSkuPriceRequest {
|
|
16
|
+
}
|
|
17
|
+
exports.BackofficeCreateSkuPriceRequest = BackofficeCreateSkuPriceRequest;
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, class_validator_1.IsInt)(),
|
|
20
|
+
(0, class_validator_1.Min)(0),
|
|
21
|
+
__metadata("design:type", Number)
|
|
22
|
+
], BackofficeCreateSkuPriceRequest.prototype, "basePriceCents", void 0);
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, class_validator_1.IsOptional)(),
|
|
25
|
+
(0, class_validator_1.IsInt)(),
|
|
26
|
+
(0, class_validator_1.Min)(0),
|
|
27
|
+
__metadata("design:type", Number)
|
|
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);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** Body de POST /backoffice/inventory/transfers (backofficeCreateTransfer); origen = destino lo rechaza el dominio. */
|
|
2
|
+
export declare class BackofficeCreateTransferRequest {
|
|
3
|
+
fromStoreId: string;
|
|
4
|
+
toStoreId: string;
|
|
5
|
+
sku: string;
|
|
6
|
+
qty: number;
|
|
7
|
+
/** IMEI o serie de cada pieza; ausente si el SKU se rastrea por cantidad. */
|
|
8
|
+
identifiers?: string[];
|
|
9
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
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.BackofficeCreateTransferRequest = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
const SkuPattern_1 = require("../../constants/SkuPattern");
|
|
15
|
+
/** Body de POST /backoffice/inventory/transfers (backofficeCreateTransfer); origen = destino lo rechaza el dominio. */
|
|
16
|
+
class BackofficeCreateTransferRequest {
|
|
17
|
+
}
|
|
18
|
+
exports.BackofficeCreateTransferRequest = BackofficeCreateTransferRequest;
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, class_validator_1.Matches)(/^\S+$/),
|
|
21
|
+
(0, class_validator_1.IsString)(),
|
|
22
|
+
__metadata("design:type", String)
|
|
23
|
+
], BackofficeCreateTransferRequest.prototype, "fromStoreId", void 0);
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, class_validator_1.Matches)(/^\S+$/),
|
|
26
|
+
(0, class_validator_1.IsString)(),
|
|
27
|
+
__metadata("design:type", String)
|
|
28
|
+
], BackofficeCreateTransferRequest.prototype, "toStoreId", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, class_validator_1.Matches)(SkuPattern_1.SKU_PATTERN, { message: 'sku admite solo [A-Za-z0-9-]' }),
|
|
31
|
+
(0, class_validator_1.Length)(1, 64),
|
|
32
|
+
(0, class_validator_1.IsString)(),
|
|
33
|
+
__metadata("design:type", String)
|
|
34
|
+
], BackofficeCreateTransferRequest.prototype, "sku", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, class_validator_1.IsInt)(),
|
|
37
|
+
(0, class_validator_1.Min)(1),
|
|
38
|
+
__metadata("design:type", Number)
|
|
39
|
+
], BackofficeCreateTransferRequest.prototype, "qty", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, class_validator_1.IsOptional)(),
|
|
42
|
+
(0, class_validator_1.IsArray)(),
|
|
43
|
+
(0, class_validator_1.ArrayMinSize)(1),
|
|
44
|
+
(0, class_validator_1.ArrayUnique)(),
|
|
45
|
+
(0, class_validator_1.Matches)(/^\S+$/, { each: true }),
|
|
46
|
+
(0, class_validator_1.IsString)({ each: true }),
|
|
47
|
+
__metadata("design:type", Array)
|
|
48
|
+
], BackofficeCreateTransferRequest.prototype, "identifiers", void 0);
|
|
@@ -0,0 +1,23 @@
|
|
|
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.BackofficeListTransfersQuery = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
const TransferStateEnum_1 = require("../../enums/TransferStateEnum");
|
|
15
|
+
/** Query de GET /backoffice/inventory/transfers (backofficeListTransfers); el retailer sale del token. */
|
|
16
|
+
class BackofficeListTransfersQuery {
|
|
17
|
+
}
|
|
18
|
+
exports.BackofficeListTransfersQuery = BackofficeListTransfersQuery;
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, class_validator_1.IsOptional)(),
|
|
21
|
+
(0, class_validator_1.IsEnum)(TransferStateEnum_1.TransferStateEnum),
|
|
22
|
+
__metadata("design:type", String)
|
|
23
|
+
], BackofficeListTransfersQuery.prototype, "state", void 0);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { InventoryMovementReasonEnum } from '../../enums/InventoryMovementReasonEnum';
|
|
2
|
+
/** Body de POST /backoffice/inventory/adjustments (backofficeRegisterAdjustment); resta del disponible con motivo. */
|
|
3
|
+
export declare class BackofficeRegisterAdjustmentRequest {
|
|
4
|
+
/** Debe pertenecer al retailer del token. */
|
|
5
|
+
storeId: string;
|
|
6
|
+
sku: string;
|
|
7
|
+
qty: number;
|
|
8
|
+
/** DAMAGED_RETURN no aplica: lo genera la devolución, no el admin. */
|
|
9
|
+
reason: InventoryMovementReasonEnum;
|
|
10
|
+
/** IMEI o serie de cada pieza; ausente si el SKU se rastrea por cantidad. */
|
|
11
|
+
identifiers?: string[];
|
|
12
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
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.BackofficeRegisterAdjustmentRequest = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
const AdjustmentReasons_1 = require("../../constants/AdjustmentReasons");
|
|
15
|
+
const SkuPattern_1 = require("../../constants/SkuPattern");
|
|
16
|
+
const InventoryMovementReasonEnum_1 = require("../../enums/InventoryMovementReasonEnum");
|
|
17
|
+
/** Body de POST /backoffice/inventory/adjustments (backofficeRegisterAdjustment); resta del disponible con motivo. */
|
|
18
|
+
class BackofficeRegisterAdjustmentRequest {
|
|
19
|
+
}
|
|
20
|
+
exports.BackofficeRegisterAdjustmentRequest = BackofficeRegisterAdjustmentRequest;
|
|
21
|
+
__decorate([
|
|
22
|
+
(0, class_validator_1.Matches)(/^\S+$/),
|
|
23
|
+
(0, class_validator_1.IsString)(),
|
|
24
|
+
__metadata("design:type", String)
|
|
25
|
+
], BackofficeRegisterAdjustmentRequest.prototype, "storeId", void 0);
|
|
26
|
+
__decorate([
|
|
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
|
+
], BackofficeRegisterAdjustmentRequest.prototype, "sku", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, class_validator_1.IsInt)(),
|
|
34
|
+
(0, class_validator_1.Min)(1),
|
|
35
|
+
__metadata("design:type", Number)
|
|
36
|
+
], BackofficeRegisterAdjustmentRequest.prototype, "qty", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, class_validator_1.IsIn)(AdjustmentReasons_1.ADJUSTMENT_REASONS),
|
|
39
|
+
__metadata("design:type", String)
|
|
40
|
+
], BackofficeRegisterAdjustmentRequest.prototype, "reason", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, class_validator_1.IsOptional)(),
|
|
43
|
+
(0, class_validator_1.IsArray)(),
|
|
44
|
+
(0, class_validator_1.ArrayMinSize)(1),
|
|
45
|
+
(0, class_validator_1.ArrayUnique)(),
|
|
46
|
+
(0, class_validator_1.Matches)(/^\S+$/, { each: true }),
|
|
47
|
+
(0, class_validator_1.IsString)({ each: true }),
|
|
48
|
+
__metadata("design:type", Array)
|
|
49
|
+
], BackofficeRegisterAdjustmentRequest.prototype, "identifiers", void 0);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** Body de POST /backoffice/inventory/entries (backofficeRegisterEntry); suma al saldo de la tienda con un MOV# ENTRY. */
|
|
2
|
+
export declare class BackofficeRegisterEntryRequest {
|
|
3
|
+
/** Debe pertenecer al retailer del token. */
|
|
4
|
+
storeId: string;
|
|
5
|
+
sku: string;
|
|
6
|
+
qty: number;
|
|
7
|
+
/** IMEI o serie de cada pieza; ausente si el SKU se rastrea por cantidad. */
|
|
8
|
+
identifiers?: string[];
|
|
9
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
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.BackofficeRegisterEntryRequest = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
const SkuPattern_1 = require("../../constants/SkuPattern");
|
|
15
|
+
/** Body de POST /backoffice/inventory/entries (backofficeRegisterEntry); suma al saldo de la tienda con un MOV# ENTRY. */
|
|
16
|
+
class BackofficeRegisterEntryRequest {
|
|
17
|
+
}
|
|
18
|
+
exports.BackofficeRegisterEntryRequest = BackofficeRegisterEntryRequest;
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, class_validator_1.Matches)(/^\S+$/),
|
|
21
|
+
(0, class_validator_1.IsString)(),
|
|
22
|
+
__metadata("design:type", String)
|
|
23
|
+
], BackofficeRegisterEntryRequest.prototype, "storeId", void 0);
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, class_validator_1.Matches)(SkuPattern_1.SKU_PATTERN, { message: 'sku admite solo [A-Za-z0-9-]' }),
|
|
26
|
+
(0, class_validator_1.Length)(1, 64),
|
|
27
|
+
(0, class_validator_1.IsString)(),
|
|
28
|
+
__metadata("design:type", String)
|
|
29
|
+
], BackofficeRegisterEntryRequest.prototype, "sku", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, class_validator_1.IsInt)(),
|
|
32
|
+
(0, class_validator_1.Min)(1),
|
|
33
|
+
__metadata("design:type", Number)
|
|
34
|
+
], BackofficeRegisterEntryRequest.prototype, "qty", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, class_validator_1.IsOptional)(),
|
|
37
|
+
(0, class_validator_1.IsArray)(),
|
|
38
|
+
(0, class_validator_1.ArrayMinSize)(1),
|
|
39
|
+
(0, class_validator_1.ArrayUnique)(),
|
|
40
|
+
(0, class_validator_1.Matches)(/^\S+$/, { each: true }),
|
|
41
|
+
(0, class_validator_1.IsString)({ each: true }),
|
|
42
|
+
__metadata("design:type", Array)
|
|
43
|
+
], BackofficeRegisterEntryRequest.prototype, "identifiers", void 0);
|