@merkaly/api 0.2.2-4 → 0.2.2-5

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,8 +1,9 @@
1
- import { Document, Types } from 'mongoose';
2
- export declare type ObjectRef<T> = T | Types.ObjectId;
1
+ import { Document } from 'mongoose';
2
+ export declare type ObjectRef<T> = T;
3
3
  export declare abstract class AppEntity extends Document {
4
4
  static $index: string;
5
+ readonly _id: string;
5
6
  readonly createdAt: Date;
6
- updatedAt?: Date;
7
- deletedAt?: Date;
7
+ readonly updatedAt?: Date;
8
+ readonly deletedAt?: Date;
8
9
  }
@@ -1,4 +1,4 @@
1
- import { AppEntity, ObjectRef } from '../../../configs/app.entity';
1
+ import { AppEntity } from '../../../configs/app.entity';
2
2
  import { AssetEntity } from '../../assets/asset.entity';
3
3
  import { BrandEntity } from '../brands/brand.entity';
4
4
  import { CategoryEntity } from '../categories/category.entity';
@@ -7,7 +7,7 @@ export declare class ProductEntity extends AppEntity {
7
7
  name: string;
8
8
  description: string;
9
9
  price: number;
10
- category?: ObjectRef<CategoryEntity>;
11
- brand?: ObjectRef<BrandEntity>;
10
+ category?: CategoryEntity;
11
+ brand?: BrandEntity;
12
12
  files: AssetEntity[];
13
13
  }
@@ -1,8 +1,12 @@
1
- import { AppEntity } from '../../../configs/app.entity';
2
- import { AddItemValidator } from './cart.validator';
1
+ import { AppEntity, ObjectRef } from '../../../configs/app.entity';
2
+ import { ProductEntity } from '../../inventory/products/product.entity';
3
+ export declare class CartItemEntity extends AppEntity {
4
+ quantity: number;
5
+ product: ObjectRef<ProductEntity>;
6
+ }
3
7
  export declare class CartEntity extends AppEntity {
4
8
  static readonly $index = "store_carts";
5
9
  user: string;
6
10
  number: string;
7
- items: AddItemValidator[];
11
+ items: CartItemEntity[];
8
12
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@merkaly/api",
3
- "version": "0.2.2-4",
3
+ "version": "0.2.2-5",
4
4
  "description": "NestJS Backend ApiRest Service",
5
5
  "repository": {
6
6
  "type": "git",
@@ -34,7 +34,6 @@
34
34
  "@types/auth0": "^2.35.2",
35
35
  "class-transformer": "^0.5.1",
36
36
  "class-validator": "^0.13.1",
37
- "mongoose": "^6.5.1",
38
37
  "reflect-metadata": "^0.1.13",
39
38
  "short-uuid": "^4.2.0"
40
39
  },
@@ -73,6 +72,7 @@
73
72
  "faker": "^5.5.3",
74
73
  "husky": "^8.0.1",
75
74
  "jest": "27.5.1",
75
+ "mongoose": "^6.5.1",
76
76
  "nestjs-console": "^8.0.0",
77
77
  "passport": "^0.6.0",
78
78
  "passport-jwt": "^4.0.0",