@fiado/type-kit 3.583.0 → 3.585.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/UpdateTenantUserEmailRequest.test.ts +24 -0
- package/_test_/unit/platformRbac/enums/__snapshots__/permissionBits.test.ts.snap +2 -1
- package/_test_/unit/platformRbac/enums/apiUserPermission.test.ts +3 -2
- package/_test_/unit/platformRbac/enums/retailIntegrationPermission.test.ts +13 -0
- package/_test_/unit/retailIntegration/eventPayloadBounds.test.ts +147 -0
- package/_test_/unit/retailIntegration/eventPayloads.test.ts +8 -0
- package/_test_/unit/retailIntegration/reconciliationContracts.test.ts +3 -3
- package/_test_/unit/retailIntegration/retailMovementsContracts.test.ts +109 -0
- package/_test_/unit/retailIntegration/retailSystemResponses.test.ts +120 -0
- package/bin/platformRbac/dtos/CreateTenantUserRequest.d.ts +2 -1
- package/bin/platformRbac/dtos/CreateTenantUserRequest.js +2 -1
- package/bin/platformRbac/dtos/UpdateTenantUserEmailRequest.d.ts +5 -0
- package/bin/platformRbac/dtos/UpdateTenantUserEmailRequest.js +30 -0
- package/bin/platformRbac/enums/Permission.d.ts +2 -1
- package/bin/platformRbac/enums/Permission.js +3 -0
- package/bin/platformRbac/index.d.ts +1 -0
- package/bin/platformRbac/index.js +1 -0
- package/bin/retailIntegration/constants/retailIntegrationLimits.d.ts +25 -0
- package/bin/retailIntegration/constants/retailIntegrationLimits.js +26 -1
- package/bin/retailIntegration/dtos/CheckRetailInventoryRequest.d.ts +4 -1
- package/bin/retailIntegration/dtos/CheckRetailInventoryRequest.js +4 -1
- package/bin/retailIntegration/dtos/GetRetailInventoryRequest.d.ts +3 -3
- package/bin/retailIntegration/dtos/GetRetailInventoryRequest.js +3 -3
- package/bin/retailIntegration/dtos/InventoryEventPayload.js +3 -0
- package/bin/retailIntegration/dtos/ListRetailInventoryMovementsRequest.d.ts +6 -0
- package/bin/retailIntegration/dtos/ListRetailInventoryMovementsRequest.js +29 -0
- package/bin/retailIntegration/dtos/ProductEventPayload.js +10 -2
- package/bin/retailIntegration/dtos/ReconciliationPageMessage.d.ts +6 -0
- package/bin/retailIntegration/dtos/ReconciliationPageMessage.js +20 -0
- package/bin/retailIntegration/dtos/RetailOutboundResponses.d.ts +10 -2
- package/bin/retailIntegration/dtos/RetailSystemResponses.d.ts +41 -0
- package/bin/retailIntegration/dtos/RetailSystemResponses.js +136 -0
- package/bin/retailIntegration/dtos/RetailUserEventPayload.js +3 -0
- package/bin/retailIntegration/dtos/StoreEventPayload.js +13 -0
- package/bin/retailIntegration/enums/ReconciliationEntityEnum.d.ts +2 -1
- package/bin/retailIntegration/enums/ReconciliationEntityEnum.js +1 -0
- package/bin/retailIntegration/enums/ReconciliationTriggerEnum.d.ts +4 -2
- package/bin/retailIntegration/enums/ReconciliationTriggerEnum.js +3 -1
- package/bin/retailIntegration/index.d.ts +3 -0
- package/bin/retailIntegration/index.js +3 -0
- package/bin/retailIntegration/models/RetailPageMeta.d.ts +3 -1
- package/bin/retailIntegration/models/RetailSystemInventory.d.ts +9 -1
- package/bin/retailIntegration/validators/IsMovementsRangeValid.d.ts +6 -0
- package/bin/retailIntegration/validators/IsMovementsRangeValid.js +28 -0
- package/package.json +1 -1
- package/src/platformRbac/dtos/CreateTenantUserRequest.ts +2 -1
- package/src/platformRbac/dtos/UpdateTenantUserEmailRequest.ts +12 -0
- package/src/platformRbac/enums/Permission.ts +3 -0
- package/src/platformRbac/index.ts +1 -0
- package/src/retailIntegration/constants/retailIntegrationLimits.ts +37 -0
- package/src/retailIntegration/dtos/CheckRetailInventoryRequest.ts +4 -1
- package/src/retailIntegration/dtos/GetRetailInventoryRequest.ts +3 -3
- package/src/retailIntegration/dtos/InventoryEventPayload.ts +11 -5
- package/src/retailIntegration/dtos/ListRetailInventoryMovementsRequest.ts +14 -0
- package/src/retailIntegration/dtos/ProductEventPayload.ts +19 -12
- package/src/retailIntegration/dtos/ReconciliationPageMessage.ts +21 -1
- package/src/retailIntegration/dtos/RetailOutboundResponses.ts +11 -2
- package/src/retailIntegration/dtos/RetailSystemResponses.ts +75 -0
- package/src/retailIntegration/dtos/RetailUserEventPayload.ts +5 -5
- package/src/retailIntegration/dtos/StoreEventPayload.ts +16 -14
- package/src/retailIntegration/enums/ReconciliationEntityEnum.ts +1 -0
- package/src/retailIntegration/enums/ReconciliationTriggerEnum.ts +3 -1
- package/src/retailIntegration/index.ts +3 -0
- package/src/retailIntegration/models/RetailPageMeta.ts +3 -1
- package/src/retailIntegration/models/RetailSystemInventory.ts +10 -1
- package/src/retailIntegration/validators/IsMovementsRangeValid.ts +17 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RETAIL_LIVE_CHECK_IDENTIFIERS_MAX = exports.RETAIL_DECIMAL_PATTERN = exports.RETAIL_SKU_PATTERN = exports.RETAIL_ZIP_CODE_MAX_LENGTH = exports.RETAIL_ZIP_CODE_MIN_LENGTH = exports.RETAIL_STORE_CODE_MAX_LENGTH = exports.RETAIL_ZONE_ID_PATTERN = exports.RETAIL_ENTITY_ID_PATTERN = exports.RETAIL_TENANT_ID_PATTERN = exports.RETAIL_LIST_LIMIT_MAX = exports.RETAIL_LIST_LIMIT_MIN = exports.RETAIL_EVENT_ID_MAX_LENGTH = void 0;
|
|
3
|
+
exports.RETAIL_MOVEMENTS_RANGE_MAX_MS = exports.RETAIL_LINE_INDEX_MAX = exports.RETAIL_LINE_INDEX_MIN = exports.RETAIL_ERROR_CODE_MAX_LENGTH = exports.RETAIL_EXTERNAL_ID_PATTERN = exports.RETAIL_NEXT_TOKEN_MAX_LENGTH = exports.RETAIL_EVENT_DECIMAL_PATTERN = exports.RETAIL_ELIGIBLE_FINANCIERS_MAX = exports.RETAIL_EVENT_STOCK_MAX = exports.RETAIL_LONG_TEXT_MAX_LENGTH = exports.RETAIL_SHORT_TEXT_MAX_LENGTH = exports.RETAIL_ID_TEXT_MAX_LENGTH = exports.RETAIL_EVENT_PIECES_MAX = exports.RETAIL_LIVE_CHECK_IDENTIFIERS_MAX = exports.RETAIL_DECIMAL_PATTERN = exports.RETAIL_SKU_PATTERN = exports.RETAIL_ZIP_CODE_MAX_LENGTH = exports.RETAIL_ZIP_CODE_MIN_LENGTH = exports.RETAIL_STORE_CODE_MAX_LENGTH = exports.RETAIL_ZONE_ID_PATTERN = exports.RETAIL_ENTITY_ID_PATTERN = exports.RETAIL_TENANT_ID_PATTERN = exports.RETAIL_LIST_LIMIT_MAX = exports.RETAIL_LIST_LIMIT_MIN = exports.RETAIL_EVENT_ID_MAX_LENGTH = void 0;
|
|
4
4
|
/** Tope de `eventId`: el límite seguro de una llave de DynamoDB. */
|
|
5
5
|
exports.RETAIL_EVENT_ID_MAX_LENGTH = 1024;
|
|
6
6
|
/** Rango de `limit` en las listas paginadas del retailer. */
|
|
@@ -23,3 +23,28 @@ exports.RETAIL_SKU_PATTERN = /^(?=.{1,64}$)[A-Za-z0-9-]+(?: +[A-Za-z0-9-]+)*$/;
|
|
|
23
23
|
exports.RETAIL_DECIMAL_PATTERN = /^\d+\.\d{2}$/;
|
|
24
24
|
/** Tope de identificadores por consulta de inventario en vivo. */
|
|
25
25
|
exports.RETAIL_LIVE_CHECK_IDENTIFIERS_MAX = 50;
|
|
26
|
+
/** Tope de piezas por evento `InventoryMovementV1`; más se rechaza con INVALID_PAYLOAD. */
|
|
27
|
+
exports.RETAIL_EVENT_PIECES_MAX = 30;
|
|
28
|
+
/** Tope de ids y códigos libres del retailer, como `externalId`. */
|
|
29
|
+
exports.RETAIL_ID_TEXT_MAX_LENGTH = 64;
|
|
30
|
+
/** Tope de textos cortos de los payloads: nombres, dirección, teléfono, marca, modelo, `identifier`. */
|
|
31
|
+
exports.RETAIL_SHORT_TEXT_MAX_LENGTH = 255;
|
|
32
|
+
/** Tope de textos largos de los payloads: descripción y referencia. */
|
|
33
|
+
exports.RETAIL_LONG_TEXT_MAX_LENGTH = 1000;
|
|
34
|
+
/** Tope de existencias por evento `InventoryMovementV1`. */
|
|
35
|
+
exports.RETAIL_EVENT_STOCK_MAX = 200;
|
|
36
|
+
/** Tope de financieras elegibles por producto. */
|
|
37
|
+
exports.RETAIL_ELIGIBLE_FINANCIERS_MAX = 50;
|
|
38
|
+
/** Decimal de los eventos del retailer: hasta 12 enteros y dos decimales, nunca negativo. */
|
|
39
|
+
exports.RETAIL_EVENT_DECIMAL_PATTERN = /^\d{1,12}\.\d{2}$/;
|
|
40
|
+
/** Tope del `nextToken` opaco que devuelve Zentral. */
|
|
41
|
+
exports.RETAIL_NEXT_TOKEN_MAX_LENGTH = 2048;
|
|
42
|
+
/** Id que asigna Zentral, como `externalSaleId`: no vacío, sin espacios y de a lo más 64. */
|
|
43
|
+
exports.RETAIL_EXTERNAL_ID_PATTERN = /^\S{1,64}$/;
|
|
44
|
+
/** Tope del `code` en el cuerpo de error de Zentral. */
|
|
45
|
+
exports.RETAIL_ERROR_CODE_MAX_LENGTH = 64;
|
|
46
|
+
/** Rango de `lineIndex` en un error de línea de venta. */
|
|
47
|
+
exports.RETAIL_LINE_INDEX_MIN = 0;
|
|
48
|
+
exports.RETAIL_LINE_INDEX_MAX = 999;
|
|
49
|
+
/** Rango máximo de `GET /inventory/movements`: 7 días en milisegundos. */
|
|
50
|
+
exports.RETAIL_MOVEMENTS_RANGE_MAX_MS = 7 * 24 * 60 * 60 * 1000;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { RetailTenantQuery } from './RetailTenantQuery';
|
|
2
|
-
/**
|
|
2
|
+
/**
|
|
3
|
+
* Query de `GET /private/retail/inventory/live-check`; `identifiers` llega como csv.
|
|
4
|
+
* @deprecated el live-check se va a quitar; el inventario se toma de movimientos y de la lectura diaria.
|
|
5
|
+
*/
|
|
3
6
|
export declare class CheckRetailInventoryRequest extends RetailTenantQuery {
|
|
4
7
|
storeId: string;
|
|
5
8
|
identifiers: string[];
|
|
@@ -18,7 +18,10 @@ const RetailTenantQuery_1 = require("./RetailTenantQuery");
|
|
|
18
18
|
function csvToArray({ value }) {
|
|
19
19
|
return typeof value === 'string' ? value.split(',').map((item) => item.trim()) : value;
|
|
20
20
|
}
|
|
21
|
-
/**
|
|
21
|
+
/**
|
|
22
|
+
* Query de `GET /private/retail/inventory/live-check`; `identifiers` llega como csv.
|
|
23
|
+
* @deprecated el live-check se va a quitar; el inventario se toma de movimientos y de la lectura diaria.
|
|
24
|
+
*/
|
|
22
25
|
class CheckRetailInventoryRequest extends RetailTenantQuery_1.RetailTenantQuery {
|
|
23
26
|
}
|
|
24
27
|
exports.CheckRetailInventoryRequest = CheckRetailInventoryRequest;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
/** Query de `GET /private/retail/inventory`; el inventario es por tienda y
|
|
3
|
-
export declare class GetRetailInventoryRequest extends
|
|
1
|
+
import { RetailPagedQuery } from './RetailPagedQuery';
|
|
2
|
+
/** Query de `GET /private/retail/inventory`; el inventario es por tienda y pagina con `limit`/`nextToken`. */
|
|
3
|
+
export declare class GetRetailInventoryRequest extends RetailPagedQuery {
|
|
4
4
|
storeId: string;
|
|
5
5
|
}
|
|
@@ -11,9 +11,9 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.GetRetailInventoryRequest = void 0;
|
|
13
13
|
const class_validator_1 = require("class-validator");
|
|
14
|
-
const
|
|
15
|
-
/** Query de `GET /private/retail/inventory`; el inventario es por tienda y
|
|
16
|
-
class GetRetailInventoryRequest extends
|
|
14
|
+
const RetailPagedQuery_1 = require("./RetailPagedQuery");
|
|
15
|
+
/** Query de `GET /private/retail/inventory`; el inventario es por tienda y pagina con `limit`/`nextToken`. */
|
|
16
|
+
class GetRetailInventoryRequest extends RetailPagedQuery_1.RetailPagedQuery {
|
|
17
17
|
}
|
|
18
18
|
exports.GetRetailInventoryRequest = GetRetailInventoryRequest;
|
|
19
19
|
__decorate([
|
|
@@ -27,6 +27,7 @@ __decorate([
|
|
|
27
27
|
__decorate([
|
|
28
28
|
(0, class_validator_1.IsString)(),
|
|
29
29
|
(0, class_validator_1.Matches)(/\S/),
|
|
30
|
+
(0, class_validator_1.MaxLength)(retailIntegrationLimits_1.RETAIL_SHORT_TEXT_MAX_LENGTH),
|
|
30
31
|
__metadata("design:type", String)
|
|
31
32
|
], PieceEventPayload.prototype, "identifier", void 0);
|
|
32
33
|
__decorate([
|
|
@@ -80,6 +81,7 @@ __decorate([
|
|
|
80
81
|
], InventoryEventPayload.prototype, "targetStoreId", void 0);
|
|
81
82
|
__decorate([
|
|
82
83
|
(0, class_validator_1.IsArray)(),
|
|
84
|
+
(0, class_validator_1.ArrayMaxSize)(retailIntegrationLimits_1.RETAIL_EVENT_PIECES_MAX),
|
|
83
85
|
(0, class_validator_1.ValidateNested)({ each: true }),
|
|
84
86
|
(0, class_transformer_1.Type)(() => PieceEventPayload),
|
|
85
87
|
(0, class_validator_1.Validate)(payloadValidators_1.HasUniqueKeys, ['identifier']),
|
|
@@ -87,6 +89,7 @@ __decorate([
|
|
|
87
89
|
], InventoryEventPayload.prototype, "pieces", void 0);
|
|
88
90
|
__decorate([
|
|
89
91
|
(0, class_validator_1.IsArray)(),
|
|
92
|
+
(0, class_validator_1.ArrayMaxSize)(retailIntegrationLimits_1.RETAIL_EVENT_STOCK_MAX),
|
|
90
93
|
(0, class_validator_1.ValidateNested)({ each: true }),
|
|
91
94
|
(0, class_transformer_1.Type)(() => StockEventPayload),
|
|
92
95
|
(0, class_validator_1.Validate)(payloadValidators_1.HasUniqueKeys, ['storeId', 'sku']),
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { RetailPagedQuery } from './RetailPagedQuery';
|
|
2
|
+
/** Query de `GET /private/retail/inventory/movements`: rango `[from, to)` de a lo más 7 días. */
|
|
3
|
+
export declare class ListRetailInventoryMovementsRequest extends RetailPagedQuery {
|
|
4
|
+
from: string;
|
|
5
|
+
to: 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
|
+
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.ListRetailInventoryMovementsRequest = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
const IsIsoDateTimeWithZone_1 = require("../validators/IsIsoDateTimeWithZone");
|
|
15
|
+
const IsMovementsRangeValid_1 = require("../validators/IsMovementsRangeValid");
|
|
16
|
+
const RetailPagedQuery_1 = require("./RetailPagedQuery");
|
|
17
|
+
/** Query de `GET /private/retail/inventory/movements`: rango `[from, to)` de a lo más 7 días. */
|
|
18
|
+
class ListRetailInventoryMovementsRequest extends RetailPagedQuery_1.RetailPagedQuery {
|
|
19
|
+
}
|
|
20
|
+
exports.ListRetailInventoryMovementsRequest = ListRetailInventoryMovementsRequest;
|
|
21
|
+
__decorate([
|
|
22
|
+
(0, class_validator_1.Validate)(IsIsoDateTimeWithZone_1.IsIsoDateTimeWithZone),
|
|
23
|
+
__metadata("design:type", String)
|
|
24
|
+
], ListRetailInventoryMovementsRequest.prototype, "from", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, class_validator_1.Validate)(IsIsoDateTimeWithZone_1.IsIsoDateTimeWithZone),
|
|
27
|
+
(0, class_validator_1.Validate)(IsMovementsRangeValid_1.IsMovementsRangeValid),
|
|
28
|
+
__metadata("design:type", String)
|
|
29
|
+
], ListRetailInventoryMovementsRequest.prototype, "to", void 0);
|
|
@@ -22,13 +22,13 @@ class ProductEventPricePayload {
|
|
|
22
22
|
exports.ProductEventPricePayload = ProductEventPricePayload;
|
|
23
23
|
__decorate([
|
|
24
24
|
(0, class_validator_1.IsString)(),
|
|
25
|
-
(0, class_validator_1.Matches)(retailIntegrationLimits_1.
|
|
25
|
+
(0, class_validator_1.Matches)(retailIntegrationLimits_1.RETAIL_EVENT_DECIMAL_PATTERN),
|
|
26
26
|
__metadata("design:type", String)
|
|
27
27
|
], ProductEventPricePayload.prototype, "basePrice", void 0);
|
|
28
28
|
__decorate([
|
|
29
29
|
(0, class_validator_1.ValidateIf)(payloadValidators_1.isNullOrValidated),
|
|
30
30
|
(0, class_validator_1.IsString)(),
|
|
31
|
-
(0, class_validator_1.Matches)(retailIntegrationLimits_1.
|
|
31
|
+
(0, class_validator_1.Matches)(retailIntegrationLimits_1.RETAIL_EVENT_DECIMAL_PATTERN),
|
|
32
32
|
__metadata("design:type", String)
|
|
33
33
|
], ProductEventPricePayload.prototype, "listPrice", void 0);
|
|
34
34
|
__decorate([
|
|
@@ -47,31 +47,37 @@ __decorate([
|
|
|
47
47
|
__decorate([
|
|
48
48
|
(0, class_validator_1.IsString)(),
|
|
49
49
|
(0, class_validator_1.Matches)(/\S/),
|
|
50
|
+
(0, class_validator_1.MaxLength)(retailIntegrationLimits_1.RETAIL_ID_TEXT_MAX_LENGTH),
|
|
50
51
|
__metadata("design:type", String)
|
|
51
52
|
], ProductEventPayload.prototype, "externalId", void 0);
|
|
52
53
|
__decorate([
|
|
53
54
|
(0, class_validator_1.IsString)(),
|
|
54
55
|
(0, class_validator_1.Matches)(/\S/),
|
|
56
|
+
(0, class_validator_1.MaxLength)(retailIntegrationLimits_1.RETAIL_SHORT_TEXT_MAX_LENGTH),
|
|
55
57
|
__metadata("design:type", String)
|
|
56
58
|
], ProductEventPayload.prototype, "brand", void 0);
|
|
57
59
|
__decorate([
|
|
58
60
|
(0, class_validator_1.IsString)(),
|
|
59
61
|
(0, class_validator_1.Matches)(/\S/),
|
|
62
|
+
(0, class_validator_1.MaxLength)(retailIntegrationLimits_1.RETAIL_SHORT_TEXT_MAX_LENGTH),
|
|
60
63
|
__metadata("design:type", String)
|
|
61
64
|
], ProductEventPayload.prototype, "model", void 0);
|
|
62
65
|
__decorate([
|
|
63
66
|
(0, class_validator_1.ValidateIf)(payloadValidators_1.isNullOrValidated),
|
|
64
67
|
(0, class_validator_1.IsString)(),
|
|
68
|
+
(0, class_validator_1.MaxLength)(retailIntegrationLimits_1.RETAIL_SHORT_TEXT_MAX_LENGTH),
|
|
65
69
|
__metadata("design:type", String)
|
|
66
70
|
], ProductEventPayload.prototype, "color", void 0);
|
|
67
71
|
__decorate([
|
|
68
72
|
(0, class_validator_1.ValidateIf)(payloadValidators_1.isNullOrValidated),
|
|
69
73
|
(0, class_validator_1.IsString)(),
|
|
74
|
+
(0, class_validator_1.MaxLength)(retailIntegrationLimits_1.RETAIL_SHORT_TEXT_MAX_LENGTH),
|
|
70
75
|
__metadata("design:type", String)
|
|
71
76
|
], ProductEventPayload.prototype, "capacity", void 0);
|
|
72
77
|
__decorate([
|
|
73
78
|
(0, class_validator_1.ValidateIf)(payloadValidators_1.isNullOrValidated),
|
|
74
79
|
(0, class_validator_1.IsString)(),
|
|
80
|
+
(0, class_validator_1.MaxLength)(retailIntegrationLimits_1.RETAIL_LONG_TEXT_MAX_LENGTH),
|
|
75
81
|
__metadata("design:type", String)
|
|
76
82
|
], ProductEventPayload.prototype, "description", void 0);
|
|
77
83
|
__decorate([
|
|
@@ -93,12 +99,14 @@ __decorate([
|
|
|
93
99
|
], ProductEventPayload.prototype, "currencyId", void 0);
|
|
94
100
|
__decorate([
|
|
95
101
|
(0, class_validator_1.IsDefined)(),
|
|
102
|
+
(0, class_validator_1.IsObject)(),
|
|
96
103
|
(0, class_validator_1.ValidateNested)(),
|
|
97
104
|
(0, class_transformer_1.Type)(() => ProductEventPricePayload),
|
|
98
105
|
__metadata("design:type", ProductEventPricePayload)
|
|
99
106
|
], ProductEventPayload.prototype, "price", void 0);
|
|
100
107
|
__decorate([
|
|
101
108
|
(0, class_validator_1.IsArray)(),
|
|
109
|
+
(0, class_validator_1.ArrayMaxSize)(retailIntegrationLimits_1.RETAIL_ELIGIBLE_FINANCIERS_MAX),
|
|
102
110
|
(0, class_validator_1.IsIn)(Object.values(enums_1.RetailFinancierEnum), { each: true }),
|
|
103
111
|
__metadata("design:type", Array)
|
|
104
112
|
], ProductEventPayload.prototype, "eligibleFinanciers", void 0);
|
|
@@ -12,4 +12,10 @@ export declare class ReconciliationPageMessage {
|
|
|
12
12
|
storeId?: string;
|
|
13
13
|
/** Veces que el mensaje ya se re-encoló. */
|
|
14
14
|
requeueCount?: number;
|
|
15
|
+
/** Cursor de Zentral para la siguiente página del inventario de la tienda. */
|
|
16
|
+
nextToken?: string;
|
|
17
|
+
/** Inicio del rango de movimientos, incluido. */
|
|
18
|
+
from?: string;
|
|
19
|
+
/** Fin del rango de movimientos, excluido. */
|
|
20
|
+
to?: string;
|
|
15
21
|
}
|
|
@@ -13,6 +13,7 @@ exports.ReconciliationPageMessage = void 0;
|
|
|
13
13
|
const class_transformer_1 = require("class-transformer");
|
|
14
14
|
const class_validator_1 = require("class-validator");
|
|
15
15
|
const ReconciliationEntityEnum_1 = require("../enums/ReconciliationEntityEnum");
|
|
16
|
+
const IsIsoDateTimeWithZone_1 = require("../validators/IsIsoDateTimeWithZone");
|
|
16
17
|
/** Mensaje de la cola de revisión: una página, o una tienda completa en inventario. */
|
|
17
18
|
class ReconciliationPageMessage {
|
|
18
19
|
}
|
|
@@ -60,3 +61,22 @@ __decorate([
|
|
|
60
61
|
(0, class_validator_1.Min)(0),
|
|
61
62
|
__metadata("design:type", Number)
|
|
62
63
|
], ReconciliationPageMessage.prototype, "requeueCount", void 0);
|
|
64
|
+
__decorate([
|
|
65
|
+
(0, class_transformer_1.Expose)(),
|
|
66
|
+
(0, class_validator_1.IsOptional)(),
|
|
67
|
+
(0, class_validator_1.IsString)(),
|
|
68
|
+
(0, class_validator_1.Matches)(/\S/),
|
|
69
|
+
__metadata("design:type", String)
|
|
70
|
+
], ReconciliationPageMessage.prototype, "nextToken", void 0);
|
|
71
|
+
__decorate([
|
|
72
|
+
(0, class_transformer_1.Expose)(),
|
|
73
|
+
(0, class_validator_1.IsOptional)(),
|
|
74
|
+
(0, class_validator_1.Validate)(IsIsoDateTimeWithZone_1.IsIsoDateTimeWithZone),
|
|
75
|
+
__metadata("design:type", String)
|
|
76
|
+
], ReconciliationPageMessage.prototype, "from", void 0);
|
|
77
|
+
__decorate([
|
|
78
|
+
(0, class_transformer_1.Expose)(),
|
|
79
|
+
(0, class_validator_1.IsOptional)(),
|
|
80
|
+
(0, class_validator_1.Validate)(IsIsoDateTimeWithZone_1.IsIsoDateTimeWithZone),
|
|
81
|
+
__metadata("design:type", String)
|
|
82
|
+
], ReconciliationPageMessage.prototype, "to", void 0);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { RetailInventoryMeta, RetailPageMeta } from '../models/RetailPageMeta';
|
|
2
|
-
import { RetailSystemPiece, RetailSystemStock } from '../models/RetailSystemInventory';
|
|
2
|
+
import { RetailSystemInventoryMovement, RetailSystemPiece, RetailSystemStock } from '../models/RetailSystemInventory';
|
|
3
3
|
import { RetailSystemProduct } from '../models/RetailSystemProduct';
|
|
4
4
|
import { RetailSystemStore } from '../models/RetailSystemStore';
|
|
5
5
|
import { RetailSystemUser } from '../models/RetailSystemUser';
|
|
@@ -19,6 +19,11 @@ export interface GetRetailInventoryResponse {
|
|
|
19
19
|
stock: RetailSystemStock[];
|
|
20
20
|
meta: RetailInventoryMeta;
|
|
21
21
|
}
|
|
22
|
+
/** `data` de `GET /private/retail/inventory/movements`. */
|
|
23
|
+
export interface ListRetailInventoryMovementsResponse {
|
|
24
|
+
items: RetailSystemInventoryMovement[];
|
|
25
|
+
meta: RetailPageMeta;
|
|
26
|
+
}
|
|
22
27
|
/** `data` de `GET /private/retail/users`. */
|
|
23
28
|
export interface ListRetailUsersResponse {
|
|
24
29
|
items: RetailSystemUser[];
|
|
@@ -32,7 +37,10 @@ export interface RegisterRetailSaleResponse {
|
|
|
32
37
|
export interface CancelRetailSaleResponse {
|
|
33
38
|
saleId: string;
|
|
34
39
|
}
|
|
35
|
-
/**
|
|
40
|
+
/**
|
|
41
|
+
* `data` de `GET /private/retail/inventory/live-check`: los identificadores que el retailer lista en la tienda.
|
|
42
|
+
* @deprecated el live-check se va a quitar; el inventario se toma de movimientos y de la lectura diaria.
|
|
43
|
+
*/
|
|
36
44
|
export interface CheckRetailInventoryResponse {
|
|
37
45
|
listed: string[];
|
|
38
46
|
generatedAt: string;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { ReceiveInventoryEventRequest } from './ReceiveInventoryEventRequest';
|
|
2
|
+
/** `meta` de una página de Zentral; `nextToken` en `null` cierra la lectura y nunca se omite. */
|
|
3
|
+
export declare class RetailSystemPageMeta {
|
|
4
|
+
count: number;
|
|
5
|
+
nextToken: string | null;
|
|
6
|
+
}
|
|
7
|
+
/** Página de una lista de Zentral; cada consumidor valida sus renglones de `data`. */
|
|
8
|
+
export declare class RetailSystemPageResponse {
|
|
9
|
+
data: unknown[];
|
|
10
|
+
meta: RetailSystemPageMeta;
|
|
11
|
+
}
|
|
12
|
+
/** `data` de una página de `GET /inventory`: piezas y existencias crudas. */
|
|
13
|
+
export declare class RetailSystemInventoryData {
|
|
14
|
+
pieces: unknown[];
|
|
15
|
+
stock: unknown[];
|
|
16
|
+
}
|
|
17
|
+
/** `meta` de una página de `GET /inventory`; `generatedAt` es igual en toda la lectura. */
|
|
18
|
+
export declare class RetailSystemInventoryMeta extends RetailSystemPageMeta {
|
|
19
|
+
storeId: string;
|
|
20
|
+
generatedAt: string;
|
|
21
|
+
}
|
|
22
|
+
/** Respuesta de `GET /inventory` de Zentral. */
|
|
23
|
+
export declare class RetailSystemInventoryResponse {
|
|
24
|
+
data: RetailSystemInventoryData;
|
|
25
|
+
meta: RetailSystemInventoryMeta;
|
|
26
|
+
}
|
|
27
|
+
/** `data` de `POST /sales` de Zentral. */
|
|
28
|
+
export declare class RetailSystemSaleResponse {
|
|
29
|
+
externalSaleId: string;
|
|
30
|
+
}
|
|
31
|
+
/** Cuerpo de error de Zentral; `lineIndex` solo viene en errores de una línea de venta. */
|
|
32
|
+
export declare class RetailSystemErrorBody {
|
|
33
|
+
code: string;
|
|
34
|
+
msg?: string;
|
|
35
|
+
lineIndex?: number;
|
|
36
|
+
}
|
|
37
|
+
/** Respuesta de `GET /inventory/movements`: cada elemento es el mismo sobre del webhook de inventario. */
|
|
38
|
+
export declare class RetailSystemMovementsResponse {
|
|
39
|
+
data: ReceiveInventoryEventRequest[];
|
|
40
|
+
meta: RetailSystemPageMeta;
|
|
41
|
+
}
|
|
@@ -0,0 +1,136 @@
|
|
|
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.RetailSystemMovementsResponse = exports.RetailSystemErrorBody = exports.RetailSystemSaleResponse = exports.RetailSystemInventoryResponse = exports.RetailSystemInventoryMeta = exports.RetailSystemInventoryData = exports.RetailSystemPageResponse = exports.RetailSystemPageMeta = 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 IsIsoDateTimeWithZone_1 = require("../validators/IsIsoDateTimeWithZone");
|
|
17
|
+
const payloadValidators_1 = require("../validators/payloadValidators");
|
|
18
|
+
const ReceiveInventoryEventRequest_1 = require("./ReceiveInventoryEventRequest");
|
|
19
|
+
/** `meta` de una página de Zentral; `nextToken` en `null` cierra la lectura y nunca se omite. */
|
|
20
|
+
class RetailSystemPageMeta {
|
|
21
|
+
}
|
|
22
|
+
exports.RetailSystemPageMeta = RetailSystemPageMeta;
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, class_validator_1.IsInt)(),
|
|
25
|
+
(0, class_validator_1.Min)(0),
|
|
26
|
+
__metadata("design:type", Number)
|
|
27
|
+
], RetailSystemPageMeta.prototype, "count", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, class_validator_1.ValidateIf)(payloadValidators_1.isNullOrValidated),
|
|
30
|
+
(0, class_validator_1.IsString)(),
|
|
31
|
+
(0, class_validator_1.MaxLength)(retailIntegrationLimits_1.RETAIL_NEXT_TOKEN_MAX_LENGTH),
|
|
32
|
+
__metadata("design:type", String)
|
|
33
|
+
], RetailSystemPageMeta.prototype, "nextToken", void 0);
|
|
34
|
+
/** Página de una lista de Zentral; cada consumidor valida sus renglones de `data`. */
|
|
35
|
+
class RetailSystemPageResponse {
|
|
36
|
+
}
|
|
37
|
+
exports.RetailSystemPageResponse = RetailSystemPageResponse;
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, class_validator_1.IsArray)(),
|
|
40
|
+
__metadata("design:type", Array)
|
|
41
|
+
], RetailSystemPageResponse.prototype, "data", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, class_validator_1.IsObject)(),
|
|
44
|
+
(0, class_validator_1.ValidateNested)(),
|
|
45
|
+
(0, class_transformer_1.Type)(() => RetailSystemPageMeta),
|
|
46
|
+
__metadata("design:type", RetailSystemPageMeta)
|
|
47
|
+
], RetailSystemPageResponse.prototype, "meta", void 0);
|
|
48
|
+
/** `data` de una página de `GET /inventory`: piezas y existencias crudas. */
|
|
49
|
+
class RetailSystemInventoryData {
|
|
50
|
+
}
|
|
51
|
+
exports.RetailSystemInventoryData = RetailSystemInventoryData;
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, class_validator_1.IsArray)(),
|
|
54
|
+
__metadata("design:type", Array)
|
|
55
|
+
], RetailSystemInventoryData.prototype, "pieces", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
(0, class_validator_1.IsArray)(),
|
|
58
|
+
__metadata("design:type", Array)
|
|
59
|
+
], RetailSystemInventoryData.prototype, "stock", void 0);
|
|
60
|
+
/** `meta` de una página de `GET /inventory`; `generatedAt` es igual en toda la lectura. */
|
|
61
|
+
class RetailSystemInventoryMeta extends RetailSystemPageMeta {
|
|
62
|
+
}
|
|
63
|
+
exports.RetailSystemInventoryMeta = RetailSystemInventoryMeta;
|
|
64
|
+
__decorate([
|
|
65
|
+
(0, class_validator_1.IsString)(),
|
|
66
|
+
(0, class_validator_1.Matches)(retailIntegrationLimits_1.RETAIL_ENTITY_ID_PATTERN),
|
|
67
|
+
__metadata("design:type", String)
|
|
68
|
+
], RetailSystemInventoryMeta.prototype, "storeId", void 0);
|
|
69
|
+
__decorate([
|
|
70
|
+
(0, class_validator_1.Validate)(IsIsoDateTimeWithZone_1.IsIsoDateTimeWithZone),
|
|
71
|
+
__metadata("design:type", String)
|
|
72
|
+
], RetailSystemInventoryMeta.prototype, "generatedAt", void 0);
|
|
73
|
+
/** Respuesta de `GET /inventory` de Zentral. */
|
|
74
|
+
class RetailSystemInventoryResponse {
|
|
75
|
+
}
|
|
76
|
+
exports.RetailSystemInventoryResponse = RetailSystemInventoryResponse;
|
|
77
|
+
__decorate([
|
|
78
|
+
(0, class_validator_1.IsObject)(),
|
|
79
|
+
(0, class_validator_1.ValidateNested)(),
|
|
80
|
+
(0, class_transformer_1.Type)(() => RetailSystemInventoryData),
|
|
81
|
+
__metadata("design:type", RetailSystemInventoryData)
|
|
82
|
+
], RetailSystemInventoryResponse.prototype, "data", void 0);
|
|
83
|
+
__decorate([
|
|
84
|
+
(0, class_validator_1.IsObject)(),
|
|
85
|
+
(0, class_validator_1.ValidateNested)(),
|
|
86
|
+
(0, class_transformer_1.Type)(() => RetailSystemInventoryMeta),
|
|
87
|
+
__metadata("design:type", RetailSystemInventoryMeta)
|
|
88
|
+
], RetailSystemInventoryResponse.prototype, "meta", void 0);
|
|
89
|
+
/** `data` de `POST /sales` de Zentral. */
|
|
90
|
+
class RetailSystemSaleResponse {
|
|
91
|
+
}
|
|
92
|
+
exports.RetailSystemSaleResponse = RetailSystemSaleResponse;
|
|
93
|
+
__decorate([
|
|
94
|
+
(0, class_validator_1.IsString)(),
|
|
95
|
+
(0, class_validator_1.MaxLength)(retailIntegrationLimits_1.RETAIL_ID_TEXT_MAX_LENGTH),
|
|
96
|
+
(0, class_validator_1.Matches)(retailIntegrationLimits_1.RETAIL_EXTERNAL_ID_PATTERN),
|
|
97
|
+
__metadata("design:type", String)
|
|
98
|
+
], RetailSystemSaleResponse.prototype, "externalSaleId", void 0);
|
|
99
|
+
/** Cuerpo de error de Zentral; `lineIndex` solo viene en errores de una línea de venta. */
|
|
100
|
+
class RetailSystemErrorBody {
|
|
101
|
+
}
|
|
102
|
+
exports.RetailSystemErrorBody = RetailSystemErrorBody;
|
|
103
|
+
__decorate([
|
|
104
|
+
(0, class_validator_1.IsString)(),
|
|
105
|
+
(0, class_validator_1.Matches)(/\S/),
|
|
106
|
+
(0, class_validator_1.MaxLength)(retailIntegrationLimits_1.RETAIL_ERROR_CODE_MAX_LENGTH),
|
|
107
|
+
__metadata("design:type", String)
|
|
108
|
+
], RetailSystemErrorBody.prototype, "code", void 0);
|
|
109
|
+
__decorate([
|
|
110
|
+
(0, class_validator_1.IsOptional)(),
|
|
111
|
+
(0, class_validator_1.IsString)(),
|
|
112
|
+
__metadata("design:type", String)
|
|
113
|
+
], RetailSystemErrorBody.prototype, "msg", void 0);
|
|
114
|
+
__decorate([
|
|
115
|
+
(0, class_validator_1.IsOptional)(),
|
|
116
|
+
(0, class_validator_1.IsInt)(),
|
|
117
|
+
(0, class_validator_1.Min)(retailIntegrationLimits_1.RETAIL_LINE_INDEX_MIN),
|
|
118
|
+
(0, class_validator_1.Max)(retailIntegrationLimits_1.RETAIL_LINE_INDEX_MAX),
|
|
119
|
+
__metadata("design:type", Number)
|
|
120
|
+
], RetailSystemErrorBody.prototype, "lineIndex", void 0);
|
|
121
|
+
/** Respuesta de `GET /inventory/movements`: cada elemento es el mismo sobre del webhook de inventario. */
|
|
122
|
+
class RetailSystemMovementsResponse {
|
|
123
|
+
}
|
|
124
|
+
exports.RetailSystemMovementsResponse = RetailSystemMovementsResponse;
|
|
125
|
+
__decorate([
|
|
126
|
+
(0, class_validator_1.IsArray)(),
|
|
127
|
+
(0, class_validator_1.ValidateNested)({ each: true }),
|
|
128
|
+
(0, class_transformer_1.Type)(() => ReceiveInventoryEventRequest_1.ReceiveInventoryEventRequest),
|
|
129
|
+
__metadata("design:type", Array)
|
|
130
|
+
], RetailSystemMovementsResponse.prototype, "data", void 0);
|
|
131
|
+
__decorate([
|
|
132
|
+
(0, class_validator_1.IsObject)(),
|
|
133
|
+
(0, class_validator_1.ValidateNested)(),
|
|
134
|
+
(0, class_transformer_1.Type)(() => RetailSystemPageMeta),
|
|
135
|
+
__metadata("design:type", RetailSystemPageMeta)
|
|
136
|
+
], RetailSystemMovementsResponse.prototype, "meta", void 0);
|
|
@@ -26,15 +26,18 @@ __decorate([
|
|
|
26
26
|
__decorate([
|
|
27
27
|
(0, class_validator_1.IsString)(),
|
|
28
28
|
(0, class_validator_1.Matches)(/\S/),
|
|
29
|
+
(0, class_validator_1.MaxLength)(retailIntegrationLimits_1.RETAIL_SHORT_TEXT_MAX_LENGTH),
|
|
29
30
|
__metadata("design:type", String)
|
|
30
31
|
], RetailUserEventPayload.prototype, "displayName", void 0);
|
|
31
32
|
__decorate([
|
|
32
33
|
(0, class_validator_1.IsEmail)(),
|
|
34
|
+
(0, class_validator_1.MaxLength)(retailIntegrationLimits_1.RETAIL_SHORT_TEXT_MAX_LENGTH),
|
|
33
35
|
__metadata("design:type", String)
|
|
34
36
|
], RetailUserEventPayload.prototype, "email", void 0);
|
|
35
37
|
__decorate([
|
|
36
38
|
(0, class_validator_1.ValidateIf)(payloadValidators_1.isNullOrValidated),
|
|
37
39
|
(0, class_validator_1.IsString)(),
|
|
40
|
+
(0, class_validator_1.MaxLength)(retailIntegrationLimits_1.RETAIL_SHORT_TEXT_MAX_LENGTH),
|
|
38
41
|
__metadata("design:type", String)
|
|
39
42
|
], RetailUserEventPayload.prototype, "phone", void 0);
|
|
40
43
|
__decorate([
|
|
@@ -24,31 +24,37 @@ exports.StoreEventAddressPayload = StoreEventAddressPayload;
|
|
|
24
24
|
__decorate([
|
|
25
25
|
(0, class_validator_1.IsString)(),
|
|
26
26
|
(0, class_validator_1.Matches)(/\S/),
|
|
27
|
+
(0, class_validator_1.MaxLength)(retailIntegrationLimits_1.RETAIL_SHORT_TEXT_MAX_LENGTH),
|
|
27
28
|
__metadata("design:type", String)
|
|
28
29
|
], StoreEventAddressPayload.prototype, "address1", void 0);
|
|
29
30
|
__decorate([
|
|
30
31
|
(0, class_validator_1.ValidateIf)(payloadValidators_1.isNullOrValidated),
|
|
31
32
|
(0, class_validator_1.IsString)(),
|
|
33
|
+
(0, class_validator_1.MaxLength)(retailIntegrationLimits_1.RETAIL_SHORT_TEXT_MAX_LENGTH),
|
|
32
34
|
__metadata("design:type", String)
|
|
33
35
|
], StoreEventAddressPayload.prototype, "externalNumber", void 0);
|
|
34
36
|
__decorate([
|
|
35
37
|
(0, class_validator_1.ValidateIf)(payloadValidators_1.isNullOrValidated),
|
|
36
38
|
(0, class_validator_1.IsString)(),
|
|
39
|
+
(0, class_validator_1.MaxLength)(retailIntegrationLimits_1.RETAIL_SHORT_TEXT_MAX_LENGTH),
|
|
37
40
|
__metadata("design:type", String)
|
|
38
41
|
], StoreEventAddressPayload.prototype, "internalNumber", void 0);
|
|
39
42
|
__decorate([
|
|
40
43
|
(0, class_validator_1.ValidateIf)(payloadValidators_1.isNullOrValidated),
|
|
41
44
|
(0, class_validator_1.IsString)(),
|
|
45
|
+
(0, class_validator_1.MaxLength)(retailIntegrationLimits_1.RETAIL_SHORT_TEXT_MAX_LENGTH),
|
|
42
46
|
__metadata("design:type", String)
|
|
43
47
|
], StoreEventAddressPayload.prototype, "neighborhood", void 0);
|
|
44
48
|
__decorate([
|
|
45
49
|
(0, class_validator_1.IsString)(),
|
|
46
50
|
(0, class_validator_1.Matches)(/\S/),
|
|
51
|
+
(0, class_validator_1.MaxLength)(retailIntegrationLimits_1.RETAIL_SHORT_TEXT_MAX_LENGTH),
|
|
47
52
|
__metadata("design:type", String)
|
|
48
53
|
], StoreEventAddressPayload.prototype, "city", void 0);
|
|
49
54
|
__decorate([
|
|
50
55
|
(0, class_validator_1.IsString)(),
|
|
51
56
|
(0, class_validator_1.Matches)(/\S/),
|
|
57
|
+
(0, class_validator_1.MaxLength)(retailIntegrationLimits_1.RETAIL_SHORT_TEXT_MAX_LENGTH),
|
|
52
58
|
__metadata("design:type", String)
|
|
53
59
|
], StoreEventAddressPayload.prototype, "state", void 0);
|
|
54
60
|
__decorate([
|
|
@@ -59,11 +65,13 @@ __decorate([
|
|
|
59
65
|
__decorate([
|
|
60
66
|
(0, class_validator_1.ValidateIf)(payloadValidators_1.isNullOrValidated),
|
|
61
67
|
(0, class_validator_1.IsString)(),
|
|
68
|
+
(0, class_validator_1.MaxLength)(retailIntegrationLimits_1.RETAIL_SHORT_TEXT_MAX_LENGTH),
|
|
62
69
|
__metadata("design:type", String)
|
|
63
70
|
], StoreEventAddressPayload.prototype, "country", void 0);
|
|
64
71
|
__decorate([
|
|
65
72
|
(0, class_validator_1.ValidateIf)(payloadValidators_1.isNullOrValidated),
|
|
66
73
|
(0, class_validator_1.IsString)(),
|
|
74
|
+
(0, class_validator_1.MaxLength)(retailIntegrationLimits_1.RETAIL_LONG_TEXT_MAX_LENGTH),
|
|
67
75
|
__metadata("design:type", String)
|
|
68
76
|
], StoreEventAddressPayload.prototype, "reference", void 0);
|
|
69
77
|
/** Coordenada de la tienda; `null` si no se informa. */
|
|
@@ -101,6 +109,7 @@ __decorate([
|
|
|
101
109
|
__decorate([
|
|
102
110
|
(0, class_validator_1.IsString)(),
|
|
103
111
|
(0, class_validator_1.Matches)(/\S/),
|
|
112
|
+
(0, class_validator_1.MaxLength)(retailIntegrationLimits_1.RETAIL_SHORT_TEXT_MAX_LENGTH),
|
|
104
113
|
__metadata("design:type", String)
|
|
105
114
|
], StoreEventPayload.prototype, "name", void 0);
|
|
106
115
|
__decorate([
|
|
@@ -111,12 +120,14 @@ __decorate([
|
|
|
111
120
|
], StoreEventPayload.prototype, "zoneId", void 0);
|
|
112
121
|
__decorate([
|
|
113
122
|
(0, class_validator_1.IsDefined)(),
|
|
123
|
+
(0, class_validator_1.IsObject)(),
|
|
114
124
|
(0, class_validator_1.ValidateNested)(),
|
|
115
125
|
(0, class_transformer_1.Type)(() => StoreEventAddressPayload),
|
|
116
126
|
__metadata("design:type", StoreEventAddressPayload)
|
|
117
127
|
], StoreEventPayload.prototype, "address", void 0);
|
|
118
128
|
__decorate([
|
|
119
129
|
(0, class_validator_1.IsDefined)(),
|
|
130
|
+
(0, class_validator_1.IsObject)(),
|
|
120
131
|
(0, class_validator_1.ValidateNested)(),
|
|
121
132
|
(0, class_transformer_1.Type)(() => StoreEventLocationPayload),
|
|
122
133
|
__metadata("design:type", StoreEventLocationPayload)
|
|
@@ -124,11 +135,13 @@ __decorate([
|
|
|
124
135
|
__decorate([
|
|
125
136
|
(0, class_validator_1.IsString)(),
|
|
126
137
|
(0, class_validator_1.Matches)(/\S/),
|
|
138
|
+
(0, class_validator_1.MaxLength)(retailIntegrationLimits_1.RETAIL_SHORT_TEXT_MAX_LENGTH),
|
|
127
139
|
__metadata("design:type", String)
|
|
128
140
|
], StoreEventPayload.prototype, "phone", void 0);
|
|
129
141
|
__decorate([
|
|
130
142
|
(0, class_validator_1.ValidateIf)(payloadValidators_1.isNullOrValidated),
|
|
131
143
|
(0, class_validator_1.IsString)(),
|
|
144
|
+
(0, class_validator_1.MaxLength)(retailIntegrationLimits_1.RETAIL_SHORT_TEXT_MAX_LENGTH),
|
|
132
145
|
__metadata("design:type", String)
|
|
133
146
|
], StoreEventPayload.prototype, "schedule", void 0);
|
|
134
147
|
__decorate([
|
|
@@ -8,4 +8,5 @@ var ReconciliationEntityEnum;
|
|
|
8
8
|
ReconciliationEntityEnum["USERS"] = "USERS";
|
|
9
9
|
ReconciliationEntityEnum["CATALOG"] = "CATALOG";
|
|
10
10
|
ReconciliationEntityEnum["INVENTORY"] = "INVENTORY";
|
|
11
|
+
ReconciliationEntityEnum["MOVEMENTS"] = "MOVEMENTS";
|
|
11
12
|
})(ReconciliationEntityEnum || (exports.ReconciliationEntityEnum = ReconciliationEntityEnum = {}));
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
/** Quién abrió la corrida: el reloj horario, el botón «Actualizar
|
|
1
|
+
/** Quién abrió la corrida: el reloj horario o diario, el botón «Actualizar», la activación o una discrepancia. */
|
|
2
2
|
export declare enum ReconciliationTriggerEnum {
|
|
3
3
|
SCHEDULED = "SCHEDULED",
|
|
4
4
|
MANUAL = "MANUAL",
|
|
5
|
-
ACTIVATION = "ACTIVATION"
|
|
5
|
+
ACTIVATION = "ACTIVATION",
|
|
6
|
+
DISCREPANCY = "DISCREPANCY",
|
|
7
|
+
DAILY = "DAILY"
|
|
6
8
|
}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ReconciliationTriggerEnum = void 0;
|
|
4
|
-
/** Quién abrió la corrida: el reloj horario, el botón «Actualizar
|
|
4
|
+
/** Quién abrió la corrida: el reloj horario o diario, el botón «Actualizar», la activación o una discrepancia. */
|
|
5
5
|
var ReconciliationTriggerEnum;
|
|
6
6
|
(function (ReconciliationTriggerEnum) {
|
|
7
7
|
ReconciliationTriggerEnum["SCHEDULED"] = "SCHEDULED";
|
|
8
8
|
ReconciliationTriggerEnum["MANUAL"] = "MANUAL";
|
|
9
9
|
ReconciliationTriggerEnum["ACTIVATION"] = "ACTIVATION";
|
|
10
|
+
ReconciliationTriggerEnum["DISCREPANCY"] = "DISCREPANCY";
|
|
11
|
+
ReconciliationTriggerEnum["DAILY"] = "DAILY";
|
|
10
12
|
})(ReconciliationTriggerEnum || (exports.ReconciliationTriggerEnum = ReconciliationTriggerEnum = {}));
|
|
@@ -2,6 +2,7 @@ export * from './constants/retailIntegrationLimits';
|
|
|
2
2
|
export * from './constants/retailIntegrationErrorHttpStatus';
|
|
3
3
|
export * from './enums';
|
|
4
4
|
export * from './validators/IsIsoDateTimeWithZone';
|
|
5
|
+
export * from './validators/IsMovementsRangeValid';
|
|
5
6
|
export * from './dtos/RetailEventEnvelope';
|
|
6
7
|
export * from './dtos/ReceiveStoreEventRequest';
|
|
7
8
|
export * from './dtos/ReceiveRetailUserEventRequest';
|
|
@@ -21,11 +22,13 @@ export * from './dtos/RetailPagedQuery';
|
|
|
21
22
|
export * from './dtos/ListRetailStoresRequest';
|
|
22
23
|
export * from './dtos/ListRetailCatalogRequest';
|
|
23
24
|
export * from './dtos/GetRetailInventoryRequest';
|
|
25
|
+
export * from './dtos/ListRetailInventoryMovementsRequest';
|
|
24
26
|
export * from './dtos/ListRetailUsersRequest';
|
|
25
27
|
export * from './dtos/RegisterRetailSaleRequest';
|
|
26
28
|
export * from './dtos/CancelRetailSaleRequest';
|
|
27
29
|
export * from './dtos/CheckRetailInventoryRequest';
|
|
28
30
|
export * from './dtos/RetailOutboundResponses';
|
|
31
|
+
export * from './dtos/RetailSystemResponses';
|
|
29
32
|
export * from './models/RetailPageMeta';
|
|
30
33
|
export * from './models/RetailSystemStore';
|
|
31
34
|
export * from './models/RetailSystemProduct';
|