@renzosanchez1357/libreria-compartida-microservicios01 1.0.27 → 1.0.30
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/README.md +71 -0
- package/dist/dto/Logistica/cart/change-order-status.dto.d.ts +6 -0
- package/dist/dto/Logistica/cart/change-order-status.dto.d.ts.map +1 -0
- package/dist/dto/{orders → Logistica/cart}/change-order-status.dto.js +13 -4
- package/dist/dto/Logistica/cart/change-order-status.dto.js.map +1 -0
- package/dist/dto/Logistica/cart/create-order.dto.d.ts.map +1 -0
- package/dist/dto/{orders → Logistica/cart}/create-order.dto.js +8 -1
- package/dist/dto/Logistica/cart/create-order.dto.js.map +1 -0
- package/dist/dto/Logistica/cart/order-item.dto.d.ts.map +1 -0
- package/dist/dto/{orders → Logistica/cart}/order-item.dto.js +10 -2
- package/dist/dto/Logistica/cart/order-item.dto.js.map +1 -0
- package/dist/dto/Logistica/cart/status-order.dto.d.ts +5 -0
- package/dist/dto/Logistica/cart/status-order.dto.d.ts.map +1 -0
- package/dist/dto/{orders → Logistica/cart}/status-order.dto.js +7 -2
- package/dist/dto/Logistica/cart/status-order.dto.js.map +1 -0
- package/dist/dto/Logistica/orders/change-order-status.dto.d.ts +6 -0
- package/dist/dto/Logistica/orders/change-order-status.dto.d.ts.map +1 -0
- package/dist/dto/Logistica/orders/change-order-status.dto.js +33 -0
- package/dist/dto/Logistica/orders/change-order-status.dto.js.map +1 -0
- package/dist/dto/Logistica/orders/create-order.dto.d.ts +5 -0
- package/dist/dto/Logistica/orders/create-order.dto.d.ts.map +1 -0
- package/dist/dto/Logistica/orders/create-order.dto.js +28 -0
- package/dist/dto/Logistica/orders/create-order.dto.js.map +1 -0
- package/dist/dto/Logistica/orders/order-item.dto.d.ts +5 -0
- package/dist/dto/Logistica/orders/order-item.dto.d.ts.map +1 -0
- package/dist/dto/{products/update-product.dto.js → Logistica/orders/order-item.dto.js} +20 -10
- package/dist/dto/Logistica/orders/order-item.dto.js.map +1 -0
- package/dist/dto/Logistica/orders/status-order.dto.d.ts +5 -0
- package/dist/dto/Logistica/orders/status-order.dto.d.ts.map +1 -0
- package/dist/dto/Logistica/orders/status-order.dto.js +25 -0
- package/dist/dto/Logistica/orders/status-order.dto.js.map +1 -0
- package/dist/dto/Productos/categories/Category.dto.d.ts +6 -0
- package/dist/dto/Productos/categories/Category.dto.d.ts.map +1 -0
- package/dist/dto/Productos/categories/Category.dto.js +39 -0
- package/dist/dto/Productos/categories/Category.dto.js.map +1 -0
- package/dist/dto/Productos/categories/update-category.dto.d.ts +10 -0
- package/dist/dto/Productos/categories/update-category.dto.d.ts.map +1 -0
- package/dist/dto/Productos/categories/update-category.dto.js +27 -0
- package/dist/dto/Productos/categories/update-category.dto.js.map +1 -0
- package/dist/dto/{products → Productos/products}/Product.dto.d.ts +4 -3
- package/dist/dto/Productos/products/Product.dto.d.ts.map +1 -0
- package/dist/dto/{products → Productos/products}/Product.dto.js +55 -24
- package/dist/dto/Productos/products/Product.dto.js.map +1 -0
- package/dist/dto/{products → Productos/products}/update-product.dto.d.ts +3 -0
- package/dist/dto/Productos/products/update-product.dto.d.ts.map +1 -0
- package/dist/dto/Productos/products/update-product.dto.js +36 -0
- package/dist/dto/Productos/products/update-product.dto.js.map +1 -0
- package/dist/index.d.ts +7 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/dto/orders/change-order-status.dto.d.ts +0 -6
- package/dist/dto/orders/change-order-status.dto.d.ts.map +0 -1
- package/dist/dto/orders/change-order-status.dto.js.map +0 -1
- package/dist/dto/orders/create-order.dto.d.ts.map +0 -1
- package/dist/dto/orders/create-order.dto.js.map +0 -1
- package/dist/dto/orders/order-item.dto.d.ts.map +0 -1
- package/dist/dto/orders/order-item.dto.js.map +0 -1
- package/dist/dto/orders/status-order.dto.d.ts +0 -5
- package/dist/dto/orders/status-order.dto.d.ts.map +0 -1
- package/dist/dto/orders/status-order.dto.js.map +0 -1
- package/dist/dto/orders/update-order.dto.d.ts +0 -7
- package/dist/dto/orders/update-order.dto.d.ts.map +0 -1
- package/dist/dto/orders/update-order.dto.js +0 -6
- package/dist/dto/orders/update-order.dto.js.map +0 -1
- package/dist/dto/pagination.dto.d.ts +0 -5
- package/dist/dto/pagination.dto.d.ts.map +0 -1
- package/dist/dto/pagination.dto.js +0 -23
- package/dist/dto/pagination.dto.js.map +0 -1
- package/dist/dto/products/Product.dto.d.ts.map +0 -1
- package/dist/dto/products/Product.dto.js.map +0 -1
- package/dist/dto/products/update-product.dto.d.ts.map +0 -1
- package/dist/dto/products/update-product.dto.js.map +0 -1
- /package/dist/dto/{orders → Logistica/cart}/create-order.dto.d.ts +0 -0
- /package/dist/dto/{orders → Logistica/cart}/order-item.dto.d.ts +0 -0
package/README.md
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# MyLibrary - Librería Compartida
|
|
2
|
+
|
|
3
|
+
Librería de tipos, DTOs y enums compartidos entre los microservicios.
|
|
4
|
+
|
|
5
|
+
## Estructura
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
MyLibrary/
|
|
9
|
+
├── package.json
|
|
10
|
+
├── pnpm-lock.yaml
|
|
11
|
+
├── tsconfig.json
|
|
12
|
+
├── update-library.sh
|
|
13
|
+
└── src/
|
|
14
|
+
├── index.ts # Exportaciones principales
|
|
15
|
+
├── dto/
|
|
16
|
+
│ ├── orders/
|
|
17
|
+
│ └── products/
|
|
18
|
+
└── enum/
|
|
19
|
+
└── order.enum.ts
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Actualizar Dependencias
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
bash update-library.sh
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
El script:
|
|
29
|
+
|
|
30
|
+
- Actualiza todas las dependencias a las últimas versiones
|
|
31
|
+
- Regenera `pnpm-lock.yaml`
|
|
32
|
+
- Valida la integridad del proyecto
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
pnpm install
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Build
|
|
39
|
+
|
|
40
|
+
Este script:
|
|
41
|
+
|
|
42
|
+
- Actualiza la dependencia `@renzosanchez1357/libreria-compartida-microservicios01` en cada microservicio (Products, Logistics, Users, etc.)
|
|
43
|
+
- Navega automáticamente por cada carpeta y ejecuta `pnpm update <librería>`
|
|
44
|
+
- Muestra si la actualización fue exitosa o hubo error en cada servicio
|
|
45
|
+
|
|
46
|
+
> Ejecuta el script desde la carpeta `MyLibrary`. Si agregas más microservicios, edítalo y añádelos al array `SERVICES`.
|
|
47
|
+
|
|
48
|
+
Si quieres actualizar la propia librería, usa los comandos manuales:
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
pnpm build
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Publicación
|
|
55
|
+
|
|
56
|
+
Después de actualizar y hacer cambios:
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
pnpm publish
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## Uso en otros proyectos
|
|
63
|
+
|
|
64
|
+
Importa desde la librería en tus microservicios:
|
|
65
|
+
|
|
66
|
+
```typescript
|
|
67
|
+
// En GateWay, Products, Logistics, Users
|
|
68
|
+
import { MyCustomDTO } from "@myproject/library";
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Asegúrate de que el `package.json` de MyLibrary esté correctamente configurado como paquete exportable.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"change-order-status.dto.d.ts","sourceRoot":"","sources":["../../../../src/dto/Logistica/cart/change-order-status.dto.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAoB,MAAM,6BAA6B,CAAC;AAE5E,qBAAa,qBAAqB;IAOhC,EAAE,EAAE,MAAM,CAAC;IAWX,MAAM,EAAE,WAAW,CAAC;CACrB"}
|
|
@@ -6,19 +6,28 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
6
6
|
};
|
|
7
7
|
import { ApiProperty } from "@nestjs/swagger";
|
|
8
8
|
import { IsEnum, IsUUID } from "class-validator";
|
|
9
|
-
import { EstadoOrden, EstadoOrdenlista } from "
|
|
9
|
+
import { EstadoOrden, EstadoOrdenlista } from "../../../enum/order.enum.js";
|
|
10
10
|
export class ActualizarEstadoOrden {
|
|
11
11
|
id;
|
|
12
12
|
estado;
|
|
13
13
|
}
|
|
14
14
|
__decorate([
|
|
15
|
-
ApiProperty(
|
|
15
|
+
ApiProperty({
|
|
16
|
+
description: "Identificador único del pedido a actualizar (UUID v4)",
|
|
17
|
+
example: "550e8400-e29b-41d4-a716-446655440000",
|
|
18
|
+
format: "uuid",
|
|
19
|
+
}),
|
|
16
20
|
IsUUID(4) // "Version (4) de UUID"
|
|
17
21
|
], ActualizarEstadoOrden.prototype, "id", void 0);
|
|
18
22
|
__decorate([
|
|
19
|
-
ApiProperty({
|
|
23
|
+
ApiProperty({
|
|
24
|
+
description: "Nuevo estado del pedido de pizza",
|
|
25
|
+
enum: EstadoOrdenlista,
|
|
26
|
+
example: "entregado",
|
|
27
|
+
enumName: "EstadoOrden",
|
|
28
|
+
}),
|
|
20
29
|
IsEnum(EstadoOrdenlista, {
|
|
21
|
-
message: `Estados
|
|
30
|
+
message: `Estados validos de una orden: ${EstadoOrdenlista}`,
|
|
22
31
|
})
|
|
23
32
|
], ActualizarEstadoOrden.prototype, "estado", void 0);
|
|
24
33
|
//# sourceMappingURL=change-order-status.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"change-order-status.dto.js","sourceRoot":"","sources":["../../../../src/dto/Logistica/cart/change-order-status.dto.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAE5E,MAAM,OAAO,qBAAqB;IAOhC,EAAE,CAAS;IAWX,MAAM,CAAc;CACrB;AAZC;IANC,WAAW,CAAC;QACX,WAAW,EAAE,uDAAuD;QACpE,OAAO,EAAE,sCAAsC;QAC/C,MAAM,EAAE,MAAM;KACf,CAAC;IACD,MAAM,CAAC,CAAC,CAAC,CAAC,wBAAwB;iDACxB;AAWX;IATC,WAAW,CAAC;QACX,WAAW,EAAE,kCAAkC;QAC/C,IAAI,EAAE,gBAAgB;QACtB,OAAO,EAAE,WAAW;QACpB,QAAQ,EAAE,aAAa;KACxB,CAAC;IACD,MAAM,CAAC,gBAAgB,EAAE;QACxB,OAAO,EAAE,iCAAiC,gBAAgB,EAAE;KAC7D,CAAC;qDACkB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-order.dto.d.ts","sourceRoot":"","sources":["../../../../src/dto/Logistica/cart/create-order.dto.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAEnD,qBAAa,cAAc;IAczB,KAAK,EAAE,YAAY,EAAE,CAAC;CACvB"}
|
|
@@ -12,7 +12,14 @@ export class CreateOrderDto {
|
|
|
12
12
|
items;
|
|
13
13
|
}
|
|
14
14
|
__decorate([
|
|
15
|
-
ApiProperty({
|
|
15
|
+
ApiProperty({
|
|
16
|
+
description: "Lista de pizzas a incluir en el pedido. Debe contener al menos una pizza",
|
|
17
|
+
type: [OrdenItemDto],
|
|
18
|
+
example: [
|
|
19
|
+
{ productoId: 1, cantidad: 2 },
|
|
20
|
+
{ productoId: 3, cantidad: 1 },
|
|
21
|
+
],
|
|
22
|
+
}),
|
|
16
23
|
IsArray(),
|
|
17
24
|
ArrayMinSize(1),
|
|
18
25
|
ValidateNested({ each: true }),
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-order.dto.js","sourceRoot":"","sources":["../../../../src/dto/Logistica/cart/create-order.dto.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACxE,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAEnD,MAAM,OAAO,cAAc;IAczB,KAAK,CAAiB;CACvB;AADC;IAbC,WAAW,CAAC;QACX,WAAW,EACT,0EAA0E;QAC5E,IAAI,EAAE,CAAC,YAAY,CAAC;QACpB,OAAO,EAAE;YACP,EAAE,UAAU,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE;YAC9B,EAAE,UAAU,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE;SAC/B;KACF,CAAC;IACD,OAAO,EAAE;IACT,YAAY,CAAC,CAAC,CAAC;IACf,cAAc,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IAC9B,IAAI,CAAC,GAAG,EAAE,CAAC,YAAY,CAAC;6CACH"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"order-item.dto.d.ts","sourceRoot":"","sources":["../../../../src/dto/Logistica/cart/order-item.dto.ts"],"names":[],"mappings":"AAIA,qBAAa,YAAY;IAQvB,UAAU,EAAE,MAAM,CAAC;IASnB,QAAQ,EAAE,MAAM,CAAC;CAMlB"}
|
|
@@ -12,12 +12,20 @@ export class OrdenItemDto {
|
|
|
12
12
|
cantidad;
|
|
13
13
|
}
|
|
14
14
|
__decorate([
|
|
15
|
-
ApiProperty(
|
|
15
|
+
ApiProperty({
|
|
16
|
+
description: "Identificador único de la pizza en el catálogo",
|
|
17
|
+
example: 3,
|
|
18
|
+
type: Number,
|
|
19
|
+
}),
|
|
16
20
|
IsNumber(),
|
|
17
21
|
IsPositive()
|
|
18
22
|
], OrdenItemDto.prototype, "productoId", void 0);
|
|
19
23
|
__decorate([
|
|
20
|
-
ApiProperty(
|
|
24
|
+
ApiProperty({
|
|
25
|
+
description: "Cantidad de pizzas a incluir en el pedido",
|
|
26
|
+
example: 2,
|
|
27
|
+
type: Number,
|
|
28
|
+
}),
|
|
21
29
|
IsNumber(),
|
|
22
30
|
IsPositive()
|
|
23
31
|
], OrdenItemDto.prototype, "cantidad", void 0);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"order-item.dto.js","sourceRoot":"","sources":["../../../../src/dto/Logistica/cart/order-item.dto.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAEvD,MAAM,OAAO,YAAY;IAQvB,UAAU,CAAS;IASnB,QAAQ,CAAS;CAMlB;AAfC;IAPC,WAAW,CAAC;QACX,WAAW,EAAE,gDAAgD;QAC7D,OAAO,EAAE,CAAC;QACV,IAAI,EAAE,MAAM;KACb,CAAC;IACD,QAAQ,EAAE;IACV,UAAU,EAAE;gDACM;AASnB;IAPC,WAAW,CAAC;QACX,WAAW,EAAE,2CAA2C;QACxD,OAAO,EAAE,CAAC;QACV,IAAI,EAAE,MAAM;KACb,CAAC;IACD,QAAQ,EAAE;IACV,UAAU,EAAE;8CACI"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"status-order.dto.d.ts","sourceRoot":"","sources":["../../../../src/dto/Logistica/cart/status-order.dto.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAoB,MAAM,6BAA6B,CAAC;AAE5E,qBAAa,SAAS;IAWpB,MAAM,EAAE,WAAW,CAAC;CACrB"}
|
|
@@ -6,12 +6,17 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
6
6
|
};
|
|
7
7
|
import { ApiProperty } from "@nestjs/swagger";
|
|
8
8
|
import { IsEnum, IsOptional } from "class-validator";
|
|
9
|
-
import { EstadoOrden, EstadoOrdenlista } from "
|
|
9
|
+
import { EstadoOrden, EstadoOrdenlista } from "../../../enum/order.enum.js";
|
|
10
10
|
export class EstadoDto {
|
|
11
11
|
estado;
|
|
12
12
|
}
|
|
13
13
|
__decorate([
|
|
14
|
-
ApiProperty({
|
|
14
|
+
ApiProperty({
|
|
15
|
+
description: "Estado actual del pedido de pizza",
|
|
16
|
+
enum: EstadoOrden,
|
|
17
|
+
example: EstadoOrden.PENDIENTE,
|
|
18
|
+
enumName: "EstadoOrden",
|
|
19
|
+
}),
|
|
15
20
|
IsEnum(EstadoOrdenlista, {
|
|
16
21
|
//Se crea una lista, ya que @IsEnum, espera un array no un objeto
|
|
17
22
|
message: `Estados valido de una orden: ${EstadoOrdenlista}`,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"status-order.dto.js","sourceRoot":"","sources":["../../../../src/dto/Logistica/cart/status-order.dto.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAE5E,MAAM,OAAO,SAAS;IAWpB,MAAM,CAAc;CACrB;AADC;IAVC,WAAW,CAAC;QACX,WAAW,EAAE,mCAAmC;QAChD,IAAI,EAAE,WAAW;QACjB,OAAO,EAAE,WAAW,CAAC,SAAS;QAC9B,QAAQ,EAAE,aAAa;KACxB,CAAC;IACD,MAAM,CAAC,gBAAgB,EAAE;QACxB,iEAAiE;QACjE,OAAO,EAAE,gCAAgC,gBAAgB,EAAE;KAC5D,CAAC;yCACkB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"change-order-status.dto.d.ts","sourceRoot":"","sources":["../../../../src/dto/Logistica/orders/change-order-status.dto.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAoB,MAAM,6BAA6B,CAAC;AAE5E,qBAAa,qBAAqB;IAOhC,EAAE,EAAE,MAAM,CAAC;IAWX,MAAM,EAAE,WAAW,CAAC;CACrB"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
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;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { ApiProperty } from "@nestjs/swagger";
|
|
8
|
+
import { IsEnum, IsUUID } from "class-validator";
|
|
9
|
+
import { EstadoOrden, EstadoOrdenlista } from "../../../enum/order.enum.js";
|
|
10
|
+
export class ActualizarEstadoOrden {
|
|
11
|
+
id;
|
|
12
|
+
estado;
|
|
13
|
+
}
|
|
14
|
+
__decorate([
|
|
15
|
+
ApiProperty({
|
|
16
|
+
description: "Identificador único del pedido a actualizar (UUID v4)",
|
|
17
|
+
example: "550e8400-e29b-41d4-a716-446655440000",
|
|
18
|
+
format: "uuid",
|
|
19
|
+
}),
|
|
20
|
+
IsUUID(4) // "Version (4) de UUID"
|
|
21
|
+
], ActualizarEstadoOrden.prototype, "id", void 0);
|
|
22
|
+
__decorate([
|
|
23
|
+
ApiProperty({
|
|
24
|
+
description: "Nuevo estado del pedido de pizza",
|
|
25
|
+
enum: EstadoOrdenlista,
|
|
26
|
+
example: "entregado",
|
|
27
|
+
enumName: "EstadoOrden",
|
|
28
|
+
}),
|
|
29
|
+
IsEnum(EstadoOrdenlista, {
|
|
30
|
+
message: `Estados validos de una orden: ${EstadoOrdenlista}`,
|
|
31
|
+
})
|
|
32
|
+
], ActualizarEstadoOrden.prototype, "estado", void 0);
|
|
33
|
+
//# sourceMappingURL=change-order-status.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"change-order-status.dto.js","sourceRoot":"","sources":["../../../../src/dto/Logistica/orders/change-order-status.dto.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAE5E,MAAM,OAAO,qBAAqB;IAOhC,EAAE,CAAS;IAWX,MAAM,CAAc;CACrB;AAZC;IANC,WAAW,CAAC;QACX,WAAW,EAAE,uDAAuD;QACpE,OAAO,EAAE,sCAAsC;QAC/C,MAAM,EAAE,MAAM;KACf,CAAC;IACD,MAAM,CAAC,CAAC,CAAC,CAAC,wBAAwB;iDACxB;AAWX;IATC,WAAW,CAAC;QACX,WAAW,EAAE,kCAAkC;QAC/C,IAAI,EAAE,gBAAgB;QACtB,OAAO,EAAE,WAAW;QACpB,QAAQ,EAAE,aAAa;KACxB,CAAC;IACD,MAAM,CAAC,gBAAgB,EAAE;QACxB,OAAO,EAAE,iCAAiC,gBAAgB,EAAE;KAC7D,CAAC;qDACkB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-order.dto.d.ts","sourceRoot":"","sources":["../../../../src/dto/Logistica/orders/create-order.dto.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAEnD,qBAAa,cAAc;IAczB,KAAK,EAAE,YAAY,EAAE,CAAC;CACvB"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
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;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { ApiProperty } from "@nestjs/swagger";
|
|
8
|
+
import { ArrayMinSize, IsArray, ValidateNested } from "class-validator";
|
|
9
|
+
import { Type } from "class-transformer";
|
|
10
|
+
import { OrdenItemDto } from "./order-item.dto.js";
|
|
11
|
+
export class CreateOrderDto {
|
|
12
|
+
items;
|
|
13
|
+
}
|
|
14
|
+
__decorate([
|
|
15
|
+
ApiProperty({
|
|
16
|
+
description: "Lista de pizzas a incluir en el pedido. Debe contener al menos una pizza",
|
|
17
|
+
type: [OrdenItemDto],
|
|
18
|
+
example: [
|
|
19
|
+
{ productoId: 1, cantidad: 2 },
|
|
20
|
+
{ productoId: 3, cantidad: 1 },
|
|
21
|
+
],
|
|
22
|
+
}),
|
|
23
|
+
IsArray(),
|
|
24
|
+
ArrayMinSize(1),
|
|
25
|
+
ValidateNested({ each: true }),
|
|
26
|
+
Type(() => OrdenItemDto)
|
|
27
|
+
], CreateOrderDto.prototype, "items", void 0);
|
|
28
|
+
//# sourceMappingURL=create-order.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-order.dto.js","sourceRoot":"","sources":["../../../../src/dto/Logistica/orders/create-order.dto.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACxE,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAEnD,MAAM,OAAO,cAAc;IAczB,KAAK,CAAiB;CACvB;AADC;IAbC,WAAW,CAAC;QACX,WAAW,EACT,0EAA0E;QAC5E,IAAI,EAAE,CAAC,YAAY,CAAC;QACpB,OAAO,EAAE;YACP,EAAE,UAAU,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE;YAC9B,EAAE,UAAU,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE;SAC/B;KACF,CAAC;IACD,OAAO,EAAE;IACT,YAAY,CAAC,CAAC,CAAC;IACf,cAAc,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IAC9B,IAAI,CAAC,GAAG,EAAE,CAAC,YAAY,CAAC;6CACH"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"order-item.dto.d.ts","sourceRoot":"","sources":["../../../../src/dto/Logistica/orders/order-item.dto.ts"],"names":[],"mappings":"AAIA,qBAAa,YAAY;IAQvB,UAAU,EAAE,MAAM,CAAC;IASnB,QAAQ,EAAE,MAAM,CAAC;CAMlB"}
|
|
@@ -5,18 +5,28 @@ 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 { ApiProperty } from "@nestjs/swagger";
|
|
8
|
-
import {
|
|
9
|
-
import { ProductDto } from "./Product.dto.js";
|
|
8
|
+
import { Type } from "class-transformer";
|
|
10
9
|
import { IsNumber, IsPositive } from "class-validator";
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
TIENE que ir el id, del producto */
|
|
15
|
-
id;
|
|
10
|
+
export class OrdenItemDto {
|
|
11
|
+
productoId;
|
|
12
|
+
cantidad;
|
|
16
13
|
}
|
|
17
14
|
__decorate([
|
|
18
|
-
ApiProperty(
|
|
15
|
+
ApiProperty({
|
|
16
|
+
description: "Identificador único de la pizza en el catálogo",
|
|
17
|
+
example: 3,
|
|
18
|
+
type: Number,
|
|
19
|
+
}),
|
|
19
20
|
IsNumber(),
|
|
20
21
|
IsPositive()
|
|
21
|
-
],
|
|
22
|
-
|
|
22
|
+
], OrdenItemDto.prototype, "productoId", void 0);
|
|
23
|
+
__decorate([
|
|
24
|
+
ApiProperty({
|
|
25
|
+
description: "Cantidad de pizzas a incluir en el pedido",
|
|
26
|
+
example: 2,
|
|
27
|
+
type: Number,
|
|
28
|
+
}),
|
|
29
|
+
IsNumber(),
|
|
30
|
+
IsPositive()
|
|
31
|
+
], OrdenItemDto.prototype, "cantidad", void 0);
|
|
32
|
+
//# sourceMappingURL=order-item.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"order-item.dto.js","sourceRoot":"","sources":["../../../../src/dto/Logistica/orders/order-item.dto.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAEvD,MAAM,OAAO,YAAY;IAQvB,UAAU,CAAS;IASnB,QAAQ,CAAS;CAMlB;AAfC;IAPC,WAAW,CAAC;QACX,WAAW,EAAE,gDAAgD;QAC7D,OAAO,EAAE,CAAC;QACV,IAAI,EAAE,MAAM;KACb,CAAC;IACD,QAAQ,EAAE;IACV,UAAU,EAAE;gDACM;AASnB;IAPC,WAAW,CAAC;QACX,WAAW,EAAE,2CAA2C;QACxD,OAAO,EAAE,CAAC;QACV,IAAI,EAAE,MAAM;KACb,CAAC;IACD,QAAQ,EAAE;IACV,UAAU,EAAE;8CACI"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"status-order.dto.d.ts","sourceRoot":"","sources":["../../../../src/dto/Logistica/orders/status-order.dto.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAoB,MAAM,6BAA6B,CAAC;AAE5E,qBAAa,SAAS;IAWpB,MAAM,EAAE,WAAW,CAAC;CACrB"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
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;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { ApiProperty } from "@nestjs/swagger";
|
|
8
|
+
import { IsEnum, IsOptional } from "class-validator";
|
|
9
|
+
import { EstadoOrden, EstadoOrdenlista } from "../../../enum/order.enum.js";
|
|
10
|
+
export class EstadoDto {
|
|
11
|
+
estado;
|
|
12
|
+
}
|
|
13
|
+
__decorate([
|
|
14
|
+
ApiProperty({
|
|
15
|
+
description: "Estado actual del pedido de pizza",
|
|
16
|
+
enum: EstadoOrden,
|
|
17
|
+
example: EstadoOrden.PENDIENTE,
|
|
18
|
+
enumName: "EstadoOrden",
|
|
19
|
+
}),
|
|
20
|
+
IsEnum(EstadoOrdenlista, {
|
|
21
|
+
//Se crea una lista, ya que @IsEnum, espera un array no un objeto
|
|
22
|
+
message: `Estados valido de una orden: ${EstadoOrdenlista}`,
|
|
23
|
+
})
|
|
24
|
+
], EstadoDto.prototype, "estado", void 0);
|
|
25
|
+
//# sourceMappingURL=status-order.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"status-order.dto.js","sourceRoot":"","sources":["../../../../src/dto/Logistica/orders/status-order.dto.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAE5E,MAAM,OAAO,SAAS;IAWpB,MAAM,CAAc;CACrB;AADC;IAVC,WAAW,CAAC;QACX,WAAW,EAAE,mCAAmC;QAChD,IAAI,EAAE,WAAW;QACjB,OAAO,EAAE,WAAW,CAAC,SAAS;QAC9B,QAAQ,EAAE,aAAa;KACxB,CAAC;IACD,MAAM,CAAC,gBAAgB,EAAE;QACxB,iEAAiE;QACjE,OAAO,EAAE,gCAAgC,gBAAgB,EAAE;KAC5D,CAAC;yCACkB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Category.dto.d.ts","sourceRoot":"","sources":["../../../../src/dto/Productos/categories/Category.dto.ts"],"names":[],"mappings":"AAGA,qBAAa,WAAW;IAMtB,MAAM,EAAE,MAAM,CAAC;IAQf,MAAM,EAAE,MAAM,CAAC;IASf,WAAW,EAAE,MAAM,CAAC;CACrB"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
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;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { ApiProperty } from "@nestjs/swagger";
|
|
8
|
+
import { IsOptional, IsString, IsUrl } from "class-validator";
|
|
9
|
+
export class CategoryDto {
|
|
10
|
+
nombre;
|
|
11
|
+
imagen;
|
|
12
|
+
descripcion;
|
|
13
|
+
}
|
|
14
|
+
__decorate([
|
|
15
|
+
ApiProperty({
|
|
16
|
+
description: "Nombre de la categoría",
|
|
17
|
+
example: "Pizzas",
|
|
18
|
+
}),
|
|
19
|
+
IsString()
|
|
20
|
+
], CategoryDto.prototype, "nombre", void 0);
|
|
21
|
+
__decorate([
|
|
22
|
+
ApiProperty({
|
|
23
|
+
description: "URL de la imagen de la categoría",
|
|
24
|
+
example: "https://example.com/pizzas.jpg",
|
|
25
|
+
}),
|
|
26
|
+
IsUrl() // Is URL?
|
|
27
|
+
,
|
|
28
|
+
IsString()
|
|
29
|
+
], CategoryDto.prototype, "imagen", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
ApiProperty({
|
|
32
|
+
description: "Descripción de la categoría",
|
|
33
|
+
example: "Deliciosas pizzas artesanales",
|
|
34
|
+
required: false,
|
|
35
|
+
}),
|
|
36
|
+
IsOptional(),
|
|
37
|
+
IsString()
|
|
38
|
+
], CategoryDto.prototype, "descripcion", void 0);
|
|
39
|
+
//# sourceMappingURL=Category.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Category.dto.js","sourceRoot":"","sources":["../../../../src/dto/Productos/categories/Category.dto.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAE9D,MAAM,OAAO,WAAW;IAMtB,MAAM,CAAS;IAQf,MAAM,CAAS;IASf,WAAW,CAAS;CACrB;AAlBC;IALC,WAAW,CAAC;QACX,WAAW,EAAE,wBAAwB;QACrC,OAAO,EAAE,QAAQ;KAClB,CAAC;IACD,QAAQ,EAAE;2CACI;AAQf;IANC,WAAW,CAAC;QACX,WAAW,EAAE,kCAAkC;QAC/C,OAAO,EAAE,gCAAgC;KAC1C,CAAC;IACD,KAAK,EAAE,CAAC,UAAU;;IAClB,QAAQ,EAAE;2CACI;AASf;IAPC,WAAW,CAAC;QACX,WAAW,EAAE,6BAA6B;QAC1C,OAAO,EAAE,+BAA+B;QACxC,QAAQ,EAAE,KAAK;KAChB,CAAC;IACD,UAAU,EAAE;IACZ,QAAQ,EAAE;gDACS"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CategoryDto } from "./Category.dto.js";
|
|
2
|
+
declare const CategoryProperties_base: import("@nestjs/mapped-types").MappedType<Partial<CategoryDto>>;
|
|
3
|
+
export declare class CategoryProperties extends CategoryProperties_base {
|
|
4
|
+
}
|
|
5
|
+
declare const UpdateCategoryDto_base: import("@nestjs/mapped-types").MappedType<Partial<CategoryDto>>;
|
|
6
|
+
export declare class UpdateCategoryDto extends UpdateCategoryDto_base {
|
|
7
|
+
id: number;
|
|
8
|
+
}
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=update-category.dto.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-category.dto.d.ts","sourceRoot":"","sources":["../../../../src/dto/Productos/categories/update-category.dto.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;;AAIhD,qBAAa,kBAAmB,SAAQ,uBAAwB;CAK/D;;AAGD,qBAAa,iBAAkB,SAAQ,sBAAwB;IAQ7D,EAAE,EAAE,MAAM,CAAC;CACZ"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
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;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { ApiHideProperty, ApiProperty } from "@nestjs/swagger";
|
|
8
|
+
import { PartialType } from "@nestjs/mapped-types";
|
|
9
|
+
import { CategoryDto } from "./Category.dto.js";
|
|
10
|
+
import { IsNumber, IsPositive } from "class-validator";
|
|
11
|
+
// DTO para el GateWay
|
|
12
|
+
export class CategoryProperties extends PartialType(CategoryDto) {
|
|
13
|
+
}
|
|
14
|
+
// (PartialType): UpdateCategoryDto de la clase CategoryDto, pero sus campos (de la clase padre) son opcionales
|
|
15
|
+
export class UpdateCategoryDto extends PartialType(CategoryDto) {
|
|
16
|
+
/* Entre microservicios, a la hora de conectarse,
|
|
17
|
+
TIENE que ir el id, de la categoría */
|
|
18
|
+
id;
|
|
19
|
+
}
|
|
20
|
+
__decorate([
|
|
21
|
+
ApiProperty({
|
|
22
|
+
default: 1,
|
|
23
|
+
}),
|
|
24
|
+
IsNumber(),
|
|
25
|
+
IsPositive()
|
|
26
|
+
], UpdateCategoryDto.prototype, "id", void 0);
|
|
27
|
+
//# sourceMappingURL=update-category.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-category.dto.js","sourceRoot":"","sources":["../../../../src/dto/Productos/categories/update-category.dto.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAEvD,sBAAsB;AACtB,MAAM,OAAO,kBAAmB,SAAQ,WAAW,CAAC,WAAW,CAAC;CAK/D;AAED,+GAA+G;AAC/G,MAAM,OAAO,iBAAkB,SAAQ,WAAW,CAAC,WAAW,CAAC;IAC7D;4CACwC;IAMxC,EAAE,CAAS;CACZ;AADC;IALC,WAAW,CAAC;QACX,OAAO,EAAE,CAAC;KACX,CAAC;IACD,QAAQ,EAAE;IACV,UAAU,EAAE;6CACF"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
export declare class ProductDto {
|
|
2
2
|
nombre: string;
|
|
3
|
-
tipo: string;
|
|
4
3
|
descripcion: string;
|
|
5
|
-
|
|
4
|
+
imagen: string;
|
|
5
|
+
precio: string;
|
|
6
|
+
disponible: boolean;
|
|
6
7
|
es_novedad: boolean;
|
|
7
8
|
es_favorito: boolean;
|
|
8
|
-
|
|
9
|
+
categoryId: number;
|
|
9
10
|
}
|
|
10
11
|
//# sourceMappingURL=Product.dto.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Product.dto.d.ts","sourceRoot":"","sources":["../../../../src/dto/Productos/products/Product.dto.ts"],"names":[],"mappings":"AAUA,qBAAa,UAAU;IAmBrB,MAAM,EAAE,MAAM,CAAC;IASf,WAAW,EAAE,MAAM,CAAC;IAOpB,MAAM,EAAE,MAAM,CAAC;IASf,MAAM,EAAE,MAAM,CAAC;IAef,UAAU,EAAE,OAAO,CAAC;IAepB,UAAU,EAAE,OAAO,CAAC;IAepB,WAAW,EAAE,OAAO,CAAC;IAOrB,UAAU,EAAE,MAAM,CAAC;CACpB"}
|
|
@@ -6,7 +6,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
6
6
|
};
|
|
7
7
|
import { ApiProperty } from "@nestjs/swagger";
|
|
8
8
|
import { Transform } from "class-transformer";
|
|
9
|
-
import { IsBoolean,
|
|
9
|
+
import { IsBoolean, IsDecimal, IsOptional, IsPositive, IsString, } from "class-validator";
|
|
10
10
|
export class ProductDto {
|
|
11
11
|
/*
|
|
12
12
|
* Paginaciones
|
|
@@ -20,39 +20,53 @@ export class ProductDto {
|
|
|
20
20
|
// @Type(() => Number)
|
|
21
21
|
// limit: number = 10;
|
|
22
22
|
nombre;
|
|
23
|
-
tipo;
|
|
24
23
|
descripcion;
|
|
25
|
-
|
|
24
|
+
imagen;
|
|
26
25
|
precio;
|
|
27
|
-
|
|
28
|
-
// @IsPositive()
|
|
29
|
-
// @Type(() => Number)
|
|
30
|
-
// precio_venta: Number;
|
|
26
|
+
disponible;
|
|
31
27
|
es_novedad;
|
|
32
28
|
es_favorito;
|
|
33
|
-
|
|
29
|
+
categoryId;
|
|
34
30
|
}
|
|
35
31
|
__decorate([
|
|
36
|
-
ApiProperty(
|
|
32
|
+
ApiProperty({
|
|
33
|
+
description: "Nombre del producto",
|
|
34
|
+
example: "Pizza Margarita",
|
|
35
|
+
}),
|
|
37
36
|
IsString()
|
|
38
37
|
], ProductDto.prototype, "nombre", void 0);
|
|
39
38
|
__decorate([
|
|
40
|
-
ApiProperty(
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
39
|
+
ApiProperty({
|
|
40
|
+
description: "Descripción del producto",
|
|
41
|
+
example: "Tomate, mozzarella, albahaca fresca y aceite de oliva",
|
|
42
|
+
required: false,
|
|
43
|
+
}),
|
|
45
44
|
IsOptional(),
|
|
46
45
|
IsString()
|
|
47
46
|
], ProductDto.prototype, "descripcion", void 0);
|
|
48
47
|
__decorate([
|
|
49
|
-
ApiProperty(
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
48
|
+
ApiProperty({
|
|
49
|
+
description: "URL de la imagen del producto",
|
|
50
|
+
example: "https://example.com/pizza.jpg",
|
|
51
|
+
}),
|
|
52
|
+
IsString()
|
|
53
|
+
], ProductDto.prototype, "imagen", void 0);
|
|
54
|
+
__decorate([
|
|
55
|
+
ApiProperty({
|
|
56
|
+
description: "Precio base del producto",
|
|
57
|
+
example: "35.99",
|
|
58
|
+
type: String,
|
|
59
|
+
}),
|
|
60
|
+
IsPositive(),
|
|
61
|
+
IsDecimal({ decimal_digits: "0,2", force_decimal: true })
|
|
53
62
|
], ProductDto.prototype, "precio", void 0);
|
|
54
63
|
__decorate([
|
|
55
|
-
ApiProperty({
|
|
64
|
+
ApiProperty({
|
|
65
|
+
description: "Indica si el producto está disponible",
|
|
66
|
+
example: true,
|
|
67
|
+
required: false,
|
|
68
|
+
default: true,
|
|
69
|
+
}),
|
|
56
70
|
IsOptional(),
|
|
57
71
|
IsBoolean(),
|
|
58
72
|
Transform(({ value }) => {
|
|
@@ -62,9 +76,14 @@ __decorate([
|
|
|
62
76
|
return false;
|
|
63
77
|
return value;
|
|
64
78
|
})
|
|
65
|
-
], ProductDto.prototype, "
|
|
79
|
+
], ProductDto.prototype, "disponible", void 0);
|
|
66
80
|
__decorate([
|
|
67
|
-
ApiProperty({
|
|
81
|
+
ApiProperty({
|
|
82
|
+
description: "Indica si es un producto nuevo",
|
|
83
|
+
example: false,
|
|
84
|
+
required: false,
|
|
85
|
+
default: false,
|
|
86
|
+
}),
|
|
68
87
|
IsOptional(),
|
|
69
88
|
IsBoolean(),
|
|
70
89
|
Transform(({ value }) => {
|
|
@@ -74,9 +93,14 @@ __decorate([
|
|
|
74
93
|
return false;
|
|
75
94
|
return value;
|
|
76
95
|
})
|
|
77
|
-
], ProductDto.prototype, "
|
|
96
|
+
], ProductDto.prototype, "es_novedad", void 0);
|
|
78
97
|
__decorate([
|
|
79
|
-
ApiProperty({
|
|
98
|
+
ApiProperty({
|
|
99
|
+
description: "Indica si es producto favorito",
|
|
100
|
+
example: false,
|
|
101
|
+
required: false,
|
|
102
|
+
default: false,
|
|
103
|
+
}),
|
|
80
104
|
IsOptional(),
|
|
81
105
|
IsBoolean(),
|
|
82
106
|
Transform(({ value }) => {
|
|
@@ -86,5 +110,12 @@ __decorate([
|
|
|
86
110
|
return false;
|
|
87
111
|
return value;
|
|
88
112
|
})
|
|
89
|
-
], ProductDto.prototype, "
|
|
113
|
+
], ProductDto.prototype, "es_favorito", void 0);
|
|
114
|
+
__decorate([
|
|
115
|
+
ApiProperty({
|
|
116
|
+
description: "ID de la categoría del producto (1:vegetariana), (2:pasta)",
|
|
117
|
+
example: "1",
|
|
118
|
+
}),
|
|
119
|
+
IsString()
|
|
120
|
+
], ProductDto.prototype, "categoryId", void 0);
|
|
90
121
|
//# sourceMappingURL=Product.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Product.dto.js","sourceRoot":"","sources":["../../../../src/dto/Productos/products/Product.dto.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EACL,SAAS,EACT,SAAS,EACT,UAAU,EACV,UAAU,EACV,QAAQ,GACT,MAAM,iBAAiB,CAAC;AAEzB,MAAM,OAAO,UAAU;IACrB;;OAEG;IACH,gBAAgB;IAChB,gBAAgB;IAChB,4DAA4D;IAC5D,qFAAqF;IAErF,gBAAgB;IAChB,gBAAgB;IAChB,sBAAsB;IACtB,sBAAsB;IAOtB,MAAM,CAAS;IASf,WAAW,CAAS;IAOpB,MAAM,CAAS;IASf,MAAM,CAAS;IAef,UAAU,CAAU;IAepB,UAAU,CAAU;IAepB,WAAW,CAAU;IAOrB,UAAU,CAAS;CACpB;AA9EC;IALC,WAAW,CAAC;QACX,WAAW,EAAE,qBAAqB;QAClC,OAAO,EAAE,iBAAiB;KAC3B,CAAC;IACD,QAAQ,EAAE;0CACI;AASf;IAPC,WAAW,CAAC;QACX,WAAW,EAAE,0BAA0B;QACvC,OAAO,EAAE,uDAAuD;QAChE,QAAQ,EAAE,KAAK;KAChB,CAAC;IACD,UAAU,EAAE;IACZ,QAAQ,EAAE;+CACS;AAOpB;IALC,WAAW,CAAC;QACX,WAAW,EAAE,+BAA+B;QAC5C,OAAO,EAAE,+BAA+B;KACzC,CAAC;IACD,QAAQ,EAAE;0CACI;AASf;IAPC,WAAW,CAAC;QACX,WAAW,EAAE,0BAA0B;QACvC,OAAO,EAAE,OAAO;QAChB,IAAI,EAAE,MAAM;KACb,CAAC;IACD,UAAU,EAAE;IACZ,SAAS,CAAC,EAAE,cAAc,EAAE,KAAK,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC;0CAC3C;AAef;IAbC,WAAW,CAAC;QACX,WAAW,EAAE,uCAAuC;QACpD,OAAO,EAAE,IAAI;QACb,QAAQ,EAAE,KAAK;QACf,OAAO,EAAE,IAAI;KACd,CAAC;IACD,UAAU,EAAE;IACZ,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;8CACkB;AAepB;IAbC,WAAW,CAAC;QACX,WAAW,EAAE,gCAAgC;QAC7C,OAAO,EAAE,KAAK;QACd,QAAQ,EAAE,KAAK;QACf,OAAO,EAAE,KAAK;KACf,CAAC;IACD,UAAU,EAAE;IACZ,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;8CACkB;AAepB;IAbC,WAAW,CAAC;QACX,WAAW,EAAE,gCAAgC;QAC7C,OAAO,EAAE,KAAK;QACd,QAAQ,EAAE,KAAK;QACf,OAAO,EAAE,KAAK;KACf,CAAC;IACD,UAAU,EAAE;IACZ,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;+CACmB;AAOrB;IALC,WAAW,CAAC;QACX,WAAW,EAAE,4DAA4D;QACzE,OAAO,EAAE,GAAG;KACb,CAAC;IACD,QAAQ,EAAE;8CACQ"}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { ProductDto } from "./Product.dto.js";
|
|
2
|
+
declare const ProductProperties_base: import("@nestjs/mapped-types").MappedType<Partial<ProductDto>>;
|
|
3
|
+
export declare class ProductProperties extends ProductProperties_base {
|
|
4
|
+
}
|
|
2
5
|
declare const UpdateProductDto_base: import("@nestjs/mapped-types").MappedType<Partial<ProductDto>>;
|
|
3
6
|
export declare class UpdateProductDto extends UpdateProductDto_base {
|
|
4
7
|
id: number;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-product.dto.d.ts","sourceRoot":"","sources":["../../../../src/dto/Productos/products/update-product.dto.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;;AAI9C,qBAAa,iBAAkB,SAAQ,sBAAuB;CAK7D;;AAID,qBAAa,gBAAiB,SAAQ,qBAAuB;IAQ3D,EAAE,EAAE,MAAM,CAAC;CACZ"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
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;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { ApiHideProperty, ApiProperty } from "@nestjs/swagger";
|
|
8
|
+
import { PartialType } from "@nestjs/mapped-types";
|
|
9
|
+
import { ProductDto } from "./Product.dto.js";
|
|
10
|
+
import { IsNumber, IsPositive } from "class-validator";
|
|
11
|
+
// DTO PARA EL GateWay
|
|
12
|
+
export class ProductProperties extends PartialType(ProductDto) {
|
|
13
|
+
}
|
|
14
|
+
// DTO PARA EL MICROSERVICIO
|
|
15
|
+
// (PartialType): UpdateProductDto de la clase ProductDto, pero sus campos (de la clase padre) son opcionales
|
|
16
|
+
export class UpdateProductDto extends PartialType(ProductDto) {
|
|
17
|
+
/* Entre microservicios, a la hora de conectarse,
|
|
18
|
+
TIENE que ir el id, del producto */
|
|
19
|
+
id;
|
|
20
|
+
}
|
|
21
|
+
__decorate([
|
|
22
|
+
ApiProperty({
|
|
23
|
+
default: 1,
|
|
24
|
+
}),
|
|
25
|
+
IsNumber(),
|
|
26
|
+
IsPositive()
|
|
27
|
+
], UpdateProductDto.prototype, "id", void 0);
|
|
28
|
+
/*
|
|
29
|
+
Recibe un objeto por separado en el body(el id + las propiedades del producto),
|
|
30
|
+
ya que, el id debe ir en el body, porque no hay URL (endpoint param ":id", que reciba ese id, en el microservicio servidor),
|
|
31
|
+
por eso, debe enviar un objeto "nuevo", updateProductDto(el id + las propiedades del producto),
|
|
32
|
+
|
|
33
|
+
El "id", se usa para encontrar al producto que se quiere actualizar, (por eso un nuevo dto (updateProductDto)).
|
|
34
|
+
No te preocupes por la validacion, ParseIntPipe, ya valida el id por ti.
|
|
35
|
+
*/
|
|
36
|
+
//# sourceMappingURL=update-product.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-product.dto.js","sourceRoot":"","sources":["../../../../src/dto/Productos/products/update-product.dto.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAEvD,sBAAsB;AACtB,MAAM,OAAO,iBAAkB,SAAQ,WAAW,CAAC,UAAU,CAAC;CAK7D;AAED,4BAA4B;AAC5B,6GAA6G;AAC7G,MAAM,OAAO,gBAAiB,SAAQ,WAAW,CAAC,UAAU,CAAC;IAC3D;yCACqC;IAMrC,EAAE,CAAS;CACZ;AADC;IALC,WAAW,CAAC;QACX,OAAO,EAAE,CAAC;KACX,CAAC;IACD,QAAQ,EAAE;IACV,UAAU,EAAE;4CACF;AAGb;;;;;;;EAOE"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
export * from "./dto/products/Product.dto.js";
|
|
2
|
-
export * from "./dto/products/update-product.dto.js";
|
|
3
|
-
export * from "./dto/
|
|
4
|
-
export * from "./dto/
|
|
5
|
-
export * from "./dto/orders/
|
|
1
|
+
export * from "./dto/Productos/products/Product.dto.js";
|
|
2
|
+
export * from "./dto/Productos/products/update-product.dto.js";
|
|
3
|
+
export * from "./dto/Productos/categories/Category.dto.js";
|
|
4
|
+
export * from "./dto/Productos/categories/update-category.dto.js";
|
|
5
|
+
export * from "./dto/Logistica/orders/create-order.dto.js";
|
|
6
|
+
export * from "./dto//Logistica/orders/status-order.dto.js";
|
|
7
|
+
export * from "./dto/Logistica/orders/change-order-status.dto.js";
|
|
6
8
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,cAAc,yCAAyC,CAAC;AACxD,cAAc,gDAAgD,CAAC;AAG/D,cAAc,4CAA4C,CAAC;AAC3D,cAAc,mDAAmD,CAAC;AAKlE,cAAc,4CAA4C,CAAC;AAC3D,cAAc,6CAA6C,CAAC;AAC5D,cAAc,mDAAmD,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,10 +1,17 @@
|
|
|
1
|
+
// SERVICIO PRODUCTOS
|
|
1
2
|
// Productos
|
|
2
|
-
export * from "./dto/products/Product.dto.js";
|
|
3
|
-
export * from "./dto/products/update-product.dto.js";
|
|
3
|
+
export * from "./dto/Productos/products/Product.dto.js";
|
|
4
|
+
export * from "./dto/Productos/products/update-product.dto.js";
|
|
5
|
+
// Categorias
|
|
6
|
+
export * from "./dto/Productos/categories/Category.dto.js";
|
|
7
|
+
export * from "./dto/Productos/categories/update-category.dto.js";
|
|
8
|
+
// SERVICIO LOGISTICA
|
|
4
9
|
// Ordenes
|
|
5
|
-
export * from "./dto/orders/create-order.dto.js";
|
|
6
|
-
export * from "./dto/orders/status-order.dto.js";
|
|
7
|
-
export * from "./dto/orders/change-order-status.dto.js";
|
|
10
|
+
export * from "./dto/Logistica/orders/create-order.dto.js";
|
|
11
|
+
export * from "./dto//Logistica/orders/status-order.dto.js";
|
|
12
|
+
export * from "./dto/Logistica/orders/change-order-status.dto.js";
|
|
13
|
+
// SERVICIO USUARIOS
|
|
14
|
+
// SERVICIO USUARIOS
|
|
8
15
|
/*
|
|
9
16
|
Al poner "verbatimModuleSyntax": false, desabilito las extensiones de ".js",
|
|
10
17
|
sin embargo, nodejs (de mis projectos), usa ESM(ECMAScript), que requiere explicitamente
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY;AACZ,cAAc
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,qBAAqB;AAErB,YAAY;AACZ,cAAc,yCAAyC,CAAC;AACxD,cAAc,gDAAgD,CAAC;AAE/D,aAAa;AACb,cAAc,4CAA4C,CAAC;AAC3D,cAAc,mDAAmD,CAAC;AAElE,qBAAqB;AAErB,UAAU;AACV,cAAc,4CAA4C,CAAC;AAC3D,cAAc,6CAA6C,CAAC;AAC5D,cAAc,mDAAmD,CAAC;AAElE,oBAAoB;AAEpB,oBAAoB;AAEpB;;;;EAIE"}
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"change-order-status.dto.d.ts","sourceRoot":"","sources":["../../../src/dto/orders/change-order-status.dto.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAoB,MAAM,0BAA0B,CAAC;AAEzE,qBAAa,qBAAqB;IAGhC,EAAE,EAAE,MAAM,CAAC;IAMX,MAAM,EAAE,WAAW,CAAC;CACrB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"change-order-status.dto.js","sourceRoot":"","sources":["../../../src/dto/orders/change-order-status.dto.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAEzE,MAAM,OAAO,qBAAqB;IAGhC,EAAE,CAAS;IAMX,MAAM,CAAc;CACrB;AAPC;IAFC,WAAW,EAAE;IACb,MAAM,CAAC,CAAC,CAAC,CAAC,wBAAwB;iDACxB;AAMX;IAJC,WAAW,CAAC,EAAE,IAAI,EAAE,gBAAgB,EAAE,CAAC;IACvC,MAAM,CAAC,gBAAgB,EAAE;QACxB,OAAO,EAAE,gCAAgC,gBAAgB,EAAE;KAC5D,CAAC;qDACkB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create-order.dto.d.ts","sourceRoot":"","sources":["../../../src/dto/orders/create-order.dto.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAEnD,qBAAa,cAAc;IAMzB,KAAK,EAAE,YAAY,EAAE,CAAC;CACvB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create-order.dto.js","sourceRoot":"","sources":["../../../src/dto/orders/create-order.dto.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACxE,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAEnD,MAAM,OAAO,cAAc;IAMzB,KAAK,CAAiB;CACvB;AADC;IALC,WAAW,CAAC,EAAE,IAAI,EAAE,CAAC,YAAY,CAAC,EAAE,CAAC;IACrC,OAAO,EAAE;IACT,YAAY,CAAC,CAAC,CAAC;IACf,cAAc,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IAC9B,IAAI,CAAC,GAAG,EAAE,CAAC,YAAY,CAAC;6CACH"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"order-item.dto.d.ts","sourceRoot":"","sources":["../../../src/dto/orders/order-item.dto.ts"],"names":[],"mappings":"AAIA,qBAAa,YAAY;IAIvB,UAAU,EAAE,MAAM,CAAC;IAKnB,QAAQ,EAAE,MAAM,CAAC;CAMlB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"order-item.dto.js","sourceRoot":"","sources":["../../../src/dto/orders/order-item.dto.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAEvD,MAAM,OAAO,YAAY;IAIvB,UAAU,CAAS;IAKnB,QAAQ,CAAS;CAMlB;AAXC;IAHC,WAAW,EAAE;IACb,QAAQ,EAAE;IACV,UAAU,EAAE;gDACM;AAKnB;IAHC,WAAW,EAAE;IACb,QAAQ,EAAE;IACV,UAAU,EAAE;8CACI"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"status-order.dto.d.ts","sourceRoot":"","sources":["../../../src/dto/orders/status-order.dto.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAoB,MAAM,0BAA0B,CAAC;AAEzE,qBAAa,SAAS;IAMpB,MAAM,EAAE,WAAW,CAAC;CACrB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"status-order.dto.js","sourceRoot":"","sources":["../../../src/dto/orders/status-order.dto.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAEzE,MAAM,OAAO,SAAS;IAMpB,MAAM,CAAc;CACrB;AADC;IALC,WAAW,CAAC,EAAE,IAAI,EAAE,gBAAgB,EAAE,CAAC;IACvC,MAAM,CAAC,gBAAgB,EAAE;QACxB,iEAAiE;QACjE,OAAO,EAAE,gCAAgC,gBAAgB,EAAE;KAC5D,CAAC;yCACkB"}
|
|
@@ -1,7 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1 +0,0 @@
|
|
|
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 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pagination.dto.d.ts","sourceRoot":"","sources":["../../src/dto/pagination.dto.ts"],"names":[],"mappings":"AAGA,qBAAa,aAAa;IAIxB,IAAI,EAAE,MAAM,CAAK;IAKjB,KAAK,EAAE,MAAM,CAAM;CACpB"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
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;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
import { Type } from "class-transformer";
|
|
8
|
-
import { IsOptional, IsPositive } from "class-validator";
|
|
9
|
-
export class PaginationDto {
|
|
10
|
-
page = 1; // a diferencia de los pipes, no los valida, solo los transforma
|
|
11
|
-
limit = 10;
|
|
12
|
-
}
|
|
13
|
-
__decorate([
|
|
14
|
-
IsPositive(),
|
|
15
|
-
IsOptional(),
|
|
16
|
-
Type(() => Number) // transformer: lo convierte a numero
|
|
17
|
-
], PaginationDto.prototype, "page", void 0);
|
|
18
|
-
__decorate([
|
|
19
|
-
IsPositive(),
|
|
20
|
-
IsOptional(),
|
|
21
|
-
Type(() => Number)
|
|
22
|
-
], PaginationDto.prototype, "limit", void 0);
|
|
23
|
-
//# sourceMappingURL=pagination.dto.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pagination.dto.js","sourceRoot":"","sources":["../../src/dto/pagination.dto.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAEzD,MAAM,OAAO,aAAa;IAIxB,IAAI,GAAW,CAAC,CAAC,CAAC,gEAAgE;IAKlF,KAAK,GAAW,EAAE,CAAC;CACpB;AANC;IAHC,UAAU,EAAE;IACZ,UAAU,EAAE;IACZ,IAAI,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,CAAC,qCAAqC;2CACxC;AAKjB;IAHC,UAAU,EAAE;IACZ,UAAU,EAAE;IACZ,IAAI,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC;4CACA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Product.dto.d.ts","sourceRoot":"","sources":["../../../src/dto/products/Product.dto.ts"],"names":[],"mappings":"AAUA,qBAAa,UAAU;IAgBrB,MAAM,EAAE,MAAM,CAAC;IAIf,IAAI,EAAE,MAAM,CAAC;IAKb,WAAW,EAAE,MAAM,CAAC;IAMpB,MAAM,EAAE,MAAM,CAAC;IAef,UAAU,EAAE,OAAO,CAAC;IAUpB,WAAW,EAAE,OAAO,CAAC;IAUrB,UAAU,EAAE,OAAO,CAAC;CACrB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Product.dto.js","sourceRoot":"","sources":["../../../src/dto/products/Product.dto.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EACL,SAAS,EACT,QAAQ,EACR,UAAU,EACV,UAAU,EACV,QAAQ,GACT,MAAM,iBAAiB,CAAC;AAEzB,MAAM,OAAO,UAAU;IACrB;;OAEG;IACH,gBAAgB;IAChB,gBAAgB;IAChB,4DAA4D;IAC5D,qFAAqF;IAErF,gBAAgB;IAChB,gBAAgB;IAChB,sBAAsB;IACtB,sBAAsB;IAItB,MAAM,CAAS;IAIf,IAAI,CAAS;IAKb,WAAW,CAAS;IAMpB,AADA,sBAAsB;IACtB,MAAM,CAAS;IAEf,cAAc;IACd,gBAAgB;IAChB,sBAAsB;IACtB,wBAAwB;IAUxB,UAAU,CAAU;IAUpB,WAAW,CAAU;IAUrB,UAAU,CAAU;CACrB;AAnDC;IAFC,WAAW,EAAE;IACb,QAAQ,EAAE;0CACI;AAIf;IAFC,WAAW,EAAE;IACb,QAAQ,EAAE;wCACE;AAKb;IAHC,WAAW,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;IAChC,UAAU,EAAE;IACZ,QAAQ,EAAE;+CACS;AAMpB;IAJC,WAAW,EAAE;IACb,QAAQ,EAAE;IACV,UAAU,EAAE;IACb,sBAAsB;0CACP;AAef;IARC,WAAW,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;IAChC,UAAU,EAAE;IACZ,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;8CACkB;AAUpB;IARC,WAAW,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;IAChC,UAAU,EAAE;IACZ,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;+CACmB;AAUrB;IARC,WAAW,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;IAChC,UAAU,EAAE;IACZ,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;8CACkB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"update-product.dto.d.ts","sourceRoot":"","sources":["../../../src/dto/products/update-product.dto.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;;AAG9C,qBAAa,gBAAiB,SAAQ,qBAAuB;IAM3D,EAAE,EAAE,MAAM,CAAC;CACZ"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"update-product.dto.js","sourceRoot":"","sources":["../../../src/dto/products/update-product.dto.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AACvD,6GAA6G;AAC7G,MAAM,OAAO,gBAAiB,SAAQ,WAAW,CAAC,UAAU,CAAC;IAC3D;yCACqC;IAIrC,EAAE,CAAS;CACZ;AADC;IAHC,WAAW,EAAE;IACb,QAAQ,EAAE;IACV,UAAU,EAAE;4CACF"}
|
|
File without changes
|
|
File without changes
|