@fiado/type-kit 3.495.0 → 3.496.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/loanCredit/dtos/createSellerPaymentRequest.test.ts +63 -0
- package/_test_/unit/loanCredit/inStorePaymentDtos.test.ts +141 -0
- package/_test_/unit/retailIntegration/applyRetailEventRequest.test.ts +43 -0
- package/_test_/unit/retailIntegration/isIsoDateTimeWithZone.test.ts +85 -0
- package/_test_/unit/retailIntegration/receiveRetailEventRequest.test.ts +93 -0
- package/_test_/unit/retailIntegration/retailOutboundRequests.test.ts +69 -0
- package/_test_/unit/retailIntegration/retailSystemEnums.test.ts +42 -0
- package/bin/index.d.ts +1 -0
- package/bin/index.js +3 -1
- package/bin/loanCredit/dtos/requests/CreateSellerPaymentRequest.d.ts +15 -0
- package/bin/loanCredit/dtos/requests/CreateSellerPaymentRequest.js +56 -0
- package/bin/loanCredit/dtos/requests/InStorePaymentDetail.d.ts +12 -0
- package/bin/loanCredit/dtos/requests/InStorePaymentDetail.js +40 -0
- package/bin/loanCredit/dtos/responses/CreditCustomerListItem.d.ts +46 -0
- package/bin/loanCredit/dtos/responses/CreditCustomerListItem.js +2 -0
- package/bin/loanCredit/dtos/responses/InStorePaymentListItem.d.ts +19 -0
- package/bin/loanCredit/dtos/responses/InStorePaymentListItem.js +2 -0
- package/bin/loanCredit/dtos/responses/LoanPaymentListItem.d.ts +14 -1
- package/bin/loanCredit/dtos/responses/SellerCreditLookupResult.d.ts +10 -0
- package/bin/loanCredit/dtos/responses/SellerCreditLookupResult.js +2 -0
- package/bin/loanCredit/dtos/responses/SellerPaymentOptions.d.ts +36 -0
- package/bin/loanCredit/dtos/responses/SellerPaymentOptions.js +2 -0
- package/bin/loanCredit/dtos/responses/SellerPaymentResult.d.ts +39 -0
- package/bin/loanCredit/dtos/responses/SellerPaymentResult.js +2 -0
- package/bin/loanCredit/enums/CreditCustomerStateEnum.d.ts +6 -0
- package/bin/loanCredit/enums/CreditCustomerStateEnum.js +10 -0
- package/bin/loanCredit/enums/InStorePaymentMethodEnum.d.ts +6 -0
- package/bin/loanCredit/enums/InStorePaymentMethodEnum.js +10 -0
- package/bin/loanCredit/enums/LoanPaymentOriginEnum.d.ts +5 -0
- package/bin/loanCredit/enums/LoanPaymentOriginEnum.js +9 -0
- package/bin/loanCredit/index.d.ts +10 -0
- package/bin/loanCredit/index.js +11 -0
- package/bin/retailIntegration/constants/retailIntegrationLimits.d.ts +7 -0
- package/bin/retailIntegration/constants/retailIntegrationLimits.js +10 -0
- package/bin/retailIntegration/dtos/ApplyRetailEventRequest.d.ts +29 -0
- package/bin/retailIntegration/dtos/ApplyRetailEventRequest.js +54 -0
- package/bin/retailIntegration/dtos/GetRetailInventoryRequest.d.ts +5 -0
- package/bin/retailIntegration/dtos/GetRetailInventoryRequest.js +23 -0
- package/bin/retailIntegration/dtos/ListRetailCatalogRequest.d.ts +4 -0
- package/bin/retailIntegration/dtos/ListRetailCatalogRequest.js +8 -0
- package/bin/retailIntegration/dtos/ListRetailStoresRequest.d.ts +4 -0
- package/bin/retailIntegration/dtos/ListRetailStoresRequest.js +8 -0
- package/bin/retailIntegration/dtos/ListRetailUsersRequest.d.ts +5 -0
- package/bin/retailIntegration/dtos/ListRetailUsersRequest.js +24 -0
- package/bin/retailIntegration/dtos/ReceiveInventoryEventRequest.d.ts +6 -0
- package/bin/retailIntegration/dtos/ReceiveInventoryEventRequest.js +23 -0
- package/bin/retailIntegration/dtos/ReceiveProductEventRequest.d.ts +6 -0
- package/bin/retailIntegration/dtos/ReceiveProductEventRequest.js +23 -0
- package/bin/retailIntegration/dtos/ReceiveRetailEventRequest.d.ts +12 -0
- package/bin/retailIntegration/dtos/ReceiveRetailEventRequest.js +2 -0
- package/bin/retailIntegration/dtos/ReceiveRetailUserEventRequest.d.ts +6 -0
- package/bin/retailIntegration/dtos/ReceiveRetailUserEventRequest.js +23 -0
- package/bin/retailIntegration/dtos/ReceiveStoreEventRequest.d.ts +6 -0
- package/bin/retailIntegration/dtos/ReceiveStoreEventRequest.js +23 -0
- package/bin/retailIntegration/dtos/RegisterRetailSaleRequest.d.ts +4 -0
- package/bin/retailIntegration/dtos/RegisterRetailSaleRequest.js +8 -0
- package/bin/retailIntegration/dtos/RetailEventEnvelope.d.ts +8 -0
- package/bin/retailIntegration/dtos/RetailEventEnvelope.js +33 -0
- package/bin/retailIntegration/dtos/RetailEventResult.d.ts +12 -0
- package/bin/retailIntegration/dtos/RetailEventResult.js +2 -0
- package/bin/retailIntegration/dtos/RetailOutboundResponses.d.ts +30 -0
- package/bin/retailIntegration/dtos/RetailOutboundResponses.js +2 -0
- package/bin/retailIntegration/dtos/RetailPagedQuery.d.ts +6 -0
- package/bin/retailIntegration/dtos/RetailPagedQuery.js +34 -0
- package/bin/retailIntegration/dtos/RetailTenantQuery.d.ts +4 -0
- package/bin/retailIntegration/dtos/RetailTenantQuery.js +23 -0
- package/bin/retailIntegration/enums/InventoryEventTypeEnum.d.ts +4 -0
- package/bin/retailIntegration/enums/InventoryEventTypeEnum.js +8 -0
- package/bin/retailIntegration/enums/ProductEventTypeEnum.d.ts +6 -0
- package/bin/retailIntegration/enums/ProductEventTypeEnum.js +10 -0
- package/bin/retailIntegration/enums/RetailCurrencyEnum.d.ts +5 -0
- package/bin/retailIntegration/enums/RetailCurrencyEnum.js +9 -0
- package/bin/retailIntegration/enums/RetailEventResultEnum.d.ts +6 -0
- package/bin/retailIntegration/enums/RetailEventResultEnum.js +10 -0
- package/bin/retailIntegration/enums/RetailFinancierEnum.d.ts +8 -0
- package/bin/retailIntegration/enums/RetailFinancierEnum.js +12 -0
- package/bin/retailIntegration/enums/RetailLinePaymentTypeEnum.d.ts +5 -0
- package/bin/retailIntegration/enums/RetailLinePaymentTypeEnum.js +9 -0
- package/bin/retailIntegration/enums/RetailMdmProviderEnum.d.ts +5 -0
- package/bin/retailIntegration/enums/RetailMdmProviderEnum.js +9 -0
- package/bin/retailIntegration/enums/RetailPaymentMethodEnum.d.ts +6 -0
- package/bin/retailIntegration/enums/RetailPaymentMethodEnum.js +10 -0
- package/bin/retailIntegration/enums/RetailPieceReasonEnum.d.ts +6 -0
- package/bin/retailIntegration/enums/RetailPieceReasonEnum.js +10 -0
- package/bin/retailIntegration/enums/RetailPieceStatusEnum.d.ts +7 -0
- package/bin/retailIntegration/enums/RetailPieceStatusEnum.js +11 -0
- package/bin/retailIntegration/enums/RetailProductCategoryEnum.d.ts +7 -0
- package/bin/retailIntegration/enums/RetailProductCategoryEnum.js +11 -0
- package/bin/retailIntegration/enums/RetailProductStatusEnum.d.ts +6 -0
- package/bin/retailIntegration/enums/RetailProductStatusEnum.js +10 -0
- package/bin/retailIntegration/enums/RetailProductTierEnum.d.ts +7 -0
- package/bin/retailIntegration/enums/RetailProductTierEnum.js +11 -0
- package/bin/retailIntegration/enums/RetailSaleFinancierEnum.d.ts +9 -0
- package/bin/retailIntegration/enums/RetailSaleFinancierEnum.js +13 -0
- package/bin/retailIntegration/enums/RetailSaleTypeEnum.d.ts +6 -0
- package/bin/retailIntegration/enums/RetailSaleTypeEnum.js +10 -0
- package/bin/retailIntegration/enums/RetailStoreStatusEnum.d.ts +6 -0
- package/bin/retailIntegration/enums/RetailStoreStatusEnum.js +10 -0
- package/bin/retailIntegration/enums/RetailTrackingModeEnum.d.ts +6 -0
- package/bin/retailIntegration/enums/RetailTrackingModeEnum.js +10 -0
- package/bin/retailIntegration/enums/RetailUserAccessStatusEnum.d.ts +6 -0
- package/bin/retailIntegration/enums/RetailUserAccessStatusEnum.js +10 -0
- package/bin/retailIntegration/enums/RetailUserEventTypeEnum.d.ts +7 -0
- package/bin/retailIntegration/enums/RetailUserEventTypeEnum.js +11 -0
- package/bin/retailIntegration/enums/RetailUserRoleEnum.d.ts +7 -0
- package/bin/retailIntegration/enums/RetailUserRoleEnum.js +11 -0
- package/bin/retailIntegration/enums/StoreEventTypeEnum.d.ts +6 -0
- package/bin/retailIntegration/enums/StoreEventTypeEnum.js +10 -0
- package/bin/retailIntegration/enums/index.d.ts +21 -0
- package/bin/retailIntegration/enums/index.js +37 -0
- package/bin/retailIntegration/index.d.ts +25 -0
- package/bin/retailIntegration/index.js +41 -0
- package/bin/retailIntegration/models/RetailPageMeta.d.ts +10 -0
- package/bin/retailIntegration/models/RetailPageMeta.js +2 -0
- package/bin/retailIntegration/models/RetailSystemInventory.d.ts +17 -0
- package/bin/retailIntegration/models/RetailSystemInventory.js +2 -0
- package/bin/retailIntegration/models/RetailSystemProduct.d.ts +32 -0
- package/bin/retailIntegration/models/RetailSystemProduct.js +2 -0
- package/bin/retailIntegration/models/RetailSystemSale.d.ts +46 -0
- package/bin/retailIntegration/models/RetailSystemSale.js +2 -0
- package/bin/retailIntegration/models/RetailSystemStore.d.ts +29 -0
- package/bin/retailIntegration/models/RetailSystemStore.js +2 -0
- package/bin/retailIntegration/models/RetailSystemUser.d.ts +14 -0
- package/bin/retailIntegration/models/RetailSystemUser.js +2 -0
- package/bin/retailIntegration/validators/IsIsoDateTimeWithZone.d.ts +6 -0
- package/bin/retailIntegration/validators/IsIsoDateTimeWithZone.js +29 -0
- package/package.json +1 -1
- package/src/index.ts +2 -0
- package/src/loanCredit/dtos/requests/CreateSellerPaymentRequest.ts +40 -0
- package/src/loanCredit/dtos/requests/InStorePaymentDetail.ts +27 -0
- package/src/loanCredit/dtos/responses/CreditCustomerListItem.ts +51 -0
- package/src/loanCredit/dtos/responses/InStorePaymentListItem.ts +21 -0
- package/src/loanCredit/dtos/responses/LoanPaymentListItem.ts +11 -1
- package/src/loanCredit/dtos/responses/SellerCreditLookupResult.ts +11 -0
- package/src/loanCredit/dtos/responses/SellerPaymentOptions.ts +29 -0
- package/src/loanCredit/dtos/responses/SellerPaymentResult.ts +43 -0
- package/src/loanCredit/enums/CreditCustomerStateEnum.ts +6 -0
- package/src/loanCredit/enums/InStorePaymentMethodEnum.ts +6 -0
- package/src/loanCredit/enums/LoanPaymentOriginEnum.ts +5 -0
- package/src/loanCredit/index.ts +12 -0
- package/src/retailIntegration/constants/retailIntegrationLimits.ts +9 -0
- package/src/retailIntegration/dtos/ApplyRetailEventRequest.ts +49 -0
- package/src/retailIntegration/dtos/GetRetailInventoryRequest.ts +9 -0
- package/src/retailIntegration/dtos/ListRetailCatalogRequest.ts +4 -0
- package/src/retailIntegration/dtos/ListRetailStoresRequest.ts +4 -0
- package/src/retailIntegration/dtos/ListRetailUsersRequest.ts +10 -0
- package/src/retailIntegration/dtos/ReceiveInventoryEventRequest.ts +9 -0
- package/src/retailIntegration/dtos/ReceiveProductEventRequest.ts +9 -0
- package/src/retailIntegration/dtos/ReceiveRetailEventRequest.ts +18 -0
- package/src/retailIntegration/dtos/ReceiveRetailUserEventRequest.ts +9 -0
- package/src/retailIntegration/dtos/ReceiveStoreEventRequest.ts +9 -0
- package/src/retailIntegration/dtos/RegisterRetailSaleRequest.ts +4 -0
- package/src/retailIntegration/dtos/RetailEventEnvelope.ts +20 -0
- package/src/retailIntegration/dtos/RetailEventResult.ts +14 -0
- package/src/retailIntegration/dtos/RetailOutboundResponses.ts +35 -0
- package/src/retailIntegration/dtos/RetailPagedQuery.ts +19 -0
- package/src/retailIntegration/dtos/RetailTenantQuery.ts +9 -0
- package/src/retailIntegration/enums/InventoryEventTypeEnum.ts +4 -0
- package/src/retailIntegration/enums/ProductEventTypeEnum.ts +6 -0
- package/src/retailIntegration/enums/RetailCurrencyEnum.ts +5 -0
- package/src/retailIntegration/enums/RetailEventResultEnum.ts +6 -0
- package/src/retailIntegration/enums/RetailFinancierEnum.ts +8 -0
- package/src/retailIntegration/enums/RetailLinePaymentTypeEnum.ts +5 -0
- package/src/retailIntegration/enums/RetailMdmProviderEnum.ts +5 -0
- package/src/retailIntegration/enums/RetailPaymentMethodEnum.ts +6 -0
- package/src/retailIntegration/enums/RetailPieceReasonEnum.ts +6 -0
- package/src/retailIntegration/enums/RetailPieceStatusEnum.ts +7 -0
- package/src/retailIntegration/enums/RetailProductCategoryEnum.ts +7 -0
- package/src/retailIntegration/enums/RetailProductStatusEnum.ts +6 -0
- package/src/retailIntegration/enums/RetailProductTierEnum.ts +7 -0
- package/src/retailIntegration/enums/RetailSaleFinancierEnum.ts +9 -0
- package/src/retailIntegration/enums/RetailSaleTypeEnum.ts +6 -0
- package/src/retailIntegration/enums/RetailStoreStatusEnum.ts +6 -0
- package/src/retailIntegration/enums/RetailTrackingModeEnum.ts +6 -0
- package/src/retailIntegration/enums/RetailUserAccessStatusEnum.ts +6 -0
- package/src/retailIntegration/enums/RetailUserEventTypeEnum.ts +7 -0
- package/src/retailIntegration/enums/RetailUserRoleEnum.ts +7 -0
- package/src/retailIntegration/enums/StoreEventTypeEnum.ts +6 -0
- package/src/retailIntegration/enums/index.ts +21 -0
- package/src/retailIntegration/index.ts +25 -0
- package/src/retailIntegration/models/RetailPageMeta.ts +11 -0
- package/src/retailIntegration/models/RetailSystemInventory.ts +20 -0
- package/src/retailIntegration/models/RetailSystemProduct.ts +43 -0
- package/src/retailIntegration/models/RetailSystemSale.ts +51 -0
- package/src/retailIntegration/models/RetailSystemStore.ts +33 -0
- package/src/retailIntegration/models/RetailSystemUser.ts +16 -0
- package/src/retailIntegration/validators/IsIsoDateTimeWithZone.ts +21 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RetailUserEventTypeEnum = void 0;
|
|
4
|
+
/** `eventType` válidos en `POST /webhooks/users`. */
|
|
5
|
+
var RetailUserEventTypeEnum;
|
|
6
|
+
(function (RetailUserEventTypeEnum) {
|
|
7
|
+
RetailUserEventTypeEnum["RETAIL_USER_CREATED_V1"] = "RetailUserCreatedV1";
|
|
8
|
+
RetailUserEventTypeEnum["RETAIL_USER_UPDATED_V1"] = "RetailUserUpdatedV1";
|
|
9
|
+
RetailUserEventTypeEnum["RETAIL_USER_TRANSFERRED_V1"] = "RetailUserTransferredV1";
|
|
10
|
+
RetailUserEventTypeEnum["RETAIL_USER_STATUS_CHANGED_V1"] = "RetailUserStatusChangedV1";
|
|
11
|
+
})(RetailUserEventTypeEnum || (exports.RetailUserEventTypeEnum = RetailUserEventTypeEnum = {}));
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RetailUserRoleEnum = void 0;
|
|
4
|
+
/** Rol de un usuario de la operación del retailer. */
|
|
5
|
+
var RetailUserRoleEnum;
|
|
6
|
+
(function (RetailUserRoleEnum) {
|
|
7
|
+
RetailUserRoleEnum["SELLER"] = "SELLER";
|
|
8
|
+
RetailUserRoleEnum["STORE_MANAGER"] = "STORE_MANAGER";
|
|
9
|
+
RetailUserRoleEnum["RETAILER_ADMIN"] = "RETAILER_ADMIN";
|
|
10
|
+
RetailUserRoleEnum["COLLECTION_AGENT"] = "COLLECTION_AGENT";
|
|
11
|
+
})(RetailUserRoleEnum || (exports.RetailUserRoleEnum = RetailUserRoleEnum = {}));
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.StoreEventTypeEnum = void 0;
|
|
4
|
+
/** `eventType` válidos en `POST /webhooks/stores`. */
|
|
5
|
+
var StoreEventTypeEnum;
|
|
6
|
+
(function (StoreEventTypeEnum) {
|
|
7
|
+
StoreEventTypeEnum["STORE_CREATED_V1"] = "StoreCreatedV1";
|
|
8
|
+
StoreEventTypeEnum["STORE_UPDATED_V1"] = "StoreUpdatedV1";
|
|
9
|
+
StoreEventTypeEnum["STORE_STATUS_CHANGED_V1"] = "StoreStatusChangedV1";
|
|
10
|
+
})(StoreEventTypeEnum || (exports.StoreEventTypeEnum = StoreEventTypeEnum = {}));
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export * from './RetailEventResultEnum';
|
|
2
|
+
export * from './StoreEventTypeEnum';
|
|
3
|
+
export * from './RetailUserEventTypeEnum';
|
|
4
|
+
export * from './ProductEventTypeEnum';
|
|
5
|
+
export * from './InventoryEventTypeEnum';
|
|
6
|
+
export * from './RetailStoreStatusEnum';
|
|
7
|
+
export * from './RetailProductCategoryEnum';
|
|
8
|
+
export * from './RetailTrackingModeEnum';
|
|
9
|
+
export * from './RetailProductTierEnum';
|
|
10
|
+
export * from './RetailCurrencyEnum';
|
|
11
|
+
export * from './RetailFinancierEnum';
|
|
12
|
+
export * from './RetailMdmProviderEnum';
|
|
13
|
+
export * from './RetailProductStatusEnum';
|
|
14
|
+
export * from './RetailPieceStatusEnum';
|
|
15
|
+
export * from './RetailPieceReasonEnum';
|
|
16
|
+
export * from './RetailUserRoleEnum';
|
|
17
|
+
export * from './RetailUserAccessStatusEnum';
|
|
18
|
+
export * from './RetailSaleTypeEnum';
|
|
19
|
+
export * from './RetailSaleFinancierEnum';
|
|
20
|
+
export * from './RetailPaymentMethodEnum';
|
|
21
|
+
export * from './RetailLinePaymentTypeEnum';
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./RetailEventResultEnum"), exports);
|
|
18
|
+
__exportStar(require("./StoreEventTypeEnum"), exports);
|
|
19
|
+
__exportStar(require("./RetailUserEventTypeEnum"), exports);
|
|
20
|
+
__exportStar(require("./ProductEventTypeEnum"), exports);
|
|
21
|
+
__exportStar(require("./InventoryEventTypeEnum"), exports);
|
|
22
|
+
__exportStar(require("./RetailStoreStatusEnum"), exports);
|
|
23
|
+
__exportStar(require("./RetailProductCategoryEnum"), exports);
|
|
24
|
+
__exportStar(require("./RetailTrackingModeEnum"), exports);
|
|
25
|
+
__exportStar(require("./RetailProductTierEnum"), exports);
|
|
26
|
+
__exportStar(require("./RetailCurrencyEnum"), exports);
|
|
27
|
+
__exportStar(require("./RetailFinancierEnum"), exports);
|
|
28
|
+
__exportStar(require("./RetailMdmProviderEnum"), exports);
|
|
29
|
+
__exportStar(require("./RetailProductStatusEnum"), exports);
|
|
30
|
+
__exportStar(require("./RetailPieceStatusEnum"), exports);
|
|
31
|
+
__exportStar(require("./RetailPieceReasonEnum"), exports);
|
|
32
|
+
__exportStar(require("./RetailUserRoleEnum"), exports);
|
|
33
|
+
__exportStar(require("./RetailUserAccessStatusEnum"), exports);
|
|
34
|
+
__exportStar(require("./RetailSaleTypeEnum"), exports);
|
|
35
|
+
__exportStar(require("./RetailSaleFinancierEnum"), exports);
|
|
36
|
+
__exportStar(require("./RetailPaymentMethodEnum"), exports);
|
|
37
|
+
__exportStar(require("./RetailLinePaymentTypeEnum"), exports);
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export * from './constants/retailIntegrationLimits';
|
|
2
|
+
export * from './enums';
|
|
3
|
+
export * from './validators/IsIsoDateTimeWithZone';
|
|
4
|
+
export * from './dtos/RetailEventEnvelope';
|
|
5
|
+
export * from './dtos/ReceiveStoreEventRequest';
|
|
6
|
+
export * from './dtos/ReceiveRetailUserEventRequest';
|
|
7
|
+
export * from './dtos/ReceiveProductEventRequest';
|
|
8
|
+
export * from './dtos/ReceiveInventoryEventRequest';
|
|
9
|
+
export * from './dtos/ReceiveRetailEventRequest';
|
|
10
|
+
export * from './dtos/RetailEventResult';
|
|
11
|
+
export * from './dtos/ApplyRetailEventRequest';
|
|
12
|
+
export * from './dtos/RetailTenantQuery';
|
|
13
|
+
export * from './dtos/RetailPagedQuery';
|
|
14
|
+
export * from './dtos/ListRetailStoresRequest';
|
|
15
|
+
export * from './dtos/ListRetailCatalogRequest';
|
|
16
|
+
export * from './dtos/GetRetailInventoryRequest';
|
|
17
|
+
export * from './dtos/ListRetailUsersRequest';
|
|
18
|
+
export * from './dtos/RegisterRetailSaleRequest';
|
|
19
|
+
export * from './dtos/RetailOutboundResponses';
|
|
20
|
+
export * from './models/RetailPageMeta';
|
|
21
|
+
export * from './models/RetailSystemStore';
|
|
22
|
+
export * from './models/RetailSystemProduct';
|
|
23
|
+
export * from './models/RetailSystemInventory';
|
|
24
|
+
export * from './models/RetailSystemUser';
|
|
25
|
+
export * from './models/RetailSystemSale';
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./constants/retailIntegrationLimits"), exports);
|
|
18
|
+
__exportStar(require("./enums"), exports);
|
|
19
|
+
__exportStar(require("./validators/IsIsoDateTimeWithZone"), exports);
|
|
20
|
+
__exportStar(require("./dtos/RetailEventEnvelope"), exports);
|
|
21
|
+
__exportStar(require("./dtos/ReceiveStoreEventRequest"), exports);
|
|
22
|
+
__exportStar(require("./dtos/ReceiveRetailUserEventRequest"), exports);
|
|
23
|
+
__exportStar(require("./dtos/ReceiveProductEventRequest"), exports);
|
|
24
|
+
__exportStar(require("./dtos/ReceiveInventoryEventRequest"), exports);
|
|
25
|
+
__exportStar(require("./dtos/ReceiveRetailEventRequest"), exports);
|
|
26
|
+
__exportStar(require("./dtos/RetailEventResult"), exports);
|
|
27
|
+
__exportStar(require("./dtos/ApplyRetailEventRequest"), exports);
|
|
28
|
+
__exportStar(require("./dtos/RetailTenantQuery"), exports);
|
|
29
|
+
__exportStar(require("./dtos/RetailPagedQuery"), exports);
|
|
30
|
+
__exportStar(require("./dtos/ListRetailStoresRequest"), exports);
|
|
31
|
+
__exportStar(require("./dtos/ListRetailCatalogRequest"), exports);
|
|
32
|
+
__exportStar(require("./dtos/GetRetailInventoryRequest"), exports);
|
|
33
|
+
__exportStar(require("./dtos/ListRetailUsersRequest"), exports);
|
|
34
|
+
__exportStar(require("./dtos/RegisterRetailSaleRequest"), exports);
|
|
35
|
+
__exportStar(require("./dtos/RetailOutboundResponses"), exports);
|
|
36
|
+
__exportStar(require("./models/RetailPageMeta"), exports);
|
|
37
|
+
__exportStar(require("./models/RetailSystemStore"), exports);
|
|
38
|
+
__exportStar(require("./models/RetailSystemProduct"), exports);
|
|
39
|
+
__exportStar(require("./models/RetailSystemInventory"), exports);
|
|
40
|
+
__exportStar(require("./models/RetailSystemUser"), exports);
|
|
41
|
+
__exportStar(require("./models/RetailSystemSale"), exports);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** `meta` de una lista paginada del retailer; `nextToken` en `null` cierra la lectura. */
|
|
2
|
+
export interface RetailPageMeta {
|
|
3
|
+
count: number;
|
|
4
|
+
nextToken: string | null;
|
|
5
|
+
}
|
|
6
|
+
/** `meta` del inventario de una tienda. */
|
|
7
|
+
export interface RetailInventoryMeta {
|
|
8
|
+
storeId: string;
|
|
9
|
+
generatedAt: string;
|
|
10
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { RetailPieceReasonEnum, RetailPieceStatusEnum } from '../enums';
|
|
2
|
+
export type RetailPieceStatus = `${RetailPieceStatusEnum}`;
|
|
3
|
+
export type RetailPieceReason = `${RetailPieceReasonEnum}`;
|
|
4
|
+
/** Pieza con IMEI o número de serie. */
|
|
5
|
+
export interface RetailSystemPiece {
|
|
6
|
+
sku: string;
|
|
7
|
+
identifier: string;
|
|
8
|
+
storeId: string;
|
|
9
|
+
status: RetailPieceStatus;
|
|
10
|
+
reason: RetailPieceReason | null;
|
|
11
|
+
}
|
|
12
|
+
/** Existencia de un producto sin identificador por unidad. */
|
|
13
|
+
export interface RetailSystemStock {
|
|
14
|
+
sku: string;
|
|
15
|
+
storeId: string;
|
|
16
|
+
qty: number;
|
|
17
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { RetailCurrencyEnum, RetailFinancierEnum, RetailMdmProviderEnum, RetailProductCategoryEnum, RetailProductStatusEnum, RetailProductTierEnum, RetailTrackingModeEnum } from '../enums';
|
|
2
|
+
export type RetailProductCategory = `${RetailProductCategoryEnum}`;
|
|
3
|
+
export type RetailTrackingMode = `${RetailTrackingModeEnum}`;
|
|
4
|
+
export type RetailProductTier = `${RetailProductTierEnum}`;
|
|
5
|
+
export type RetailCurrency = `${RetailCurrencyEnum}`;
|
|
6
|
+
export type RetailFinancier = `${RetailFinancierEnum}`;
|
|
7
|
+
export type RetailMdmProvider = `${RetailMdmProviderEnum}`;
|
|
8
|
+
export type RetailProductStatus = `${RetailProductStatusEnum}`;
|
|
9
|
+
/** Precios como decimal en string con dos decimales. */
|
|
10
|
+
export interface RetailSystemProductPrice {
|
|
11
|
+
basePrice: string;
|
|
12
|
+
listPrice: string | null;
|
|
13
|
+
effectiveFrom: string;
|
|
14
|
+
}
|
|
15
|
+
/** Producto tal como lo define la doc de integración. */
|
|
16
|
+
export interface RetailSystemProduct {
|
|
17
|
+
sku: string;
|
|
18
|
+
externalId: string;
|
|
19
|
+
brand: string;
|
|
20
|
+
model: string;
|
|
21
|
+
color: string | null;
|
|
22
|
+
capacity: string | null;
|
|
23
|
+
description: string | null;
|
|
24
|
+
category: RetailProductCategory;
|
|
25
|
+
trackingMode: RetailTrackingMode;
|
|
26
|
+
tier: RetailProductTier | null;
|
|
27
|
+
currencyId: RetailCurrency;
|
|
28
|
+
price: RetailSystemProductPrice;
|
|
29
|
+
eligibleFinanciers: RetailFinancier[];
|
|
30
|
+
mdmProvider: RetailMdmProvider | null;
|
|
31
|
+
status: RetailProductStatus;
|
|
32
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { RetailLinePaymentTypeEnum, RetailPaymentMethodEnum, RetailSaleFinancierEnum, RetailSaleTypeEnum } from '../enums';
|
|
2
|
+
import { RetailCurrency } from './RetailSystemProduct';
|
|
3
|
+
export type RetailSaleType = `${RetailSaleTypeEnum}`;
|
|
4
|
+
export type RetailSaleFinancier = `${RetailSaleFinancierEnum}`;
|
|
5
|
+
export type RetailPaymentMethod = `${RetailPaymentMethodEnum}`;
|
|
6
|
+
export type RetailLinePaymentType = `${RetailLinePaymentTypeEnum}`;
|
|
7
|
+
export interface RetailSystemSaleCustomer {
|
|
8
|
+
customerId: string;
|
|
9
|
+
names: string;
|
|
10
|
+
paternalLastName: string;
|
|
11
|
+
maternalLastName: string | null;
|
|
12
|
+
phone: string;
|
|
13
|
+
}
|
|
14
|
+
export interface RetailSystemSaleComponent {
|
|
15
|
+
sku: string;
|
|
16
|
+
qty: number;
|
|
17
|
+
identifiers: string[];
|
|
18
|
+
}
|
|
19
|
+
export interface RetailSystemSaleLine {
|
|
20
|
+
lineId: string;
|
|
21
|
+
sku: string;
|
|
22
|
+
qty: number;
|
|
23
|
+
basePrice: string;
|
|
24
|
+
discount: string;
|
|
25
|
+
paymentType: RetailLinePaymentType;
|
|
26
|
+
financedAmount: string;
|
|
27
|
+
role: 'GIFT' | null;
|
|
28
|
+
components: RetailSystemSaleComponent[];
|
|
29
|
+
}
|
|
30
|
+
/** Cuerpo de `POST /sales` de la doc; `saleId` es la llave de idempotencia. */
|
|
31
|
+
export interface RetailSystemSale {
|
|
32
|
+
saleId: string;
|
|
33
|
+
folio: string;
|
|
34
|
+
storeId: string;
|
|
35
|
+
sellerRetailUserId: string;
|
|
36
|
+
soldAt: string;
|
|
37
|
+
saleType: RetailSaleType;
|
|
38
|
+
financier: RetailSaleFinancier;
|
|
39
|
+
creditId: string | null;
|
|
40
|
+
currencyId: RetailCurrency;
|
|
41
|
+
customer: RetailSystemSaleCustomer;
|
|
42
|
+
equipmentPrice: string;
|
|
43
|
+
amountPaid: string;
|
|
44
|
+
paymentMethod: RetailPaymentMethod | null;
|
|
45
|
+
lines: RetailSystemSaleLine[];
|
|
46
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { RetailStoreStatusEnum } from '../enums';
|
|
2
|
+
export type RetailStoreStatus = `${RetailStoreStatusEnum}`;
|
|
3
|
+
export interface RetailSystemStoreAddress {
|
|
4
|
+
address1: string;
|
|
5
|
+
externalNumber: string | null;
|
|
6
|
+
internalNumber: string | null;
|
|
7
|
+
neighborhood: string | null;
|
|
8
|
+
city: string;
|
|
9
|
+
state: string;
|
|
10
|
+
zipCode: string;
|
|
11
|
+
country: string | null;
|
|
12
|
+
reference: string | null;
|
|
13
|
+
}
|
|
14
|
+
export interface RetailSystemStoreLocation {
|
|
15
|
+
lat: number | null;
|
|
16
|
+
lng: number | null;
|
|
17
|
+
}
|
|
18
|
+
/** Tienda tal como la define la doc de integración. */
|
|
19
|
+
export interface RetailSystemStore {
|
|
20
|
+
storeId: string;
|
|
21
|
+
code: string;
|
|
22
|
+
name: string;
|
|
23
|
+
zoneId: string | null;
|
|
24
|
+
address: RetailSystemStoreAddress;
|
|
25
|
+
location: RetailSystemStoreLocation;
|
|
26
|
+
phone: string;
|
|
27
|
+
schedule: string | null;
|
|
28
|
+
status: RetailStoreStatus;
|
|
29
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { RetailUserAccessStatusEnum, RetailUserRoleEnum } from '../enums';
|
|
2
|
+
export type RetailUserRole = `${RetailUserRoleEnum}`;
|
|
3
|
+
export type RetailUserAccessStatus = `${RetailUserAccessStatusEnum}`;
|
|
4
|
+
/** Usuario de la operación del retailer, tal como lo define la doc de integración. */
|
|
5
|
+
export interface RetailSystemUser {
|
|
6
|
+
retailUserId: string;
|
|
7
|
+
displayName: string;
|
|
8
|
+
email: string;
|
|
9
|
+
phone: string | null;
|
|
10
|
+
homeStoreId: string;
|
|
11
|
+
zoneId: string | null;
|
|
12
|
+
role: RetailUserRole;
|
|
13
|
+
status: RetailUserAccessStatus;
|
|
14
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ValidatorConstraintInterface } from 'class-validator';
|
|
2
|
+
/** Acepta fecha y hora ISO-8601 con segundos y zona; sin zona se rechaza, como dice la doc. */
|
|
3
|
+
export declare class IsIsoDateTimeWithZone implements ValidatorConstraintInterface {
|
|
4
|
+
validate(value: unknown): boolean;
|
|
5
|
+
defaultMessage(): string;
|
|
6
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.IsIsoDateTimeWithZone = void 0;
|
|
10
|
+
const class_validator_1 = require("class-validator");
|
|
11
|
+
const ISO_DATE_TIME_WITH_ZONE = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{1,9})?(Z|[+-]\d{2}:\d{2})$/;
|
|
12
|
+
/** Descarta fechas que `Date` recorre en silencio, como el 31 de febrero. */
|
|
13
|
+
function isRealCalendarDate(value) {
|
|
14
|
+
const [year, month, day] = value.slice(0, 10).split('-').map(Number);
|
|
15
|
+
return !Number.isNaN(Date.parse(value)) && new Date(Date.UTC(year, month - 1, day)).getUTCDate() === day;
|
|
16
|
+
}
|
|
17
|
+
/** Acepta fecha y hora ISO-8601 con segundos y zona; sin zona se rechaza, como dice la doc. */
|
|
18
|
+
let IsIsoDateTimeWithZone = class IsIsoDateTimeWithZone {
|
|
19
|
+
validate(value) {
|
|
20
|
+
return typeof value === 'string' && ISO_DATE_TIME_WITH_ZONE.test(value) && isRealCalendarDate(value);
|
|
21
|
+
}
|
|
22
|
+
defaultMessage() {
|
|
23
|
+
return 'debe ser fecha y hora ISO-8601 con zona, por ejemplo 2026-08-17T20:32:05Z';
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
exports.IsIsoDateTimeWithZone = IsIsoDateTimeWithZone;
|
|
27
|
+
exports.IsIsoDateTimeWithZone = IsIsoDateTimeWithZone = __decorate([
|
|
28
|
+
(0, class_validator_1.ValidatorConstraint)({ name: 'isIsoDateTimeWithZone', async: false })
|
|
29
|
+
], IsIsoDateTimeWithZone);
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -125,6 +125,8 @@ export * as RetailWizard from './retailWizard';
|
|
|
125
125
|
// RetailPromotions: DTOs/enums de retail-promotions-business (promos de venta, códigos de descuento y
|
|
126
126
|
// cupones de VentasLuga). Porcentajes en puntos base, dinero en centavos.
|
|
127
127
|
export * as RetailPromotions from './retailPromotions';
|
|
128
|
+
// RetailIntegration: DTOs del retail-integration-connector (webhooks del retailer y salida hacia su sistema).
|
|
129
|
+
export * as RetailIntegration from './retailIntegration';
|
|
128
130
|
export * as DatalakeQuery from './datalakeQuery';
|
|
129
131
|
// LoanConfig: DTOs/enums del lambda loan-config-business (comp 09 — parámetros operativos del SOFOM).
|
|
130
132
|
export * as LoanConfig from './loanConfig';
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { Expose, Type } from 'class-transformer';
|
|
2
|
+
import { IsEnum, IsInt, IsOptional, IsUUID, Min, ValidateNested } from 'class-validator';
|
|
3
|
+
import { InStorePaymentMethodEnum } from '../../enums/InStorePaymentMethodEnum';
|
|
4
|
+
import { LoanCustomerPaymentTypeEnum } from '../../enums/LoanCustomerPaymentTypeEnum';
|
|
5
|
+
import { InStorePaymentDetail } from './InStorePaymentDetail';
|
|
6
|
+
|
|
7
|
+
/** Body de `POST /seller/credits/{creditId}/payments`: el vendedor anota un pago recibido en tienda. */
|
|
8
|
+
export class CreateSellerPaymentRequest {
|
|
9
|
+
@Expose()
|
|
10
|
+
@IsEnum(LoanCustomerPaymentTypeEnum)
|
|
11
|
+
type!: LoanCustomerPaymentTypeEnum;
|
|
12
|
+
|
|
13
|
+
/** El monto que vio el vendedor en las opciones; distinto al de hoy → 409 CUSTOMER_PAYMENT_AMOUNT_CHANGED. */
|
|
14
|
+
@Expose()
|
|
15
|
+
@IsInt()
|
|
16
|
+
@Min(1)
|
|
17
|
+
expectedAmountCents!: number;
|
|
18
|
+
|
|
19
|
+
/** Solo ADVANCE: cuántas cuotas adelanta. */
|
|
20
|
+
@Expose()
|
|
21
|
+
@IsOptional()
|
|
22
|
+
@IsInt()
|
|
23
|
+
@Min(2)
|
|
24
|
+
installmentCount?: number;
|
|
25
|
+
|
|
26
|
+
@Expose()
|
|
27
|
+
@IsEnum(InStorePaymentMethodEnum)
|
|
28
|
+
method!: InStorePaymentMethodEnum;
|
|
29
|
+
|
|
30
|
+
/** Tarjeta: `cardLast4` + `authCode`; SPEI: `speiTrackingKey`; efectivo: sin detalle. */
|
|
31
|
+
@Expose()
|
|
32
|
+
@IsOptional()
|
|
33
|
+
@ValidateNested()
|
|
34
|
+
@Type(() => InStorePaymentDetail)
|
|
35
|
+
detail?: InStorePaymentDetail;
|
|
36
|
+
|
|
37
|
+
@Expose()
|
|
38
|
+
@IsUUID()
|
|
39
|
+
idempotencyKey!: string;
|
|
40
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Expose } from 'class-transformer';
|
|
2
|
+
import { IsString, Length, Matches, ValidateIf } from 'class-validator';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Dato de la forma de pago anotada en tienda; solo valida la forma, nunca lleva CLABE.
|
|
6
|
+
* Qué campo exige cada método lo decide loan-credit (400 INVALID_PAYMENT_DETAIL).
|
|
7
|
+
*/
|
|
8
|
+
export class InStorePaymentDetail {
|
|
9
|
+
/** Tarjeta: últimos 4 dígitos. */
|
|
10
|
+
@Expose()
|
|
11
|
+
@ValidateIf((detail: InStorePaymentDetail) => detail.cardLast4 !== undefined)
|
|
12
|
+
@Matches(/^\d{4}$/)
|
|
13
|
+
cardLast4?: string;
|
|
14
|
+
|
|
15
|
+
/** Tarjeta: número de autorización del voucher. */
|
|
16
|
+
@Expose()
|
|
17
|
+
@ValidateIf((detail: InStorePaymentDetail) => detail.authCode !== undefined)
|
|
18
|
+
@Matches(/^[A-Za-z0-9]{1,12}$/)
|
|
19
|
+
authCode?: string;
|
|
20
|
+
|
|
21
|
+
/** SPEI: clave de rastreo. */
|
|
22
|
+
@Expose()
|
|
23
|
+
@ValidateIf((detail: InStorePaymentDetail) => detail.speiTrackingKey !== undefined)
|
|
24
|
+
@IsString()
|
|
25
|
+
@Length(1, 30)
|
|
26
|
+
speiTrackingKey?: string;
|
|
27
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { PaginatedResult } from '../../../retailOrg';
|
|
2
|
+
import type { CreditCustomerStateEnum } from '../../enums/CreditCustomerStateEnum';
|
|
3
|
+
import type { LoanPaymentOriginEnum } from '../../enums/LoanPaymentOriginEnum';
|
|
4
|
+
|
|
5
|
+
/** Segmento del catálogo al que pertenece el cliente. */
|
|
6
|
+
export interface CreditCustomerSegment {
|
|
7
|
+
segmentId: string;
|
|
8
|
+
name: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/** Último pago que entró al crédito: cuándo y por dónde. */
|
|
12
|
+
export interface CreditLastPayment {
|
|
13
|
+
at: string;
|
|
14
|
+
origin: LoanPaymentOriginEnum;
|
|
15
|
+
storeId?: string;
|
|
16
|
+
storeName?: string;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/** Bloque de crédito de la fila de Clientes; sin lectura todo va en null. */
|
|
20
|
+
export interface CreditCustomerCredit {
|
|
21
|
+
state: CreditCustomerStateEnum;
|
|
22
|
+
clientLevel: string | null;
|
|
23
|
+
sciScore: number | null;
|
|
24
|
+
/** Si el SCI es el vivo del acreditado o el congelado al originar. */
|
|
25
|
+
sciSource: string | null;
|
|
26
|
+
creditsCount: number | null;
|
|
27
|
+
activeCreditsCount: number | null;
|
|
28
|
+
settledCreditsCount: number | null;
|
|
29
|
+
writtenOffCreditsCount: number | null;
|
|
30
|
+
outstandingBalanceCents: number | null;
|
|
31
|
+
arrearsDays: number | null;
|
|
32
|
+
lastPaymentAt: string | null;
|
|
33
|
+
/** Ausente en créditos sin pago desde que existe el campo: el front cae a `lastPaymentAt`. */
|
|
34
|
+
lastPayment?: CreditLastPayment;
|
|
35
|
+
/** Crédito vigente; si hubiera más de uno vivo, el más reciente. */
|
|
36
|
+
activeCreditId: string | null;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/** Fila de la tabla Clientes del backoffice. */
|
|
40
|
+
export interface CreditCustomerListItem {
|
|
41
|
+
retailCustomerId: string;
|
|
42
|
+
fullName: string | null;
|
|
43
|
+
phone: string | null;
|
|
44
|
+
originStoreId: string | null;
|
|
45
|
+
segments: CreditCustomerSegment[];
|
|
46
|
+
/** `false` = la consulta de segmentos falló: la celda dice «sin leer», no «ninguno». */
|
|
47
|
+
segmentsRead: boolean;
|
|
48
|
+
credit: CreditCustomerCredit;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export type CreditCustomerPage = PaginatedResult<CreditCustomerListItem>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { InStorePaymentMethodEnum } from '../../enums/InStorePaymentMethodEnum';
|
|
2
|
+
import type { LoanChargeKindEnum } from '../../enums/LoanChargeKindEnum';
|
|
3
|
+
import type { NamedRef } from './SellerPaymentResult';
|
|
4
|
+
|
|
5
|
+
/** Un cobro en tienda en la conciliación de la cadena. */
|
|
6
|
+
export interface InStorePaymentListItem {
|
|
7
|
+
receipt: string;
|
|
8
|
+
creditId: string;
|
|
9
|
+
paymentId: string;
|
|
10
|
+
chargeKind: LoanChargeKindEnum;
|
|
11
|
+
amountCents: number;
|
|
12
|
+
method: InStorePaymentMethodEnum;
|
|
13
|
+
collectedBySeller: NamedRef;
|
|
14
|
+
appliedAt: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/** `GET /seller/stores/{storeId}/in-store-payments`; `nextToken` ausente = última página. */
|
|
18
|
+
export interface InStorePaymentListResponse {
|
|
19
|
+
items: InStorePaymentListItem[];
|
|
20
|
+
nextToken?: string;
|
|
21
|
+
}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { CollectionResultStatus } from '../../../collection/enums/CollectionResultStatus';
|
|
2
2
|
import { MechanismType } from '../../../collection/enums/MechanismType';
|
|
3
3
|
import { CurrencyId } from '../../../currency/enums/CurrencyId';
|
|
4
|
+
import type { InStorePaymentMethodEnum } from '../../enums/InStorePaymentMethodEnum';
|
|
4
5
|
import { LoanChargeKindEnum } from '../../enums/LoanChargeKindEnum';
|
|
6
|
+
import type { LoanPaymentOriginEnum } from '../../enums/LoanPaymentOriginEnum';
|
|
7
|
+
import type { NamedRef } from './SellerPaymentResult';
|
|
5
8
|
|
|
6
9
|
/** Un pago del historial de un crédito, tal como lo asentó el motor de cobro en `LoanPayment_GT`. */
|
|
7
10
|
export interface LoanPaymentListItem {
|
|
@@ -10,7 +13,8 @@ export interface LoanPaymentListItem {
|
|
|
10
13
|
receipt: string;
|
|
11
14
|
installmentNumber: number;
|
|
12
15
|
attemptId: string;
|
|
13
|
-
|
|
16
|
+
/** Ausente en los pagos en tienda: ahí no hubo motor. */
|
|
17
|
+
mechanism?: MechanismType;
|
|
14
18
|
result: CollectionResultStatus;
|
|
15
19
|
currency: CurrencyId;
|
|
16
20
|
collectedCents: number;
|
|
@@ -30,6 +34,12 @@ export interface LoanPaymentListItem {
|
|
|
30
34
|
chargeKind?: LoanChargeKindEnum;
|
|
31
35
|
/** Saldo de capital del crédito después de este pago. Ausente en pagos viejos. */
|
|
32
36
|
creditPrincipalBalanceAfterCents?: number;
|
|
37
|
+
/** Ausente en filas viejas = COLLECTION_ENGINE. */
|
|
38
|
+
origin?: LoanPaymentOriginEnum;
|
|
39
|
+
inStoreMethod?: InStorePaymentMethodEnum;
|
|
40
|
+
/** Tienda y vendedor con el nombre congelado al cobrar; el cliente nunca recibe `collectedBySeller.id`. */
|
|
41
|
+
collectedAtStore?: NamedRef;
|
|
42
|
+
collectedBySeller?: { id?: string; name: string | null };
|
|
33
43
|
}
|
|
34
44
|
|
|
35
45
|
/** Página del historial. El fin lo marca la AUSENCIA de `nextToken`, nunca una página corta. */
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { SellerNextInstallment } from './SellerPaymentResult';
|
|
2
|
+
|
|
3
|
+
/** Respuesta de `GET /seller/credits/lookup`: lo mínimo para confirmar que es el crédito correcto. */
|
|
4
|
+
export interface SellerCreditLookupResult {
|
|
5
|
+
creditId: string;
|
|
6
|
+
/** PII: nunca se loguea. */
|
|
7
|
+
customerName: string | null;
|
|
8
|
+
productBrand: string | null;
|
|
9
|
+
productModel: string | null;
|
|
10
|
+
nextInstallment: SellerNextInstallment | null;
|
|
11
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { LoanPaymentOptionUnavailableReasonEnum } from '../../enums/LoanPaymentOptionUnavailableReasonEnum';
|
|
2
|
+
import type { SellerNextInstallment } from './SellerPaymentResult';
|
|
3
|
+
|
|
4
|
+
/** Una opción de cobro en tienda: disponible con su monto o rango, o no con su razón. */
|
|
5
|
+
export interface SellerPaymentOption {
|
|
6
|
+
available: boolean;
|
|
7
|
+
unavailableReason?: LoanPaymentOptionUnavailableReasonEnum;
|
|
8
|
+
amountCents?: number;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/** Resumen del crédito de la opción A del canvas. */
|
|
12
|
+
export interface SellerCreditPaymentSummary {
|
|
13
|
+
totalCents: number;
|
|
14
|
+
paidCents: number;
|
|
15
|
+
remainingCents: number;
|
|
16
|
+
nextInstallment: SellerNextInstallment | null;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/** Respuesta de `GET /seller/credits/{creditId}/payment-options`: fuente de `expectedAmountCents`. */
|
|
20
|
+
export interface SellerPaymentOptions {
|
|
21
|
+
creditId: string;
|
|
22
|
+
summary: SellerCreditPaymentSummary;
|
|
23
|
+
/** Su cuota: las exigibles hoy (vencidas y la de hoy) o, sin nada exigible, la siguiente. */
|
|
24
|
+
nextInstallment: SellerPaymentOption & { installmentNumbers?: number[]; overdueCount?: number };
|
|
25
|
+
advance: SellerPaymentOption & { minInstallments?: number; maxInstallments?: number; installmentAmountsCents?: number[] };
|
|
26
|
+
prepayment: SellerPaymentOption & { minAmountCents?: number; maxAmountCents?: number };
|
|
27
|
+
/** Liquidar: el neto de la cotización de hoy. */
|
|
28
|
+
settlement: SellerPaymentOption;
|
|
29
|
+
}
|