@renzosanchez1357/libreria-compartida-microservicios01 1.0.8 → 1.0.10

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.
@@ -0,0 +1,9 @@
1
+ import { EstadoOrden } from "../../enum/order.enum";
2
+ export declare class CreateOrderDto {
3
+ precio_total: number;
4
+ items_totales: number;
5
+ direccion_envio: String;
6
+ estado: EstadoOrden;
7
+ pagado: Boolean;
8
+ }
9
+ //# sourceMappingURL=create-order.dto.d.ts.map
@@ -0,0 +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,uBAAuB,CAAC;AAEpD,qBAAa,cAAc;IAGzB,YAAY,EAAE,MAAM,CAAC;IAIrB,aAAa,EAAE,MAAM,CAAC;IAItB,eAAe,EAAE,MAAM,CAAC;IAYxB,MAAM,EAAE,WAAW,CAAyB;IAQ5C,MAAM,EAAE,OAAO,CAAS;CACzB"}
@@ -0,0 +1,51 @@
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 { IsBoolean, IsEnum, IsNumber, IsOptional, IsPositive, IsString, } from "class-validator";
8
+ import { Transform } from "class-transformer";
9
+ import { EstadoOrden } from "../../enum/order.enum";
10
+ export class CreateOrderDto {
11
+ precio_total;
12
+ items_totales;
13
+ //? Arreglar direccion
14
+ direccion_envio;
15
+ // direccion_calle String
16
+ // direccion_numero Int
17
+ // direccion_codigopostal Int
18
+ // direccion_ciudad String
19
+ // direccion_provincia String
20
+ // direccion_pais String
21
+ estado = EstadoOrden.PENDIENTE;
22
+ pagado = false;
23
+ }
24
+ __decorate([
25
+ IsNumber(),
26
+ IsPositive()
27
+ ], CreateOrderDto.prototype, "precio_total", void 0);
28
+ __decorate([
29
+ IsNumber(),
30
+ IsPositive()
31
+ ], CreateOrderDto.prototype, "items_totales", void 0);
32
+ __decorate([
33
+ IsString()
34
+ ], CreateOrderDto.prototype, "direccion_envio", void 0);
35
+ __decorate([
36
+ IsEnum(EstadoOrden, {
37
+ message: `Possible status values are ${EstadoOrden}`,
38
+ }),
39
+ IsOptional()
40
+ ], CreateOrderDto.prototype, "estado", void 0);
41
+ __decorate([
42
+ IsBoolean(),
43
+ Transform(({ value }) => {
44
+ if (value === "true")
45
+ return true;
46
+ if (value === "false")
47
+ return false;
48
+ return value;
49
+ })
50
+ ], CreateOrderDto.prototype, "pagado", void 0);
51
+ //# sourceMappingURL=create-order.dto.js.map
@@ -0,0 +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,uBAAuB,CAAC;AAEpD,MAAM,OAAO,cAAc;IAGzB,YAAY,CAAS;IAIrB,aAAa,CAAS;IAEtB,sBAAsB;IAEtB,eAAe,CAAS;IACxB,gCAAgC;IAChC,6BAA6B;IAC7B,6BAA6B;IAC7B,gCAAgC;IAChC,gCAAgC;IAChC,gCAAgC;IAMhC,MAAM,GAAgB,WAAW,CAAC,SAAS,CAAC;IAQ5C,MAAM,GAAY,KAAK,CAAC;CACzB;AA7BC;IAFC,QAAQ,EAAE;IACV,UAAU,EAAE;oDACQ;AAIrB;IAFC,QAAQ,EAAE;IACV,UAAU,EAAE;qDACS;AAItB;IADC,QAAQ,EAAE;uDACa;AAYxB;IAJC,MAAM,CAAC,WAAW,EAAE;QACnB,OAAO,EAAE,8BAA8B,WAAW,EAAE;KACrD,CAAC;IACD,UAAU,EAAE;8CAC+B;AAQ5C;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"}
@@ -1 +1 @@
1
- {"version":3,"file":"Product.dto.d.ts","sourceRoot":"","sources":["../../../src/dto/products/Product.dto.ts"],"names":[],"mappings":"AAGA,qBAAa,UAAU;IAarB,MAAM,EAAE,MAAM,CAAC;IAIf,IAAI,EAAE,MAAM,CAAC;IAIb,WAAW,EAAE,MAAM,CAAC;IAKpB,MAAM,EAAE,MAAM,CAAC;IAKf,YAAY,EAAE,MAAM,CAAC;IASrB,UAAU,EAAE,OAAO,CAAC;IASpB,WAAW,EAAE,OAAO,CAAC;IASrB,UAAU,EAAE,OAAO,CAAC;CACrB"}
1
+ {"version":3,"file":"Product.dto.d.ts","sourceRoot":"","sources":["../../../src/dto/products/Product.dto.ts"],"names":[],"mappings":"AAGA,qBAAa,UAAU;IAgBrB,MAAM,EAAE,MAAM,CAAC;IAIf,IAAI,EAAE,MAAM,CAAC;IAIb,WAAW,EAAE,MAAM,CAAC;IAKpB,MAAM,EAAE,MAAM,CAAC;IAKf,YAAY,EAAE,MAAM,CAAC;IASrB,UAAU,EAAE,OAAO,CAAC;IASpB,WAAW,EAAE,OAAO,CAAC;IASrB,UAAU,EAAE,OAAO,CAAC;CACrB"}
@@ -7,6 +7,9 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
7
7
  import { Transform, Type } from "class-transformer";
