@fiado/type-kit 3.494.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/dtos/originateLoanCreditRequest.test.ts +56 -0
- package/_test_/unit/loanCredit/inStorePaymentDtos.test.ts +141 -0
- package/_test_/unit/loanCredit/sellerCreditDtos.test.ts +119 -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/requests/OriginateLoanCreditRequest.d.ts +7 -3
- package/bin/loanCredit/dtos/requests/OriginateLoanCreditRequest.js +8 -1
- package/bin/loanCredit/dtos/responses/CreditCustomerListItem.d.ts +46 -0
- package/bin/loanCredit/dtos/responses/CreditCustomerListItem.js +2 -0
- package/bin/loanCredit/dtos/responses/CreditSaleContext.d.ts +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/SellerCreditDetailResponse.d.ts +10 -0
- package/bin/loanCredit/dtos/responses/SellerCreditDetailResponse.js +2 -0
- package/bin/loanCredit/dtos/responses/SellerCreditListResponse.d.ts +7 -0
- package/bin/loanCredit/dtos/responses/SellerCreditListResponse.js +2 -0
- package/bin/loanCredit/dtos/responses/SellerCreditLookupResult.d.ts +10 -0
- package/bin/loanCredit/dtos/responses/SellerCreditLookupResult.js +2 -0
- package/bin/loanCredit/dtos/responses/SellerCreditRow.d.ts +25 -0
- package/bin/loanCredit/dtos/responses/SellerCreditRow.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 +13 -0
- package/bin/loanCredit/index.js +15 -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/bin/retailWizard/dtos/WizardSessionLookupEntry.d.ts +2 -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/requests/OriginateLoanCreditRequest.ts +12 -3
- package/src/loanCredit/dtos/responses/CreditCustomerListItem.ts +51 -0
- package/src/loanCredit/dtos/responses/CreditSaleContext.ts +2 -0
- package/src/loanCredit/dtos/responses/InStorePaymentListItem.ts +21 -0
- package/src/loanCredit/dtos/responses/LoanPaymentListItem.ts +11 -1
- package/src/loanCredit/dtos/responses/SellerCreditDetailResponse.ts +11 -0
- package/src/loanCredit/dtos/responses/SellerCreditListResponse.ts +8 -0
- package/src/loanCredit/dtos/responses/SellerCreditLookupResult.ts +11 -0
- package/src/loanCredit/dtos/responses/SellerCreditRow.ts +26 -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 +16 -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
- package/src/retailWizard/dtos/WizardSessionLookupEntry.ts +2 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** Tope de `eventId`: el límite seguro de una llave de DynamoDB. */
|
|
2
|
+
export declare const RETAIL_EVENT_ID_MAX_LENGTH = 1024;
|
|
3
|
+
/** Rango de `limit` en las listas paginadas del retailer. */
|
|
4
|
+
export declare const RETAIL_LIST_LIMIT_MIN = 1;
|
|
5
|
+
export declare const RETAIL_LIST_LIMIT_MAX = 200;
|
|
6
|
+
/** Forma válida de un `tenantId`; también arma el nombre del secreto del retailer. */
|
|
7
|
+
export declare const RETAIL_TENANT_ID_PATTERN: RegExp;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RETAIL_TENANT_ID_PATTERN = exports.RETAIL_LIST_LIMIT_MAX = exports.RETAIL_LIST_LIMIT_MIN = exports.RETAIL_EVENT_ID_MAX_LENGTH = void 0;
|
|
4
|
+
/** Tope de `eventId`: el límite seguro de una llave de DynamoDB. */
|
|
5
|
+
exports.RETAIL_EVENT_ID_MAX_LENGTH = 1024;
|
|
6
|
+
/** Rango de `limit` en las listas paginadas del retailer. */
|
|
7
|
+
exports.RETAIL_LIST_LIMIT_MIN = 1;
|
|
8
|
+
exports.RETAIL_LIST_LIMIT_MAX = 200;
|
|
9
|
+
/** Forma válida de un `tenantId`; también arma el nombre del secreto del retailer. */
|
|
10
|
+
exports.RETAIL_TENANT_ID_PATTERN = /^[A-Za-z0-9_-]{1,64}$/;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { ReceiveInventoryEventRequest } from './ReceiveInventoryEventRequest';
|
|
2
|
+
import { ReceiveProductEventRequest } from './ReceiveProductEventRequest';
|
|
3
|
+
import { ReceiveRetailUserEventRequest } from './ReceiveRetailUserEventRequest';
|
|
4
|
+
import { ReceiveStoreEventRequest } from './ReceiveStoreEventRequest';
|
|
5
|
+
import { RetailEventResult } from './RetailEventResult';
|
|
6
|
+
/** Evento de tienda que el connector manda a retail-org-business, con el tenant de la credencial. */
|
|
7
|
+
export declare class ApplyStoreEventRequest extends ReceiveStoreEventRequest {
|
|
8
|
+
tenantId: string;
|
|
9
|
+
}
|
|
10
|
+
/** Evento de usuario que el connector manda a retail-org-business, con el tenant de la credencial. */
|
|
11
|
+
export declare class ApplyRetailUserEventRequest extends ReceiveRetailUserEventRequest {
|
|
12
|
+
tenantId: string;
|
|
13
|
+
}
|
|
14
|
+
/** Evento de producto que el connector manda a retail-catalog-business, con el tenant de la credencial. */
|
|
15
|
+
export declare class ApplyProductEventRequest extends ReceiveProductEventRequest {
|
|
16
|
+
tenantId: string;
|
|
17
|
+
}
|
|
18
|
+
/** Evento de inventario que el connector manda a retail-catalog-business, con el tenant de la credencial. */
|
|
19
|
+
export declare class ApplyInventoryEventRequest extends ReceiveInventoryEventRequest {
|
|
20
|
+
tenantId: string;
|
|
21
|
+
}
|
|
22
|
+
/** Cualquiera de los cuatro eventos que el connector manda a un destino. */
|
|
23
|
+
export type ApplyRetailEventRequest = ApplyStoreEventRequest | ApplyRetailUserEventRequest | ApplyProductEventRequest | ApplyInventoryEventRequest;
|
|
24
|
+
/** El destino contesta `200` con `result`; un rechazo de negocio es `REJECTED`, nunca 4xx. */
|
|
25
|
+
export type ApplyRetailEventResponse = RetailEventResult;
|
|
26
|
+
export type ApplyStoreEventResponse = RetailEventResult;
|
|
27
|
+
export type ApplyRetailUserEventResponse = RetailEventResult;
|
|
28
|
+
export type ApplyProductEventResponse = RetailEventResult;
|
|
29
|
+
export type ApplyInventoryEventResponse = RetailEventResult;
|
|
@@ -0,0 +1,54 @@
|
|
|
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.ApplyInventoryEventRequest = exports.ApplyProductEventRequest = exports.ApplyRetailUserEventRequest = exports.ApplyStoreEventRequest = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
const retailIntegrationLimits_1 = require("../constants/retailIntegrationLimits");
|
|
15
|
+
const ReceiveInventoryEventRequest_1 = require("./ReceiveInventoryEventRequest");
|
|
16
|
+
const ReceiveProductEventRequest_1 = require("./ReceiveProductEventRequest");
|
|
17
|
+
const ReceiveRetailUserEventRequest_1 = require("./ReceiveRetailUserEventRequest");
|
|
18
|
+
const ReceiveStoreEventRequest_1 = require("./ReceiveStoreEventRequest");
|
|
19
|
+
/** Evento de tienda que el connector manda a retail-org-business, con el tenant de la credencial. */
|
|
20
|
+
class ApplyStoreEventRequest extends ReceiveStoreEventRequest_1.ReceiveStoreEventRequest {
|
|
21
|
+
}
|
|
22
|
+
exports.ApplyStoreEventRequest = ApplyStoreEventRequest;
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, class_validator_1.IsString)(),
|
|
25
|
+
(0, class_validator_1.Matches)(retailIntegrationLimits_1.RETAIL_TENANT_ID_PATTERN),
|
|
26
|
+
__metadata("design:type", String)
|
|
27
|
+
], ApplyStoreEventRequest.prototype, "tenantId", void 0);
|
|
28
|
+
/** Evento de usuario que el connector manda a retail-org-business, con el tenant de la credencial. */
|
|
29
|
+
class ApplyRetailUserEventRequest extends ReceiveRetailUserEventRequest_1.ReceiveRetailUserEventRequest {
|
|
30
|
+
}
|
|
31
|
+
exports.ApplyRetailUserEventRequest = ApplyRetailUserEventRequest;
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, class_validator_1.IsString)(),
|
|
34
|
+
(0, class_validator_1.Matches)(retailIntegrationLimits_1.RETAIL_TENANT_ID_PATTERN),
|
|
35
|
+
__metadata("design:type", String)
|
|
36
|
+
], ApplyRetailUserEventRequest.prototype, "tenantId", void 0);
|
|
37
|
+
/** Evento de producto que el connector manda a retail-catalog-business, con el tenant de la credencial. */
|
|
38
|
+
class ApplyProductEventRequest extends ReceiveProductEventRequest_1.ReceiveProductEventRequest {
|
|
39
|
+
}
|
|
40
|
+
exports.ApplyProductEventRequest = ApplyProductEventRequest;
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, class_validator_1.IsString)(),
|
|
43
|
+
(0, class_validator_1.Matches)(retailIntegrationLimits_1.RETAIL_TENANT_ID_PATTERN),
|
|
44
|
+
__metadata("design:type", String)
|
|
45
|
+
], ApplyProductEventRequest.prototype, "tenantId", void 0);
|
|
46
|
+
/** Evento de inventario que el connector manda a retail-catalog-business, con el tenant de la credencial. */
|
|
47
|
+
class ApplyInventoryEventRequest extends ReceiveInventoryEventRequest_1.ReceiveInventoryEventRequest {
|
|
48
|
+
}
|
|
49
|
+
exports.ApplyInventoryEventRequest = ApplyInventoryEventRequest;
|
|
50
|
+
__decorate([
|
|
51
|
+
(0, class_validator_1.IsString)(),
|
|
52
|
+
(0, class_validator_1.Matches)(retailIntegrationLimits_1.RETAIL_TENANT_ID_PATTERN),
|
|
53
|
+
__metadata("design:type", String)
|
|
54
|
+
], ApplyInventoryEventRequest.prototype, "tenantId", 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.GetRetailInventoryRequest = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
const RetailTenantQuery_1 = require("./RetailTenantQuery");
|
|
15
|
+
/** Query de `GET /private/retail/inventory`; el inventario es por tienda y no pagina. */
|
|
16
|
+
class GetRetailInventoryRequest extends RetailTenantQuery_1.RetailTenantQuery {
|
|
17
|
+
}
|
|
18
|
+
exports.GetRetailInventoryRequest = GetRetailInventoryRequest;
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, class_validator_1.IsString)(),
|
|
21
|
+
(0, class_validator_1.Matches)(/\S/),
|
|
22
|
+
__metadata("design:type", String)
|
|
23
|
+
], GetRetailInventoryRequest.prototype, "storeId", void 0);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ListRetailCatalogRequest = void 0;
|
|
4
|
+
const RetailPagedQuery_1 = require("./RetailPagedQuery");
|
|
5
|
+
/** Query de `GET /private/retail/catalog`. */
|
|
6
|
+
class ListRetailCatalogRequest extends RetailPagedQuery_1.RetailPagedQuery {
|
|
7
|
+
}
|
|
8
|
+
exports.ListRetailCatalogRequest = ListRetailCatalogRequest;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ListRetailStoresRequest = void 0;
|
|
4
|
+
const RetailPagedQuery_1 = require("./RetailPagedQuery");
|
|
5
|
+
/** Query de `GET /private/retail/stores`. */
|
|
6
|
+
class ListRetailStoresRequest extends RetailPagedQuery_1.RetailPagedQuery {
|
|
7
|
+
}
|
|
8
|
+
exports.ListRetailStoresRequest = ListRetailStoresRequest;
|
|
@@ -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.ListRetailUsersRequest = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
const RetailPagedQuery_1 = require("./RetailPagedQuery");
|
|
15
|
+
/** Query de `GET /private/retail/users`; sin `storeId` trae todos los usuarios. */
|
|
16
|
+
class ListRetailUsersRequest extends RetailPagedQuery_1.RetailPagedQuery {
|
|
17
|
+
}
|
|
18
|
+
exports.ListRetailUsersRequest = ListRetailUsersRequest;
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, class_validator_1.IsOptional)(),
|
|
21
|
+
(0, class_validator_1.IsString)(),
|
|
22
|
+
(0, class_validator_1.Matches)(/\S/),
|
|
23
|
+
__metadata("design:type", String)
|
|
24
|
+
], ListRetailUsersRequest.prototype, "storeId", void 0);
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { InventoryEventTypeEnum } from '../enums/InventoryEventTypeEnum';
|
|
2
|
+
import { RetailEventEnvelope } from './RetailEventEnvelope';
|
|
3
|
+
/** Sobre de `POST /webhooks/inventory`. */
|
|
4
|
+
export declare class ReceiveInventoryEventRequest extends RetailEventEnvelope {
|
|
5
|
+
eventType: InventoryEventTypeEnum;
|
|
6
|
+
}
|
|
@@ -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.ReceiveInventoryEventRequest = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
const InventoryEventTypeEnum_1 = require("../enums/InventoryEventTypeEnum");
|
|
15
|
+
const RetailEventEnvelope_1 = require("./RetailEventEnvelope");
|
|
16
|
+
/** Sobre de `POST /webhooks/inventory`. */
|
|
17
|
+
class ReceiveInventoryEventRequest extends RetailEventEnvelope_1.RetailEventEnvelope {
|
|
18
|
+
}
|
|
19
|
+
exports.ReceiveInventoryEventRequest = ReceiveInventoryEventRequest;
|
|
20
|
+
__decorate([
|
|
21
|
+
(0, class_validator_1.IsIn)(Object.values(InventoryEventTypeEnum_1.InventoryEventTypeEnum)),
|
|
22
|
+
__metadata("design:type", String)
|
|
23
|
+
], ReceiveInventoryEventRequest.prototype, "eventType", void 0);
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ProductEventTypeEnum } from '../enums/ProductEventTypeEnum';
|
|
2
|
+
import { RetailEventEnvelope } from './RetailEventEnvelope';
|
|
3
|
+
/** Sobre de `POST /webhooks/catalog`. */
|
|
4
|
+
export declare class ReceiveProductEventRequest extends RetailEventEnvelope {
|
|
5
|
+
eventType: ProductEventTypeEnum;
|
|
6
|
+
}
|
|
@@ -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.ReceiveProductEventRequest = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
const ProductEventTypeEnum_1 = require("../enums/ProductEventTypeEnum");
|
|
15
|
+
const RetailEventEnvelope_1 = require("./RetailEventEnvelope");
|
|
16
|
+
/** Sobre de `POST /webhooks/catalog`. */
|
|
17
|
+
class ReceiveProductEventRequest extends RetailEventEnvelope_1.RetailEventEnvelope {
|
|
18
|
+
}
|
|
19
|
+
exports.ReceiveProductEventRequest = ReceiveProductEventRequest;
|
|
20
|
+
__decorate([
|
|
21
|
+
(0, class_validator_1.IsIn)(Object.values(ProductEventTypeEnum_1.ProductEventTypeEnum)),
|
|
22
|
+
__metadata("design:type", String)
|
|
23
|
+
], ReceiveProductEventRequest.prototype, "eventType", void 0);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { InventoryEventTypeEnum } from '../enums/InventoryEventTypeEnum';
|
|
2
|
+
import { ProductEventTypeEnum } from '../enums/ProductEventTypeEnum';
|
|
3
|
+
import { RetailUserEventTypeEnum } from '../enums/RetailUserEventTypeEnum';
|
|
4
|
+
import { StoreEventTypeEnum } from '../enums/StoreEventTypeEnum';
|
|
5
|
+
import { ReceiveInventoryEventRequest } from './ReceiveInventoryEventRequest';
|
|
6
|
+
import { ReceiveProductEventRequest } from './ReceiveProductEventRequest';
|
|
7
|
+
import { ReceiveRetailUserEventRequest } from './ReceiveRetailUserEventRequest';
|
|
8
|
+
import { ReceiveStoreEventRequest } from './ReceiveStoreEventRequest';
|
|
9
|
+
/** Cualquier `eventType` aceptado por alguno de los cuatro webhooks. */
|
|
10
|
+
export type RetailEventType = StoreEventTypeEnum | RetailUserEventTypeEnum | ProductEventTypeEnum | InventoryEventTypeEnum;
|
|
11
|
+
/** Sobre ya validado de cualquiera de los cuatro webhooks. */
|
|
12
|
+
export type ReceiveRetailEventRequest = ReceiveStoreEventRequest | ReceiveRetailUserEventRequest | ReceiveProductEventRequest | ReceiveInventoryEventRequest;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { RetailUserEventTypeEnum } from '../enums/RetailUserEventTypeEnum';
|
|
2
|
+
import { RetailEventEnvelope } from './RetailEventEnvelope';
|
|
3
|
+
/** Sobre de `POST /webhooks/users`. */
|
|
4
|
+
export declare class ReceiveRetailUserEventRequest extends RetailEventEnvelope {
|
|
5
|
+
eventType: RetailUserEventTypeEnum;
|
|
6
|
+
}
|
|
@@ -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.ReceiveRetailUserEventRequest = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
const RetailUserEventTypeEnum_1 = require("../enums/RetailUserEventTypeEnum");
|
|
15
|
+
const RetailEventEnvelope_1 = require("./RetailEventEnvelope");
|
|
16
|
+
/** Sobre de `POST /webhooks/users`. */
|
|
17
|
+
class ReceiveRetailUserEventRequest extends RetailEventEnvelope_1.RetailEventEnvelope {
|
|
18
|
+
}
|
|
19
|
+
exports.ReceiveRetailUserEventRequest = ReceiveRetailUserEventRequest;
|
|
20
|
+
__decorate([
|
|
21
|
+
(0, class_validator_1.IsIn)(Object.values(RetailUserEventTypeEnum_1.RetailUserEventTypeEnum)),
|
|
22
|
+
__metadata("design:type", String)
|
|
23
|
+
], ReceiveRetailUserEventRequest.prototype, "eventType", void 0);
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { StoreEventTypeEnum } from '../enums/StoreEventTypeEnum';
|
|
2
|
+
import { RetailEventEnvelope } from './RetailEventEnvelope';
|
|
3
|
+
/** Sobre de `POST /webhooks/stores`. */
|
|
4
|
+
export declare class ReceiveStoreEventRequest extends RetailEventEnvelope {
|
|
5
|
+
eventType: StoreEventTypeEnum;
|
|
6
|
+
}
|
|
@@ -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.ReceiveStoreEventRequest = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
const StoreEventTypeEnum_1 = require("../enums/StoreEventTypeEnum");
|
|
15
|
+
const RetailEventEnvelope_1 = require("./RetailEventEnvelope");
|
|
16
|
+
/** Sobre de `POST /webhooks/stores`. */
|
|
17
|
+
class ReceiveStoreEventRequest extends RetailEventEnvelope_1.RetailEventEnvelope {
|
|
18
|
+
}
|
|
19
|
+
exports.ReceiveStoreEventRequest = ReceiveStoreEventRequest;
|
|
20
|
+
__decorate([
|
|
21
|
+
(0, class_validator_1.IsIn)(Object.values(StoreEventTypeEnum_1.StoreEventTypeEnum)),
|
|
22
|
+
__metadata("design:type", String)
|
|
23
|
+
], ReceiveStoreEventRequest.prototype, "eventType", void 0);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RegisterRetailSaleRequest = void 0;
|
|
4
|
+
const RetailTenantQuery_1 = require("./RetailTenantQuery");
|
|
5
|
+
/** Query de `POST /private/retail/sales`; el cuerpo es la venta y no se valida aquí. */
|
|
6
|
+
class RegisterRetailSaleRequest extends RetailTenantQuery_1.RetailTenantQuery {
|
|
7
|
+
}
|
|
8
|
+
exports.RegisterRetailSaleRequest = RegisterRetailSaleRequest;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** Payload del evento: el connector no lo valida, lo valida el lambda destino. */
|
|
2
|
+
export type RetailEventPayload = Record<string, unknown>;
|
|
3
|
+
/** Campos comunes del sobre de un webhook; cada ruta agrega su `eventType`. */
|
|
4
|
+
export declare abstract class RetailEventEnvelope {
|
|
5
|
+
eventId: string;
|
|
6
|
+
occurredAt: string;
|
|
7
|
+
payload: RetailEventPayload;
|
|
8
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
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.RetailEventEnvelope = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
const retailIntegrationLimits_1 = require("../constants/retailIntegrationLimits");
|
|
15
|
+
const IsIsoDateTimeWithZone_1 = require("../validators/IsIsoDateTimeWithZone");
|
|
16
|
+
/** Campos comunes del sobre de un webhook; cada ruta agrega su `eventType`. */
|
|
17
|
+
class RetailEventEnvelope {
|
|
18
|
+
}
|
|
19
|
+
exports.RetailEventEnvelope = RetailEventEnvelope;
|
|
20
|
+
__decorate([
|
|
21
|
+
(0, class_validator_1.IsString)(),
|
|
22
|
+
(0, class_validator_1.Matches)(/\S/),
|
|
23
|
+
(0, class_validator_1.MaxLength)(retailIntegrationLimits_1.RETAIL_EVENT_ID_MAX_LENGTH),
|
|
24
|
+
__metadata("design:type", String)
|
|
25
|
+
], RetailEventEnvelope.prototype, "eventId", void 0);
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, class_validator_1.Validate)(IsIsoDateTimeWithZone_1.IsIsoDateTimeWithZone),
|
|
28
|
+
__metadata("design:type", String)
|
|
29
|
+
], RetailEventEnvelope.prototype, "occurredAt", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, class_validator_1.IsObject)(),
|
|
32
|
+
__metadata("design:type", Object)
|
|
33
|
+
], RetailEventEnvelope.prototype, "payload", void 0);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { RetailEventResultEnum } from '../enums/RetailEventResultEnum';
|
|
2
|
+
/** Resultado de un evento; `code` explica un `REJECTED` y es `null` en los demás. */
|
|
3
|
+
export interface RetailEventResult {
|
|
4
|
+
eventId: string;
|
|
5
|
+
result: RetailEventResultEnum;
|
|
6
|
+
code: string | null;
|
|
7
|
+
}
|
|
8
|
+
export type ReceiveStoreEventResponse = RetailEventResult;
|
|
9
|
+
export type ReceiveRetailUserEventResponse = RetailEventResult;
|
|
10
|
+
export type ReceiveProductEventResponse = RetailEventResult;
|
|
11
|
+
export type ReceiveInventoryEventResponse = RetailEventResult;
|
|
12
|
+
export type ReceiveRetailEventResponse = RetailEventResult;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { RetailInventoryMeta, RetailPageMeta } from '../models/RetailPageMeta';
|
|
2
|
+
import { RetailSystemPiece, RetailSystemStock } from '../models/RetailSystemInventory';
|
|
3
|
+
import { RetailSystemProduct } from '../models/RetailSystemProduct';
|
|
4
|
+
import { RetailSystemStore } from '../models/RetailSystemStore';
|
|
5
|
+
import { RetailSystemUser } from '../models/RetailSystemUser';
|
|
6
|
+
/** `data` de `GET /private/retail/stores`. */
|
|
7
|
+
export interface ListRetailStoresResponse {
|
|
8
|
+
items: RetailSystemStore[];
|
|
9
|
+
meta: RetailPageMeta;
|
|
10
|
+
}
|
|
11
|
+
/** `data` de `GET /private/retail/catalog`. */
|
|
12
|
+
export interface ListRetailCatalogResponse {
|
|
13
|
+
items: RetailSystemProduct[];
|
|
14
|
+
meta: RetailPageMeta;
|
|
15
|
+
}
|
|
16
|
+
/** `data` de `GET /private/retail/inventory`. */
|
|
17
|
+
export interface GetRetailInventoryResponse {
|
|
18
|
+
pieces: RetailSystemPiece[];
|
|
19
|
+
stock: RetailSystemStock[];
|
|
20
|
+
meta: RetailInventoryMeta;
|
|
21
|
+
}
|
|
22
|
+
/** `data` de `GET /private/retail/users`. */
|
|
23
|
+
export interface ListRetailUsersResponse {
|
|
24
|
+
items: RetailSystemUser[];
|
|
25
|
+
meta: RetailPageMeta;
|
|
26
|
+
}
|
|
27
|
+
/** `data` de `POST /private/retail/sales`: el id de la venta en el sistema del retailer. */
|
|
28
|
+
export interface RegisterRetailSaleResponse {
|
|
29
|
+
externalSaleId: string;
|
|
30
|
+
}
|
|
@@ -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.RetailPagedQuery = 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 RetailTenantQuery_1 = require("./RetailTenantQuery");
|
|
17
|
+
/** Base de las listas paginadas; `nextToken` es opaco y viaja tal cual. */
|
|
18
|
+
class RetailPagedQuery extends RetailTenantQuery_1.RetailTenantQuery {
|
|
19
|
+
}
|
|
20
|
+
exports.RetailPagedQuery = RetailPagedQuery;
|
|
21
|
+
__decorate([
|
|
22
|
+
(0, class_validator_1.IsOptional)(),
|
|
23
|
+
(0, class_transformer_1.Type)(() => Number),
|
|
24
|
+
(0, class_validator_1.IsInt)(),
|
|
25
|
+
(0, class_validator_1.Min)(retailIntegrationLimits_1.RETAIL_LIST_LIMIT_MIN),
|
|
26
|
+
(0, class_validator_1.Max)(retailIntegrationLimits_1.RETAIL_LIST_LIMIT_MAX),
|
|
27
|
+
__metadata("design:type", Number)
|
|
28
|
+
], RetailPagedQuery.prototype, "limit", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, class_validator_1.IsOptional)(),
|
|
31
|
+
(0, class_validator_1.IsString)(),
|
|
32
|
+
(0, class_validator_1.Matches)(/\S/),
|
|
33
|
+
__metadata("design:type", String)
|
|
34
|
+
], RetailPagedQuery.prototype, "nextToken", 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.RetailTenantQuery = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
const retailIntegrationLimits_1 = require("../constants/retailIntegrationLimits");
|
|
15
|
+
/** Base de toda llamada de salida: el tenant cuyo retailer se consulta. */
|
|
16
|
+
class RetailTenantQuery {
|
|
17
|
+
}
|
|
18
|
+
exports.RetailTenantQuery = RetailTenantQuery;
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, class_validator_1.IsString)(),
|
|
21
|
+
(0, class_validator_1.Matches)(retailIntegrationLimits_1.RETAIL_TENANT_ID_PATTERN),
|
|
22
|
+
__metadata("design:type", String)
|
|
23
|
+
], RetailTenantQuery.prototype, "tenantId", void 0);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.InventoryEventTypeEnum = void 0;
|
|
4
|
+
/** `eventType` válidos en `POST /webhooks/inventory`. */
|
|
5
|
+
var InventoryEventTypeEnum;
|
|
6
|
+
(function (InventoryEventTypeEnum) {
|
|
7
|
+
InventoryEventTypeEnum["INVENTORY_MOVEMENT_V1"] = "InventoryMovementV1";
|
|
8
|
+
})(InventoryEventTypeEnum || (exports.InventoryEventTypeEnum = InventoryEventTypeEnum = {}));
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ProductEventTypeEnum = void 0;
|
|
4
|
+
/** `eventType` válidos en `POST /webhooks/catalog`. */
|
|
5
|
+
var ProductEventTypeEnum;
|
|
6
|
+
(function (ProductEventTypeEnum) {
|
|
7
|
+
ProductEventTypeEnum["PRODUCT_CREATED_V1"] = "ProductCreatedV1";
|
|
8
|
+
ProductEventTypeEnum["PRODUCT_UPDATED_V1"] = "ProductUpdatedV1";
|
|
9
|
+
ProductEventTypeEnum["PRODUCT_STATUS_CHANGED_V1"] = "ProductStatusChangedV1";
|
|
10
|
+
})(ProductEventTypeEnum || (exports.ProductEventTypeEnum = ProductEventTypeEnum = {}));
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RetailCurrencyEnum = void 0;
|
|
4
|
+
/** Moneda de precios y ventas. */
|
|
5
|
+
var RetailCurrencyEnum;
|
|
6
|
+
(function (RetailCurrencyEnum) {
|
|
7
|
+
RetailCurrencyEnum["MXN"] = "MXN";
|
|
8
|
+
RetailCurrencyEnum["USD"] = "USD";
|
|
9
|
+
})(RetailCurrencyEnum || (exports.RetailCurrencyEnum = RetailCurrencyEnum = {}));
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RetailEventResultEnum = void 0;
|
|
4
|
+
/** Resultado de aplicar un evento del retailer en el lambda destino. */
|
|
5
|
+
var RetailEventResultEnum;
|
|
6
|
+
(function (RetailEventResultEnum) {
|
|
7
|
+
RetailEventResultEnum["APPLIED"] = "APPLIED";
|
|
8
|
+
RetailEventResultEnum["NOOP"] = "NOOP";
|
|
9
|
+
RetailEventResultEnum["REJECTED"] = "REJECTED";
|
|
10
|
+
})(RetailEventResultEnum || (exports.RetailEventResultEnum = RetailEventResultEnum = {}));
|