@renzosanchez1357/libreria-compartida-microservicios01 1.0.11 → 1.0.12
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/dist/dto/orders/create-order.dto.d.ts +6 -1
- package/dist/dto/orders/create-order.dto.d.ts.map +1 -1
- package/dist/dto/orders/create-order.dto.js +30 -10
- package/dist/dto/orders/create-order.dto.js.map +1 -1
- package/dist/dto/orders/update-order.dto.d.ts +7 -0
- package/dist/dto/orders/update-order.dto.d.ts.map +1 -0
- package/dist/dto/orders/update-order.dto.js +6 -0
- package/dist/dto/orders/update-order.dto.js.map +1 -0
- package/dist/dto/products/Product.dto.d.ts.map +1 -1
- package/dist/dto/products/Product.dto.js +6 -6
- package/dist/dto/products/Product.dto.js.map +1 -1
- package/package.json +1 -1
|
@@ -2,7 +2,12 @@ import { EstadoOrden } from "../../enum/order.enum.js";
|
|
|
2
2
|
export declare class CreateOrderDto {
|
|
3
3
|
precio_total: number;
|
|
4
4
|
items_totales: number;
|
|
5
|
-
|
|
5
|
+
direccion_calle: String;
|
|
6
|
+
direccion_numero: number;
|
|
7
|
+
direccion_codigopostal: number;
|
|
8
|
+
direccion_ciudad: String;
|
|
9
|
+
direccion_provincia: String;
|
|
10
|
+
direccion_pais: String;
|
|
6
11
|
estado: EstadoOrden;
|
|
7
12
|
pagado: Boolean;
|
|
8
13
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-order.dto.d.ts","sourceRoot":"","sources":["../../../src/dto/orders/create-order.dto.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEvD,qBAAa,cAAc;IAGzB,YAAY,EAAE,MAAM,CAAC;IAIrB,aAAa,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"create-order.dto.d.ts","sourceRoot":"","sources":["../../../src/dto/orders/create-order.dto.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEvD,qBAAa,cAAc;IAGzB,YAAY,EAAE,MAAM,CAAC;IAIrB,aAAa,EAAE,MAAM,CAAC;IAKtB,eAAe,EAAE,MAAM,CAAC;IAExB,gBAAgB,EAAE,MAAM,CAAC;IAEzB,sBAAsB,EAAE,MAAM,CAAC;IAE/B,gBAAgB,EAAE,MAAM,CAAC;IAEzB,mBAAmB,EAAE,MAAM,CAAC;IAE5B,cAAc,EAAE,MAAM,CAAC;IAMvB,MAAM,EAAE,WAAW,CAAyB;IAa5C,MAAM,EAAE,OAAO,CAAS;CACzB"}
|
|
@@ -10,15 +10,20 @@ import { EstadoOrden } from "../../enum/order.enum.js";
|
|
|
10
10
|
export class CreateOrderDto {
|
|
11
11
|
precio_total;
|
|
12
12
|
items_totales;
|
|
13
|
-
//?
|
|
14
|
-
direccion_envio;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
estado = EstadoOrden.PENDIENTE;
|
|
13
|
+
//? Direccion ¿?
|
|
14
|
+
// direccion_envio: String;
|
|
15
|
+
direccion_calle;
|
|
16
|
+
direccion_numero;
|
|
17
|
+
direccion_codigopostal;
|
|
18
|
+
direccion_ciudad;
|
|
19
|
+
direccion_provincia;
|
|
20
|
+
direccion_pais;
|
|
21
|
+
estado = EstadoOrden.PENDIENTE; //esto es una opcion por defecto
|
|
22
|
+
/*
|
|
23
|
+
Se puede hacer directamente en el schema,
|
|
24
|
+
esto es un ejemplo, que tambien se puede
|
|
25
|
+
hacer en los dtos
|
|
26
|
+
*/
|
|
22
27
|
pagado = false;
|
|
23
28
|
}
|
|
24
29
|
__decorate([
|
|
@@ -31,7 +36,22 @@ __decorate([
|
|
|
31
36
|
], CreateOrderDto.prototype, "items_totales", void 0);
|
|
32
37
|
__decorate([
|
|
33
38
|
IsString()
|
|
34
|
-
], CreateOrderDto.prototype, "
|
|
39
|
+
], CreateOrderDto.prototype, "direccion_calle", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
IsString()
|
|
42
|
+
], CreateOrderDto.prototype, "direccion_numero", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
IsString()
|
|
45
|
+
], CreateOrderDto.prototype, "direccion_codigopostal", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
IsString()
|
|
48
|
+
], CreateOrderDto.prototype, "direccion_ciudad", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
IsString()
|
|
51
|
+
], CreateOrderDto.prototype, "direccion_provincia", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
IsString()
|
|
54
|
+
], CreateOrderDto.prototype, "direccion_pais", void 0);
|
|
35
55
|
__decorate([
|
|
36
56
|
IsEnum(EstadoOrden, {
|
|
37
57
|
message: `Possible status values are ${EstadoOrden}`,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-order.dto.js","sourceRoot":"","sources":["../../../src/dto/orders/create-order.dto.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EACL,SAAS,EACT,MAAM,EACN,QAAQ,EACR,UAAU,EACV,UAAU,EACV,QAAQ,GACT,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEvD,MAAM,OAAO,cAAc;IAGzB,YAAY,CAAS;IAIrB,aAAa,CAAS;IAEtB,
|
|
1
|
+
{"version":3,"file":"create-order.dto.js","sourceRoot":"","sources":["../../../src/dto/orders/create-order.dto.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EACL,SAAS,EACT,MAAM,EACN,QAAQ,EACR,UAAU,EACV,UAAU,EACV,QAAQ,GACT,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEvD,MAAM,OAAO,cAAc;IAGzB,YAAY,CAAS;IAIrB,aAAa,CAAS;IAEtB,gBAAgB;IAChB,2BAA2B;IAE3B,eAAe,CAAS;IAExB,gBAAgB,CAAS;IAEzB,sBAAsB,CAAS;IAE/B,gBAAgB,CAAS;IAEzB,mBAAmB,CAAS;IAE5B,cAAc,CAAS;IAMvB,MAAM,GAAgB,WAAW,CAAC,SAAS,CAAC,CAAC,gCAAgC;IAC7E;;;;MAIE;IAQF,MAAM,GAAY,KAAK,CAAC;CACzB;AAvCC;IAFC,QAAQ,EAAE;IACV,UAAU,EAAE;oDACQ;AAIrB;IAFC,QAAQ,EAAE;IACV,UAAU,EAAE;qDACS;AAKtB;IADC,QAAQ,EAAE;uDACa;AAExB;IADC,QAAQ,EAAE;wDACc;AAEzB;IADC,QAAQ,EAAE;8DACoB;AAE/B;IADC,QAAQ,EAAE;wDACc;AAEzB;IADC,QAAQ,EAAE;2DACiB;AAE5B;IADC,QAAQ,EAAE;sDACY;AAMvB;IAJC,MAAM,CAAC,WAAW,EAAE;QACnB,OAAO,EAAE,8BAA8B,WAAW,EAAE;KACrD,CAAC;IACD,UAAU,EAAE;8CAC+B;AAa5C;IANC,SAAS,EAAE;IACX,SAAS,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;QACvB,IAAI,KAAK,KAAK,MAAM;YAAE,OAAO,IAAI,CAAC;QAClC,IAAI,KAAK,KAAK,OAAO;YAAE,OAAO,KAAK,CAAC;QACpC,OAAO,KAAK,CAAC;IACf,CAAC,CAAC;8CACsB"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { CreateOrderDto } from './create-order.dto';
|
|
2
|
+
declare const UpdateOrderDto_base: import("@nestjs/mapped-types").MappedType<Partial<CreateOrderDto>>;
|
|
3
|
+
export declare class UpdateOrderDto extends UpdateOrderDto_base {
|
|
4
|
+
id: number;
|
|
5
|
+
}
|
|
6
|
+
export {};
|
|
7
|
+
//# sourceMappingURL=update-order.dto.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-order.dto.d.ts","sourceRoot":"","sources":["../../../src/dto/orders/update-order.dto.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;;AAEpD,qBAAa,cAAe,SAAQ,mBAA2B;IAC7D,EAAE,EAAE,MAAM,CAAC;CACZ"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-order.dto.js","sourceRoot":"","sources":["../../../src/dto/orders/update-order.dto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,MAAM,OAAO,cAAe,SAAQ,WAAW,CAAC,cAAc,CAAC;IAC7D,EAAE,CAAS;CACZ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Product.dto.d.ts","sourceRoot":"","sources":["../../../src/dto/products/Product.dto.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Product.dto.d.ts","sourceRoot":"","sources":["../../../src/dto/products/Product.dto.ts"],"names":[],"mappings":"AASA,qBAAa,UAAU;IAgBrB,MAAM,EAAE,MAAM,CAAC;IAIf,IAAI,EAAE,MAAM,CAAC;IAKb,WAAW,EAAE,MAAM,CAAC;IAKpB,MAAM,EAAE,MAAM,CAAC;IAKf,YAAY,EAAE,MAAM,CAAC;IASrB,UAAU,EAAE,OAAO,CAAC;IASpB,WAAW,EAAE,OAAO,CAAC;IAQrB,UAAU,EAAE,OAAO,CAAC;CACrB"}
|
|
@@ -5,7 +5,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
7
|
import { Transform, Type } from "class-transformer";
|
|
8
|
-
import { IsBoolean, IsOptional, IsPositive } from "class-validator";
|
|
8
|
+
import { IsBoolean, IsNumber, IsOptional, IsPositive, IsString, } from "class-validator";
|
|
9
9
|
export class ProductDto {
|
|
10
10
|
/*
|
|
11
11
|
* Paginaciones
|
|
@@ -28,24 +28,25 @@ export class ProductDto {
|
|
|
28
28
|
disponible;
|
|
29
29
|
}
|
|
30
30
|
__decorate([
|
|
31
|
-
|
|
31
|
+
IsString(),
|
|
32
32
|
Type(() => String)
|
|
33
33
|
], ProductDto.prototype, "nombre", void 0);
|
|
34
34
|
__decorate([
|
|
35
|
-
|
|
35
|
+
IsString(),
|
|
36
36
|
Type(() => String)
|
|
37
37
|
], ProductDto.prototype, "tipo", void 0);
|
|
38
38
|
__decorate([
|
|
39
39
|
IsOptional(),
|
|
40
|
+
IsString(),
|
|
40
41
|
Type(() => String)
|
|
41
42
|
], ProductDto.prototype, "descripcion", void 0);
|
|
42
43
|
__decorate([
|
|
43
|
-
|
|
44
|
+
IsNumber(),
|
|
44
45
|
IsPositive(),
|
|
45
46
|
Type(() => Number)
|
|
46
47
|
], ProductDto.prototype, "precio", void 0);
|
|
47
48
|
__decorate([
|
|
48
|
-
|
|
49
|
+
IsNumber(),
|
|
49
50
|
IsPositive(),
|
|
50
51
|
Type(() => Number)
|
|
51
52
|
], ProductDto.prototype, "precio_venta", void 0);
|
|
@@ -72,7 +73,6 @@ __decorate([
|
|
|
72
73
|
})
|
|
73
74
|
], ProductDto.prototype, "es_favorito", void 0);
|
|
74
75
|
__decorate([
|
|
75
|
-
IsOptional(),
|
|
76
76
|
IsBoolean(),
|
|
77
77
|
Transform(({ value }) => {
|
|
78
78
|
if (value === "true")
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Product.dto.js","sourceRoot":"","sources":["../../../src/dto/products/Product.dto.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,
|
|
1
|
+
{"version":3,"file":"Product.dto.js","sourceRoot":"","sources":["../../../src/dto/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