8
8
  import { IsBoolean, IsOptional, IsPositive } from "class-validator";
9
9
  export class ProductDto {
10
+ /*
11
+ * Paginaciones
12
+ */
10
13
  // @IsPositive()
11
14
  // @IsOptional()
12
15
  // @Type(() => Number) // transformer: lo convierte a numero
@@ -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,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAEpE,MAAM,OAAO,UAAU;IACrB,gBAAgB;IAChB,gBAAgB;IAChB,4DAA4D;IAC5D,qFAAqF;IAErF,gBAAgB;IAChB,gBAAgB;IAChB,sBAAsB;IACtB,sBAAsB;IAItB,MAAM,CAAS;IAIf,IAAI,CAAS;IAIb,WAAW,CAAS;IAKpB,MAAM,CAAS;IAKf,YAAY,CAAS;IASrB,UAAU,CAAU;IASpB,WAAW,CAAU;IASrB,UAAU,CAAU;CACrB;AA9CC;IAFC,UAAU,EAAE;IACZ,IAAI,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC;0CACJ;AAIf;IAFC,UAAU,EAAE;IACZ,IAAI,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC;wCACN;AAIb;IAFC,UAAU,EAAE;IACZ,IAAI,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC;+CACC;AAKpB;IAHC,UAAU,EAAE;IACZ,UAAU,EAAE;IACZ,IAAI,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC;0CACJ;AAKf;IAHC,UAAU,EAAE;IACZ,UAAU,EAAE;IACZ,IAAI,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC;gDACE;AASrB;IAPC,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;AASpB;IAPC,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;AASrB;IAPC,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
+ {"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,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAEpE,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;IAIb,WAAW,CAAS;IAKpB,MAAM,CAAS;IAKf,YAAY,CAAS;IASrB,UAAU,CAAU;IASpB,WAAW,CAAU;IASrB,UAAU,CAAU;CACrB;AA9CC;IAFC,UAAU,EAAE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TREGADO = 1,
4
+ CANCELADO = 2
5
+ }
6
+ //# sourceMappingURL=order.enum.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"order.enum.d.ts","sourceRoot":"","sources":["../../src/enum/order.enum.ts"],"names":[],"mappings":"AAAA,oBAAY,WAAW;IACrB,SAAS,IAAA;IACT,SAAS,IAAA;IACT,SAAS,IAAA;CACV"}
@@ -0,0 +1,7 @@
1
+ export var EstadoOrden;
2
+ (function (EstadoOrden) {
3
+ EstadoOrden[EstadoOrden["PENDIENTE"] = 0] = "PENDIENTE";
4
+ EstadoOrden[EstadoOrden["ENTREGADO"] = 1] = "ENTREGADO";
5
+ EstadoOrden[EstadoOrden["CANCELADO"] = 2] = "CANCELADO";
6
+ })(EstadoOrden || (EstadoOrden = {}));
7
+ //# sourceMappingURL=order.enum.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"order.enum.js","sourceRoot":"","sources":["../../src/enum/order.enum.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,WAIX;AAJD,WAAY,WAAW;IACrB,uDAAS,CAAA;IACT,uDAAS,CAAA;IACT,uDAAS,CAAA;AACX,CAAC,EAJW,WAAW,KAAX,WAAW,QAItB"}
package/dist/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
- export * from "./dto/products/Product.dto";
2
- export * from "./dto/products/update-product.dto";
1
+ export * from "./dto/products/Product.dto.js";
2
+ export * from "./dto/products/update-product.dto.js";
3
+ export * from "./dto/orders/create-order.dto.js";
3
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC;AAC3C,cAAc,mCAAmC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,+BAA+B,CAAC;AAC9C,cAAc,sCAAsC,CAAC;AAGrD,cAAc,kCAAkC,CAAC"}
package/dist/index.js CHANGED
@@ -1,3 +1,11 @@
1
- export * from "./dto/products/Product.dto";
2
- export * from "./dto/products/update-product.dto";
1
+ // Products
2
+ export * from "./dto/products/Product.dto.js";
3
+ export * from "./dto/products/update-product.dto.js";
4
+ // Orders
5
+ export * from "./dto/orders/create-order.dto.js";
6
+ /*
7
+ Al poner "verbatimModuleSyntax": false, desabilito las extensiones de ".js",
8
+ sin embargo, nodejs (de mis projectos), usa ESM(ECMAScript), que requiere explicitamente
9
+ que se utilizen las extensiones al hacer los importes
10
+ */
3
11
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC;AAC3C,cAAc,mCAAmC,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,WAAW;AACX,cAAc,+BAA+B,CAAC;AAC9C,cAAc,sCAAsC,CAAC;AAErD,SAAS;AACT,cAAc,kCAAkC,CAAC;AAEjD;;;;EAIE"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@renzosanchez1357/libreria-compartida-microservicios01",
3
- "version": "1.0.8",
3
+ "version": "1.0.10",
4
4
  "description": "Libreria compartida, para DTOS, y validacion",
5
5
  "main": "dist/index.js",
6
6
  "types": "module",