@fiado/type-kit 3.215.0 → 3.216.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.
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* POST /wizard/sessions/:id/product — reserva un equipo del catálogo (paso 03). Reserva 30 min en
|
|
3
|
-
* RetailInventory F1 (condición atómica H2).
|
|
4
|
-
*
|
|
3
|
+
* RetailInventory F1 (condición atómica H2).
|
|
4
|
+
*
|
|
5
|
+
* `imei` y `cashPriceCents` son OPCIONALES a propósito: la unidad física y el precio son AUTORIDAD DEL
|
|
6
|
+
* SERVIDOR. Con solo el `sku`, el wizard elige una unidad disponible del catálogo y toma su precio (el
|
|
7
|
+
* cliente NUNCA dicta el monto a cobrar — `cashPriceCents` ancla el cobro con `amountCents == cashPrice`).
|
|
8
|
+
* Si el caller manda `imei`, el server puede honrar esa unidad, pero el precio SIEMPRE sale del catálogo.
|
|
9
|
+
* SureKeep Fase 2 — pista Retail.
|
|
5
10
|
*/
|
|
6
11
|
export declare class AddProductRequest {
|
|
7
12
|
sku: string;
|
|
8
|
-
imei
|
|
9
|
-
cashPriceCents
|
|
13
|
+
imei?: string;
|
|
14
|
+
cashPriceCents?: number;
|
|
10
15
|
}
|
|
@@ -14,8 +14,13 @@ const class_transformer_1 = require("class-transformer");
|
|
|
14
14
|
const class_validator_1 = require("class-validator");
|
|
15
15
|
/**
|
|
16
16
|
* POST /wizard/sessions/:id/product — reserva un equipo del catálogo (paso 03). Reserva 30 min en
|
|
17
|
-
* RetailInventory F1 (condición atómica H2).
|
|
18
|
-
*
|
|
17
|
+
* RetailInventory F1 (condición atómica H2).
|
|
18
|
+
*
|
|
19
|
+
* `imei` y `cashPriceCents` son OPCIONALES a propósito: la unidad física y el precio son AUTORIDAD DEL
|
|
20
|
+
* SERVIDOR. Con solo el `sku`, el wizard elige una unidad disponible del catálogo y toma su precio (el
|
|
21
|
+
* cliente NUNCA dicta el monto a cobrar — `cashPriceCents` ancla el cobro con `amountCents == cashPrice`).
|
|
22
|
+
* Si el caller manda `imei`, el server puede honrar esa unidad, pero el precio SIEMPRE sale del catálogo.
|
|
23
|
+
* SureKeep Fase 2 — pista Retail.
|
|
19
24
|
*/
|
|
20
25
|
class AddProductRequest {
|
|
21
26
|
}
|
|
@@ -27,11 +32,13 @@ __decorate([
|
|
|
27
32
|
], AddProductRequest.prototype, "sku", void 0);
|
|
28
33
|
__decorate([
|
|
29
34
|
(0, class_transformer_1.Expose)(),
|
|
35
|
+
(0, class_validator_1.IsOptional)(),
|
|
30
36
|
(0, class_validator_1.IsString)(),
|
|
31
37
|
__metadata("design:type", String)
|
|
32
38
|
], AddProductRequest.prototype, "imei", void 0);
|
|
33
39
|
__decorate([
|
|
34
40
|
(0, class_transformer_1.Expose)(),
|
|
41
|
+
(0, class_validator_1.IsOptional)(),
|
|
35
42
|
(0, class_validator_1.IsInt)(),
|
|
36
43
|
(0, class_validator_1.Min)(0),
|
|
37
44
|
__metadata("design:type", Number)
|
package/package.json
CHANGED
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
import { Expose } from 'class-transformer';
|
|
2
|
-
import { IsInt, IsString, Min } from 'class-validator';
|
|
2
|
+
import { IsInt, IsOptional, IsString, Min } from 'class-validator';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* POST /wizard/sessions/:id/product — reserva un equipo del catálogo (paso 03). Reserva 30 min en
|
|
6
|
-
* RetailInventory F1 (condición atómica H2).
|
|
7
|
-
*
|
|
6
|
+
* RetailInventory F1 (condición atómica H2).
|
|
7
|
+
*
|
|
8
|
+
* `imei` y `cashPriceCents` son OPCIONALES a propósito: la unidad física y el precio son AUTORIDAD DEL
|
|
9
|
+
* SERVIDOR. Con solo el `sku`, el wizard elige una unidad disponible del catálogo y toma su precio (el
|
|
10
|
+
* cliente NUNCA dicta el monto a cobrar — `cashPriceCents` ancla el cobro con `amountCents == cashPrice`).
|
|
11
|
+
* Si el caller manda `imei`, el server puede honrar esa unidad, pero el precio SIEMPRE sale del catálogo.
|
|
12
|
+
* SureKeep Fase 2 — pista Retail.
|
|
8
13
|
*/
|
|
9
14
|
export class AddProductRequest {
|
|
10
15
|
@Expose()
|
|
@@ -12,11 +17,13 @@ export class AddProductRequest {
|
|
|
12
17
|
sku!: string;
|
|
13
18
|
|
|
14
19
|
@Expose()
|
|
20
|
+
@IsOptional()
|
|
15
21
|
@IsString()
|
|
16
|
-
imei
|
|
22
|
+
imei?: string;
|
|
17
23
|
|
|
18
24
|
@Expose()
|
|
25
|
+
@IsOptional()
|
|
19
26
|
@IsInt()
|
|
20
27
|
@Min(0)
|
|
21
|
-
cashPriceCents
|
|
28
|
+
cashPriceCents?: number;
|
|
22
29
|
}
|