@fiado/type-kit 3.577.0 → 3.579.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/platformRbac/dtos/levelEntityAdminDtos.test.ts +14 -0
- package/_test_/unit/retailCatalog/catalogEnums.test.ts +2 -2
- package/_test_/unit/retailCatalog/centralSaleAccepted.test.ts +54 -0
- package/_test_/unit/retailCatalog/sellInventoryRequest.test.ts +25 -0
- package/_test_/unit/retailCatalog/stockRequests.test.ts +14 -4
- package/_test_/unit/retailCatalog/ventaSaga.test.ts +7 -0
- package/_test_/unit/retailIntegration/reconciliationContracts.test.ts +121 -0
- package/_test_/unit/retailIntegration/retailIntegrationErrorCodes.test.ts +37 -0
- package/_test_/unit/retailIntegration/retailOutboundRequests.test.ts +46 -15
- package/_test_/unit/retailIntegration/retailSaleContracts.test.ts +160 -0
- package/_test_/unit/retailIntegration/retailSystemEnums.test.ts +1 -1
- package/_test_/unit/retailOrg/dtos/retailerIntegration.test.ts +92 -0
- package/_test_/unit/retailWizard/centralOutboundAndLiveCheck.test.ts +63 -0
- package/_test_/unit/retailWizard/centralSaleStatus.test.ts +49 -0
- package/_test_/unit/retailWizard/customerTableShapes.test.ts +22 -0
- package/_test_/unit/retailWizard/multiItemShapes.test.ts +2 -2
- package/bin/platformRbac/dtos/UpdateLevelEntityRequest.d.ts +3 -1
- package/bin/platformRbac/dtos/UpdateLevelEntityRequest.js +8 -1
- package/bin/retailCatalog/dtos/requests/ReturnStockRequest.d.ts +2 -0
- package/bin/retailCatalog/dtos/requests/ReturnStockRequest.js +5 -0
- package/bin/retailCatalog/dtos/requests/SellInventoryRequest.d.ts +9 -0
- package/bin/retailCatalog/dtos/requests/SellInventoryRequest.js +32 -0
- package/bin/retailCatalog/dtos/requests/SellStockRequest.d.ts +2 -2
- package/bin/retailCatalog/dtos/requests/SellStockRequest.js +1 -1
- package/bin/retailCatalog/enums/InventoryInboundMessageTypeEnum.d.ts +2 -1
- package/bin/retailCatalog/enums/InventoryInboundMessageTypeEnum.js +1 -0
- package/bin/retailCatalog/enums/InventoryItemStatusEnum.d.ts +3 -1
- package/bin/retailCatalog/enums/InventoryItemStatusEnum.js +2 -0
- package/bin/retailCatalog/events/InventoryCentralSaleAcceptedMessage.d.ts +13 -0
- package/bin/retailCatalog/events/InventoryCentralSaleAcceptedMessage.js +55 -0
- package/bin/retailCatalog/events/InventoryInboundMessage.d.ts +2 -1
- package/bin/retailCatalog/events/InventorySaleAppliedMessage.d.ts +0 -2
- package/bin/retailCatalog/events/InventorySaleAppliedMessage.js +0 -6
- package/bin/retailCatalog/index.d.ts +2 -0
- package/bin/retailCatalog/index.js +2 -0
- package/bin/retailCustomer/dtos/requests/UpsertCustomerFromKycRequest.d.ts +2 -0
- package/bin/retailCustomer/dtos/requests/UpsertCustomerFromKycRequest.js +6 -0
- package/bin/retailIntegration/constants/retailIntegrationErrorHttpStatus.d.ts +3 -0
- package/bin/retailIntegration/constants/retailIntegrationErrorHttpStatus.js +19 -0
- package/bin/retailIntegration/constants/retailIntegrationLimits.d.ts +2 -0
- package/bin/retailIntegration/constants/retailIntegrationLimits.js +3 -1
- package/bin/retailIntegration/dtos/CancelRetailSaleRequest.d.ts +6 -0
- package/bin/retailIntegration/dtos/CancelRetailSaleRequest.js +32 -0
- package/bin/retailIntegration/dtos/CheckRetailInventoryRequest.d.ts +7 -0
- package/bin/retailIntegration/dtos/CheckRetailInventoryRequest.js +43 -0
- package/bin/retailIntegration/dtos/GetReconciliationResponses.d.ts +35 -0
- package/bin/retailIntegration/dtos/GetReconciliationResponses.js +2 -0
- package/bin/retailIntegration/dtos/GetRetailInventoryRequest.d.ts +2 -2
- package/bin/retailIntegration/dtos/GetRetailInventoryRequest.js +2 -2
- package/bin/retailIntegration/dtos/ReconciliationPageMessage.d.ts +13 -0
- package/bin/retailIntegration/dtos/ReconciliationPageMessage.js +48 -0
- package/bin/retailIntegration/dtos/ReconciliationRunCounts.d.ts +9 -0
- package/bin/retailIntegration/dtos/ReconciliationRunCounts.js +2 -0
- package/bin/retailIntegration/dtos/RetailListQuery.d.ts +5 -0
- package/bin/retailIntegration/dtos/RetailListQuery.js +24 -0
- package/bin/retailIntegration/dtos/RetailOutboundResponses.d.ts +9 -0
- package/bin/retailIntegration/dtos/RetailPagedQuery.d.ts +2 -2
- package/bin/retailIntegration/dtos/RetailPagedQuery.js +2 -2
- package/bin/retailIntegration/dtos/RetailTenantQuery.d.ts +2 -1
- package/bin/retailIntegration/dtos/RetailTenantQuery.js +6 -1
- package/bin/retailIntegration/dtos/StartCatalogReconciliationRequest.d.ts +11 -0
- package/bin/retailIntegration/dtos/StartCatalogReconciliationRequest.js +28 -0
- package/bin/retailIntegration/dtos/StartOrgReconciliationRequest.d.ts +9 -0
- package/bin/retailIntegration/dtos/StartOrgReconciliationRequest.js +22 -0
- package/bin/retailIntegration/enums/InactiveReasonEnum.d.ts +5 -0
- package/bin/retailIntegration/enums/InactiveReasonEnum.js +9 -0
- package/bin/retailIntegration/enums/ReconciliationEntityEnum.d.ts +7 -0
- package/bin/retailIntegration/enums/ReconciliationEntityEnum.js +11 -0
- package/bin/retailIntegration/enums/ReconciliationRunStatusEnum.d.ts +7 -0
- package/bin/retailIntegration/enums/ReconciliationRunStatusEnum.js +11 -0
- package/bin/retailIntegration/enums/ReconciliationTriggerEnum.d.ts +6 -0
- package/bin/retailIntegration/enums/ReconciliationTriggerEnum.js +10 -0
- package/bin/retailIntegration/enums/RetailEventRejectCodeEnum.d.ts +3 -1
- package/bin/retailIntegration/enums/RetailEventRejectCodeEnum.js +2 -0
- package/bin/retailIntegration/enums/RetailIntegrationErrorCodeEnum.d.ts +23 -0
- package/bin/retailIntegration/enums/RetailIntegrationErrorCodeEnum.js +27 -0
- package/bin/retailIntegration/enums/RetailSaleLineRoleEnum.d.ts +4 -0
- package/bin/retailIntegration/enums/RetailSaleLineRoleEnum.js +8 -0
- package/bin/retailIntegration/enums/index.d.ts +6 -0
- package/bin/retailIntegration/enums/index.js +6 -0
- package/bin/retailIntegration/index.d.ts +9 -0
- package/bin/retailIntegration/index.js +9 -0
- package/bin/retailIntegration/models/RetailSystemSale.d.ts +8 -7
- package/bin/retailIntegration/models/RetailSystemSale.js +186 -0
- package/bin/retailOrg/dtos/Retailer.d.ts +5 -0
- package/bin/retailOrg/dtos/Retailer.js +20 -0
- package/bin/retailOrg/dtos/requests/ActivateRetailerIntegrationRequest.d.ts +5 -0
- package/bin/retailOrg/dtos/requests/ActivateRetailerIntegrationRequest.js +24 -0
- package/bin/retailOrg/dtos/responses/ActivateRetailerIntegrationResponse.d.ts +3 -0
- package/bin/retailOrg/dtos/responses/ActivateRetailerIntegrationResponse.js +2 -0
- package/bin/retailOrg/dtos/validation/RetailerValidationDto.d.ts +4 -0
- package/bin/retailOrg/enums/RetailIntegrationSystemEnum.d.ts +4 -0
- package/bin/retailOrg/enums/RetailIntegrationSystemEnum.js +8 -0
- package/bin/retailOrg/index.d.ts +3 -0
- package/bin/retailOrg/index.js +3 -0
- package/bin/retailWizard/dtos/Sale.d.ts +25 -0
- package/bin/retailWizard/dtos/WizardReservedLine.d.ts +3 -0
- package/bin/retailWizard/dtos/WizardSession.d.ts +3 -0
- package/bin/retailWizard/dtos/responses/BackofficeCustomerTableResponse.d.ts +18 -5
- package/bin/retailWizard/enums/CentralCancelStatusEnum.d.ts +18 -0
- package/bin/retailWizard/enums/CentralCancelStatusEnum.js +22 -0
- package/bin/retailWizard/enums/CentralLiveCheckEnum.d.ts +10 -0
- package/bin/retailWizard/enums/CentralLiveCheckEnum.js +14 -0
- package/bin/retailWizard/enums/CentralSyncStatusEnum.d.ts +8 -2
- package/bin/retailWizard/enums/CentralSyncStatusEnum.js +7 -1
- package/bin/retailWizard/enums/RetailCentralOutboundMessageTypeEnum.d.ts +5 -0
- package/bin/retailWizard/enums/RetailCentralOutboundMessageTypeEnum.js +9 -0
- package/bin/retailWizard/enums/WizardLineStatusEnum.d.ts +3 -1
- package/bin/retailWizard/enums/WizardLineStatusEnum.js +2 -0
- package/bin/retailWizard/events/RetailCentralOutboundMessage.d.ts +9 -0
- package/bin/retailWizard/events/RetailCentralOutboundMessage.js +42 -0
- package/bin/retailWizard/index.d.ts +4 -0
- package/bin/retailWizard/index.js +4 -0
- package/package.json +1 -1
- package/src/platformRbac/dtos/UpdateLevelEntityRequest.ts +3 -1
- package/src/retailCatalog/dtos/requests/ReturnStockRequest.ts +6 -1
- package/src/retailCatalog/dtos/requests/SellInventoryRequest.ts +19 -0
- package/src/retailCatalog/dtos/requests/SellStockRequest.ts +4 -4
- package/src/retailCatalog/enums/InventoryInboundMessageTypeEnum.ts +1 -0
- package/src/retailCatalog/enums/InventoryItemStatusEnum.ts +2 -0
- package/src/retailCatalog/events/InventoryCentralSaleAcceptedMessage.ts +36 -0
- package/src/retailCatalog/events/InventoryInboundMessage.ts +5 -1
- package/src/retailCatalog/events/InventorySaleAppliedMessage.ts +1 -7
- package/src/retailCatalog/index.ts +2 -0
- package/src/retailCustomer/dtos/requests/UpsertCustomerFromKycRequest.ts +6 -0
- package/src/retailIntegration/constants/retailIntegrationErrorHttpStatus.ts +17 -0
- package/src/retailIntegration/constants/retailIntegrationLimits.ts +3 -0
- package/src/retailIntegration/dtos/CancelRetailSaleRequest.ts +9 -0
- package/src/retailIntegration/dtos/CheckRetailInventoryRequest.ts +20 -0
- package/src/retailIntegration/dtos/GetReconciliationResponses.ts +37 -0
- package/src/retailIntegration/dtos/GetRetailInventoryRequest.ts +2 -2
- package/src/retailIntegration/dtos/ReconciliationPageMessage.ts +32 -0
- package/src/retailIntegration/dtos/ReconciliationRunCounts.ts +9 -0
- package/src/retailIntegration/dtos/RetailListQuery.ts +10 -0
- package/src/retailIntegration/dtos/RetailOutboundResponses.ts +11 -0
- package/src/retailIntegration/dtos/RetailPagedQuery.ts +2 -2
- package/src/retailIntegration/dtos/RetailTenantQuery.ts +5 -1
- package/src/retailIntegration/dtos/StartCatalogReconciliationRequest.ts +19 -0
- package/src/retailIntegration/dtos/StartOrgReconciliationRequest.ts +13 -0
- package/src/retailIntegration/enums/InactiveReasonEnum.ts +5 -0
- package/src/retailIntegration/enums/ReconciliationEntityEnum.ts +7 -0
- package/src/retailIntegration/enums/ReconciliationRunStatusEnum.ts +7 -0
- package/src/retailIntegration/enums/ReconciliationTriggerEnum.ts +6 -0
- package/src/retailIntegration/enums/RetailEventRejectCodeEnum.ts +2 -0
- package/src/retailIntegration/enums/RetailIntegrationErrorCodeEnum.ts +23 -0
- package/src/retailIntegration/enums/RetailSaleLineRoleEnum.ts +4 -0
- package/src/retailIntegration/enums/index.ts +6 -0
- package/src/retailIntegration/index.ts +9 -0
- package/src/retailIntegration/models/RetailSystemSale.ts +45 -37
- package/src/retailOrg/dtos/Retailer.ts +19 -1
- package/src/retailOrg/dtos/requests/ActivateRetailerIntegrationRequest.ts +10 -0
- package/src/retailOrg/dtos/responses/ActivateRetailerIntegrationResponse.ts +5 -0
- package/src/retailOrg/dtos/validation/RetailerValidationDto.ts +4 -0
- package/src/retailOrg/enums/RetailIntegrationSystemEnum.ts +4 -0
- package/src/retailOrg/index.ts +3 -0
- package/src/retailWizard/dtos/Sale.ts +25 -0
- package/src/retailWizard/dtos/WizardReservedLine.ts +3 -0
- package/src/retailWizard/dtos/WizardSession.ts +3 -0
- package/src/retailWizard/dtos/responses/BackofficeCustomerTableResponse.ts +19 -5
- package/src/retailWizard/enums/CentralCancelStatusEnum.ts +18 -0
- package/src/retailWizard/enums/CentralLiveCheckEnum.ts +10 -0
- package/src/retailWizard/enums/CentralSyncStatusEnum.ts +7 -1
- package/src/retailWizard/enums/RetailCentralOutboundMessageTypeEnum.ts +5 -0
- package/src/retailWizard/enums/WizardLineStatusEnum.ts +2 -0
- package/src/retailWizard/events/RetailCentralOutboundMessage.ts +24 -0
- package/src/retailWizard/index.ts +4 -0
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export * from './constants/retailIntegrationLimits';
|
|
2
|
+
export * from './constants/retailIntegrationErrorHttpStatus';
|
|
2
3
|
export * from './enums';
|
|
3
4
|
export * from './validators/IsIsoDateTimeWithZone';
|
|
4
5
|
export * from './dtos/RetailEventEnvelope';
|
|
@@ -15,12 +16,15 @@ export * from './dtos/RetailUserEventPayload';
|
|
|
15
16
|
export * from './dtos/ProductEventPayload';
|
|
16
17
|
export * from './dtos/InventoryEventPayload';
|
|
17
18
|
export * from './dtos/RetailTenantQuery';
|
|
19
|
+
export * from './dtos/RetailListQuery';
|
|
18
20
|
export * from './dtos/RetailPagedQuery';
|
|
19
21
|
export * from './dtos/ListRetailStoresRequest';
|
|
20
22
|
export * from './dtos/ListRetailCatalogRequest';
|
|
21
23
|
export * from './dtos/GetRetailInventoryRequest';
|
|
22
24
|
export * from './dtos/ListRetailUsersRequest';
|
|
23
25
|
export * from './dtos/RegisterRetailSaleRequest';
|
|
26
|
+
export * from './dtos/CancelRetailSaleRequest';
|
|
27
|
+
export * from './dtos/CheckRetailInventoryRequest';
|
|
24
28
|
export * from './dtos/RetailOutboundResponses';
|
|
25
29
|
export * from './models/RetailPageMeta';
|
|
26
30
|
export * from './models/RetailSystemStore';
|
|
@@ -28,3 +32,8 @@ export * from './models/RetailSystemProduct';
|
|
|
28
32
|
export * from './models/RetailSystemInventory';
|
|
29
33
|
export * from './models/RetailSystemUser';
|
|
30
34
|
export * from './models/RetailSystemSale';
|
|
35
|
+
export * from './dtos/StartOrgReconciliationRequest';
|
|
36
|
+
export * from './dtos/StartCatalogReconciliationRequest';
|
|
37
|
+
export * from './dtos/ReconciliationRunCounts';
|
|
38
|
+
export * from './dtos/GetReconciliationResponses';
|
|
39
|
+
export * from './dtos/ReconciliationPageMessage';
|
|
@@ -15,6 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./constants/retailIntegrationLimits"), exports);
|
|
18
|
+
__exportStar(require("./constants/retailIntegrationErrorHttpStatus"), exports);
|
|
18
19
|
__exportStar(require("./enums"), exports);
|
|
19
20
|
__exportStar(require("./validators/IsIsoDateTimeWithZone"), exports);
|
|
20
21
|
__exportStar(require("./dtos/RetailEventEnvelope"), exports);
|
|
@@ -31,12 +32,15 @@ __exportStar(require("./dtos/RetailUserEventPayload"), exports);
|
|
|
31
32
|
__exportStar(require("./dtos/ProductEventPayload"), exports);
|
|
32
33
|
__exportStar(require("./dtos/InventoryEventPayload"), exports);
|
|
33
34
|
__exportStar(require("./dtos/RetailTenantQuery"), exports);
|
|
35
|
+
__exportStar(require("./dtos/RetailListQuery"), exports);
|
|
34
36
|
__exportStar(require("./dtos/RetailPagedQuery"), exports);
|
|
35
37
|
__exportStar(require("./dtos/ListRetailStoresRequest"), exports);
|
|
36
38
|
__exportStar(require("./dtos/ListRetailCatalogRequest"), exports);
|
|
37
39
|
__exportStar(require("./dtos/GetRetailInventoryRequest"), exports);
|
|
38
40
|
__exportStar(require("./dtos/ListRetailUsersRequest"), exports);
|
|
39
41
|
__exportStar(require("./dtos/RegisterRetailSaleRequest"), exports);
|
|
42
|
+
__exportStar(require("./dtos/CancelRetailSaleRequest"), exports);
|
|
43
|
+
__exportStar(require("./dtos/CheckRetailInventoryRequest"), exports);
|
|
40
44
|
__exportStar(require("./dtos/RetailOutboundResponses"), exports);
|
|
41
45
|
__exportStar(require("./models/RetailPageMeta"), exports);
|
|
42
46
|
__exportStar(require("./models/RetailSystemStore"), exports);
|
|
@@ -44,3 +48,8 @@ __exportStar(require("./models/RetailSystemProduct"), exports);
|
|
|
44
48
|
__exportStar(require("./models/RetailSystemInventory"), exports);
|
|
45
49
|
__exportStar(require("./models/RetailSystemUser"), exports);
|
|
46
50
|
__exportStar(require("./models/RetailSystemSale"), exports);
|
|
51
|
+
__exportStar(require("./dtos/StartOrgReconciliationRequest"), exports);
|
|
52
|
+
__exportStar(require("./dtos/StartCatalogReconciliationRequest"), exports);
|
|
53
|
+
__exportStar(require("./dtos/ReconciliationRunCounts"), exports);
|
|
54
|
+
__exportStar(require("./dtos/GetReconciliationResponses"), exports);
|
|
55
|
+
__exportStar(require("./dtos/ReconciliationPageMessage"), exports);
|
|
@@ -1,22 +1,23 @@
|
|
|
1
|
-
import { RetailLinePaymentTypeEnum, RetailPaymentMethodEnum, RetailSaleFinancierEnum, RetailSaleTypeEnum } from '../enums';
|
|
1
|
+
import { RetailLinePaymentTypeEnum, RetailPaymentMethodEnum, RetailSaleFinancierEnum, RetailSaleLineRoleEnum, RetailSaleTypeEnum } from '../enums';
|
|
2
2
|
import { RetailCurrency } from './RetailSystemProduct';
|
|
3
3
|
export type RetailSaleType = `${RetailSaleTypeEnum}`;
|
|
4
4
|
export type RetailSaleFinancier = `${RetailSaleFinancierEnum}`;
|
|
5
5
|
export type RetailPaymentMethod = `${RetailPaymentMethodEnum}`;
|
|
6
6
|
export type RetailLinePaymentType = `${RetailLinePaymentTypeEnum}`;
|
|
7
|
-
export
|
|
7
|
+
export type RetailSaleLineRole = `${RetailSaleLineRoleEnum}`;
|
|
8
|
+
export declare class RetailSystemSaleCustomer {
|
|
8
9
|
customerId: string;
|
|
9
10
|
names: string;
|
|
10
11
|
paternalLastName: string;
|
|
11
12
|
maternalLastName: string | null;
|
|
12
13
|
phone: string;
|
|
13
14
|
}
|
|
14
|
-
export
|
|
15
|
+
export declare class RetailSystemSaleComponent {
|
|
15
16
|
sku: string;
|
|
16
17
|
qty: number;
|
|
17
18
|
identifiers: string[];
|
|
18
19
|
}
|
|
19
|
-
export
|
|
20
|
+
export declare class RetailSystemSaleLine {
|
|
20
21
|
lineId: string;
|
|
21
22
|
sku: string;
|
|
22
23
|
qty: number;
|
|
@@ -24,11 +25,11 @@ export interface RetailSystemSaleLine {
|
|
|
24
25
|
discount: string;
|
|
25
26
|
paymentType: RetailLinePaymentType;
|
|
26
27
|
financedAmount: string;
|
|
27
|
-
role:
|
|
28
|
+
role: RetailSaleLineRole | null;
|
|
28
29
|
components: RetailSystemSaleComponent[];
|
|
29
30
|
}
|
|
30
|
-
/** Cuerpo de `POST /sales` de la doc
|
|
31
|
-
export
|
|
31
|
+
/** Cuerpo de `POST /sales` de la doc y de `privateRegisterRetailSale`; `saleId` es la llave de idempotencia. */
|
|
32
|
+
export declare class RetailSystemSale {
|
|
32
33
|
saleId: string;
|
|
33
34
|
folio: string;
|
|
34
35
|
storeId: string;
|
|
@@ -1,2 +1,188 @@
|
|
|
1
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
|
+
};
|
|
2
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.RetailSystemSale = exports.RetailSystemSaleLine = exports.RetailSystemSaleComponent = exports.RetailSystemSaleCustomer = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
const retailIntegrationLimits_1 = require("../constants/retailIntegrationLimits");
|
|
16
|
+
const enums_1 = require("../enums");
|
|
17
|
+
const IsIsoDateTimeWithZone_1 = require("../validators/IsIsoDateTimeWithZone");
|
|
18
|
+
const payloadValidators_1 = require("../validators/payloadValidators");
|
|
19
|
+
class RetailSystemSaleCustomer {
|
|
20
|
+
}
|
|
21
|
+
exports.RetailSystemSaleCustomer = RetailSystemSaleCustomer;
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, class_validator_1.IsString)(),
|
|
24
|
+
(0, class_validator_1.Matches)(/\S/),
|
|
25
|
+
__metadata("design:type", String)
|
|
26
|
+
], RetailSystemSaleCustomer.prototype, "customerId", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, class_validator_1.IsString)(),
|
|
29
|
+
(0, class_validator_1.Matches)(/\S/),
|
|
30
|
+
__metadata("design:type", String)
|
|
31
|
+
], RetailSystemSaleCustomer.prototype, "names", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, class_validator_1.IsString)(),
|
|
34
|
+
(0, class_validator_1.Matches)(/\S/),
|
|
35
|
+
__metadata("design:type", String)
|
|
36
|
+
], RetailSystemSaleCustomer.prototype, "paternalLastName", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, class_validator_1.ValidateIf)(payloadValidators_1.isNullOrValidated),
|
|
39
|
+
(0, class_validator_1.IsString)(),
|
|
40
|
+
__metadata("design:type", String)
|
|
41
|
+
], RetailSystemSaleCustomer.prototype, "maternalLastName", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, class_validator_1.IsString)(),
|
|
44
|
+
(0, class_validator_1.Matches)(/\S/),
|
|
45
|
+
__metadata("design:type", String)
|
|
46
|
+
], RetailSystemSaleCustomer.prototype, "phone", void 0);
|
|
47
|
+
class RetailSystemSaleComponent {
|
|
48
|
+
}
|
|
49
|
+
exports.RetailSystemSaleComponent = RetailSystemSaleComponent;
|
|
50
|
+
__decorate([
|
|
51
|
+
(0, class_validator_1.IsString)(),
|
|
52
|
+
(0, class_validator_1.Matches)(retailIntegrationLimits_1.RETAIL_SKU_PATTERN),
|
|
53
|
+
__metadata("design:type", String)
|
|
54
|
+
], RetailSystemSaleComponent.prototype, "sku", void 0);
|
|
55
|
+
__decorate([
|
|
56
|
+
(0, class_validator_1.IsInt)(),
|
|
57
|
+
(0, class_validator_1.Min)(1),
|
|
58
|
+
__metadata("design:type", Number)
|
|
59
|
+
], RetailSystemSaleComponent.prototype, "qty", void 0);
|
|
60
|
+
__decorate([
|
|
61
|
+
(0, class_validator_1.IsArray)(),
|
|
62
|
+
(0, class_validator_1.IsString)({ each: true }),
|
|
63
|
+
(0, class_validator_1.Matches)(/\S/, { each: true }),
|
|
64
|
+
__metadata("design:type", Array)
|
|
65
|
+
], RetailSystemSaleComponent.prototype, "identifiers", void 0);
|
|
66
|
+
class RetailSystemSaleLine {
|
|
67
|
+
}
|
|
68
|
+
exports.RetailSystemSaleLine = RetailSystemSaleLine;
|
|
69
|
+
__decorate([
|
|
70
|
+
(0, class_validator_1.IsString)(),
|
|
71
|
+
(0, class_validator_1.Matches)(/\S/),
|
|
72
|
+
__metadata("design:type", String)
|
|
73
|
+
], RetailSystemSaleLine.prototype, "lineId", void 0);
|
|
74
|
+
__decorate([
|
|
75
|
+
(0, class_validator_1.IsString)(),
|
|
76
|
+
(0, class_validator_1.Matches)(retailIntegrationLimits_1.RETAIL_SKU_PATTERN),
|
|
77
|
+
__metadata("design:type", String)
|
|
78
|
+
], RetailSystemSaleLine.prototype, "sku", void 0);
|
|
79
|
+
__decorate([
|
|
80
|
+
(0, class_validator_1.IsInt)(),
|
|
81
|
+
(0, class_validator_1.Min)(1),
|
|
82
|
+
__metadata("design:type", Number)
|
|
83
|
+
], RetailSystemSaleLine.prototype, "qty", void 0);
|
|
84
|
+
__decorate([
|
|
85
|
+
(0, class_validator_1.IsString)(),
|
|
86
|
+
(0, class_validator_1.Matches)(retailIntegrationLimits_1.RETAIL_DECIMAL_PATTERN),
|
|
87
|
+
__metadata("design:type", String)
|
|
88
|
+
], RetailSystemSaleLine.prototype, "basePrice", void 0);
|
|
89
|
+
__decorate([
|
|
90
|
+
(0, class_validator_1.IsString)(),
|
|
91
|
+
(0, class_validator_1.Matches)(retailIntegrationLimits_1.RETAIL_DECIMAL_PATTERN),
|
|
92
|
+
__metadata("design:type", String)
|
|
93
|
+
], RetailSystemSaleLine.prototype, "discount", void 0);
|
|
94
|
+
__decorate([
|
|
95
|
+
(0, class_validator_1.IsIn)(Object.values(enums_1.RetailLinePaymentTypeEnum)),
|
|
96
|
+
__metadata("design:type", String)
|
|
97
|
+
], RetailSystemSaleLine.prototype, "paymentType", void 0);
|
|
98
|
+
__decorate([
|
|
99
|
+
(0, class_validator_1.IsString)(),
|
|
100
|
+
(0, class_validator_1.Matches)(retailIntegrationLimits_1.RETAIL_DECIMAL_PATTERN),
|
|
101
|
+
__metadata("design:type", String)
|
|
102
|
+
], RetailSystemSaleLine.prototype, "financedAmount", void 0);
|
|
103
|
+
__decorate([
|
|
104
|
+
(0, class_validator_1.ValidateIf)(payloadValidators_1.isNullOrValidated),
|
|
105
|
+
(0, class_validator_1.IsIn)(Object.values(enums_1.RetailSaleLineRoleEnum)),
|
|
106
|
+
__metadata("design:type", String)
|
|
107
|
+
], RetailSystemSaleLine.prototype, "role", void 0);
|
|
108
|
+
__decorate([
|
|
109
|
+
(0, class_validator_1.IsArray)(),
|
|
110
|
+
(0, class_validator_1.ValidateNested)({ each: true }),
|
|
111
|
+
(0, class_transformer_1.Type)(() => RetailSystemSaleComponent),
|
|
112
|
+
__metadata("design:type", Array)
|
|
113
|
+
], RetailSystemSaleLine.prototype, "components", void 0);
|
|
114
|
+
/** Cuerpo de `POST /sales` de la doc y de `privateRegisterRetailSale`; `saleId` es la llave de idempotencia. */
|
|
115
|
+
class RetailSystemSale {
|
|
116
|
+
}
|
|
117
|
+
exports.RetailSystemSale = RetailSystemSale;
|
|
118
|
+
__decorate([
|
|
119
|
+
(0, class_validator_1.IsString)(),
|
|
120
|
+
(0, class_validator_1.Matches)(/\S/),
|
|
121
|
+
__metadata("design:type", String)
|
|
122
|
+
], RetailSystemSale.prototype, "saleId", void 0);
|
|
123
|
+
__decorate([
|
|
124
|
+
(0, class_validator_1.IsString)(),
|
|
125
|
+
(0, class_validator_1.Matches)(/\S/),
|
|
126
|
+
__metadata("design:type", String)
|
|
127
|
+
], RetailSystemSale.prototype, "folio", void 0);
|
|
128
|
+
__decorate([
|
|
129
|
+
(0, class_validator_1.IsString)(),
|
|
130
|
+
(0, class_validator_1.Matches)(retailIntegrationLimits_1.RETAIL_ENTITY_ID_PATTERN),
|
|
131
|
+
__metadata("design:type", String)
|
|
132
|
+
], RetailSystemSale.prototype, "storeId", void 0);
|
|
133
|
+
__decorate([
|
|
134
|
+
(0, class_validator_1.IsString)(),
|
|
135
|
+
(0, class_validator_1.Matches)(retailIntegrationLimits_1.RETAIL_ENTITY_ID_PATTERN),
|
|
136
|
+
__metadata("design:type", String)
|
|
137
|
+
], RetailSystemSale.prototype, "sellerRetailUserId", void 0);
|
|
138
|
+
__decorate([
|
|
139
|
+
(0, class_validator_1.Validate)(IsIsoDateTimeWithZone_1.IsIsoDateTimeWithZone),
|
|
140
|
+
__metadata("design:type", String)
|
|
141
|
+
], RetailSystemSale.prototype, "soldAt", void 0);
|
|
142
|
+
__decorate([
|
|
143
|
+
(0, class_validator_1.IsIn)(Object.values(enums_1.RetailSaleTypeEnum)),
|
|
144
|
+
__metadata("design:type", String)
|
|
145
|
+
], RetailSystemSale.prototype, "saleType", void 0);
|
|
146
|
+
__decorate([
|
|
147
|
+
(0, class_validator_1.IsIn)(Object.values(enums_1.RetailSaleFinancierEnum)),
|
|
148
|
+
__metadata("design:type", String)
|
|
149
|
+
], RetailSystemSale.prototype, "financier", void 0);
|
|
150
|
+
__decorate([
|
|
151
|
+
(0, class_validator_1.ValidateIf)(payloadValidators_1.isNullOrValidated),
|
|
152
|
+
(0, class_validator_1.IsString)(),
|
|
153
|
+
(0, class_validator_1.Matches)(/\S/),
|
|
154
|
+
__metadata("design:type", String)
|
|
155
|
+
], RetailSystemSale.prototype, "creditId", void 0);
|
|
156
|
+
__decorate([
|
|
157
|
+
(0, class_validator_1.IsIn)(Object.values(enums_1.RetailCurrencyEnum)),
|
|
158
|
+
__metadata("design:type", String)
|
|
159
|
+
], RetailSystemSale.prototype, "currencyId", void 0);
|
|
160
|
+
__decorate([
|
|
161
|
+
(0, class_validator_1.IsObject)(),
|
|
162
|
+
(0, class_validator_1.ValidateNested)(),
|
|
163
|
+
(0, class_transformer_1.Type)(() => RetailSystemSaleCustomer),
|
|
164
|
+
__metadata("design:type", RetailSystemSaleCustomer)
|
|
165
|
+
], RetailSystemSale.prototype, "customer", void 0);
|
|
166
|
+
__decorate([
|
|
167
|
+
(0, class_validator_1.IsString)(),
|
|
168
|
+
(0, class_validator_1.Matches)(retailIntegrationLimits_1.RETAIL_DECIMAL_PATTERN),
|
|
169
|
+
__metadata("design:type", String)
|
|
170
|
+
], RetailSystemSale.prototype, "equipmentPrice", void 0);
|
|
171
|
+
__decorate([
|
|
172
|
+
(0, class_validator_1.IsString)(),
|
|
173
|
+
(0, class_validator_1.Matches)(retailIntegrationLimits_1.RETAIL_DECIMAL_PATTERN),
|
|
174
|
+
__metadata("design:type", String)
|
|
175
|
+
], RetailSystemSale.prototype, "amountPaid", void 0);
|
|
176
|
+
__decorate([
|
|
177
|
+
(0, class_validator_1.ValidateIf)(payloadValidators_1.isNullOrValidated),
|
|
178
|
+
(0, class_validator_1.IsIn)(Object.values(enums_1.RetailPaymentMethodEnum)),
|
|
179
|
+
__metadata("design:type", String)
|
|
180
|
+
], RetailSystemSale.prototype, "paymentMethod", void 0);
|
|
181
|
+
__decorate([
|
|
182
|
+
(0, class_validator_1.IsArray)(),
|
|
183
|
+
(0, class_validator_1.ArrayNotEmpty)(),
|
|
184
|
+
(0, class_validator_1.ValidateNested)({ each: true }),
|
|
185
|
+
(0, class_transformer_1.Type)(() => RetailSystemSaleLine),
|
|
186
|
+
(0, class_validator_1.Validate)(payloadValidators_1.HasUniqueKeys, ['lineId']),
|
|
187
|
+
__metadata("design:type", Array)
|
|
188
|
+
], RetailSystemSale.prototype, "lines", void 0);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { LocationAddress } from '../../address/dtos/LocationAddress';
|
|
2
2
|
import { RetailerStatusEnum } from '../enums/RetailerStatusEnum';
|
|
3
3
|
import { RetailerTypeEnum } from '../enums/RetailerTypeEnum';
|
|
4
|
+
import { RetailIntegrationSystemEnum } from '../enums/RetailIntegrationSystemEnum';
|
|
4
5
|
/**
|
|
5
6
|
* Retailer — nodo raíz de la organización comercial SureKeep (cadena / subdistribuidor / franquicia).
|
|
6
7
|
* Entidad completa del dominio retail-org-business (SureKeep Fase 1 — pista Retail).
|
|
@@ -27,4 +28,8 @@ export declare class Retailer {
|
|
|
27
28
|
updatedAt: string;
|
|
28
29
|
createdBy: string;
|
|
29
30
|
updatedBy: string;
|
|
31
|
+
/** Bandera «integrado»: presente solo si el retailer ya se activó con un sistema externo. */
|
|
32
|
+
integrationSystem?: RetailIntegrationSystemEnum;
|
|
33
|
+
integrationActivatedAt?: string;
|
|
34
|
+
integrationActivatedBy?: string;
|
|
30
35
|
}
|
|
@@ -16,6 +16,7 @@ const LocationAddress_1 = require("../../address/dtos/LocationAddress");
|
|
|
16
16
|
const regex_1 = require("../../helpers/constans/regex");
|
|
17
17
|
const RetailerStatusEnum_1 = require("../enums/RetailerStatusEnum");
|
|
18
18
|
const RetailerTypeEnum_1 = require("../enums/RetailerTypeEnum");
|
|
19
|
+
const RetailIntegrationSystemEnum_1 = require("../enums/RetailIntegrationSystemEnum");
|
|
19
20
|
/**
|
|
20
21
|
* Retailer — nodo raíz de la organización comercial SureKeep (cadena / subdistribuidor / franquicia).
|
|
21
22
|
* Entidad completa del dominio retail-org-business (SureKeep Fase 1 — pista Retail).
|
|
@@ -102,3 +103,22 @@ __decorate([
|
|
|
102
103
|
(0, class_validator_1.IsString)(),
|
|
103
104
|
__metadata("design:type", String)
|
|
104
105
|
], Retailer.prototype, "updatedBy", void 0);
|
|
106
|
+
__decorate([
|
|
107
|
+
(0, class_transformer_1.Expose)(),
|
|
108
|
+
(0, class_validator_1.IsOptional)(),
|
|
109
|
+
(0, class_validator_1.IsEnum)(RetailIntegrationSystemEnum_1.RetailIntegrationSystemEnum),
|
|
110
|
+
__metadata("design:type", String)
|
|
111
|
+
], Retailer.prototype, "integrationSystem", void 0);
|
|
112
|
+
__decorate([
|
|
113
|
+
(0, class_transformer_1.Expose)(),
|
|
114
|
+
(0, class_validator_1.IsOptional)(),
|
|
115
|
+
(0, class_validator_1.IsString)(),
|
|
116
|
+
(0, class_validator_1.Matches)(regex_1.regexIso8601, { message: 'integrationActivatedAt debe ser una fecha ISO 8601' }),
|
|
117
|
+
__metadata("design:type", String)
|
|
118
|
+
], Retailer.prototype, "integrationActivatedAt", void 0);
|
|
119
|
+
__decorate([
|
|
120
|
+
(0, class_transformer_1.Expose)(),
|
|
121
|
+
(0, class_validator_1.IsOptional)(),
|
|
122
|
+
(0, class_validator_1.IsString)(),
|
|
123
|
+
__metadata("design:type", String)
|
|
124
|
+
], Retailer.prototype, "integrationActivatedBy", void 0);
|
|
@@ -0,0 +1,24 @@
|
|
|
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.ActivateRetailerIntegrationRequest = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
const RetailIntegrationSystemEnum_1 = require("../../enums/RetailIntegrationSystemEnum");
|
|
16
|
+
/** Body de POST /retailers/:retailerId/integration/activate. */
|
|
17
|
+
class ActivateRetailerIntegrationRequest {
|
|
18
|
+
}
|
|
19
|
+
exports.ActivateRetailerIntegrationRequest = ActivateRetailerIntegrationRequest;
|
|
20
|
+
__decorate([
|
|
21
|
+
(0, class_transformer_1.Expose)(),
|
|
22
|
+
(0, class_validator_1.IsEnum)(RetailIntegrationSystemEnum_1.RetailIntegrationSystemEnum),
|
|
23
|
+
__metadata("design:type", String)
|
|
24
|
+
], ActivateRetailerIntegrationRequest.prototype, "integrationSystem", void 0);
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { Retailer } from '../Retailer';
|
|
2
|
+
/** Respuesta de POST /retailers/:retailerId/integration/activate: el Retailer con la bandera ya sellada. */
|
|
3
|
+
export type ActivateRetailerIntegrationResponse = Retailer & Required<Pick<Retailer, 'integrationSystem' | 'integrationActivatedAt' | 'integrationActivatedBy'>>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { RetailerStatusEnum } from '../../enums/RetailerStatusEnum';
|
|
2
2
|
import type { RetailerTypeEnum } from '../../enums/RetailerTypeEnum';
|
|
3
|
+
import type { RetailIntegrationSystemEnum } from '../../enums/RetailIntegrationSystemEnum';
|
|
3
4
|
/**
|
|
4
5
|
* Shape mínimo que devuelve el endpoint privado de validación de retailer (consumido por otros
|
|
5
6
|
* lambdas F1 vía @fiado/api-invoker). NO expone el registro completo: solo lo necesario para
|
|
@@ -11,4 +12,7 @@ export interface RetailerValidationDto {
|
|
|
11
12
|
type: RetailerTypeEnum;
|
|
12
13
|
status: RetailerStatusEnum;
|
|
13
14
|
parentId: string;
|
|
15
|
+
/** Bandera «integrado»; ausente si el retailer no está integrado. */
|
|
16
|
+
integrationSystem?: RetailIntegrationSystemEnum;
|
|
17
|
+
integrationActivatedAt?: string;
|
|
14
18
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RetailIntegrationSystemEnum = void 0;
|
|
4
|
+
/** Sistema externo que administra la organización de un retailer integrado. */
|
|
5
|
+
var RetailIntegrationSystemEnum;
|
|
6
|
+
(function (RetailIntegrationSystemEnum) {
|
|
7
|
+
RetailIntegrationSystemEnum["ZENTRAL"] = "ZENTRAL";
|
|
8
|
+
})(RetailIntegrationSystemEnum || (exports.RetailIntegrationSystemEnum = RetailIntegrationSystemEnum = {}));
|
package/bin/retailOrg/index.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ export * from './enums/RetailUserStatusEnum';
|
|
|
6
6
|
export * from './enums/EmploymentTypeEnum';
|
|
7
7
|
export * from './enums/CollectorSeniorityEnum';
|
|
8
8
|
export * from './enums/RetailUserWalletLinkMethodEnum';
|
|
9
|
+
export * from './enums/RetailIntegrationSystemEnum';
|
|
9
10
|
export * from './enums/GoalTargetTypeEnum';
|
|
10
11
|
export * from './dtos/GeoLocation';
|
|
11
12
|
export * from './dtos/GoalAmounts';
|
|
@@ -44,6 +45,7 @@ export * from './dtos/requests/GoalPathParams';
|
|
|
44
45
|
export * from './dtos/requests/PrivateGoalListQuery';
|
|
45
46
|
export * from './dtos/requests/KpiQuery';
|
|
46
47
|
export * from './dtos/requests/PrivateSellerListQuery';
|
|
48
|
+
export * from './dtos/requests/ActivateRetailerIntegrationRequest';
|
|
47
49
|
export * from './dtos/responses/RetailerHierarchyResponse';
|
|
48
50
|
export * from './dtos/responses/GoalListResponse';
|
|
49
51
|
export * from './dtos/responses/GoalUpsertResponse';
|
|
@@ -52,3 +54,4 @@ export * from './dtos/responses/StoreKpiResponse';
|
|
|
52
54
|
export * from './dtos/responses/SellerKpiResponse';
|
|
53
55
|
export * from './dtos/responses/LookupRetailUserWalletResponse';
|
|
54
56
|
export * from './dtos/responses/PrivateRetailUserWalletResponse';
|
|
57
|
+
export * from './dtos/responses/ActivateRetailerIntegrationResponse';
|
package/bin/retailOrg/index.js
CHANGED
|
@@ -22,6 +22,7 @@ __exportStar(require("./enums/RetailUserStatusEnum"), exports);
|
|
|
22
22
|
__exportStar(require("./enums/EmploymentTypeEnum"), exports);
|
|
23
23
|
__exportStar(require("./enums/CollectorSeniorityEnum"), exports);
|
|
24
24
|
__exportStar(require("./enums/RetailUserWalletLinkMethodEnum"), exports);
|
|
25
|
+
__exportStar(require("./enums/RetailIntegrationSystemEnum"), exports);
|
|
25
26
|
// F3 — Portal Admin VentasLuga (metas de venta del periodo)
|
|
26
27
|
__exportStar(require("./enums/GoalTargetTypeEnum"), exports);
|
|
27
28
|
// Entity DTOs
|
|
@@ -67,6 +68,7 @@ __exportStar(require("./dtos/requests/GoalPathParams"), exports);
|
|
|
67
68
|
__exportStar(require("./dtos/requests/PrivateGoalListQuery"), exports);
|
|
68
69
|
__exportStar(require("./dtos/requests/KpiQuery"), exports);
|
|
69
70
|
__exportStar(require("./dtos/requests/PrivateSellerListQuery"), exports);
|
|
71
|
+
__exportStar(require("./dtos/requests/ActivateRetailerIntegrationRequest"), exports);
|
|
70
72
|
// Response DTOs
|
|
71
73
|
__exportStar(require("./dtos/responses/RetailerHierarchyResponse"), exports);
|
|
72
74
|
__exportStar(require("./dtos/responses/GoalListResponse"), exports);
|
|
@@ -76,3 +78,4 @@ __exportStar(require("./dtos/responses/StoreKpiResponse"), exports);
|
|
|
76
78
|
__exportStar(require("./dtos/responses/SellerKpiResponse"), exports);
|
|
77
79
|
__exportStar(require("./dtos/responses/LookupRetailUserWalletResponse"), exports);
|
|
78
80
|
__exportStar(require("./dtos/responses/PrivateRetailUserWalletResponse"), exports);
|
|
81
|
+
__exportStar(require("./dtos/responses/ActivateRetailerIntegrationResponse"), exports);
|
|
@@ -4,6 +4,8 @@ import type { SalePaymentMethodEnum } from '../enums/SalePaymentMethodEnum';
|
|
|
4
4
|
import type { SaleChannelEnum } from '../enums/SaleChannelEnum';
|
|
5
5
|
import type { ExternalProviderEnum } from '../enums/ExternalProviderEnum';
|
|
6
6
|
import type { CentralSyncStatusEnum } from '../enums/CentralSyncStatusEnum';
|
|
7
|
+
import type { CentralCancelStatusEnum } from '../enums/CentralCancelStatusEnum';
|
|
8
|
+
import type { CentralLiveCheckEnum } from '../enums/CentralLiveCheckEnum';
|
|
7
9
|
import type { SalePaymentDetail } from './SalePaymentDetail';
|
|
8
10
|
import type { SaleLine } from './SaleLine';
|
|
9
11
|
import type { SalePromotionRef } from '../../retailPromotions/dtos/SalePromotionRef';
|
|
@@ -63,6 +65,29 @@ export interface Sale {
|
|
|
63
65
|
cardDeliveryId: string | null;
|
|
64
66
|
centralSyncStatus: CentralSyncStatusEnum;
|
|
65
67
|
centralTag: string | null;
|
|
68
|
+
/** Estado de la cancelación en Central; ausente si la venta no se ha cancelado. */
|
|
69
|
+
centralCancelStatus?: CentralCancelStatusEnum;
|
|
70
|
+
/** ISO; primer intento de envío, se sella una sola vez. */
|
|
71
|
+
centralFirstAttemptAt?: string;
|
|
72
|
+
/** ISO; inicio de la ventana de 24 h de reintentos, el reenvío la reinicia. */
|
|
73
|
+
centralRetryWindowStartAt?: string;
|
|
74
|
+
/** ISO; último intento de envío. */
|
|
75
|
+
centralLastAttemptAt?: string;
|
|
76
|
+
/** ISO; hasta cuándo el consumidor tiene tomada la venta. */
|
|
77
|
+
centralLeaseUntil?: string;
|
|
78
|
+
centralAttempts?: number;
|
|
79
|
+
/** Code del rechazo o del último error de Central. */
|
|
80
|
+
centralLastErrorCode?: string;
|
|
81
|
+
/** ISO; cuándo Central aceptó la venta. */
|
|
82
|
+
centralAcceptedAt?: string;
|
|
83
|
+
/** ISO; primer intento de la cancelación, se sella una sola vez. */
|
|
84
|
+
centralCancelFirstAttemptAt?: string;
|
|
85
|
+
/** ISO; inicio de la ventana de 24 h de la cancelación, el reenvío la reinicia. */
|
|
86
|
+
centralCancelRetryWindowStartAt?: string;
|
|
87
|
+
/** ISO; cuándo Central aceptó la cancelación. */
|
|
88
|
+
centralCancelAcceptedAt?: string;
|
|
89
|
+
/** Resultado de la consulta en vivo, copiado de la sesión al cerrar. */
|
|
90
|
+
centralLiveCheck?: CentralLiveCheckEnum;
|
|
66
91
|
status: SaleStatusEnum;
|
|
67
92
|
cancelledAt: string | null;
|
|
68
93
|
/** Reason OBLIGATORIO en cancelación (AuditTrail) — flujo C. */
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { InventoryItemStatusEnum } from '../../retailCatalog/enums/InventoryItemStatusEnum';
|
|
1
2
|
import type { MdmProviderEnum } from '../../retailCatalog/enums/MdmProviderEnum';
|
|
2
3
|
import type { ReservedComponent } from '../../retailCatalog/dtos/responses/ReserveStockResponse';
|
|
3
4
|
import type { LinePaymentTypeEnum } from '../enums/LinePaymentTypeEnum';
|
|
@@ -11,6 +12,8 @@ export interface WizardReservedLine extends WizardLinePromotionFields {
|
|
|
11
12
|
sku: string;
|
|
12
13
|
qty: number;
|
|
13
14
|
status: WizardLineStatusEnum;
|
|
15
|
+
/** Solo en LOST: estado en que Central dejó la pieza (SOLD, IN_TRANSIT o DAMAGED). */
|
|
16
|
+
lostReason?: InventoryItemStatusEnum;
|
|
14
17
|
/** Llave de idempotencia de la reserva; una nueva por cada intento. */
|
|
15
18
|
reservationId: string;
|
|
16
19
|
/** Vencimiento de la reserva; una línea PENDING nace con ahora + 30 min. */
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { SalePromotionRef } from '../../retailPromotions/dtos/SalePromotionRef';
|
|
2
|
+
import type { CentralLiveCheckEnum } from '../enums/CentralLiveCheckEnum';
|
|
2
3
|
import type { WizardStateEnum } from '../enums/WizardStateEnum';
|
|
3
4
|
import type { WizardStepEnum } from '../enums/WizardStepEnum';
|
|
4
5
|
import type { FiadoPhoneStatusEnum } from '../enums/FiadoPhoneStatusEnum';
|
|
@@ -148,6 +149,8 @@ export interface WizardSession {
|
|
|
148
149
|
/** Contexto de crédito (pista SOFOM, pasos 04-09): PUNTEROS al dominio loan-*. Null en contado/externa. */
|
|
149
150
|
loan: WizardLoan | null;
|
|
150
151
|
saleId: string | null;
|
|
152
|
+
/** Resultado de la consulta en vivo a Central; la TX de cierre lo copia a la venta. */
|
|
153
|
+
centralLiveCheck?: CentralLiveCheckEnum;
|
|
151
154
|
/** Prospecto vinculado (si la sesión se reanudó desde un prospecto): se cierra al cerrar la venta (D-prospecto). */
|
|
152
155
|
prospectId: string | null;
|
|
153
156
|
cancelReason: string | null;
|
|
@@ -1,16 +1,23 @@
|
|
|
1
1
|
import type { ClientLevelEnum } from '../../../loanScoring/enums/ClientLevelEnum';
|
|
2
2
|
import type { SellerTableSourceStatusEnum } from '../../enums/SellerTableSourceStatusEnum';
|
|
3
|
-
/**
|
|
3
|
+
/**
|
|
4
|
+
* Una fila de la tabla de Clientes: un cliente del padrón de la cadena con sus compras en la ventana
|
|
5
|
+
* (sin canceladas) y su crédito SK. `accountOnly` = abrió cuenta y no tiene ninguna compra en la cadena.
|
|
6
|
+
*/
|
|
4
7
|
export interface CustomerTableRow {
|
|
5
8
|
retailCustomerId: string;
|
|
9
|
+
accountOnly: boolean;
|
|
10
|
+
/** Tienda donde se dio de alta; `null` si el padrón no la tiene. */
|
|
11
|
+
originStoreId: string | null;
|
|
6
12
|
name: string | null;
|
|
7
13
|
phone: string | null;
|
|
8
14
|
purchaseCount: number;
|
|
9
15
|
/** Precio de lo comprado (en crédito, el precio del equipo, no el enganche). */
|
|
10
16
|
totalSpentCents: number;
|
|
11
17
|
averageTicketCents: number | null;
|
|
12
|
-
|
|
13
|
-
|
|
18
|
+
/** `null` en un cliente «solo cuenta». */
|
|
19
|
+
firstPurchaseAt: string | null;
|
|
20
|
+
lastPurchaseAt: string | null;
|
|
14
21
|
lastStoreName: string | null;
|
|
15
22
|
/** Tienda con más compras; en empate, la de la compra más reciente. */
|
|
16
23
|
favoriteStoreId: string | null;
|
|
@@ -25,14 +32,20 @@ export interface CustomerTableSources {
|
|
|
25
32
|
sales: SellerTableSourceStatusEnum.OK;
|
|
26
33
|
credit: SellerTableSourceStatusEnum;
|
|
27
34
|
}
|
|
35
|
+
/** Clientes del padrón leídos en la página, antes del filtro `customerType`; el front los suma por página. */
|
|
36
|
+
export interface CustomerTableCounts {
|
|
37
|
+
withSales: number;
|
|
38
|
+
accountOnly: number;
|
|
39
|
+
}
|
|
28
40
|
/**
|
|
29
|
-
* `GET /backoffice/customers/table?from&to&limit&nextToken&storeId&sellerId&value` — tabla
|
|
30
|
-
* del Portal Admin VL, paginada por
|
|
41
|
+
* `GET /backoffice/customers/table?from&to&limit&nextToken&storeId&sellerId&customerType&value` — tabla
|
|
42
|
+
* de Clientes del Portal Admin VL, paginada sobre el padrón por alta descendente. `from` en `null` es «Todo».
|
|
31
43
|
*/
|
|
32
44
|
export interface BackofficeCustomerTableResponse {
|
|
33
45
|
from: string | null;
|
|
34
46
|
to: string;
|
|
35
47
|
nextToken: string | null;
|
|
36
48
|
sources: CustomerTableSources;
|
|
49
|
+
counts: CustomerTableCounts;
|
|
37
50
|
items: CustomerTableRow[];
|
|
38
51
|
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Estado de la cancelación de la venta en Central.
|
|
3
|
+
*
|
|
4
|
+
* PENDING - Por enviar o en reintento.
|
|
5
|
+
* SENDING - Tomada por el consumidor, envío en curso.
|
|
6
|
+
* ACCEPTED - Central aceptó la cancelación.
|
|
7
|
+
* REJECTED - Central rechazó la cancelación.
|
|
8
|
+
* FAILED - Se agotó la ventana de reintentos.
|
|
9
|
+
* NOT_SENT - No se envía: la venta nunca quedó en Central.
|
|
10
|
+
*/
|
|
11
|
+
export declare enum CentralCancelStatusEnum {
|
|
12
|
+
PENDING = "PENDING",
|
|
13
|
+
SENDING = "SENDING",
|
|
14
|
+
ACCEPTED = "ACCEPTED",
|
|
15
|
+
REJECTED = "REJECTED",
|
|
16
|
+
FAILED = "FAILED",
|
|
17
|
+
NOT_SENT = "NOT_SENT"
|
|
18
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CentralCancelStatusEnum = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Estado de la cancelación de la venta en Central.
|
|
6
|
+
*
|
|
7
|
+
* PENDING - Por enviar o en reintento.
|
|
8
|
+
* SENDING - Tomada por el consumidor, envío en curso.
|
|
9
|
+
* ACCEPTED - Central aceptó la cancelación.
|
|
10
|
+
* REJECTED - Central rechazó la cancelación.
|
|
11
|
+
* FAILED - Se agotó la ventana de reintentos.
|
|
12
|
+
* NOT_SENT - No se envía: la venta nunca quedó en Central.
|
|
13
|
+
*/
|
|
14
|
+
var CentralCancelStatusEnum;
|
|
15
|
+
(function (CentralCancelStatusEnum) {
|
|
16
|
+
CentralCancelStatusEnum["PENDING"] = "PENDING";
|
|
17
|
+
CentralCancelStatusEnum["SENDING"] = "SENDING";
|
|
18
|
+
CentralCancelStatusEnum["ACCEPTED"] = "ACCEPTED";
|
|
19
|
+
CentralCancelStatusEnum["REJECTED"] = "REJECTED";
|
|
20
|
+
CentralCancelStatusEnum["FAILED"] = "FAILED";
|
|
21
|
+
CentralCancelStatusEnum["NOT_SENT"] = "NOT_SENT";
|
|
22
|
+
})(CentralCancelStatusEnum || (exports.CentralCancelStatusEnum = CentralCancelStatusEnum = {}));
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Resultado de la consulta en vivo a Central antes de cerrar la venta.
|
|
3
|
+
*
|
|
4
|
+
* VERIFIED - Central confirmó la pieza a tiempo.
|
|
5
|
+
* UNVERIFIED - Central no contestó a tiempo; la venta sigue igual.
|
|
6
|
+
*/
|
|
7
|
+
export declare enum CentralLiveCheckEnum {
|
|
8
|
+
VERIFIED = "VERIFIED",
|
|
9
|
+
UNVERIFIED = "UNVERIFIED"
|
|
10
|
+
}
|