@tabletennisshop/common 1.0.55 → 1.0.57

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.
@@ -3,6 +3,7 @@ interface UserPayload {
3
3
  username: string;
4
4
  email: string;
5
5
  type: string;
6
+ _id: string;
6
7
  }
7
8
  declare global {
8
9
  namespace Express {
@@ -5,6 +5,7 @@ export interface IInventory {
5
5
  serials?: string[];
6
6
  }
7
7
  interface InventoryDoc extends IInventory, Document {
8
+ _id: Types.ObjectId;
8
9
  createdAt: Date;
9
10
  updatedAt: Date;
10
11
  }
@@ -16,6 +16,7 @@ export interface OrderAttrs {
16
16
  payment_method: PaymentMethodEnum;
17
17
  }
18
18
  export interface OrderDoc extends Document {
19
+ _id: Types.ObjectId;
19
20
  user_id: Types.ObjectId;
20
21
  products: IOrderProduct[];
21
22
  status: OrderStatusEnum;
@@ -1,4 +1,4 @@
1
- import mongoose, { Document } from 'mongoose';
1
+ import mongoose, { Document, Types } from 'mongoose';
2
2
  import { ProductTypeEnum } from '../enums/product-type.enum';
3
3
  import { ProductStatusEnum } from '../enums/product-status.enum';
4
4
  export interface ProductAttrsBase {
@@ -13,6 +13,7 @@ export interface ProductAttrsBase {
13
13
  status: ProductStatusEnum;
14
14
  }
15
15
  export interface ProductDoc extends Document {
16
+ _id: Types.ObjectId;
16
17
  name: string;
17
18
  slug: string;
18
19
  brand: string;
@@ -26,7 +27,7 @@ export interface ProductDoc extends Document {
26
27
  updatedAt: Date;
27
28
  }
28
29
  export declare const ProductModel: mongoose.Model<ProductDoc, {}, {}, {}, mongoose.Document<unknown, {}, ProductDoc, {}> & ProductDoc & Required<{
29
- _id: unknown;
30
+ _id: Types.ObjectId;
30
31
  }> & {
31
32
  __v: number;
32
33
  }, any>;
@@ -6,6 +6,7 @@ export interface IRatingAttrs {
6
6
  rate_score: number;
7
7
  }
8
8
  interface RatingDoc extends IRatingAttrs, Document {
9
+ _id: Types.ObjectId;
9
10
  createdAt: Date;
10
11
  updatedAt: Date;
11
12
  }
@@ -1,4 +1,4 @@
1
- import { Model, Document } from 'mongoose';
1
+ import { Model, Document, Types } from 'mongoose';
2
2
  import { UserStatusEnum } from '../enums/user-status.enum';
3
3
  export interface UserAttrs {
4
4
  username: string;
@@ -10,6 +10,7 @@ export interface UserAttrs {
10
10
  status: UserStatusEnum;
11
11
  }
12
12
  interface UserDoc extends Document {
13
+ _id: Types.ObjectId;
13
14
  username: string;
14
15
  email: string;
15
16
  password: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tabletennisshop/common",
3
- "version": "1.0.55",
3
+ "version": "1.0.57",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "build/index.d.ts",